1 Reply Latest reply on Jun 13, 2016 6:04 AM by Tshegofatso Manakana

    EclipseLink static weaving not working

    Tshegofatso Manakana Newbie


      I have configured my project to support static weaving but lazy loading is not functioning.


      • Eclipse Mars
      • Maven 3.2.2
      • eclipselink-2.3.0
      • wildfly 10.0.0 - CLI managed
      • JPA 2.0
      • eclipselink-staticweave-maven-plugin:1.0.4


      Project stracture

      ear containing:

      • jar - Persistance layer. EJB as Service, Enttities (Annotated with fetch type lazy) persistance unit
      • war file JSF application as front end

      My problem is that: even after weaving seems to be successful (I decompiled classes and checked), my application continue to load child objects of Customer entitty eagerly (I see select statments in logs) and it hangs on the following statement:

      Client client = em.find(Client.class, clientId, LockModeType.PESSIMISTIC_WRITE);

      Does Lazy Loading not work with pessimistic write? Am I missing a JPA or EclipseLink concept here? Please assist.

      Here is my persitance.xml property settings:

        <property name="eclipselink.logging.level" value="FINE" />
        <property name="javax.persistance.lock.timeout" value="5000" />
        <property name="eclipselink.target-database" value="Oracle" />
        <property name="eclipselink.logging.level.sql" value="FINE" />
        <property name="eclipselink.logging.parameters" value="true" />
        <property name="eclipselink.deploy-on-startup" value="true" />
        <property name="eclipselink.target-server" value="JBoss" />
        <property name="eclipselink.weaving" value="static"/>