Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-2834

Performance issue while deploying in Wildfly EAP with OpenJPA-3.1.1

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.1
    • 3.2.0
    • jpa
    • None
    • Linux OS
      Oracle DB

    Description

      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 
      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 

      They have also shared link for Jira of JBOSS 
      https://issues.redhat.com/browse/WFLY-7075

       

      I am attaching Project and logs for reference. 

       

       

      Attachments

        1. redHatRecommendation.txt
          2 kB
          Vishal
        2. OneDrive_2020-09-18.zip
          22.56 MB
          Vishal
        3. jpa.log
          6.11 MB
          Vishal
        4. image-2020-10-06-13-34-07-912.png
          13 kB
          Vishal

        Activity

          People

            romain.manni-bucau Romain Manni-Bucau
            vishalduke Vishal
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: