[jboss-user] [EJB 3.0] - EntityListener, EntityManager, and Threading
justinmiller
do-not-reply at jboss.com
Tue Nov 14 14:06:41 EST 2006
We have a situation where we have specified an @EntityListener with @Post* annotated methods for a set of entity beans (ejb3 pojo's that is). From the @Post* methods, we then pass the pojo to a MBean service where we know there is both threading and further database access occurring.
It is when the pojo is passed to the mbean that we are running into errors. A forum posting says that EntityManager methods may not be invoked in an @EntityListener - so that could be one cause of our errors. The other contributing factor could be the threading that is occurring in the MBean; the ejb spec prohibits spawning threads from an EJB.
Are we correct in one or both of these conjectures?
Is there a better and/or correct way to accomplish what we're trying to do?
The caveat with the post-handling is that we will take generic action based on the fact that we have an entity bean in our hands. We don't care about the actual declared type of the pojo, just that it is, in fact, an entity bean.
Thanks,
Justin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985916#3985916
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985916
More information about the jboss-user
mailing list