FileDocCategorySizeDatePackage
EjbRef.javaAPI DocGlassfish v2 API4947Fri May 04 22:33:00 BST 2007org.apache.naming

EjbRef

public class EjbRef extends Reference
Represents a reference address to an EJB.
author
Remy Maucherat
version
$Revision: 1.3 $ $Date: 2007/05/05 05:32:59 $

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;
            }
        }