[Messaging, JMS & JBossMQ] - Sending Entities in Messages?
by SmokingAPipe
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
19 years, 4 months
[EJB 3.0] - EJB3 and Derby Problems
by enazareno
Hi,
I don't know if this is the right post for this question or if this issue has already been answered. I've just been working with hibernate persistence using embedded Derby and MySQL. In derby, when a table is created, it does not include indexes and unique constraints. so @Column( unique=true ) does not work and so does @uniqueConstraint. I've tested the same entity using MySQL and it does so perfectly.
Is embedded derby not yet fully supported by hibernate? I've plan to include persistence in client side and any changes I would do to the entity would be automatically recreated in the client without manual intervention, i.e. including indexes. If this has been answered, pls. redirect me to the posts. Thanks.
Regards,
Elmo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995984#3995984
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995984
19 years, 4 months