Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] EclipseLink data-source usage

The described scenario is default one (exclusive connection is not).
When nothing has been written yet inside transaction find by pk is done in L2 cache first, if not found there - in the db, but through reading connection (and result merged into L2 cache).

On 10/7/2014 10:13 AM, Rick Curtis wrote:
I have been doing some testing on EclipseLink around datasource usage (jta vs non-jta) and there is a scenario that I don't quite understand. 

It scenario involves a SLSB method that has @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW). I found that if inside of that method I do a number of em.find(..) operations, each operation gets a new (non-jta) connection. If I start the method with an em.persist(...);em.flush(); followed by a number of em.find(...) operations all of follow on em.find(...) calls use the one connection(jta). From what the documentation states (eclipselink.jdbc.exclusive-connection.mode), the default EclipseLink behavior is to send all reads/writes through an exclusive connection when running inside of a transaction. What am I missing?

Are there any best practices around the use of jta/non-jta datasources when using a JTA EntityManager?

Thanks,
Rick

--
Rick Curtis


_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top