org.jboss.jpa.deployment
Class PersistenceUnitDeployment

java.lang.Object
  extended by org.jboss.jpa.deployment.PersistenceUnitDeployment
All Implemented Interfaces:
PersistenceUnit

public class PersistenceUnitDeployment
extends Object
implements PersistenceUnit

Comment

Version:
$Revision: 84471 $
Author:
Bill Burke

Field Summary
protected  javax.persistence.EntityManagerFactory actualFactory
           
protected  PersistenceDeployment deployment
           
protected  org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit di
           
protected  List<String> explicitEntityClasses
           
protected  InitialContext initialContext
           
protected  String kernelName
           
protected  ManagedEntityManagerFactory managedFactory
           
protected  org.jboss.metadata.jpa.spec.PersistenceUnitMetaData metaData
           
 
Constructor Summary
PersistenceUnitDeployment(InitialContext initialContext, PersistenceDeployment deployment, List<String> explicitEntityClasses, org.jboss.metadata.jpa.spec.PersistenceUnitMetaData metadata, String kernelName, org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit deploymentUnit, Properties defaultPersistenceProperties)
           
 
Method Summary
 void create()
           
 void destroy()
           
 javax.persistence.EntityManagerFactory getActualFactory()
           
 javax.persistence.EntityManagerFactory getContainerEntityManagerFactory()
          Obtain the container entity manager factory.
static String getDefaultKernelName(String unitName)
           
 PersistenceDeployment getDeployment()
           
 String getEntityManagerName()
           
protected  String getJaccContextId()
           
 String getKernelName()
           
 ManagedEntityManagerFactory getManagedFactory()
           
 String getName()
           
protected  org.jboss.virtual.VirtualFile getPersistenceUnitRoot()
          Find the persistence unit root, which can be the root of a jar or WEB-INF/classes of a war.
protected  Map<String,String> getProperties()
           
 org.jboss.metadata.jpa.spec.PersistenceUnitMetaData getXml()
           
 XPCResolver getXPCResolver()
          The extended persistence context resolver associated with this persistence unit.
 void setXPCResolver(XPCResolver xpcResolver)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

initialContext

protected InitialContext initialContext

di

protected org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit di

explicitEntityClasses

protected List<String> explicitEntityClasses

managedFactory

protected ManagedEntityManagerFactory managedFactory

actualFactory

protected javax.persistence.EntityManagerFactory actualFactory

metaData

protected org.jboss.metadata.jpa.spec.PersistenceUnitMetaData metaData

kernelName

protected String kernelName

deployment

protected PersistenceDeployment deployment
Constructor Detail

PersistenceUnitDeployment

public PersistenceUnitDeployment(InitialContext initialContext,
                                 PersistenceDeployment deployment,
                                 List<String> explicitEntityClasses,
                                 org.jboss.metadata.jpa.spec.PersistenceUnitMetaData metadata,
                                 String kernelName,
                                 org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit deploymentUnit,
                                 Properties defaultPersistenceProperties)
Method Detail

create

public void create()

destroy

public void destroy()

getDefaultKernelName

public static String getDefaultKernelName(String unitName)

getDeployment

public PersistenceDeployment getDeployment()

getJaccContextId

protected String getJaccContextId()

getActualFactory

public javax.persistence.EntityManagerFactory getActualFactory()

getXml

public org.jboss.metadata.jpa.spec.PersistenceUnitMetaData getXml()

getKernelName

public String getKernelName()

getName

public String getName()
Specified by:
getName in interface PersistenceUnit

getPersistenceUnitRoot

protected org.jboss.virtual.VirtualFile getPersistenceUnitRoot()
Find the persistence unit root, which can be the root of a jar or WEB-INF/classes of a war.

Returns:
the persistence unit root

getContainerEntityManagerFactory

public javax.persistence.EntityManagerFactory getContainerEntityManagerFactory()
Description copied from interface: PersistenceUnit
Obtain the container entity manager factory.

Specified by:
getContainerEntityManagerFactory in interface PersistenceUnit
Returns:
an EntityManagerFactory

getEntityManagerName

public String getEntityManagerName()

getManagedFactory

public ManagedEntityManagerFactory getManagedFactory()

getProperties

protected Map<String,String> getProperties()

getXPCResolver

public XPCResolver getXPCResolver()
Description copied from interface: PersistenceUnit
The extended persistence context resolver associated with this persistence unit.

Specified by:
getXPCResolver in interface PersistenceUnit
Returns:
the XPC resolver

setXPCResolver

public void setXPCResolver(XPCResolver xpcResolver)

start

public void start()
           throws Exception
Throws:
Exception

stop

public void stop()
          throws Exception
Throws:
Exception


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.