I have a business service which registers a user. The service method doesn't have a return value so the @Publisher annotation is out of the question. What I need to do is to publish an event with the user object to a JMS topic for further processing.
I would like to add a line in my service method akin to the following:
...And have Spring Integration transform my user to a message and send it off to JMS.Code:outputChannel.send(user)
Here's my integration config thus far:
I don't think setting up my Spring Integration objects are a problem. It's really a question of how do I inject some Spring Integration component into my existing service to publish? I haven't seen any examples where Java Code actually kicks off the publishing and I searched the Reference Doc and read Maning's MEAP Spring Integration in Action.Code:<jee:jndi-lookup id="cf" jndi-name="jms/cf" expected-type="javax.jms.ConnectionFactory" /> <jms:publish-subscribe-channel id="completedUserRegistrations" connection-factory="cf" topic-name="mytopic" />


Reply With Quote
