0 Replies Latest reply: Jun 6, 2013 11:34 PM by Michael OBrien RSS

    Cloud JPA EMF predeploy does not find unlisted entities - works locally

    Michael OBrien
      Cloud developers,
      I am seeing SE like behavior running a JTA persistence unit in the WAR - the Java EE 6 spec mandates EE container managed behavior - which is what I see running locally on my WebLogic OEPE server.
      On the Cloud WLS I require the following in persistence.xml - just like i am running a RESOURCE_LOCAL pu - but I am running a JTA EMF.

      <!-- not required on a standalone WLS server -->
      _<class>org.obrienlabs.opendatalink.model.Record</class>_
      _<class>org.obrienlabs.opendatalink.model.URISite</class>_
      <exclude-unlisted-classes>false</exclude-unlisted-classes>


      On a local WebLogic 12.1.1.0 server everything works fine and the predeploy of the persistence unit picks up the annotated @Entity/@MappedSuperclass classes fine - without specifying them - the standard for managed persistence units. It is almost like dynamic weaving is off on the cloud instance.

      Persistence.createEntityManagerFactory("JPAServletPU").getMetamodel().toString();

      See my custom Metamodel toString() in http://bugs.eclipse.org/266912 that can be used to verify the correct number of entities and other relational metadata is loaded.
      JPA Metamodel: MetamodelImpl@363169072 [ 7 Types: , 4 ManagedTypes: , 2 EntityTypes: , 2 MappedSuperclassTypes: , 0 EmbeddableTypes: ]

      My issue with the truncated version of WLS 12c running on the oracle cloud is that everything annotated does not seem to be picked up - only XML configuration seems to be working - or pre-instrumented weaved entities in the case of JPA.
      How can I get the EJB container to kick in a proper predeploy without resorting to static weaving.

      Is there a set of extended examples beyond the SDK that has verified EAR templates containing Web Profile and full EE 6 examples for deployment of EJB beans both in the ejb.jar and the war (I understand EJB 3.1 is removed from the the cloud instance). This could match the supported/unsupported list below.
      http://docs.oracle.com/cloud/CSJSU/feat_implement.htm#CEGBGCCE

      thank you
      /michael

      https://forums.oracle.com/forums/profile.jspa?userID=609861
      https://forums.oracle.com/forums/profile.jspa?userID=849227