Skip to main content

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

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

Back to the top