|
From: Mark P. <Mar...@co...> - 2004-10-27 16:59:34
|
Hi, Great job! Going to try it out asap... - Mark > -----Original Message----- > From: spr...@li...=20 > [mailto:spr...@li...] > On Behalf Of jas...@ma... > Sent: Wednesday, October 27, 2004 5:23 AM > To: spr...@li... > Subject: [Springframework-developer] Spring MDB / Message Driven POJOs >=20 >=20 > This has been an ongoing area of research for some time - how=20 > best to =20 > do JMS consumption from inside Spring. After scratching my=20 > head for a =20 > while over the best way to do this; I figured, JCA is the=20 > answer, since =20 > it takes care of all the thorny issues behind doing proper consumer =20 > based JMS pooling and transaction handling, which is way more=20 > complex =20 > than you might imagine. The only downside of this approach is that =20 > folks often think JCA is really complex & fat & depends on a J2EE =20 > container which is not true. >=20 > As part of the ActiveMQ project we've written a small, Spring=20 > based & =20 > easily embedded JCA container. Its just a few classes and is easy to =20 > use on any project, just depending on Spring and the JCA APIs. >=20 > http://activemq.codehaus.org/JCA+Container >=20 > So we can now have all the features of MDB such as efficient JMS =20 > pooling, hooks to work with all the major JMS providers via=20 > their JCA =20 > Resource Adapters (*), proper transaction handling and pooling of =20 > message listeners - but all from within Spring. We get the added =20 > benefit that we get to use Spring's Dependency Injection to=20 > configure =20 > the message listeners properly - plus we can easily perform=20 > the dynamic =20 > creation of new subscriptions easily at runtime, rather than=20 > having to =20 > rely on a fixed & rigid XML deployment configuration like EJB. >=20 > So now we've 'message driven pojos' in Spring! :) >=20 > To give you an idea of how simple it is, here's a sample... >=20 > http://cvs.activemq.codehaus.org/viewrep/activemq/activemq/modules/=20 > container/src/test/org/codehaus/activemq/jca/spring.xml?r=3DHEAD >=20 > There's more detailed documentation on the above page if you need it. >=20 >=20 > (*) to help work with other JMS providers which don't yet=20 > provide a JCA =20 > ResourceAdapter, which they really should if they want to integrate =20 > well with other J2EE containers, we could enhance ActiveMQ's =20 > ResourceAdapter to work with foreign JMS providers. >=20 > James > ------- > http://radio.weblogs.com/0112098/ >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: > Sybase ASE Linux Express Edition - download now for FREE=20 > LinuxWorld Reader's Choice Award Winner for best database on=20 > Linux. http://ads.osdn.com/?ad_id=3D5588&alloc_id=3D12065&op=3Dclick > _______________________________________________ > Springframework-developer mailing list=20 > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 >=20 |