tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "seenu.atluri" <seenu.atl...@gmail.com>
Subject Re: CMP2 enitity get is making update query in Linux environment
Date Tue, 28 Feb 2017 11:44:54 GMT
Hi Romain,

I have fixed it, looks like an issue with openejb. addTransformer() in
PersistenceUnitInfoImpl class is being called only in my windows
environment, not in linux environment. Here is the call trace in  my windows
environment.

at
org.apache.openejb.persistence.PersistenceUnitInfoImpl.addTransformer(PersistenceUnitInfoImpl.java:337)
	at
org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:170)
	at
org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:63)
	at
org.apache.openejb.assembler.classic.EntityManagerFactoryCallable.call(EntityManagerFactoryCallable.java:64)
	at
org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate(ReloadableEntityManagerFactory.java:122)
	at
org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.<init>(ReloadableEntityManagerFactory.java:108)
	at
org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:157)
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:864)
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:717)
	at
org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:595)
	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:483)
	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:150)
	at org.apache.openejb.OpenEJB.init(OpenEJB.java:307)
	at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:247)

When I see why it is not being called in linux, here is the piece of code
causing issue in ReloadableEntityManagerFactory constructor. 

if (!callable.getUnitInfo().isLazilyInitialized()) {
            createDelegate();
}


isLazilyinitialized() is false in Windows, true in Linux. It is being
determined using "info.webappName != null" in PersistenceBuilder. As of now,
I removed if condition, it is working fine in Linux now. Is this bug, or can
you suggest some workaround for this?

Thanks & Regards,
Srinivas Atluri



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-Linux-environment-tp4681136p4681186.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Mime
View raw message