Difference between revisions of "EclipseLink/UserGuide/JPA/Advanced JPA Development/NoSQL/Transactions"
|Line 1:||Line 1:|
Latest revision as of 06:17, 17 April 2013
For current information, please see "Using EclipseLink with NoSQL Databases in the EclipseLink Solutions Guide: http://www.eclipse.org/eclipselink/documentation/latest/solutions/nonrelational_db.htm
|Mailing List • Forums • IRC|
The JPA transaction API is supported with NoSQL data-sources. Some NoSQL data-sources may not support transactions, so the level of transaction support is dependent on the NoSQL platform. JTA persistence units and transactions are also supported, but unless the NoSQL adapter is integrated with JTA, no XA or transaction support will be available.
If the NoSQL data-source does not support transactions, then any database change such as
flush() will be committed directly to the database, and
rollback() will not have any affect. A commit operation that fails will not roll back any successful changes written before the error. JPA normally does not write to the database until
flush() are called, so there will still be some level of transaction support offered by the persistence context.
remove() are supported.
MongoDB - Transactions are not supported.
Oracle NoSQL - Transactions are not supported.
Locking support is dependent on the NoSQL platform. Some NoSQL platforms may offer support for optimistic version locking. Even if the NoSQL platform does not support locking an
@Version can still be used, and will at a minimum still be validated on
MongoDB - Version locking is supported. Note that when a lock error occurs any previous successful writes will not be rolledback as transactions are not supported.
Oracle NoSQL - Locking is not supported.