org.glassfish.persistence.jpa
Class ServerProviderContainerContractInfo

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

public class ServerProviderContainerContractInfo
extends ProviderContainerContractInfoBase

Implementation of ProviderContainerContractInfo while running on server.

Author:
Mitesh Meswani

Field Summary
 
Fields inherited from interface org.glassfish.persistence.jpa.ProviderContainerContractInfo
DEFAULT_DS_NAME
 
Constructor Summary
ServerProviderContainerContractInfo(DeploymentContext deploymentContext, ConnectorRuntime connectorRuntime, boolean isDas)
           
 
Method Summary
 void addTransformer(javax.persistence.spi.ClassTransformer transformer)
          Adds ClassTransformer to underlying Application's classloader
 java.lang.String getApplicationLocation()
           
 java.lang.ClassLoader getClassLoader()
           
 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.
 void registerEMF(java.lang.String unitName, java.lang.String persistenceRootUri, RootDeploymentDescriptor containingBundle, javax.persistence.EntityManagerFactory emf)
          Register the give emf with underlying container
 
Methods inherited from class org.glassfish.persistence.jpa.ProviderContainerContractInfoBase
getDefaultDataSourceName, isWeavingEnabled, lookupDataSource, lookupNonTxDataSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerProviderContainerContractInfo

public ServerProviderContainerContractInfo(DeploymentContext deploymentContext,
                                           ConnectorRuntime connectorRuntime,
                                           boolean isDas)
Method Detail

getClassLoader

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

getTempClassloader

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

addTransformer

public void addTransformer(javax.persistence.spi.ClassTransformer transformer)
Description copied from interface: ProviderContainerContractInfo
Adds ClassTransformer to underlying Application's classloader


getApplicationLocation

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

getValidatorFactory

public javax.validation.ValidatorFactory getValidatorFactory()
Description copied from interface: ProviderContainerContractInfo
get instance of ValidatorFactory for this environment


isJava2DBRequired

public boolean isJava2DBRequired()
Description copied from interface: ProviderContainerContractInfo
Will be called while loading an application.

Returns:
true if java2DB is required false otherwise

getDeploymentContext

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

registerEMF

public void registerEMF(java.lang.String unitName,
                        java.lang.String persistenceRootUri,
                        RootDeploymentDescriptor containingBundle,
                        javax.persistence.EntityManagerFactory emf)
Description copied from interface: ProviderContainerContractInfo
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

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


Copyright © 2012 GlassFish Community. All Rights Reserved.