com.caucho.j2ee.appclient
Class ClientEjbRef

java.lang.Object
  extended by com.caucho.j2ee.appclient.ClientEjbRef
All Implemented Interfaces:
ObjectProxy

public class ClientEjbRef
extends java.lang.Object
implements ObjectProxy

Configuration for the ejb-ref. An ejb-ref is used to make an ejb available within the environment in which the ejb-ref is declared.


Constructor Summary
ClientEjbRef(javax.naming.Context ic)
           
 
Method Summary
 java.lang.Object createObject(java.util.Hashtable env)
          Creates the object from the proxy.
 java.lang.String getEjbRefName()
          Returns the ejb name.
 java.lang.Class getHome()
          Returns the home class.
 java.lang.Class getRemote()
          Returns the remote class.
 void init()
           
 void setDescription(java.lang.String description)
           
 void setEjbLink(java.lang.String ejbLink)
          Set the target of the reference, an alternative to setJndiName(String).
 void setEjbRefName(java.lang.String name)
          Sets the name to use in the local jndi context.
 void setEjbRefType(java.lang.String type)
           
 void setHome(java.lang.Class home)
           
 void setId(java.lang.String id)
           
 void setJndiName(java.lang.String jndiName)
          Sets the canonical jndi name to use to find the bean that is the target of the reference.
 void setRemote(java.lang.Class remote)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClientEjbRef

public ClientEjbRef(javax.naming.Context ic)
Method Detail

setId

public void setId(java.lang.String id)

setDescription

public void setDescription(java.lang.String description)

setEjbRefName

public void setEjbRefName(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.
   ejb/Gryffindor
   ...
   (new InitialContext()).lookup("java:comp/env/ejb/Gryffindor");
 


getEjbRefName

public java.lang.String getEjbRefName()
Returns the ejb name.


setEjbRefType

public void setEjbRefType(java.lang.String type)

setHome

public void setHome(java.lang.Class home)

getHome

public java.lang.Class getHome()
Returns the home class.


setRemote

public void setRemote(java.lang.Class remote)

getRemote

public java.lang.Class getRemote()
Returns the remote class.


setJndiName

public void setJndiName(java.lang.String jndiName)
Sets the canonical jndi name to use to find the bean that is the target of the reference. For remote beans, a <jndi-link> LinkProxy is used to link the local jndi context referred to in this name to a remote context.


setEjbLink

public void setEjbLink(java.lang.String ejbLink)
Set the target of the reference, an alternative to setJndiName(String). The format of the ejbLink is "bean", or "jarname#bean", where bean is the ejb-name of a bean within the same enterprise application, and jarname further qualifies the identity of the target.


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
Parameters:
env - the calling environment
Returns:
the object named by the proxy.
Throws:
javax.naming.NamingException

toString

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