[jboss-user] [EJB 3.0] - Re: How to know when entity is removed?

ALRubinger do-not-reply at jboss.com
Tue Sep 5 10:58:43 EDT 2006


Hmm...never tried throwing an EntityManager into an entity itself - probably not the best practice.  I don't remember reading anything prohibiting that injection...But why do you need it do send JMS?

First solution that occurs to me would be to separate your listeners from the entity using @EntityListener.  From that externalized class you can either send your JMS messages or delegate out to a Session bean to do it for you...

S,
ALR

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969489#3969489

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969489



More information about the jboss-user mailing list