Package org.glassfish.persistence.jpa
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final org.glassfish.api.naming.SimpleJndiName -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTransformer(jakarta.persistence.spi.ClassTransformer transformer) Adds ClassTransformer to underlying Application's classloaderorg.glassfish.api.naming.SimpleJndiNameorg.glassfish.api.deployment.DeploymentContextorg.glassfish.api.naming.SimpleJndiNamejakarta.validation.ValidatorFactoryget instance of ValidatorFactory for this environmentbooleanWill be called while loading an application.booleanlookupDataSource(org.glassfish.api.naming.SimpleJndiName dataSourceName) Looks up DataSource with JNDI name given bydataSourceNamelookupNonTxDataSource(org.glassfish.api.naming.SimpleJndiName 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 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 bydataSourceName- 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 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
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
-