Entity Manager Transaction Contexts

You can initiate an transaction context by initialising the entity manager instance. an entity manager is a single transaction to the underlying data store. So whatever you do within a single entity manager instance stays within the instance. Although, you can set configuration settings to override this default behaviour.

You cannot start a transaction in one entity manager, and commits/rollsback the transaction in another. Here is a simple example of transactional contexts.

Last edited Mar 1, 2011 at 10:59 AM by ahmedsalako, version 1


No comments yet.