Class EjbBundleDescriptorImpl
- java.lang.Object
-
- java.util.Observable
-
- org.glassfish.deployment.common.DynamicAttributesDescriptor
-
- org.glassfish.deployment.common.Descriptor
-
- org.glassfish.deployment.common.RootDeploymentDescriptor
-
- com.sun.enterprise.deployment.BundleDescriptor
-
- com.sun.enterprise.deployment.CommonResourceBundleDescriptor
-
- com.sun.enterprise.deployment.EjbBundleDescriptor
-
- org.glassfish.ejb.deployment.descriptor.EjbBundleDescriptorImpl
-
- All Implemented Interfaces:
JndiNameEnvironment
,Roles
,EjbReferenceContainer
,MessageDestinationReferenceContainer
,ResourceEnvReferenceContainer
,ResourceReferenceContainer
,ServiceReferenceContainer
,WritableJndiNameEnvironment
,Serializable
public class EjbBundleDescriptorImpl extends EjbBundleDescriptor
The concrete implementation of abstract super class com.sun.enterprise.deployment.EjbBundleDescriptor. EjbBundleDescriptor could be changed from abstract class to an interface in the future, with this class as its implementation.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.sun.enterprise.deployment.BundleDescriptor
rootNodes
-
Fields inherited from class org.glassfish.deployment.common.RootDeploymentDescriptor
classLoader, deplLogger, extensions, moduleDescriptor, moduleID
-
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 EjbBundleDescriptorImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addApplicationException(EjbApplicationExceptionInfo appExc)
void
addAroundConstructDescriptor(LifecycleCallbackDescriptor aroundConstructDesc)
void
addEjb(EjbDescriptor ejbDescriptor)
void
addEjbReferenceDescriptor(EjbReference ejbReference)
Adds a reference to another ejb to me.void
addEnterpriseBeansProperty(NameValuePairDescriptor newProp)
void
addEntityManagerFactoryReferenceDescriptor(EntityManagerFactoryReferenceDescriptor reference)
void
addEntityManagerReferenceDescriptor(EntityManagerReferenceDescriptor reference)
void
addEnvironmentProperty(EnvironmentProperty environmentProperty)
Adds the specified environment property to the receiver.void
addInterceptor(EjbInterceptor interceptor)
void
addMessageDestinationReferenceDescriptor(MessageDestinationReferenceDescriptor messageDestRef)
Adds the specified message destination reference to the receiver.void
addPersistenceManager(IASPersistenceManagerDescriptor pmDesc)
void
addPostConstructDescriptor(LifecycleCallbackDescriptor postConstructDesc)
Adds the specified post-construct descriptor to the receiver.void
addPreDestroyDescriptor(LifecycleCallbackDescriptor preDestroyDesc)
Adds the specified pre-destroy descriptor to the receiver.void
addRelationship(RelationshipDescriptor relDesc)
Add a RelationshipDescriptor which describes a CMR field between a bean/DO/entityRef in this ejb-jar.void
addResourceEnvReferenceDescriptor(ResourceEnvReferenceDescriptor resourceEnvReference)
Adds the specified resource environment reference to the receiver.void
addResourceReferenceDescriptor(ResourceReferenceDescriptor resourceReference)
Adds a resource reference to me.void
addSecurityRoleMapping(SecurityRoleMapping roleMapping)
void
addServiceReferenceDescriptor(ServiceReferenceDescriptor serviceRef)
Adds the specified service reference to the receiver.void
appendInterceptorBinding(InterceptorBindingDescriptor binding)
boolean
areResourceReferencesValid()
Checks whether the role references my ejbs have reference roles that I have.boolean
containsCMPEntity()
Collection<? extends PersistenceUnitDescriptor>
findReferencedPUs()
This method returns all the persistence units that are referenced by this module.Map<String,EjbApplicationExceptionInfo>
getApplicationExceptions()
LifecycleCallbackDescriptor
getAroundConstructDescriptorByClass(String className)
Set<LifecycleCallbackDescriptor>
getAroundConstructDescriptors()
ComponentVisitor
getBundleVisitor()
ResourceReferenceDescriptor
getCMPResourceReference()
Return the Resource I use for CMP.String
getDefaultSpecVersion()
Descriptor
getDescriptorByName(String name)
Collection<Long>
getDescriptorIds()
Boolean
getDisableNonportableJndiNames()
EjbDescriptor[]
getEjbByClassName(String className)
Returns all ejb descriptors that has a give Class name.EjbDescriptor
getEjbByName(String name)
Returns an ejb descriptor that I have by the same name, otherwise throws an IllegalArgumentExceptionEjbDescriptor
getEjbByName(String name, boolean isCreateDummy)
Returns an ejb descriptor that I have by the same name.EjbDescriptor[]
getEjbBySEIName(String className)
Returns all ejb descriptors that has a given Class name as the web service endpoint interface.String
getEjbClientJarUri()
Return the empty String or the entry name of the ejb client JAR in my archive if I have one.EjbReference
getEjbReference(String name)
Looks up an ejb reference with the given name.EjbReference
getEjbReferenceByName(String name)
Return a reference to another ejb by the same name or throw an IllegalArgumentException.Set<EjbReference>
getEjbReferenceDescriptors()
Returns the generated XML directory feturn the set of ejb references this ejb declares.Set<ResourceReferenceDescriptor>
getEjbResourceReferenceDescriptors()
Return the set of references to resources held by ejbs defined in this module.Set<EjbDescriptor>
getEjbs()
Return the Set of ejb descriptors that I have.Set<ServiceReferenceDescriptor>
getEjbServiceReferenceDescriptors()
List<NameValuePairDescriptor>
getEnterpriseBeansProperties()
String
getEnterpriseBeansProperty(String key)
EntityManagerFactoryReferenceDescriptor
getEntityManagerFactoryReferenceByName(String name)
Return the entity manager factory reference descriptor corresponding to the given name.Set<EntityManagerFactoryReferenceDescriptor>
getEntityManagerFactoryReferenceDescriptors()
Return a set of entity manager factory reference descriptors.EntityManagerReferenceDescriptor
getEntityManagerReferenceByName(String name)
Return the entity manager factory reference descriptor corresponding to the given name.Set<EntityManagerReferenceDescriptor>
getEntityManagerReferenceDescriptors()
Return a set of entity manager reference descriptors.Set<EnvironmentProperty>
getEnvironmentProperties()
Return a copy of the structure holding the environment properties.EnvironmentProperty
getEnvironmentPropertyByName(String name)
Returns the environment property object searching on the supplied key.static int
getIdFromEjbId(long ejbId)
List<InjectionCapable>
getInjectableResourcesByClass(String className)
protected List<InjectionCapable>
getInjectableResourcesByClass(String className, JndiNameEnvironment jndiNameEnv)
Define implementation of getInjectableResourceByClass here so it isn't replicated across appclient, web, ejb descriptors.InjectionInfo
getInjectionInfoByClass(Class clazz)
List<InterceptorBindingDescriptor>
getInterceptorBindings()
EjbInterceptor
getInterceptorByClassName(String className)
Set<EjbInterceptor>
getInterceptors()
MessageDestinationReferenceDescriptor
getMessageDestinationReferenceByName(String name)
Looks up an message destination reference with the given name.Set<MessageDestinationReferenceDescriptor>
getMessageDestinationReferenceDescriptors()
Return a set of message destination reference descriptors.ArchiveType
getModuleType()
String
getName()
Returns my name.Collection
getNamedDescriptors()
Return the set of NamedDescriptors that I have.Vector<NamedReferencePair>
getNamedReferencePairs()
Return all the named descriptors I have together with the descriptor that references each one in a Vector of NameReferencePairs.PersistenceManagerInUse
getPersistenceManagerInUse()
Vector
getPersistenceManagers()
LifecycleCallbackDescriptor
getPostConstructDescriptorByClass(String className)
Return the post-construct descriptor corresponding to the given name.Set<LifecycleCallbackDescriptor>
getPostConstructDescriptors()
Return a set of post-construct descriptors.LifecycleCallbackDescriptor
getPreDestroyDescriptorByClass(String className)
Return the pre-destroy descriptor corresponding to the given name.Set<LifecycleCallbackDescriptor>
getPreDestroyDescriptors()
Return a set of pre-destroy descriptors.IASPersistenceManagerDescriptor
getPreferredPersistenceManager()
Set<RelationshipDescriptor>
getRelationships()
Get all relationships in this ejb-jar.String
getRelationshipsDescription()
EJB2.0: get description forelement. ResourceEnvReferenceDescriptor
getResourceEnvReferenceByName(String name)
Return a reference to another ejb by the same name or throw an IllegalArgumentException.Set<ResourceEnvReferenceDescriptor>
getResourceEnvReferenceDescriptors()
Return the set of resource environment references this ejb declares.ResourceReferenceDescriptor
getResourceReferenceByName(String name)
Return the resource object corresponding to the supplied name or throw an illegal argument exception.Set<ResourceReferenceDescriptor>
getResourceReferenceDescriptors()
Return the set of resource references this ejb declares.List<SecurityRoleMapping>
getSecurityRoleMappings()
ServiceReferenceDescriptor
getServiceReferenceByName(String name)
Looks up an service reference with the given name.Set<ServiceReferenceDescriptor>
getServiceReferenceDescriptors()
Return a set of service reference descriptors.DescriptorVisitor
getTracerVisitor()
long
getUniqueId()
Returns the unique id used in a stand alone ejb module.boolean
hasAssemblyInformation()
Return true if I have roles, permissioned roles or container transactions.boolean
hasContainerTransactions()
Return true if any of my ejb's methods have been assigned transaction attributes.boolean
hasEjbByName(String name)
Returns true if I have an ejb descriptor by that name.boolean
hasEjbReferences()
Return true if I reference other ejbs, false else.boolean
hasInterceptors()
boolean
hasPermissionedRoles()
Returns true if I have Roles to which method permissions have been assigned.boolean
hasRelationship(RelationshipDescriptor rd)
Returns true if given relationship is already part of this ejb-jar.boolean
hasRelationships()
boolean
hasWebServiceClients()
boolean
isEJB11()
True if EJB version is 1.x.boolean
isEJB20()
True if EJB version is 2.x.boolean
isEmpty()
Return true if this root deployment descriptor does not describe anythingvoid
prependInterceptorBinding(InterceptorBindingDescriptor binding)
void
print(StringBuilder toStringBuilder)
Returns a formatted String representing my state.void
removeEjb(EjbDescriptor ejbDescriptor)
Remove the given ejb descriptor from my (by equality).void
removeEjbReferenceDescriptor(EjbReference ejbReference)
Removes the specificed ejb reference from the receiver.void
removeEnvironmentProperty(EnvironmentProperty environmentProperty)
Removes the given environment property from me.void
removeMessageDestinationReferenceDescriptor(MessageDestinationReferenceDescriptor msgDestRef)
Removes the specified message destination reference from the receiver.void
removeRelationship(RelationshipDescriptor relDesc)
Add a RelationshipDescriptor which describes a CMR field between a bean/DO/entityRef in this ejb-jar.void
removeResourceEnvReferenceDescriptor(ResourceEnvReferenceDescriptor resourceEnvReference)
Removes the specified resource environment reference from the receiver.void
removeResourceReferenceDescriptor(ResourceReferenceDescriptor resourceReference)
Removes the given resource reference from me.void
removeRole(Role role)
Removes the given org.glassfish.security.common.Role object from me.void
removeServiceReferenceDescriptor(ServiceReferenceDescriptor serviceRef)
Removes the specified service reference from the receiver.void
setCMPResourceReference(ResourceReferenceDescriptor resourceReference)
Sets the resource reference I use for CMP.void
setDisableNonportableJndiNames(String disableOrNot)
void
setEjbClientJarUri(String ejbClientJarUri)
void
setInterceptorBindings(List<InterceptorBindingDescriptor> bindings)
void
setPersistenceManagerInuse(String id, String ver)
void
setPersistenceManagerInUse(PersistenceManagerInUse inuse)
void
setRelationshipsDescription(String relationshipsDescription)
EJB2.0: set description forelement. void
setUniqueId(long id)
Sets the unique id for a stand alone ejb module.void
setupDataStructuresForRuntime()
Setup EJB Ids during deployment and shouldn't be called at runtimevoid
visit(DescriptorVisitor aVisitor)
visit the descriptor and all sub descriptors with a DOL visitor implementation-
Methods inherited from class com.sun.enterprise.deployment.CommonResourceBundleDescriptor
addResourceDescriptor, getAllResourcesDescriptors, getAllResourcesDescriptors, getResourceDescriptor, getResourceDescriptors, removeResourceDescriptor
-
Methods inherited from class com.sun.enterprise.deployment.BundleDescriptor
addBundleDescriptor, addEntityManagerFactory, addManagedBean, addMessageDestination, addRole, addRole, addRootNode, findDefaultPU, findReferencedPU, findReferencedPUsViaPCRefs, findReferencedPUsViaPURefs, findReferencedPUViaEMFRef, findReferencedPUViaEMRef, getApplication, getClassLoader, getCompatibility, getDeploymentDescriptorDir, getEntityManagerFactories, getEntityManagerFactory, getInjectableResources, getInjectionInfoByClass, getKeepState, getManagedBeanByBeanClass, getManagedBeans, getMessageDestinationByName, getMessageDestinations, getModuleID, getModuleName, getNamedDescriptorsFrom, getNamedReferencePairsFrom, getPostConstructDescriptorByClass, getPreDestroyDescriptorByClass, getRawModuleID, getRoles, getRootNode, getUniqueFriendlyId, getVisiblePUs, getWebServiceEndpointByName, getWebServices, getWsdlDir, hasManagedBeanByBeanClass, hasMessageDestinationByName, hasWebServices, isApplication, isDDWithNoAnnotationAllowed, isDefaultGroupPrincipalMapping, isFullAttribute, isFullFlag, isPackagedAsSingleModule, isPolicyModified, isStandalone, removeMessageDestination, setApplication, setCompatibility, setDefaultGroupPrincipalMapping, setFullAttribute, setFullFlag, setKeepState, setPolicyModified, visit
-
Methods inherited from class org.glassfish.deployment.common.RootDeploymentDescriptor
addExtensionDescriptor, getDisplayName, getExtensionsDescriptors, getExtensionsDescriptors, getExtensionsDescriptors, getMainDescriptor, getModuleDescriptor, getSchemaLocation, getSpecVersion, isExtensionDescriptor, setClassLoader, setDisplayName, setModuleDescriptor, setModuleID, setName, setSchemaLocation, setSpecVersion
-
Methods inherited from class org.glassfish.deployment.common.Descriptor
addDescriptorExtension, addPrefixMapping, createUniqueFilenameAmongst, createUniqueNameAmongst, createUniqueNameAmongstNamedDescriptors, fillDocType, getDeploymentExtensions, getDescription, getDescriptorExtension, getDescriptorExtensions, getDocType, getLargeIconUri, getLocalizedDescription, getLocalizedDescriptions, getLocalizedDisplayName, getLocalizedDisplayNames, getLocalizedLargeIconUri, getLocalizedLargeIconUris, getLocalizedSmallIconUri, getLocalizedSmallIconUris, getPrefixMapping, getSmallIconUri, isBoundsChecking, setBoundsChecking, setDescription, setLargeIconUri, setLocalizedDescription, setLocalizedDisplayName, setLocalizedLargeIconUri, setLocalizedSmallIconUri, setSmallIconUri
-
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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.sun.enterprise.deployment.JndiNameEnvironment
getAllResourcesDescriptors, getAllResourcesDescriptors, getResourceDescriptors
-
Methods inherited from interface com.sun.enterprise.deployment.WritableJndiNameEnvironment
addResourceDescriptor, removeResourceDescriptor
-
-
-
-
Method Detail
-
isEJB20
public boolean isEJB20()
True if EJB version is 2.x. This is the default for any new modules.
-
isEJB11
public boolean isEJB11()
True if EJB version is 1.x.
-
getDefaultSpecVersion
public String getDefaultSpecVersion()
- Specified by:
getDefaultSpecVersion
in classRootDeploymentDescriptor
- Returns:
- the default version of the deployment descriptor loaded by this descriptor
-
getEjbClientJarUri
public String getEjbClientJarUri()
Return the empty String or the entry name of the ejb client JAR in my archive if I have one.
-
isEmpty
public boolean isEmpty()
Description copied from class:RootDeploymentDescriptor
Return true if this root deployment descriptor does not describe anything- Specified by:
isEmpty
in classRootDeploymentDescriptor
- Returns:
- true if this root descriptor is empty
-
setEjbClientJarUri
public void setEjbClientJarUri(String ejbClientJarUri)
-
addApplicationException
public void addApplicationException(EjbApplicationExceptionInfo appExc)
-
getApplicationExceptions
public Map<String,EjbApplicationExceptionInfo> getApplicationExceptions()
-
getNamedDescriptors
public Collection getNamedDescriptors()
Return the set of NamedDescriptors that I have.
-
getNamedReferencePairs
public Vector<NamedReferencePair> getNamedReferencePairs()
Return all the named descriptors I have together with the descriptor that references each one in a Vector of NameReferencePairs.
-
getEjbResourceReferenceDescriptors
public Set<ResourceReferenceDescriptor> getEjbResourceReferenceDescriptors()
Return the set of references to resources held by ejbs defined in this module.
-
hasEjbReferences
public boolean hasEjbReferences()
Return true if I reference other ejbs, false else.
-
getEjbs
public Set<EjbDescriptor> getEjbs()
Return the Set of ejb descriptors that I have.- Specified by:
getEjbs
in classEjbBundleDescriptor
-
setupDataStructuresForRuntime
public void setupDataStructuresForRuntime()
Setup EJB Ids during deployment and shouldn't be called at runtime
-
hasEjbByName
public boolean hasEjbByName(String name)
Returns true if I have an ejb descriptor by that name.- Specified by:
hasEjbByName
in classEjbBundleDescriptor
-
getEjbByName
public EjbDescriptor getEjbByName(String name)
Returns an ejb descriptor that I have by the same name, otherwise throws an IllegalArgumentException- Specified by:
getEjbByName
in classEjbBundleDescriptor
-
getEjbByName
public EjbDescriptor getEjbByName(String name, boolean isCreateDummy)
Returns an ejb descriptor that I have by the same name. Create a DummyEjbDescriptor if requested, otherwise throws an IllegalArgumentException
-
getEjbByClassName
public EjbDescriptor[] getEjbByClassName(String className)
Returns all ejb descriptors that has a give Class name. It returns an empty array if no ejb is found.- Specified by:
getEjbByClassName
in classEjbBundleDescriptor
-
getEjbBySEIName
public EjbDescriptor[] getEjbBySEIName(String className)
Returns all ejb descriptors that has a given Class name as the web service endpoint interface. It returns an empty array if no ejb is found.- Specified by:
getEjbBySEIName
in classEjbBundleDescriptor
-
getDescriptorIds
public Collection<Long> getDescriptorIds()
- Returns:
- Collection of unique ID of EJBs within the same module
-
addEjb
public void addEjb(EjbDescriptor ejbDescriptor)
-
removeEjb
public void removeEjb(EjbDescriptor ejbDescriptor)
Remove the given ejb descriptor from my (by equality).
-
containsCMPEntity
public boolean containsCMPEntity()
- Returns:
- true if this bundle descriptor contains at least one CMP EntityBean
-
addInterceptor
public void addInterceptor(EjbInterceptor interceptor)
-
getInterceptorByClassName
public EjbInterceptor getInterceptorByClassName(String className)
- Specified by:
getInterceptorByClassName
in classEjbBundleDescriptor
-
hasInterceptors
public boolean hasInterceptors()
-
getInterceptors
public Set<EjbInterceptor> getInterceptors()
- Specified by:
getInterceptors
in classEjbBundleDescriptor
-
prependInterceptorBinding
public void prependInterceptorBinding(InterceptorBindingDescriptor binding)
-
appendInterceptorBinding
public void appendInterceptorBinding(InterceptorBindingDescriptor binding)
-
getInterceptorBindings
public List<InterceptorBindingDescriptor> getInterceptorBindings()
-
setInterceptorBindings
public void setInterceptorBindings(List<InterceptorBindingDescriptor> bindings)
-
areResourceReferencesValid
public boolean areResourceReferencesValid()
Checks whether the role references my ejbs have reference roles that I have.
-
removeRole
public void removeRole(Role role)
Removes the given org.glassfish.security.common.Role object from me.- Specified by:
removeRole
in interfaceRoles
- Overrides:
removeRole
in classBundleDescriptor
-
hasPermissionedRoles
public boolean hasPermissionedRoles()
Returns true if I have Roles to which method permissions have been assigned.
-
hasContainerTransactions
public boolean hasContainerTransactions()
Return true if any of my ejb's methods have been assigned transaction attributes.
-
hasAssemblyInformation
public boolean hasAssemblyInformation()
Return true if I have roles, permissioned roles or container transactions.
-
addRelationship
public void addRelationship(RelationshipDescriptor relDesc)
Add a RelationshipDescriptor which describes a CMR field between a bean/DO/entityRef in this ejb-jar.
-
removeRelationship
public void removeRelationship(RelationshipDescriptor relDesc)
Add a RelationshipDescriptor which describes a CMR field between a bean/DO/entityRef in this ejb-jar.
-
getRelationshipsDescription
public String getRelationshipsDescription()
EJB2.0: get description forelement.
-
setRelationshipsDescription
public void setRelationshipsDescription(String relationshipsDescription)
EJB2.0: set description forelement.
-
getRelationships
public Set<RelationshipDescriptor> getRelationships()
Get all relationships in this ejb-jar.- Returns:
- a Set of RelationshipDescriptors.
-
hasRelationships
public boolean hasRelationships()
-
hasRelationship
public boolean hasRelationship(RelationshipDescriptor rd)
Returns true if given relationship is already part of this ejb-jar.
-
getCMPResourceReference
public ResourceReferenceDescriptor getCMPResourceReference()
Return the Resource I use for CMP.
-
setCMPResourceReference
public void setCMPResourceReference(ResourceReferenceDescriptor resourceReference)
Sets the resource reference I use for CMP.
-
getDescriptorByName
public Descriptor getDescriptorByName(String name)
-
getName
public String getName()
Returns my name.- Overrides:
getName
in classRootDeploymentDescriptor
- Returns:
- the name of this descriptor
-
setUniqueId
public void setUniqueId(long id)
Sets the unique id for a stand alone ejb module. It traverses through all the ejbs in this stand alone module and sets the unique id for each of them. The traversal order is done in ascending element order.Note: This method will not be called for application.
- Parameters:
id
- unique id for stand alone module
-
getUniqueId
public long getUniqueId()
Returns the unique id used in a stand alone ejb module. For application, this will return zero.- Returns:
- the unique if used in stand alone ejb module
-
getIdFromEjbId
public static int getIdFromEjbId(long ejbId)
-
hasWebServiceClients
public boolean hasWebServiceClients()
- Overrides:
hasWebServiceClients
in classBundleDescriptor
- Returns:
- true if this bundle descriptor defines web service clients
-
getEjbServiceReferenceDescriptors
public Set<ServiceReferenceDescriptor> getEjbServiceReferenceDescriptors()
- Specified by:
getEjbServiceReferenceDescriptors
in classEjbBundleDescriptor
- Returns:
- a set of service-ref from ejbs contained in this bundle this bundle or empty set if none
-
print
public void print(StringBuilder toStringBuilder)
Returns a formatted String representing my state.- Overrides:
print
in classBundleDescriptor
-
getTracerVisitor
public DescriptorVisitor getTracerVisitor()
- Overrides:
getTracerVisitor
in classRootDeploymentDescriptor
- Returns:
- the tracer visitor for this descriptor
-
getBundleVisitor
public ComponentVisitor getBundleVisitor()
- Overrides:
getBundleVisitor
in classBundleDescriptor
- Returns:
- the visitor for this bundle descriptor
-
visit
public void visit(DescriptorVisitor aVisitor)
visit the descriptor and all sub descriptors with a DOL visitor implementation- Overrides:
visit
in classDescriptor
- Parameters:
aVisitor
- a visitor to traverse the descriptors
-
getModuleType
public ArchiveType getModuleType()
- Specified by:
getModuleType
in classBundleDescriptor
- Returns:
- the module type for this bundle descriptor
-
setPersistenceManagerInUse
public void setPersistenceManagerInUse(PersistenceManagerInUse inuse)
-
getPersistenceManagerInUse
public PersistenceManagerInUse getPersistenceManagerInUse()
-
addPersistenceManager
public void addPersistenceManager(IASPersistenceManagerDescriptor pmDesc)
-
getPreferredPersistenceManager
public IASPersistenceManagerDescriptor getPreferredPersistenceManager()
-
getPersistenceManagers
public Vector getPersistenceManagers()
-
addSecurityRoleMapping
public void addSecurityRoleMapping(SecurityRoleMapping roleMapping)
-
getSecurityRoleMappings
public List<SecurityRoleMapping> getSecurityRoleMappings()
-
findReferencedPUs
public Collection<? extends PersistenceUnitDescriptor> findReferencedPUs()
This method returns all the persistence units that are referenced by this module. Depending on the type of component, a PU can be referenced by one of the four following ways:, @PersistenceContext, and @PersistenceUnit Only EjbBundleDescriptor, ApplicationClientDescriptor and WebBundleDescriptor have useful implementation of this method. - Overrides:
findReferencedPUs
in classBundleDescriptor
- Returns:
- persistence units that are referenced by this module
-
getEjbReferenceDescriptors
public Set<EjbReference> getEjbReferenceDescriptors()
Returns the generated XML directory feturn the set of ejb references this ejb declares.- Returns:
- java.util.Set of EjbReferenceDescriptor objects
-
addEjbReferenceDescriptor
public void addEjbReferenceDescriptor(EjbReference ejbReference)
Adds a reference to another ejb to me.- Parameters:
ejbReference
- the EjbReferenceDescriptor to add.
-
removeEjbReferenceDescriptor
public void removeEjbReferenceDescriptor(EjbReference ejbReference)
Description copied from interface:WritableJndiNameEnvironment
Removes the specificed ejb reference from the receiver.- Parameters:
ejbReference
- the EjbReferenceDescriptor to remove.
-
getEjbReferenceByName
public EjbReference getEjbReferenceByName(String name)
Return a reference to another ejb by the same name or throw an IllegalArgumentException.
-
getEjbReference
public EjbReference getEjbReference(String name)
Description copied from interface:EjbReferenceContainer
Looks up an ejb reference with the given name. Throws an IllegalArgumentException if it is not found.
-
getServiceReferenceDescriptors
public Set<ServiceReferenceDescriptor> getServiceReferenceDescriptors()
Description copied from interface:JndiNameEnvironment
Return a set of service reference descriptors.- Returns:
- java.util.Set of ServiceReferenceDescriptor objects
-
addServiceReferenceDescriptor
public void addServiceReferenceDescriptor(ServiceReferenceDescriptor serviceRef)
Description copied from interface:WritableJndiNameEnvironment
Adds the specified service reference to the receiver.- Parameters:
serviceRef
- the ServiceReferenceDescriptor to add.
-
removeServiceReferenceDescriptor
public void removeServiceReferenceDescriptor(ServiceReferenceDescriptor serviceRef)
Description copied from interface:WritableJndiNameEnvironment
Removes the specified service reference from the receiver.- Parameters:
serviceRef
- the ServiceReferenceDescriptor to remove.
-
getServiceReferenceByName
public ServiceReferenceDescriptor getServiceReferenceByName(String name)
Looks up an service reference with the given name. Throws an IllegalArgumentException if it is not found.- Returns:
- ServiceReferenceDescriptor object
-
getMessageDestinationReferenceDescriptors
public Set<MessageDestinationReferenceDescriptor> getMessageDestinationReferenceDescriptors()
Description copied from interface:JndiNameEnvironment
Return a set of message destination reference descriptors.- Returns:
- java.util.Set of MessageDestinationReferenceDescriptor objects
-
addMessageDestinationReferenceDescriptor
public void addMessageDestinationReferenceDescriptor(MessageDestinationReferenceDescriptor messageDestRef)
Description copied from interface:WritableJndiNameEnvironment
Adds the specified message destination reference to the receiver.- Parameters:
messageDestRef
- the MessageDestinationReferenceDescriptor to add.
-
removeMessageDestinationReferenceDescriptor
public void removeMessageDestinationReferenceDescriptor(MessageDestinationReferenceDescriptor msgDestRef)
Description copied from interface:WritableJndiNameEnvironment
Removes the specified message destination reference from the receiver.- Parameters:
msgDestRef
- MessageDestinationReferenceDescriptor to remove.
-
getMessageDestinationReferenceByName
public MessageDestinationReferenceDescriptor getMessageDestinationReferenceByName(String name)
Looks up an message destination reference with the given name. Throws an IllegalArgumentException if it is not found.- Returns:
- MessageDestinationReferenceDescriptor object
-
getResourceEnvReferenceDescriptors
public Set<ResourceEnvReferenceDescriptor> getResourceEnvReferenceDescriptors()
Return the set of resource environment references this ejb declares.- Returns:
- java.util.Set of ResourceEnvReferenceDescriptor objects
-
addResourceEnvReferenceDescriptor
public void addResourceEnvReferenceDescriptor(ResourceEnvReferenceDescriptor resourceEnvReference)
Description copied from interface:WritableJndiNameEnvironment
Adds the specified resource environment reference to the receiver.- Parameters:
resourceEnvReference
- the ResourceEnvReferenceDescriptor to add.
-
removeResourceEnvReferenceDescriptor
public void removeResourceEnvReferenceDescriptor(ResourceEnvReferenceDescriptor resourceEnvReference)
Description copied from interface:WritableJndiNameEnvironment
Removes the specified resource environment reference from the receiver.- Parameters:
resourceEnvReference
- the ResourceEnvReferenceDescriptor to remove.
-
getResourceEnvReferenceByName
public ResourceEnvReferenceDescriptor getResourceEnvReferenceByName(String name)
Return a reference to another ejb by the same name or throw an IllegalArgumentException.- Returns:
- ResourceEnvReferenceDescriptor object
-
getResourceReferenceDescriptors
public Set<ResourceReferenceDescriptor> getResourceReferenceDescriptors()
Return the set of resource references this ejb declares.- Returns:
- java.util.Set of ResourceReferenceDescriptor objects
-
addResourceReferenceDescriptor
public void addResourceReferenceDescriptor(ResourceReferenceDescriptor resourceReference)
Adds a resource reference to me.- Parameters:
resourceReference
- the ResourceReferenceDescriptor to add.
-
removeResourceReferenceDescriptor
public void removeResourceReferenceDescriptor(ResourceReferenceDescriptor resourceReference)
Removes the given resource reference from me.- Parameters:
resourceReference
- the ResourceReferenceDescriptor to remove.
-
getResourceReferenceByName
public ResourceReferenceDescriptor getResourceReferenceByName(String name)
Return the resource object corresponding to the supplied name or throw an illegal argument exception.
-
getEnvironmentPropertyByName
public EnvironmentProperty getEnvironmentPropertyByName(String name)
Returns the environment property object searching on the supplied key. throws an illegal argument exception if no such environment property exists.- Returns:
- EnvironmentProperty descriptor
-
getEnvironmentProperties
public Set<EnvironmentProperty> getEnvironmentProperties()
Return a copy of the structure holding the environment properties.- Returns:
- java.util.Set of EnvironmentProperty objects
-
addEnvironmentProperty
public void addEnvironmentProperty(EnvironmentProperty environmentProperty)
Description copied from interface:WritableJndiNameEnvironment
Adds the specified environment property to the receiver.- Parameters:
environmentProperty
- the EnvironmentProperty to add.
-
removeEnvironmentProperty
public void removeEnvironmentProperty(EnvironmentProperty environmentProperty)
Removes the given environment property from me.- Parameters:
environmentProperty
- the EnvironmentProperty to remove.
-
getEntityManagerFactoryReferenceDescriptors
public Set<EntityManagerFactoryReferenceDescriptor> getEntityManagerFactoryReferenceDescriptors()
Description copied from interface:JndiNameEnvironment
Return a set of entity manager factory reference descriptors.
-
getEntityManagerFactoryReferenceByName
public EntityManagerFactoryReferenceDescriptor getEntityManagerFactoryReferenceByName(String name)
Return the entity manager factory reference descriptor corresponding to the given name.
-
addEntityManagerFactoryReferenceDescriptor
public void addEntityManagerFactoryReferenceDescriptor(EntityManagerFactoryReferenceDescriptor reference)
-
getEntityManagerReferenceDescriptors
public Set<EntityManagerReferenceDescriptor> getEntityManagerReferenceDescriptors()
Description copied from interface:JndiNameEnvironment
Return a set of entity manager reference descriptors.
-
getEntityManagerReferenceByName
public EntityManagerReferenceDescriptor getEntityManagerReferenceByName(String name)
Return the entity manager factory reference descriptor corresponding to the given name.
-
addEntityManagerReferenceDescriptor
public void addEntityManagerReferenceDescriptor(EntityManagerReferenceDescriptor reference)
-
getInjectableResourcesByClass
public List<InjectionCapable> getInjectableResourcesByClass(String className)
-
getInjectionInfoByClass
public InjectionInfo getInjectionInfoByClass(Class clazz)
-
getDisableNonportableJndiNames
public Boolean getDisableNonportableJndiNames()
- Specified by:
getDisableNonportableJndiNames
in classEjbBundleDescriptor
-
setDisableNonportableJndiNames
public void setDisableNonportableJndiNames(String disableOrNot)
-
getAroundConstructDescriptors
public Set<LifecycleCallbackDescriptor> getAroundConstructDescriptors()
-
addAroundConstructDescriptor
public void addAroundConstructDescriptor(LifecycleCallbackDescriptor aroundConstructDesc)
-
getAroundConstructDescriptorByClass
public LifecycleCallbackDescriptor getAroundConstructDescriptorByClass(String className)
-
getPostConstructDescriptors
public Set<LifecycleCallbackDescriptor> getPostConstructDescriptors()
Description copied from interface:JndiNameEnvironment
Return a set of post-construct descriptors.- Returns:
- java.util.Set of LifecycleCallbackDescriptor post-construct objects
-
addPostConstructDescriptor
public void addPostConstructDescriptor(LifecycleCallbackDescriptor postConstructDesc)
Description copied from interface:WritableJndiNameEnvironment
Adds the specified post-construct descriptor to the receiver.- Parameters:
postConstructDesc
- the post-construct LifecycleCallbackDescriptor to add.
-
getPostConstructDescriptorByClass
public LifecycleCallbackDescriptor getPostConstructDescriptorByClass(String className)
Description copied from interface:JndiNameEnvironment
Return the post-construct descriptor corresponding to the given name.- Returns:
- LifecycleCallbackDescriptor post-construct object
-
getPreDestroyDescriptors
public Set<LifecycleCallbackDescriptor> getPreDestroyDescriptors()
Description copied from interface:JndiNameEnvironment
Return a set of pre-destroy descriptors.- Returns:
- java.util.Set of LifecycleCallbackDescriptor pre-destroy objects
-
addPreDestroyDescriptor
public void addPreDestroyDescriptor(LifecycleCallbackDescriptor preDestroyDesc)
Description copied from interface:WritableJndiNameEnvironment
Adds the specified pre-destroy descriptor to the receiver.- Parameters:
preDestroyDesc
- the pre-destroy LifecycleCallbackDescriptor to add.
-
getPreDestroyDescriptorByClass
public LifecycleCallbackDescriptor getPreDestroyDescriptorByClass(String className)
Description copied from interface:JndiNameEnvironment
Return the pre-destroy descriptor corresponding to the given name.- Returns:
- LifecycleCallbackDescriptor pre-destroy object
-
addEnterpriseBeansProperty
public void addEnterpriseBeansProperty(NameValuePairDescriptor newProp)
-
getEnterpriseBeansProperties
public List<NameValuePairDescriptor> getEnterpriseBeansProperties()
-
getInjectableResourcesByClass
protected List<InjectionCapable> getInjectableResourcesByClass(String className, JndiNameEnvironment jndiNameEnv)
Description copied from class:BundleDescriptor
Define implementation of getInjectableResourceByClass here so it isn't replicated across appclient, web, ejb descriptors.- Overrides:
getInjectableResourcesByClass
in classBundleDescriptor
-
-