org.glassfish.persistence.jpa
Class ProviderContainerContractInfoBase

java.lang.Object
  extended by org.glassfish.persistence.jpa.ProviderContainerContractInfoBase
All Implemented Interfaces:
ProviderContainerContractInfo
Direct Known Subclasses:
ServerProviderContainerContractInfo

public abstract class ProviderContainerContractInfoBase
extends java.lang.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
ProviderContainerContractInfoBase(ConnectorRuntime connectorRuntime)
           
ProviderContainerContractInfoBase(ConnectorRuntime connectorRuntime, DeploymentContext context)
           
 
Method Summary
 java.lang.String getDefaultDataSourceName()
           
 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
 
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 javax.sql.DataSource lookupDataSource(java.lang.String dataSourceName)
                                      throws javax.naming.NamingException
Description copied from interface: ProviderContainerContractInfo
Looks up DataSource with JNDI name given by dataSourceName

Specified by:
lookupDataSource in interface ProviderContainerContractInfo
Returns:
DataSource with JNDI name given by dataSourceName
Throws:
javax.naming.NamingException

lookupNonTxDataSource

public javax.sql.DataSource lookupNonTxDataSource(java.lang.String dataSourceName)
                                           throws javax.naming.NamingException
Description copied from interface: ProviderContainerContractInfo
Looks up Non transactional DataSource with JNDI name given by dataSourceName

Specified by:
lookupNonTxDataSource in interface ProviderContainerContractInfo
Returns:
Non transactional DataSource with JNDI name given by dataSourceName
Throws:
javax.naming.NamingException

getDefaultDataSourceName

public java.lang.String getDefaultDataSourceName()
Specified by:
getDefaultDataSourceName in interface ProviderContainerContractInfo
Returns:
default data source name to be used if user has not defined a data source

isWeavingEnabled

public boolean isWeavingEnabled()
Specified by:
isWeavingEnabled in interface ProviderContainerContractInfo
Returns:
true if weaving is enabled for the current environment false otherwise


Copyright © 2012 GlassFish Community. All Rights Reserved.