I'll start this note by stating that I have very little experience with Spring....
To get something quickly working with Spring, I started with the Liberty/Spring/EclipseLink sample from WASdev[1]. I did a bit of butchering of the application because it uses a packaged version of EclipseLink rather than the EclipseLink version that has been a part of our betas. The pu is defined as JTA , has a jta-data-source defined, and it declares the target-server (this sample was created prior to target-server detection) as WebSphere_Liberty. The application uses Persistence.createEntityManagerFactory(..) to get EMFs and it uses UserTransaction.begin/join/commit for transactions.
I found that if I set the target-server property to None, the application fails when EclipseLink tries to get a JTA transaction. Then I tried to change the application to be RESOURCE_LOCAL, yet only define a jta-datasource and that fails when EclipseLink tries to get the non-jta-datasource, because it doesn't exist..
I'm not sure if this is helpful or interesting to anyone else on the list. I believe the net of this, is that we can't have just one Spring target-server.... and I don't know if making a Spring target server per true application server makes much sense either though?
Thanks,
[2] Caused by: javax.persistence.TransactionRequiredException: joinTransaction has been called on a resource-local EntityManager which is unable to register for a JTA transaction.
at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionWrapper.registerIfRequired(EntityTransactionWrapper.java:91)