Package org.glassfish.persistence.jpa
Interface ProviderContainerContractInfo
-
- All Known Implementing Classes:
EmbeddedProviderContainerContractInfo,ProviderContainerContractInfoBase,ServerProviderContainerContractInfo
public interface ProviderContainerContractInfo- Author:
- Mitesh Meswani This encapsulates information needed to load or unload persistence units.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_DS_NAME
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddTransformer(jakarta.persistence.spi.ClassTransformer transformer)Adds ClassTransformer to underlying Application's classloaderStringgetApplicationLocation()ClassLoadergetClassLoader()StringgetDefaultDataSourceName()org.glassfish.api.deployment.DeploymentContextgetDeploymentContext()StringgetJTADataSourceOverride()ClassLoadergetTempClassloader()jakarta.validation.ValidatorFactorygetValidatorFactory()get instance of ValidatorFactory for this environmentbooleanisJava2DBRequired()Will be called while loading an application.booleanisWeavingEnabled()DataSourcelookupDataSource(String dataSourceName)Looks up DataSource with JNDI name given bydataSourceNameDataSourcelookupNonTxDataSource(String dataSourceName)Looks up Non transactional DataSource with JNDI name given bydataSourceNamevoidregisterEMF(String unitName, String persistenceRootUri, org.glassfish.deployment.common.RootDeploymentDescriptor containingBundle, jakarta.persistence.EntityManagerFactory emf)Register the give emf with underlying container
-
-
-
Field Detail
-
DEFAULT_DS_NAME
static final String DEFAULT_DS_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
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(String dataSourceName) throws NamingException
Looks up DataSource with JNDI name given bydataSourceName- Parameters:
dataSourceName-- Returns:
- DataSource with JNDI name given by
dataSourceName - Throws:
NamingException
-
lookupNonTxDataSource
DataSource lookupNonTxDataSource(String dataSourceName) throws NamingException
Looks up Non transactional DataSource with JNDI name given bydataSourceName- 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 PersistenceUnitpersistenceRootUri- URI within application (excluding META-INF) for root of corresponding PersistenceUnitcontainingBundle- The bundle that contains PU for the given EMFemf- The emf that needs to be registered
-
getJTADataSourceOverride
String getJTADataSourceOverride()
- Returns:
- JTA DataSource override if any
-
getDefaultDataSourceName
String 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
-
-