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
static java.lang.String DEFAULT_DS_NAME
           
 
Method Summary
 void addTransformer(javax.persistence.spi.ClassTransformer transformer)
          Adds ClassTransformer to underlying Application's classloader
 java.lang.String getApplicationLocation()
           
 java.lang.ClassLoader getClassLoader()
           
 java.lang.String getDefaultDataSourceName()
           
 DeploymentContext getDeploymentContext()
           
 java.lang.String getJTADataSourceOverride()
           
 java.lang.ClassLoader getTempClassloader()
           
 javax.validation.ValidatorFactory getValidatorFactory()
          get instance of ValidatorFactory for this environment
 boolean isJava2DBRequired()
          Will be called while loading an application.
 boolean isWeavingEnabled()
           
 javax.sql.DataSource lookupDataSource(java.lang.String dataSourceName)
          Looks up DataSource with JNDI name given by dataSourceName
 javax.sql.DataSource lookupNonTxDataSource(java.lang.String dataSourceName)
          Looks up Non transactional DataSource with JNDI name given by dataSourceName
 void registerEMF(java.lang.String unitName, java.lang.String persistenceRootUri, RootDeploymentDescriptor containingBundle, javax.persistence.EntityManagerFactory emf)
          Register the give emf with underlying container
 

Field Detail

DEFAULT_DS_NAME

static final java.lang.String DEFAULT_DS_NAME
See Also:
Constant Field Values
Method Detail

getClassLoader

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

getTempClassloader

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

addTransformer

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


getApplicationLocation

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

lookupDataSource

javax.sql.DataSource lookupDataSource(java.lang.String dataSourceName)
                                      throws javax.naming.NamingException
Looks up DataSource with JNDI name given by dataSourceName

Parameters:
dataSourceName -
Returns:
DataSource with JNDI name given by dataSourceName
Throws:
javax.naming.NamingException

lookupNonTxDataSource

javax.sql.DataSource lookupNonTxDataSource(java.lang.String dataSourceName)
                                           throws javax.naming.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:
javax.naming.NamingException

getValidatorFactory

javax.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

DeploymentContext getDeploymentContext()
Returns:
DeploymentContext associated with this instance.

registerEMF

void registerEMF(java.lang.String unitName,
                 java.lang.String persistenceRootUri,
                 RootDeploymentDescriptor containingBundle,
                 javax.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

java.lang.String getJTADataSourceOverride()
Returns:
JTA DataSource override if any

getDefaultDataSourceName

java.lang.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


Copyright © 2012 GlassFish Community. All Rights Reserved.