Class WebJETJavaSECMPInitializer

java.lang.Object
org.eclipse.persistence.internal.jpa.deployment.JPAInitializer
org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializer
sk.iway.iwcm.system.jpa.WebJETJavaSECMPInitializer

public class WebJETJavaSECMPInitializer extends org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializer
WebJETJavaSECMPInitializer.java Subclassed in order to override reading metadata from persistence.xml and use datasources specified in poolman.xml
  • Field Details

  • Constructor Details

    • WebJETJavaSECMPInitializer

      protected WebJETJavaSECMPInitializer()
    • WebJETJavaSECMPInitializer

      protected WebJETJavaSECMPInitializer(ClassLoader loader)
  • Method Details

    • getJavaSECMPInitializer

      public static WebJETJavaSECMPInitializer getJavaSECMPInitializer()
      Get the singleton entityContainer.
    • getJavaSECMPInitializer

      public static WebJETJavaSECMPInitializer getJavaSECMPInitializer(ClassLoader loader)
    • getJavaSECMPInitializerFromAgent

      public static WebJETJavaSECMPInitializer getJavaSECMPInitializerFromAgent()
    • getJavaSECMPInitializerFromMain

      public static WebJETJavaSECMPInitializer getJavaSECMPInitializerFromMain(Map m)
    • getJavaSECMPInitializer

      public static WebJETJavaSECMPInitializer getJavaSECMPInitializer(ClassLoader classLoader, Map m, boolean fromAgent)
    • initialize

      public void initialize(Map m)
      This method initializes the container. Essentially, it will try to load the class that contains the list of entities and reflectively call the method that contains that list. It will then initialize the container with that list.
      Overrides:
      initialize in class org.eclipse.persistence.internal.jpa.deployment.JPAInitializer
    • initPersistenceUnits

      protected void initPersistenceUnits(org.eclipse.persistence.jpa.Archive archive, Map m)
      Initialize persistence units. Initialization is a two phase process. First the predeploy process builds the metadata and creates any required transformers. This is WebJET specific version, any metadata from persistence.xml is abandoned. Instead, a new SEPersistenceUnitInfo is created from metadata contained in poolman.xml. Only classes in specific packages with specific class name patterns are included to be scanned as managedClasses. Second the deploy process creates an EclipseLink session based on that metadata.
      Overrides:
      initPersistenceUnits in class org.eclipse.persistence.internal.jpa.deployment.JPAInitializer
    • setDefaultProperties

      public static void setDefaultProperties(Properties properties)