[jboss-user] [Messaging, JMS & JBossMQ] - Sending Entities in Messages?
SmokingAPipe
do-not-reply at jboss.com
Fri Dec 22 23:03:32 EST 2006
I'm new to JMS so please forgive the basicness of this question:
I have an enterprise application, distributed as an EAR. It uses Seam and EJB3 for most of its work.
However, there is one Servlet on it which takes input and does some processing. At the end of its processing, it grabs an EntityManager and persists a new entity.
After that entity has been persisted, it needs to send that entity over to a message queue, where some other things are going to pick up the entity and do stuff with it. That way, the Servlet can finish off the HTTP request immediately, and the processessing (which can take a few minutes) will happen in the background.
So, here's the question: I can see an easy way to pass the entity ID within a message; I just use a MapMessage and put the integer right into it. Great. Then the MDB can use an entity manager to fetch that entity based on the entity ID. It seems like that would work fine.
But that also seems clunky. What's the best-practices way to send an entity bean from a Servlet to a MDB?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995986#3995986
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995986
More information about the jboss-user
mailing list