com.caucho.config.types
Class PersistenceUnitRef

java.lang.Object
  extended by com.caucho.config.types.PersistenceUnitRef
All Implemented Interfaces:
ObjectProxy

public class PersistenceUnitRef
extends java.lang.Object
implements ObjectProxy

Configuration for the persistence-unit-ref.


Constructor Summary
PersistenceUnitRef()
           
 
Method Summary
 java.lang.Object createObject(java.util.Hashtable env)
          Creates the object from the proxy.
 java.lang.String getMappedName()
          Returns the name.
 java.lang.String getPersistenceUnitName()
          Returns the name.
 java.lang.String getPersistenceUnitRefName()
          Returns the name.
protected  java.lang.String getTagName()
           
 void init()
           
 void setConfigLocation(java.lang.String location)
           
 void setDescription(java.lang.String description)
           
 void setDisplayName(java.lang.String displayName)
           
 void setId(java.lang.String id)
           
 void setMappedName(java.lang.String name)
          Sets the mapped-name
 void setPersistenceUnitName(java.lang.String name)
          Sets the name from the persistence.xml
 void setPersistenceUnitRefName(java.lang.String name)
          Sets the name to use in the local jndi context.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PersistenceUnitRef

public PersistenceUnitRef()
Method Detail

setConfigLocation

public void setConfigLocation(java.lang.String location)

getTagName

protected java.lang.String getTagName()

setId

public void setId(java.lang.String id)

setDescription

public void setDescription(java.lang.String description)

setDisplayName

public void setDisplayName(java.lang.String displayName)

setPersistenceUnitRefName

public void setPersistenceUnitRefName(java.lang.String name)
Sets the name to use in the local jndi context. This is the jndi lookup name that code uses to obtain the home for the bean when doing a jndi lookup.
   persistence/Gryffindor
   ...
   (new InitialContext()).lookup("java:comp/env/ejb/Gryffindor");
 


getPersistenceUnitRefName

public java.lang.String getPersistenceUnitRefName()
Returns the name.


setPersistenceUnitName

public void setPersistenceUnitName(java.lang.String name)
Sets the name from the persistence.xml


getPersistenceUnitName

public java.lang.String getPersistenceUnitName()
Returns the name.


setMappedName

public void setMappedName(java.lang.String name)
Sets the mapped-name


getMappedName

public java.lang.String getMappedName()
Returns the name.


init

@PostConstruct
public void init()
          throws java.lang.Exception
Throws:
java.lang.Exception

createObject

public java.lang.Object createObject(java.util.Hashtable env)
                              throws javax.naming.NamingException
Creates the object from the proxy.

Specified by:
createObject in interface ObjectProxy
Returns:
the object named by the proxy.
Throws:
javax.naming.NamingException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object