FileDocCategorySizeDatePackage
EjbRef.javaAPI DocApache Tomcat 6.0.143896Fri Jul 20 04:20:32 BST 2007org.apache.naming

EjbRef

public class EjbRef extends Reference
Represents a reference address to an EJB.
author
Remy Maucherat
version
$Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $

Fields Summary
public static final String
DEFAULT_FACTORY
Default factory for this reference.
public static final String
TYPE
EJB type address type.
public static final String
REMOTE
Remote interface classname address type.
public static final String
LINK
Link address type.
Constructors Summary
public EjbRef(String ejbType, String home, String remote, String link)
EJB Reference.

param
ejbType EJB type
param
home Home interface classname
param
remote Remote interface classname
param
link EJB link



    // ----------------------------------------------------------- Constructors


                              
             
        this(ejbType, home, remote, link, null, null);
    
public EjbRef(String ejbType, String home, String remote, String link, String factory, String factoryLocation)
EJB Reference.

param
ejbType EJB type
param
home Home interface classname
param
remote Remote interface classname
param
link EJB link

        super(home, factory, factoryLocation);
        StringRefAddr refAddr = null;
        if (ejbType != null) {
            refAddr = new StringRefAddr(TYPE, ejbType);
            add(refAddr);
        }
        if (remote != null) {
            refAddr = new StringRefAddr(REMOTE, remote);
            add(refAddr);
        }
        if (link != null) {
            refAddr = new StringRefAddr(LINK, link);
            add(refAddr);
        }
    
Methods Summary
public java.lang.StringgetFactoryClassName()
Retrieves the class name of the factory of the object to which this reference refers.

        String factory = super.getFactoryClassName();
        if (factory != null) {
            return factory;
        } else {
            factory = System.getProperty(Context.OBJECT_FACTORIES);
            if (factory != null) {
                return null;
            } else {
                return DEFAULT_FACTORY;
            }
        }