|
From: Daniel P. <po...@ci...> - 2004-02-26 13:40:46
|
I've written some simple Spring support for JMS (queues-only) in the application I'm currently working on, so I'd be very interested to see Andre's work and provide feedback. I wrote a JmsQueueTemplate class with operations for sending and consuming messages from a queue. The template class has Queue and QueueConnection member variables, so you define one template bean per queue. The template class has various convenience methods for sending simple text and object messages, but also uses a message "preparator" (wouldn't "preparer" be more accurate?) class that callers can use to prepare more complicated messages (very similar to Spring's existing mail support). The template class takes care of creating the message object, then invokes the callback on the preparator class to allow the caller to modify the message as required. Of course, the template takes care of JMS-specific exceptions and translates them to Spring-specific runtime exceptions. It also hides the details of working with Queue, QueueConnection, QueueConnectionFactory classes (in fact, we use a custom QueueConnectionFactoryBean to create QueueConnections for the template beans, so the template only has to work with Queue and QueueConnection objects). I also added support for synchronous retrieval of messages, but I'm not as happy with the solution I came up with for that, so I'm quite interested to see how Andre plans to deal with it. Daniel On Thu, Feb 26, 2004 at 06:35:33AM +0000, Rod Johnson wrote: > Rong >=20 > JMS support is in the works, and should make 1.1. >=20 > Andre Biryukov is currently working on this, and should be joining the > Spring team soon. >=20 > Andre, if you want to share your work in progress with the Spring dev list > (or with Rong directly), now would be a good time :-) >=20 > Regards, > Rod >=20 > ----- Original Message ----- > From: "Ou, Rong" <Ro...@sa...> > To: <spr...@li...> > Sent: Tuesday, February 24, 2004 9:44 PM > Subject: [Springframework-developer] JMS brainstorming >=20 >=20 > Hi all, >=20 > We currently have a project that does a lot of JMS messaging, and we > desperately need an API to simplify the interface layer to JMS. I heard > rumors that JMS support will be added to Spring 1.1, but we just can't wa= it > that long. So I am thinking about doing something in the interim. Who kno= ws, > if it comes out good, maybe I can contribute the code back. >=20 > In Rod's book there is only a couple of pages that briefly touches upon J= MS. > I looked at the interface21 code, the JMS portion is also pretty simplist= ic. > I understand Spring has evolved a lot since the interface21 days. So to a= ll > you experienced Spring'ers, if you were to add JMS support today, what wo= uld > you do? I am still fairly new to Spring, so any suggestions and help are > welcome. >=20 > Thanks, >=20 > Rong >=20 >=20 > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=1356&alloc_id438&op=3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=3D1356&alloc_id=3D3438&op=3Dclick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |