[jboss-user] [EJB 3.0] - Are EntityListener's part of the transaction...

mfishman do-not-reply at jboss.com
Mon Sep 11 11:38:34 EDT 2006


Hi,

I have some code where I have a EJB3 entity bean with an EntityListener on it.  In my post methods in the EntityListener (e.g. postPersist, postRemove, postUpdate) a handler attempts to serialize the entity bean and transfer it to a remote location.  During the deserialization at the remote location, I get a ClassCastException related to the org.hibernate.collection.PersistentBag class.    My assumption was that hibernate would not be involved at this point.  That the EntityListener methods would be executed after the transaction had completed and thus the entity would be detached and hence a standard POJO again.  Is this not true?  I tried to find anything about transactions and EntityListeners in the spec and I did not see anything one way or the other on the subject.  I am sorry if I am just missing it.

Thanks.

-- Mark

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

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



More information about the jboss-user mailing list