Class ProviderContainerContractInfoImpl
- java.lang.Object
-
- org.glassfish.persistence.jpa.ProviderContainerContractInfoBase
-
- org.glassfish.appclient.client.acc.ProviderContainerContractInfoImpl
-
- All Implemented Interfaces:
ProviderContainerContractInfo
public class ProviderContainerContractInfoImpl extends ProviderContainerContractInfoBase
Implements the internal GlassFish interface which all persistence provider containers must.- Author:
- tjquinn
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProviderContainerContractInfoImpl.TransformerWrapper
Wraps a persistence transformer in a java.lang.instrumentation.ClassFileTransformer suitable for addition as a transformer to the JVM-provided instrumentation class.
-
Field Summary
-
Fields inherited from interface org.glassfish.persistence.jpa.ProviderContainerContractInfo
DEFAULT_DS_NAME
-
-
Constructor Summary
Constructors Constructor Description ProviderContainerContractInfoImpl(ACCClassLoader classLoader, Instrumentation inst, String applicationLocation, ConnectorRuntime connectorRuntime)
Creates a new instance of the ACC's implementation of the contract.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTransformer(jakarta.persistence.spi.ClassTransformer transformer)
Adds ClassTransformer to underlying Application's classloaderCollection<jakarta.persistence.EntityManagerFactory>
emfs()
String
getApplicationLocation()
ClassLoader
getClassLoader()
DeploymentContext
getDeploymentContext()
String
getJTADataSourceOverride()
ClassLoader
getTempClassloader()
jakarta.validation.ValidatorFactory
getValidatorFactory()
get instance of ValidatorFactory for this environmentboolean
isJava2DBRequired()
Will be called while loading an application.void
registerEMF(String unitName, String persistenceRootUri, RootDeploymentDescriptor containingBundle, jakarta.persistence.EntityManagerFactory emf)
Register the give emf with underlying container-
Methods inherited from class org.glassfish.persistence.jpa.ProviderContainerContractInfoBase
getDefaultDataSourceName, isWeavingEnabled, lookupDataSource, lookupNonTxDataSource
-
-
-
-
Constructor Detail
-
ProviderContainerContractInfoImpl
public ProviderContainerContractInfoImpl(ACCClassLoader classLoader, Instrumentation inst, String applicationLocation, ConnectorRuntime connectorRuntime)
Creates a new instance of the ACC's implementation of the contract. The ACC uses its agent to register a VM transformer which can then delegate to transformers registered with this class by the persistence logic.- Parameters:
classLoader
- ACC's class loaderinst
- VM's instrumentation object
-
-
Method Detail
-
getClassLoader
public ClassLoader getClassLoader()
- Returns:
- a class loader that is used to load persistence entities bundled in this application.
-
getTempClassloader
public ClassLoader getTempClassloader()
- Returns:
- a temp class loader that is used to load persistence entities bundled in this application.
-
addTransformer
public void addTransformer(jakarta.persistence.spi.ClassTransformer transformer)
Description copied from interface:ProviderContainerContractInfo
Adds ClassTransformer to underlying Application's classloader
-
getApplicationLocation
public String getApplicationLocation()
- Returns:
- absolute path of the location where application is exploded.
-
getValidatorFactory
public jakarta.validation.ValidatorFactory getValidatorFactory()
Description copied from interface:ProviderContainerContractInfo
get instance of ValidatorFactory for this environment
-
getDeploymentContext
public DeploymentContext getDeploymentContext()
- Returns:
- DeploymentContext associated with this instance.
-
isJava2DBRequired
public boolean isJava2DBRequired()
Description copied from interface:ProviderContainerContractInfo
Will be called while loading an application.- Returns:
- true if java2DB is required false otherwise
-
registerEMF
public void registerEMF(String unitName, String persistenceRootUri, RootDeploymentDescriptor containingBundle, jakarta.persistence.EntityManagerFactory emf)
Description copied from interface:ProviderContainerContractInfo
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
public String getJTADataSourceOverride()
- Returns:
- JTA DataSource override if any
-
emfs
public Collection<jakarta.persistence.EntityManagerFactory> emfs()
-
-