Jul 29th, 2010, 08:56 AM
Suggestions for Asynchronous Behavior
I am working on a project to integrate two systems using Spring-WS. Part of the interface involves triggering a web service call from within the database. This call just lets the app server know there is information ready for processing. I would like this service to return as fast as possible as to not waste resources on the db server.
I'm thinking the best way to do this is have the first service make some sort of asynchronous call to a second one that does the heavy-weight processing, but I'm not sure how to go about this. Right now I'm using HTTP as the transport, but from what I've read so far it appears I may have to use JMS. I'd like to avoid adding another component to the architecture at this point, so I'm looking other suggestions to achieve what I'm looking for.
Thanks for any ideas, I'm kind of stuck at the moment.
Aug 9th, 2010, 04:48 PM
If you are using Spring 3, you can check out the @Async annotation. You can probably use that to create a very lightweight HTTP web service that kicks off whatever job you need.
Else you if you really don't want JMS you can mock a queue using database table or something.
Aug 11th, 2010, 08:26 AM
Thanks, I read the documentation on the @Async annontation and it appears to be exactly what I need. Unfortunately, I'm currently using Spring Core 2.5.6 with Spring-WS 1.5.9. I know switching versions mid-project may not be the best idea, but I've got some room in my schedule so I may consider it.
I'm going to read through the upgrade guide and see if its plausable because it appears I will gain a lot from it. Any thoughts, suggestions or warnings that may assisit in getting this done seamlessly?
Tags for this Thread