Interface ProviderContainerContractInfo

All Known Implementing Classes:
EmbeddedProviderContainerContractInfo, ProviderContainerContractInfoBase, ServerProviderContainerContractInfo

public interface ProviderContainerContractInfo
This encapsulates information needed to load or unload persistence units.
Author:
Mitesh Meswani
  • Field Details

    • DEFAULT_DS_NAME

      static final org.glassfish.api.naming.SimpleJndiName DEFAULT_DS_NAME
  • Method Details

    • getClassLoader

      ClassLoader getClassLoader()
      Returns:
      a class loader that is used to load persistence entities bundled in this application.
    • getTempClassloader

      ClassLoader getTempClassloader()
      Returns:
      a temp class loader that is used to load persistence entities bundled in this application.
    • addTransformer

      void addTransformer(jakarta.persistence.spi.ClassTransformer transformer)
      Adds ClassTransformer to underlying Application's classloader
    • getApplicationLocation

      String getApplicationLocation()
      Returns:
      absolute path of the location where application is exploded.
    • lookupDataSource

      DataSource lookupDataSource(org.glassfish.api.naming.SimpleJndiName dataSourceName) throws NamingException
      Looks up DataSource with JNDI name given by dataSourceName
      Parameters:
      dataSourceName -
      Returns:
      DataSource with JNDI name given by dataSourceName
      Throws:
      NamingException
    • lookupNonTxDataSource

      DataSource lookupNonTxDataSource(org.glassfish.api.naming.SimpleJndiName dataSourceName) throws NamingException
      Looks up Non transactional DataSource with JNDI name given by dataSourceName
      Parameters:
      dataSourceName -
      Returns:
      Non transactional DataSource with JNDI name given by dataSourceName
      Throws:
      NamingException
    • getValidatorFactory

      jakarta.validation.ValidatorFactory getValidatorFactory()
      get instance of ValidatorFactory for this environment
    • isJava2DBRequired

      boolean isJava2DBRequired()
      Will be called while loading an application.
      Returns:
      true if java2DB is required false otherwise
    • getDeploymentContext

      org.glassfish.api.deployment.DeploymentContext getDeploymentContext()
      Returns:
      DeploymentContext associated with this instance.
    • registerEMF

      void registerEMF(String unitName, String persistenceRootUri, org.glassfish.deployment.common.RootDeploymentDescriptor containingBundle, jakarta.persistence.EntityManagerFactory emf)
      Register the give emf with underlying container
      Parameters:
      unitName - Name of correspoding PersistenceUnit
      persistenceRootUri - URI within application (excluding META-INF) for root of corresponding PersistenceUnit
      containingBundle - The bundle that contains PU for the given EMF
      emf - The emf that needs to be registered
    • getJTADataSourceOverride

      org.glassfish.api.naming.SimpleJndiName getJTADataSourceOverride()
      Returns:
      JTA DataSource override if any
    • getDefaultDataSourceName

      org.glassfish.api.naming.SimpleJndiName getDefaultDataSourceName()
      Returns:
      default data source name to be used if user has not defined a data source
    • isWeavingEnabled

      boolean isWeavingEnabled()
      Returns:
      true if weaving is enabled for the current environment false otherwise