Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] EM.clear() within a transaction and out of any transaction

As far as committing objects to the data base is concerned, the comment to the method states:
/**
* Clear the persistence context, causing all managed
* entities to become detached. Changes made to entities that
* have not been flushed to the database will not be
* persisted.
*/

Another aspect is shared cache, which Eclipselink uses.
Calling clear in transaction means some objects may have been flushed to the data base, but won't be merged into the shared cache.

http://www.eclipse.org/eclipselink/api/1.1/org/eclipse/persistence/config/FlushClearCache.html describes the options.

On 7/25/2012 8:21 AM, Michael Simons wrote:
Hello,

is there a difference between calling em.clear() within a transaction or out of any TX?


mit freundlichen Grüßen,
Michael Simons

OPTITOOL GmbH
Im Gewerbepark D85
93059 Regensburg

www.optitool.de

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top