[jboss-user] [EJB 3.0] - Re: Entity bean state not rolled back on TX rollback:

jnorris10 do-not-reply at jboss.com
Sat Jul 15 12:27:40 EDT 2006

Just for any that are interested in this thread, here is what the spec says about this:

anonymous wrote : 
  | EJB3 Persistence Specification, page 54
  | 3.3.2 Transaction Rollback 
  | For both transaction-scoped and extended persistence contexts, transaction rollback causes all pre-existing managed instances and removed instances [15] to become detached. The instances? state will be the state of the instances at the point at which the transaction was rolledback. Transaction rollback typically causes the persistence context to be in an inconsistent state at the point of rollback.  Inparticular, the state of version attributes and generated state (e.g., generated primary keys) may be inconsistent. 
  | Instances that were formerly managed by the persistence context (including new instances that were made persistent in that transaction) may therefore not be reusable in the same manner as other detached 
  | objects?for example, they may fail when passed to the merge operation.[16] 
  | ...
  | [16] It is unspecified as to whether instances that were not persistent in the database behave as new instances or detached instances after rollback. This may be implementation-dependent.

I personally am curious why full blown @Entity property rollback isn't in the spec.  Perhaps in the big picture it's not as useful as I think it is.

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

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

More information about the jboss-user mailing list