tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: CMP2 enitity get is making update query in Linux environment
Date Tue, 28 Feb 2017 17:52:48 GMT
can you check why it is true on one side and false on the other? is one
having the lazy persistence unit flag somehow and not the other?


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-02-28 12:44 GMT+01:00 seenu.atluri <seenu.atluri@gmail.com>:

> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message