Re: ContainerManagedTransactionStrategy
This should be used with a JTA datasource and the call to the repository typically goes through an EJB starting the transaction. Do you have some more context to the error? On Fri, Oct 3, 2014 at 4:58 PM, hwaastad he...@waastad.org wrote: Hi, i was wondering if there is any doc on the usage of ContainerManagedTransactionStrategy? I've been trying to add this in beans.xml, but I only get a: javax.persistence.PersistenceException: java.lang.NullPointerException at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getIdentifier(EntityManagerFactoryDelegate.java:719) at org.apache.deltaspike.data.impl.handler.CdiQueryInvocationContext.isNew(CdiQueryInvocationContext.java:93) . . . Caused by: java.lang.NullPointerException at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getIdentifier(EntityManagerFactoryImpl.java:85) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getIdentifier(EntityManagerFactoryDelegate.java:715) br hw -- View this message in context: http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/ContainerManagedTransactionStrategy-tp4659084.html Sent from the Apache DeltaSpike Incubator Discussions mailing list archive at Nabble.com.
Re: ContainerManagedTransactionStrategy
Hi TH, and thanks for answering. I'm running JTA datasource and running repository within an EJB transaction. However, what I found out is that I need the entoitymanagerconfig with resolver or else this error occurs. I've made a simple test project (https://github.com/hwaastad/TomeeDsValidation.git) So if you remove the @EntityManagerConfig(entityManagerResolver = CrmEntityManagerResolver.class,flushMode = FlushModeType.COMMIT) Then this error will occure. Any idea why? br hw -- View this message in context: http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/ContainerManagedTransactionStrategy-tp4659084p4659102.html Sent from the Apache DeltaSpike Incubator Discussions mailing list archive at Nabble.com.
Re: ContainerManagedTransactionStrategy
I use TomEE with Eclipselink and have no issues. I do not recognize nor use the eclipselink properties you have in persistence.xml. Otherwise we have very similar configuration. On 5 October 2014 16:58, hwaastad he...@waastad.org wrote: Hi TH, and thanks for answering. I'm running JTA datasource and running repository within an EJB transaction. However, what I found out is that I need the entoitymanagerconfig with resolver or else this error occurs. I've made a simple test project (https://github.com/hwaastad/TomeeDsValidation.git) So if you remove the @EntityManagerConfig(entityManagerResolver = CrmEntityManagerResolver.class,flushMode = FlushModeType.COMMIT) Then this error will occure. Any idea why? br hw -- View this message in context: http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/ContainerManagedTransactionStrategy-tp4659084p4659102.html Sent from the Apache DeltaSpike Incubator Discussions mailing list archive at Nabble.com.