com.caucho.config.types
Class EjbRef

java.lang.Object
  extended by com.caucho.config.program.ConfigProgram
      extended by com.caucho.config.types.ResourceGroupConfig
          extended by com.caucho.config.types.BaseRef
              extended by com.caucho.config.types.EjbRef
All Implemented Interfaces:
ObjectProxy, java.lang.Comparable<ConfigProgram>
Direct Known Subclasses:
EjbLocalRef

public class EjbRef
extends BaseRef

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.


Field Summary
 
Fields inherited from class com.caucho.config.types.BaseRef
_injectionTarget, _modulePath, _sourceEjbName
 
Constructor Summary
EjbRef()
           
EjbRef(javax.naming.Context context)
           
EjbRef(Path modulePath)
           
EjbRef(Path modulePath, java.lang.String sourceEjbName)
           
 
Method Summary
 void bind()
          Binds the injection point
 void deploy()
           
 java.lang.Object getByType(java.lang.Class<?> type)
           
 java.lang.String getEjbLink()
           
 java.lang.String getEjbRefName()
          Returns the ejb name.
 java.lang.Class<?> getHome()
          Returns the home class.
 InjectionTarget getInjectionTarget()
          Gets the injection-target
 java.lang.Class<?> getLocal()
           
 java.lang.Class<?> getRemote()
          Returns the remote class.
protected  java.lang.String getTagName()
           
 java.lang.Object getValue()
          Creates the object from the proxy.
 boolean isEjbLocalRef()
           
 void mergeFrom(EjbRef other)
          Merges duplicated information in application-client.xml / resin-application-client.xml
 void setClientClassName(java.lang.String clientClassName)
           
 void setConfigLocation(java.lang.String loc)
           
 void setDescription(java.lang.String description)
          Sets the 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 setForeignName(java.lang.String foreignName)
          Sets the canonical jndi name to use to find the bean that is the target of the reference.
 void setHome(java.lang.Class<?> home)
           
 void setId(java.lang.String id)
           
 void setInjectionTarget(InjectionTarget injectionTarget)
          Sets the injection-target
 void setRemote(java.lang.Class<?> remote)
           
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.config.types.BaseRef
getFieldOrMethod, getJavaClass
 
Methods inherited from class com.caucho.config.types.ResourceGroupConfig
addInjectionTarget, createObject, error, getJndiClassLoader, getLookupName, getProgram, getProgram, inferTypeFromInjection, init, inject, isProgram, setConfigLocation, setDefaultInjectionClass, setJndiClassLoader, setLookupName, setProgram
 
Methods inherited from class com.caucho.config.program.ConfigProgram
addProgram, compareTo, configure, configure, configure, create, create, create, getDeclaringClass, getName, getPriority, getQName, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EjbRef

public EjbRef()

EjbRef

public EjbRef(javax.naming.Context context)

EjbRef

public EjbRef(Path modulePath)

EjbRef

public EjbRef(Path modulePath,
              java.lang.String sourceEjbName)
Method Detail

setConfigLocation

public void setConfigLocation(java.lang.String loc)

isEjbLocalRef

public boolean isEjbLocalRef()

getInjectionTarget

public InjectionTarget getInjectionTarget()
Gets the injection-target

Overrides:
getInjectionTarget in class BaseRef

getTagName

protected java.lang.String getTagName()

setId

public void setId(java.lang.String id)
Overrides:
setId in class ResourceGroupConfig

setDescription

public void setDescription(java.lang.String description)
Description copied from class: ResourceGroupConfig
Sets the description.

Overrides:
setDescription in class ResourceGroupConfig

setClientClassName

public void setClientClassName(java.lang.String clientClassName)

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");
 


setInjectionTarget

public void setInjectionTarget(InjectionTarget injectionTarget)
Sets the injection-target

Overrides:
setInjectionTarget in class BaseRef

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.


getLocal

public java.lang.Class<?> getLocal()

setForeignName

public void setForeignName(java.lang.String foreignName)
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.


getEjbLink

public java.lang.String getEjbLink()

mergeFrom

public void mergeFrom(EjbRef other)
Merges duplicated information in application-client.xml / resin-application-client.xml


deploy

public void deploy()
Overrides:
deploy in class ResourceGroupConfig

bind

public void bind()
Description copied from class: ConfigProgram
Binds the injection point

Overrides:
bind in class ConfigProgram

getValue

public java.lang.Object getValue()
Creates the object from the proxy.

Overrides:
getValue in class ResourceGroupConfig
Returns:
the object named by the proxy.

getByType

public java.lang.Object getByType(java.lang.Class<?> type)

toString

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