[ 
https://issues.apache.org/jira/browse/OPENJPA-2834?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17205303#comment-17205303
 ] 

Vishal edited comment on OPENJPA-2834 at 10/1/20, 7:07 AM:
-----------------------------------------------------------

[^redHatRecommendation.txt]

^Hi Romain^

The issue still persist with 3.1.3 Jar after building as it is still taking 
more time to perform CRUD operation with EAP7.3.

+One observation on Fixed you have provided vs RED Hat recommendation+
*RED Hat recommendation* is openjpa code is creating a  new Entity Manger only 
to getProperties so we still seeing this in  class 
EntityManagerFactoryImpl.java on 122 line
 while getting getProperties() method.

 

*REDHAT Jira*  : the Jira that introduced the change that is responsible in the 
changed behavior of OpenJPA. As mentioned this was due to WFLY-7075 (see [1]).

 [https://issues.redhat.com/browse/WFLY-7075]

I have attached red hat recommendation with inline with comment.
 suggest us.

Regards

Vishal Duke


was (Author: vishalduke):
[^redHatRecommendation.txt]

^Hi Romain^

In code we saw it is still creating new Entity Manger of class 
EntityManagerFactoryImpl.java on 122 line
while getting getProperties() method

REDHAT : the Jira that introduced the change that is responsible in the changed 
behavior of OpenJPA. As mentioned this was due to WFLY-7075 (see [1]).

 [https://issues.redhat.com/browse/WFLY-7075]

I have attached red hat recommendation with inline with comment.
suggest us.

Regards

Vishal Duke

> Performance issue while deploying in Wildfly EAP with OpenJPA-3.1.1
> -------------------------------------------------------------------
>
>                 Key: OPENJPA-2834
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2834
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 3.1.1
>         Environment: Linux OS
> Oracle DB
>            Reporter: Vishal
>            Assignee: Romain Manni-Bucau
>            Priority: Major
>             Fix For: 3.1.3
>
>         Attachments: OneDrive_2020-09-18.zip, redHatRecommendation.txt
>
>
> Hi Team
> We are facing Performance issue with OpenJPA-3.1.1 when we deploy our 
> application in EAP 7.3 Server but similar issue is not replicated with  
> Wildfly-10.1.0 server with same version.
>  Below is reply from RED-HAT Team memeber we have received 
>  {color:#ff8b00}With the scope of WFLY-7075 (see [1]) the 
> 'TransactionScopedEntityManager' implementation got updated to throw an error 
> if a jta transaction already has an UNSYNCHRONIZED persistence context and a 
> SYNCHRONIZED persistence context is requested. For this the implementation is 
> using the 'EntityManagerFactory', see: ~~~ private static void 
> testForMixedSynchronizationTypes(EntityManagerFactory emf, EntityManager 
> entityManagerFromJTA, String scopedPuName, final SynchronizationType 
> targetSynchronizationType, Map targetProperties) \{ boolean 
> skipMixedSyncTypeChecking = 
> Configuration.skipMixedSynchronizationTypeCheck(emf, targetProperties); // 
> extension to allow skipping of check based on properties of target entity 
> manager boolean allowJoinedUnsyncPersistenceContext = 
> Configuration.allowJoinedUnsyncPersistenceContext(emf, targetProperties); // 
> extension to allow joined unsync persistence context to be treated as sync 
> persistence context ... } ~~~ Printing the stack in 
> 'EntityManagerFactoryImpl.' shows: 11698 ragedesign INFO [default task-1] 
> openjpa.Runtime - 
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.getProperties(EntityManagerFactoryImpl.java:125)
>  11698 ragedesign INFO [default task-1] openjpa.Runtime - 
> org.jboss.as.jpa.config.Configuration.skipMixedSynchronizationTypeCheck(Configuration.java:345)
>  So, the code above calls 'EntityManagerFactoryImpl.getProperties(...)' from 
> OpenJPA, see: ~~~ @Override public Map<String,Object> getProperties() \{ 
> Map<String,Object> props = _factory.getProperties(); // convert to user 
> readable values props.putAll(createEntityManager().getProperties()); return 
> props; } ~~~ As you can see this code is creating a new 'EntityManager' 
> (createEntityManager()) on every invocation just to get the Properties. As 
> mentioned in the beginning to resolve the issue for JBoss EAP 7.3 and Open 
> JPA, you would need to fix this in Open JPA {color}
> {color:#172b4d}They have also shared link for Jira of JBOSS 
>  [https://issues.redhat.com/browse/WFLY-7075]{color}
>  
> I am attaching Project and logs for reference. 
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to