Package com.sun.enterprise.deployment
Class EjbReferenceDescriptor
- java.lang.Object
-
- java.util.Observable
-
- org.glassfish.deployment.common.DynamicAttributesDescriptor
-
- org.glassfish.deployment.common.Descriptor
-
- com.sun.enterprise.deployment.EnvironmentProperty
-
- com.sun.enterprise.deployment.EjbReferenceDescriptor
-
- All Implemented Interfaces:
InjectionCapable
,NamedDescriptor
,ApplicationParam
,EjbReference
,NamedInformation
,ContextParameter
,EnvironmentEntry
,InitializationParameter
,NameValuePair
,WebDescriptor
,Serializable
public class EjbReferenceDescriptor extends EnvironmentProperty implements EjbReference, NamedDescriptor
An object representing a link to another ejb.- Author:
- Jerome Dochez
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.sun.enterprise.deployment.EnvironmentProperty
mappedName
-
Fields inherited from class org.glassfish.deployment.common.Descriptor
DESCRIPTION_CHANGED, DESCRIPTOR_CHANGED, docType, LARGE_ICON_CHANGED, NAME_CHANGED, SMALL_ICON_CHANGED
-
-
Constructor Summary
Constructors Constructor Description EjbReferenceDescriptor()
Constructs a reference in the exterrnal state.EjbReferenceDescriptor(EjbReferenceDescriptor other)
copy constructorEjbReferenceDescriptor(String name, String description, EjbDescriptor ejbDescriptor)
Construct an remote ejb reference to the given ejb descriptor with the given name and descriptor of the reference.EjbReferenceDescriptor(String name, String description, EjbDescriptor ejbDescriptor, boolean isLocal)
constructs an local or remote ejb reference to the given ejb descriptor, the description and the name of the reference
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
Returns true if the argument is an environment property of the same name, false else.String
getBeanClassName()
EjbDescriptor
getEjbDescriptor()
return the ejb to whoch I refer.String
getEjbHomeInterface()
Gets the home classname of the referee EJB.String
getEjbInterface()
Gets the local or remote interface classname of the referee EJB.String
getHomeClassName()
Gets the home classname of the referee EJB.String
getInjectResourceType()
This is the class name of the type of resource that is to be injected.String
getJndiName()
return the jndi name of the bean to which I refer.String
getLinkName()
Gets the link name of the reference.String
getLookupName()
Gets the lookup valueBundleDescriptor
getReferringBundleDescriptor()
Get the referring bundle, i.e.String
getType()
Retusn the type of the ejb to whioch I refer.String
getValue()
Return the jndi name of the bean to which I refer.int
hashCode()
The hashCode of an environment property is the same as that of the name String.boolean
hasJndiName()
Returns true if the reference has a non-null non-zero length jndinameboolean
hasLookupName()
Returns true if the lookup name is non-null and has a non-zero lengthboolean
isConflict(EjbReferenceDescriptor other)
boolean
isEJB30ClientView()
boolean
isLinked()
return true if I know the name of the ejb to which I refer.boolean
isLocal()
Tests if the reference to the referree EJB is through local or remote interfacevoid
print(StringBuilder toStringBuilder)
returns a formatted string representing me.void
setBeanClassName(String remoteClassName)
Sets the bean instance business interface classname of the bean to which I refer.void
setEjbDescriptor(EjbDescriptor ejbDescriptor)
Sets the ejb descriptor to which I refer.void
setEjbHomeInterface(String homeClassName)
Sets the local or remote home classname of the referee EJB.void
setEjbInterface(String remoteClassName)
Sets the local or remote bean interface classname of the referee EJB.void
setHomeClassName(String homeClassName)
Sets the home classname of the bean to whcioh I refer.void
setInjectResourceType(String resourceType)
void
setJndiName(String jndiName)
Sets the jndi name of the bean type which I am referring.void
setLinkName(String linkName)
Sets the name of the ejb to which I refer.void
setLocal(boolean local)
Set whether this EJB Reference uses local interfaces or remotevoid
setLookupName(String l)
Sets the lookup namevoid
setReferringBundleDescriptor(BundleDescriptor referringBundle)
Set the referring bundle, i.e.void
setType(String type)
Assigns the type of the ejb to whcoih I refer.-
Methods inherited from class com.sun.enterprise.deployment.EnvironmentProperty
addInjectionTarget, getComponentEnvName, getInjectionTargets, getMappedName, getResolvedValue, getResolvedValueObject, getValueObject, getValueType, hasAValue, hasInjectionTargetFromXml, isConflict, isConflictResourceGroup, isInjectable, isSetValueCalled, printInjectableResourceInfo, setMappedName, setValue
-
Methods inherited from class org.glassfish.deployment.common.Descriptor
addDescriptorExtension, addPrefixMapping, createUniqueFilenameAmongst, createUniqueNameAmongst, createUniqueNameAmongstNamedDescriptors, fillDocType, getDeploymentExtensions, getDescription, getDescriptorExtension, getDescriptorExtensions, getDisplayName, getDocType, getLargeIconUri, getLocalizedDescription, getLocalizedDescriptions, getLocalizedDisplayName, getLocalizedDisplayNames, getLocalizedLargeIconUri, getLocalizedLargeIconUris, getLocalizedSmallIconUri, getLocalizedSmallIconUris, getName, getPrefixMapping, getSmallIconUri, isBoundsChecking, setBoundsChecking, setDescription, setDisplayName, setLargeIconUri, setLocalizedDescription, setLocalizedDisplayName, setLocalizedLargeIconUri, setLocalizedSmallIconUri, setName, setSmallIconUri, visit
-
Methods inherited from class org.glassfish.deployment.common.DynamicAttributesDescriptor
addExtraAttribute, getExtraAttribute, getExtraAttributes, removeExtraAttribute, toString
-
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.sun.enterprise.deployment.InjectionCapable
addInjectionTarget, getComponentEnvName, getInjectionTargets, isInjectable
-
Methods inherited from interface com.sun.enterprise.deployment.NamedDescriptor
getName
-
Methods inherited from interface com.sun.enterprise.deployment.types.NamedInformation
getDescription, getName, setDescription, setName
-
Methods inherited from interface com.sun.enterprise.deployment.web.NameValuePair
getDescription, getName, setDescription, setName
-
Methods inherited from interface com.sun.enterprise.deployment.web.WebDescriptor
getDescription, getLargeIconUri, getName, getSmallIconUri, setDescription, setLargeIconUri, setName, setSmallIconUri
-
-
-
-
Constructor Detail
-
EjbReferenceDescriptor
public EjbReferenceDescriptor(EjbReferenceDescriptor other)
copy constructor- Parameters:
other
- handle to other EjbReferenceDescriptor to clone
-
EjbReferenceDescriptor
public EjbReferenceDescriptor(String name, String description, EjbDescriptor ejbDescriptor)
Construct an remote ejb reference to the given ejb descriptor with the given name and descriptor of the reference.- Parameters:
name
- the ejb-ref name as used in the referencing beandescription
- optional descriptionejbDescriptor
- of the referenced bean
-
EjbReferenceDescriptor
public EjbReferenceDescriptor(String name, String description, EjbDescriptor ejbDescriptor, boolean isLocal)
constructs an local or remote ejb reference to the given ejb descriptor, the description and the name of the reference- Parameters:
name
- is the name of the referencedescription
- is a human readable description of the referenceejbDescriptor
- the referenced EJBisLocal
- true if the reference uses the local interfaces
-
EjbReferenceDescriptor
public EjbReferenceDescriptor()
Constructs a reference in the exterrnal state.
-
-
Method Detail
-
setReferringBundleDescriptor
public void setReferringBundleDescriptor(BundleDescriptor referringBundle)
Set the referring bundle, i.e. the bundle within which this EJB reference is declared.- Specified by:
setReferringBundleDescriptor
in interfaceEjbReference
-
getReferringBundleDescriptor
public BundleDescriptor getReferringBundleDescriptor()
Get the referring bundle, i.e. the bundle within which this EJB reference is declared.- Specified by:
getReferringBundleDescriptor
in interfaceEjbReference
- Returns:
-
setEjbDescriptor
public void setEjbDescriptor(EjbDescriptor ejbDescriptor)
Sets the ejb descriptor to which I refer.- Specified by:
setEjbDescriptor
in interfaceEjbReference
- Parameters:
ejbDescriptor
- the ejb descriptor referenced, null if it is unknown at this time
-
setJndiName
public void setJndiName(String jndiName)
Sets the jndi name of the bean type which I am referring.- Specified by:
setJndiName
in interfaceEjbReference
- Specified by:
setJndiName
in interfaceNamedDescriptor
- Parameters:
jndiName
- the new JNDI name of the receiver.
-
hasJndiName
public boolean hasJndiName()
Description copied from interface:EjbReference
Returns true if the reference has a non-null non-zero length jndiname- Specified by:
hasJndiName
in interfaceEjbReference
- Returns:
-
isLinked
public boolean isLinked()
return true if I know the name of the ejb to which I refer.
-
getLinkName
public String getLinkName()
Description copied from interface:EjbReference
Gets the link name of the reference. For use when linking to an EJB within a J2EE application.- Specified by:
getLinkName
in interfaceEjbReference
- Returns:
- the name of the ejb to which I refer
-
setLinkName
public void setLinkName(String linkName)
Sets the name of the ejb to which I refer.- Specified by:
setLinkName
in interfaceEjbReference
- Parameters:
linkName
- the link name.
-
getJndiName
public String getJndiName()
return the jndi name of the bean to which I refer.- Specified by:
getJndiName
in interfaceEjbReference
- Specified by:
getJndiName
in interfaceNamedDescriptor
- Returns:
- the jndi name for this ejb reference
-
getValue
public String getValue()
Return the jndi name of the bean to which I refer.- Specified by:
getValue
in interfaceNameValuePair
- Overrides:
getValue
in classEnvironmentProperty
-
setLookupName
public void setLookupName(String l)
Description copied from class:EnvironmentProperty
Sets the lookup name- Overrides:
setLookupName
in classEnvironmentProperty
-
getLookupName
public String getLookupName()
Description copied from class:EnvironmentProperty
Gets the lookup value- Specified by:
getLookupName
in interfaceEjbReference
- Overrides:
getLookupName
in classEnvironmentProperty
- Returns:
- the lookupname or an empty string if not set
-
hasLookupName
public boolean hasLookupName()
Description copied from interface:EjbReference
Returns true if the lookup name is non-null and has a non-zero length- Specified by:
hasLookupName
in interfaceEjbReference
- Overrides:
hasLookupName
in classEnvironmentProperty
- Returns:
- true if lookup is not null and non-zero length
-
getEjbDescriptor
public EjbDescriptor getEjbDescriptor()
return the ejb to whoch I refer.- Specified by:
getEjbDescriptor
in interfaceEjbReference
-
isLocal
public boolean isLocal()
Description copied from interface:EjbReference
Tests if the reference to the referree EJB is through local or remote interface- Specified by:
isLocal
in interfaceEjbReference
- Returns:
- true if the EJB reference uses the local interfaces of the EJB
-
setLocal
public void setLocal(boolean local)
Set whether this EJB Reference uses local interfaces or remote- Specified by:
setLocal
in interfaceEjbReference
- Parameters:
local
- true if the EJB reference use local interfaces
-
getType
public String getType()
Retusn the type of the ejb to whioch I refer.- Specified by:
getType
in interfaceEjbReference
- Specified by:
getType
in interfaceEnvironmentEntry
- Overrides:
getType
in classEnvironmentProperty
- Returns:
- the type of the EJB.
-
setType
public void setType(String type)
Assigns the type of the ejb to whcoih I refer.- Specified by:
setType
in interfaceEjbReference
- Specified by:
setType
in interfaceEnvironmentEntry
- Overrides:
setType
in classEnvironmentProperty
- Parameters:
type
- the type of the EJB.
-
getInjectResourceType
public String getInjectResourceType()
Description copied from interface:InjectionCapable
This is the class name of the type of resource that is to be injected.- Specified by:
getInjectResourceType
in interfaceInjectionCapable
- Overrides:
getInjectResourceType
in classEnvironmentProperty
-
setInjectResourceType
public void setInjectResourceType(String resourceType)
- Specified by:
setInjectResourceType
in interfaceInjectionCapable
- Overrides:
setInjectResourceType
in classEnvironmentProperty
-
getHomeClassName
public String getHomeClassName()
Gets the home classname of the referee EJB.
-
setHomeClassName
public void setHomeClassName(String homeClassName)
Sets the home classname of the bean to whcioh I refer.
-
getBeanClassName
public String getBeanClassName()
- Returns:
- the bean instance interface classname of the referee EJB.
-
setBeanClassName
public void setBeanClassName(String remoteClassName)
Sets the bean instance business interface classname of the bean to which I refer. this interface is the local object or the remote interfaces depending if the reference is local or not.
-
getEjbHomeInterface
public String getEjbHomeInterface()
Gets the home classname of the referee EJB.- Specified by:
getEjbHomeInterface
in interfaceEjbReference
- Returns:
- the class name of the EJB home.
-
setEjbHomeInterface
public void setEjbHomeInterface(String homeClassName)
Sets the local or remote home classname of the referee EJB.- Specified by:
setEjbHomeInterface
in interfaceEjbReference
- Parameters:
homeClassName
- the class name of the EJB home.
-
getEjbInterface
public String getEjbInterface()
Gets the local or remote interface classname of the referee EJB.- Specified by:
getEjbInterface
in interfaceEjbReference
- Returns:
- the classname of the EJB remote object.
-
setEjbInterface
public void setEjbInterface(String remoteClassName)
Sets the local or remote bean interface classname of the referee EJB.- Specified by:
setEjbInterface
in interfaceEjbReference
- Parameters:
remoteClassName
- the classname of the EJB remote object.
-
isEJB30ClientView
public boolean isEJB30ClientView()
- Specified by:
isEJB30ClientView
in interfaceEjbReference
- Returns:
- true if the EJB reference is a 30 client view
-
print
public void print(StringBuilder toStringBuilder)
returns a formatted string representing me.- Overrides:
print
in classEnvironmentProperty
-
equals
public boolean equals(Object object)
Description copied from class:EnvironmentProperty
Returns true if the argument is an environment property of the same name, false else.- Overrides:
equals
in classEnvironmentProperty
-
hashCode
public int hashCode()
Description copied from class:EnvironmentProperty
The hashCode of an environment property is the same as that of the name String.- Overrides:
hashCode
in classEnvironmentProperty
-
isConflict
public boolean isConflict(EjbReferenceDescriptor other)
-
-