Package org.glassfish.persistence.jpa
Class ProviderContainerContractInfoBase
- java.lang.Object
-
- org.glassfish.persistence.jpa.ProviderContainerContractInfoBase
-
- All Implemented Interfaces:
ProviderContainerContractInfo
- Direct Known Subclasses:
ProviderContainerContractInfoImpl
,ServerProviderContainerContractInfo
public abstract class ProviderContainerContractInfoBase extends Object implements ProviderContainerContractInfo
Convenience base class for implementing ProviderContainerContractInfo.- Author:
- Mitesh Meswani
-
-
Field Summary
-
Fields inherited from interface org.glassfish.persistence.jpa.ProviderContainerContractInfo
DEFAULT_DS_NAME
-
-
Constructor Summary
Constructors Constructor Description ProviderContainerContractInfoBase(ConnectorRuntime connectorRuntime)
ProviderContainerContractInfoBase(ConnectorRuntime connectorRuntime, DeploymentContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDefaultDataSourceName()
boolean
isWeavingEnabled()
DataSource
lookupDataSource(String dataSourceName)
Looks up DataSource with JNDI name given bydataSourceName
DataSource
lookupNonTxDataSource(String dataSourceName)
Looks up Non transactional DataSource with JNDI name given bydataSourceName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.glassfish.persistence.jpa.ProviderContainerContractInfo
addTransformer, getApplicationLocation, getClassLoader, getDeploymentContext, getJTADataSourceOverride, getTempClassloader, getValidatorFactory, isJava2DBRequired, registerEMF
-
-
-
-
Constructor Detail
-
ProviderContainerContractInfoBase
public ProviderContainerContractInfoBase(ConnectorRuntime connectorRuntime)
-
ProviderContainerContractInfoBase
public ProviderContainerContractInfoBase(ConnectorRuntime connectorRuntime, DeploymentContext context)
-
-
Method Detail
-
lookupDataSource
public DataSource lookupDataSource(String dataSourceName) throws NamingException
Description copied from interface:ProviderContainerContractInfo
Looks up DataSource with JNDI name given bydataSourceName
- Specified by:
lookupDataSource
in interfaceProviderContainerContractInfo
- Returns:
- DataSource with JNDI name given by
dataSourceName
- Throws:
NamingException
-
lookupNonTxDataSource
public DataSource lookupNonTxDataSource(String dataSourceName) throws NamingException
Description copied from interface:ProviderContainerContractInfo
Looks up Non transactional DataSource with JNDI name given bydataSourceName
- Specified by:
lookupNonTxDataSource
in interfaceProviderContainerContractInfo
- Returns:
- Non transactional DataSource with JNDI name given by
dataSourceName
- Throws:
NamingException
-
getDefaultDataSourceName
public String getDefaultDataSourceName()
- Specified by:
getDefaultDataSourceName
in interfaceProviderContainerContractInfo
- Returns:
- default data source name to be used if user has not defined a data source
-
isWeavingEnabled
public boolean isWeavingEnabled()
- Specified by:
isWeavingEnabled
in interfaceProviderContainerContractInfo
- Returns:
- true if weaving is enabled for the current environment false otherwise
-
-