com.sun.enterprise.deployment
Class EjbBundleDescriptor

java.lang.Object
  extended by java.util.Observable
      extended by com.sun.enterprise.deployment.DynamicAttributesDescriptor
          extended by com.sun.enterprise.deployment.Descriptor
              extended by com.sun.enterprise.deployment.RootDeploymentDescriptor
                  extended by com.sun.enterprise.deployment.BundleDescriptor
                      extended by com.sun.enterprise.deployment.EjbBundleDescriptor
All Implemented Interfaces:
JndiNameEnvironment, Roles, EjbReferenceContainer, MessageDestinationReferenceContainer, ResourceEnvReferenceContainer, ResourceReferenceContainer, ServiceReferenceContainer, WritableJndiNameEnvironment, java.io.Serializable

public class EjbBundleDescriptor
extends BundleDescriptor
implements WritableJndiNameEnvironment, EjbReferenceContainer, ResourceEnvReferenceContainer, ResourceReferenceContainer, ServiceReferenceContainer, MessageDestinationReferenceContainer

I represent all the configurable deployment information contained in an EJB JAR.

Author:
Danny Coward
See Also:
Serialized Form

Field Summary
static java.lang.String SPEC_VERSION
           
 
Fields inherited from class com.sun.enterprise.deployment.RootDeploymentDescriptor
classLoader, extensions, moduleDescriptor, moduleID
 
Fields inherited from class com.sun.enterprise.deployment.Descriptor
DESCRIPTION_CHANGED, DESCRIPTOR_CHANGED, docType, LARGE_ICON_CHANGED, NAME_CHANGED, SMALL_ICON_CHANGED
 
Constructor Summary
EjbBundleDescriptor()
          Constructs an ejb bundle descriptor with no ejbs.
 
Method Summary
 void addApplicationException(EjbApplicationExceptionInfo appExc)
           
 void addDataSourceDefinitionDescriptor(DataSourceDefinitionDescriptor reference)
          Adds the specified data-source-definition to the receiver.
 void addEjb(EjbDescriptor ejbDescriptor)
          Add an ejb to me.
 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 addJmsDestinationReferenceDescriptor(JmsDestinationReferenceDescriptor jmsDestReference)
          Adds the specified JMS destination reference to the receiver.
 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 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()
           
 java.util.Collection<? extends PersistenceUnitDescriptor> findReferencedPUs()
          This method returns all the persistence units that are referenced by this module.
 java.util.Map<java.lang.String,EjbApplicationExceptionInfo> getApplicationExceptions()
           
 ResourceReferenceDescriptor getCMPResourceReference()
          Return the Resource I use for CMP.
 java.util.Set<DataSourceDefinitionDescriptor> getDataSourceDefinitionDescriptors()
          Return a set of data-source-definition descriptors.
 java.lang.String getDefaultSpecVersion()
           
 Descriptor getDescriptorByName(java.lang.String name)
           
 java.lang.Boolean getDisableNonportableJndiNames()
           
 EjbDescriptor[] getEjbByClassName(java.lang.String className)
          Returns all ejb descriptors that has a give Class name.
 EjbDescriptor getEjbByName(java.lang.String name)
          Returns an ejb descriptor that I have by the same name, otherwise throws an IllegalArgumentException
 EjbDescriptor getEjbByName(java.lang.String name, boolean isCreateDummy)
          Returns an ejb descriptor that I have by the same name.
 EjbDescriptor[] getEjbBySEIName(java.lang.String className)
          Returns all ejb descriptors that has a given Class name as the web service endpoint interface.
 java.lang.String getEjbClientJarUri()
          Return the emptry String or the entry name of the ejb client JAR in my archive if I have one.
 EjbReference getEjbReference(java.lang.String name)
          Looks up an ejb reference with the given name.
 EjbReference getEjbReferenceByName(java.lang.String name)
          Return a reference to another ejb by the same name or throw an IllegalArgumentException.
 java.util.Set<EjbReference> getEjbReferenceDescriptors()
          Returns the generated XML directory feturn the set of ejb references this ejb declares.
 java.util.Set<ResourceReferenceDescriptor> getEjbResourceReferenceDescriptors()
          Return the set of references to resources held by ejbs defined in this module.
 java.util.Set<EjbDescriptor> getEjbs()
          Return the Set of ejb descriptors that I have.
 java.util.Set<ServiceReferenceDescriptor> getEjbServiceReferenceDescriptors()
           
 java.util.List<NameValuePairDescriptor> getEnterpriseBeansProperties()
           
 java.lang.String getEnterpriseBeansProperty(java.lang.String key)
           
 EntityManagerFactoryReferenceDescriptor getEntityManagerFactoryReferenceByName(java.lang.String name)
          Return the entity manager factory reference descriptor corresponding to the given name.
 java.util.Set<EntityManagerFactoryReferenceDescriptor> getEntityManagerFactoryReferenceDescriptors()
          Return a set of entity manager factory reference descriptors.
 EntityManagerReferenceDescriptor getEntityManagerReferenceByName(java.lang.String name)
          Return the entity manager factory reference descriptor corresponding to the given name.
 java.util.Set<EntityManagerReferenceDescriptor> getEntityManagerReferenceDescriptors()
          Return a set of entity manager reference descriptors.
 java.util.Set<EnvironmentProperty> getEnvironmentProperties()
          Return a copy of the structure holding the environment properties.
 EnvironmentProperty getEnvironmentPropertyByName(java.lang.String name)
          Returns the environment property object searching on the supplied key.
static int getIdFromEjbId(long ejbId)
           
 java.util.List<InjectionCapable> getInjectableResourcesByClass(java.lang.String className)
           
 InjectionInfo getInjectionInfoByClass(java.lang.Class clazz)
           
 java.util.List<InterceptorBindingDescriptor> getInterceptorBindings()
           
 EjbInterceptor getInterceptorByClassName(java.lang.String className)
           
 java.util.Set<EjbInterceptor> getInterceptors()
           
 JmsDestinationReferenceDescriptor getJmsDestinationReferenceByName(java.lang.String name)
          Return a reference to another ejb by the same name or throw an IllegalArgumentException.
 java.util.Set<JmsDestinationReferenceDescriptor> getJmsDestinationReferenceDescriptors()
          Return the set of JMS destination references this ejb declares.
 MessageDestinationReferenceDescriptor getMessageDestinationReferenceByName(java.lang.String name)
          Looks up an message destination reference with the given name.
 java.util.Set<MessageDestinationReferenceDescriptor> getMessageDestinationReferenceDescriptors()
          Return a set of message destination reference descriptors.
 XModuleType getModuleType()
           
 java.lang.String getName()
          Returns my name.
 java.util.Collection getNamedDescriptors()
          Return the set of NamedDescriptors that I have.
 java.util.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()
           
 java.util.Vector getPersistenceManagers()
           
 LifecycleCallbackDescriptor getPostConstructDescriptorByClass(java.lang.String className)
          Return the post-construct descriptor corresponding to the given name.
 java.util.Set<LifecycleCallbackDescriptor> getPostConstructDescriptors()
          Return a set of post-construct descriptors.
 LifecycleCallbackDescriptor getPreDestroyDescriptorByClass(java.lang.String className)
          Return the pre-destroy descriptor corresponding to the given name.
 java.util.Set<LifecycleCallbackDescriptor> getPreDestroyDescriptors()
          Return a set of pre-destroy descriptors.
 IASPersistenceManagerDescriptor getPreferredPersistenceManager()
           
 java.util.Set<RelationshipDescriptor> getRelationships()
          Get all relationships in this ejb-jar.
 java.lang.String getRelationshipsDescription()
          EJB2.0: get description for element.
 ResourceReferenceDescriptor getResourceReferenceByName(java.lang.String name)
          Return the resource object corresponding to the supplied name or throw an illegal argument exception.
 java.util.Set<ResourceReferenceDescriptor> getResourceReferenceDescriptors()
          Return the set of resource references this ejb declares.
 java.util.List<SecurityRoleMapping> getSecurityRoleMappings()
           
 ServiceReferenceDescriptor getServiceReferenceByName(java.lang.String name)
          Looks up an service reference with the given name.
 java.util.Set<ServiceReferenceDescriptor> getServiceReferenceDescriptors()
          Return a set of service reference descriptors.
 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(java.lang.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 anything
 void prependInterceptorBinding(InterceptorBindingDescriptor binding)
           
 void print(java.lang.StringBuffer toStringBuffer)
          Returns a formatted String representing my state.
 void removeDataSourceDefinitionDescriptor(DataSourceDefinitionDescriptor reference)
          Removes the specified data-source-definition from the receiver.
 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 removeJmsDestinationReferenceDescriptor(JmsDestinationReferenceDescriptor jmsDestReference)
          Removes the specified JMS destination reference from the receiver.
 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 removeResourceReferenceDescriptor(ResourceReferenceDescriptor resourceReference)
          Removes the given resource reference from me.
 void removeRole(Role role)
          Removes the given com.sun.enterprise.deployment.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(java.lang.String disableOrNot)
           
 void setEjbClientJarUri(java.lang.String ejbClientJarUri)
          Sets the ejb client JAR entry name.
 void setInterceptorBindings(java.util.List<InterceptorBindingDescriptor> bindings)
           
 void setPersistenceManagerInUse(PersistenceManagerInUse inuse)
           
 void setPersistenceManagerInuse(java.lang.String id, java.lang.String ver)
           
 void setRelationshipsDescription(java.lang.String relationshipsDescription)
          EJB2.0: set description for element.
 void setUniqueId(long id)
          Sets the unique id for a stand alone ejb module.
 void visit(DescriptorVisitor aVisitor)
          visit the descriptor and all sub descriptors with a DOL visitor implementation
 void visit(EjbBundleVisitor aVisitor)
          visit the descriptor and all sub descriptors with a DOL visitor implementation
 
Methods inherited from class com.sun.enterprise.deployment.BundleDescriptor
addEntityManagerFactory, addManagedBean, addMessageDestination, addRole, addRole, findDefaultPU, findReferencedPU, findReferencedPUsViaPCRefs, findReferencedPUsViaPURefs, findReferencedPUViaEMFRef, findReferencedPUViaEMRef, getApplication, getClassLoader, getCompatibility, getDeploymentDescriptorDir, getEntityManagerFactories, getEntityManagerFactory, getInjectableResources, getInjectableResourcesByClass, getInjectionInfoByClass, getKeepState, getManagedBeanByBeanClass, getManagedBeans, getMessageDestinationByName, getMessageDestinations, getModuleID, getModuleName, getNamedDescriptorsFrom, getNamedReferencePairsFrom, getPostConstructDescriptorByClass, getPreDestroyDescriptorByClass, getRoles, getUniqueFriendlyId, getVisiblePUs, getWebServiceEndpointByName, getWebServices, getWsdlDir, hasManagedBeanByBeanClass, hasMessageDestinationByName, hasWebServices, isApplication, isPackagedAsSingleModule, isPolicyModified, isStandalone, removeMessageDestination, setApplication, setCompatibility, setKeepState, setPolicyModified
 
Methods inherited from class com.sun.enterprise.deployment.RootDeploymentDescriptor
addExtensionDescriptor, getDisplayName, getExtensionsDescriptors, getExtensionsDescriptors, getExtensionsDescriptors, getMainDescriptor, getModuleDescriptor, getSchemaLocation, getSpecVersion, isDDWithNoAnnotationAllowed, isExtensionDescriptor, isFullAttribute, isFullFlag, setClassLoader, setDisplayName, setFullAttribute, setFullFlag, setModuleDescriptor, setModuleID, setName, setSchemaLocation, setSpecVersion
 
Methods inherited from class com.sun.enterprise.deployment.Descriptor
addDeploymentExtension, addPrefixMapping, createUniqueFilenameAmongst, createUniqueNameAmongst, createUniqueNameAmongstNamedDescriptors, fillDocType, getDeploymentExtensions, getDescription, 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 com.sun.enterprise.deployment.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
 

Field Detail

SPEC_VERSION

public static final java.lang.String SPEC_VERSION
See Also:
Constant Field Values
Constructor Detail

EjbBundleDescriptor

public EjbBundleDescriptor()
Constructs an ejb bundle descriptor with no ejbs.

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 java.lang.String getDefaultSpecVersion()
Specified by:
getDefaultSpecVersion in class RootDeploymentDescriptor
Returns:
the default version of the deployment descriptor loaded by this descriptor

getEjbClientJarUri

public java.lang.String getEjbClientJarUri()
Return the emptry 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 class RootDeploymentDescriptor
Returns:
true if this root descriptor is empty

setEjbClientJarUri

public void setEjbClientJarUri(java.lang.String ejbClientJarUri)
Sets the ejb client JAR entry name.


addApplicationException

public void addApplicationException(EjbApplicationExceptionInfo appExc)

getApplicationExceptions

public java.util.Map<java.lang.String,EjbApplicationExceptionInfo> getApplicationExceptions()

getNamedDescriptors

public java.util.Collection getNamedDescriptors()
Return the set of NamedDescriptors that I have.


getNamedReferencePairs

public java.util.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 java.util.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 java.util.Set<EjbDescriptor> getEjbs()
Return the Set of ejb descriptors that I have.


hasEjbByName

public boolean hasEjbByName(java.lang.String name)
Returns true if I have an ejb descriptor by that name.


getEjbByName

public EjbDescriptor getEjbByName(java.lang.String name)
Returns an ejb descriptor that I have by the same name, otherwise throws an IllegalArgumentException


getEjbByName

public EjbDescriptor getEjbByName(java.lang.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(java.lang.String className)
Returns all ejb descriptors that has a give Class name. It returns an empty array if no ejb is found.


getEjbBySEIName

public EjbDescriptor[] getEjbBySEIName(java.lang.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.


addEjb

public void addEjb(EjbDescriptor ejbDescriptor)
Add an ejb to me.


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(java.lang.String className)

hasInterceptors

public boolean hasInterceptors()

getInterceptors

public java.util.Set<EjbInterceptor> getInterceptors()

prependInterceptorBinding

public void prependInterceptorBinding(InterceptorBindingDescriptor binding)

appendInterceptorBinding

public void appendInterceptorBinding(InterceptorBindingDescriptor binding)

getInterceptorBindings

public java.util.List<InterceptorBindingDescriptor> getInterceptorBindings()

setInterceptorBindings

public void setInterceptorBindings(java.util.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 com.sun.enterprise.deployment.Role object from me.

Specified by:
removeRole in interface Roles
Overrides:
removeRole in class BundleDescriptor

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 java.lang.String getRelationshipsDescription()
EJB2.0: get description for element.


setRelationshipsDescription

public void setRelationshipsDescription(java.lang.String relationshipsDescription)
EJB2.0: set description for element.


getRelationships

public java.util.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(java.lang.String name)

getName

public java.lang.String getName()
Returns my name.

Overrides:
getName in class RootDeploymentDescriptor
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 class BundleDescriptor
Returns:
true if this bundle descriptor defines web service clients

getEjbServiceReferenceDescriptors

public java.util.Set<ServiceReferenceDescriptor> getEjbServiceReferenceDescriptors()
Returns:
a set of service-ref from ejbs contained in this bundle this bundle or empty set if none

print

public void print(java.lang.StringBuffer toStringBuffer)
Returns a formatted String representing my state.

Overrides:
print in class BundleDescriptor

visit

public void visit(DescriptorVisitor aVisitor)
visit the descriptor and all sub descriptors with a DOL visitor implementation

Overrides:
visit in class Descriptor
Parameters:
aVisitor - a visitor to traverse the descriptors

visit

public void visit(EjbBundleVisitor aVisitor)
visit the descriptor and all sub descriptors with a DOL visitor implementation

Parameters:
aVisitor - a visitor to traverse the descriptors

getModuleType

public XModuleType getModuleType()
Specified by:
getModuleType in class BundleDescriptor
Returns:
the module type for this bundle descriptor

setPersistenceManagerInuse

public void setPersistenceManagerInuse(java.lang.String id,
                                       java.lang.String ver)

setPersistenceManagerInUse

public void setPersistenceManagerInUse(PersistenceManagerInUse inuse)

getPersistenceManagerInUse

public PersistenceManagerInUse getPersistenceManagerInUse()

addPersistenceManager

public void addPersistenceManager(IASPersistenceManagerDescriptor pmDesc)

getPreferredPersistenceManager

public IASPersistenceManagerDescriptor getPreferredPersistenceManager()

getPersistenceManagers

public java.util.Vector getPersistenceManagers()

addSecurityRoleMapping

public void addSecurityRoleMapping(SecurityRoleMapping roleMapping)

getSecurityRoleMappings

public java.util.List<SecurityRoleMapping> getSecurityRoleMappings()

findReferencedPUs

public java.util.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 class BundleDescriptor
Returns:
persistence units that are referenced by this module

getEjbReferenceDescriptors

public java.util.Set<EjbReference> getEjbReferenceDescriptors()
Returns the generated XML directory feturn the set of ejb references this ejb declares.

Specified by:
getEjbReferenceDescriptors in interface JndiNameEnvironment
Specified by:
getEjbReferenceDescriptors in interface EjbReferenceContainer
Returns:
java.util.Set of EjbReferenceDescriptor objects

addEjbReferenceDescriptor

public void addEjbReferenceDescriptor(EjbReference ejbReference)
Adds a reference to another ejb to me.

Specified by:
addEjbReferenceDescriptor in interface EjbReferenceContainer
Specified by:
addEjbReferenceDescriptor in interface WritableJndiNameEnvironment
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.

Specified by:
removeEjbReferenceDescriptor in interface WritableJndiNameEnvironment
Parameters:
ejbReference - the EjbReferenceDescriptor to remove.

getEjbReferenceByName

public EjbReference getEjbReferenceByName(java.lang.String name)
Return a reference to another ejb by the same name or throw an IllegalArgumentException.


getEjbReference

public EjbReference getEjbReference(java.lang.String name)
Description copied from interface: EjbReferenceContainer
Looks up an ejb reference with the given name. Throws an IllegalArgumentException if it is not found.

Specified by:
getEjbReference in interface EjbReferenceContainer

getServiceReferenceDescriptors

public java.util.Set<ServiceReferenceDescriptor> getServiceReferenceDescriptors()
Description copied from interface: JndiNameEnvironment
Return a set of service reference descriptors.

Specified by:
getServiceReferenceDescriptors in interface JndiNameEnvironment
Specified by:
getServiceReferenceDescriptors in interface ServiceReferenceContainer
Specified by:
getServiceReferenceDescriptors in class BundleDescriptor
Returns:
a set of service-ref from this bundle or an empty set if none

addServiceReferenceDescriptor

public void addServiceReferenceDescriptor(ServiceReferenceDescriptor serviceRef)
Description copied from interface: WritableJndiNameEnvironment
Adds the specified service reference to the receiver.

Specified by:
addServiceReferenceDescriptor in interface ServiceReferenceContainer
Specified by:
addServiceReferenceDescriptor in interface WritableJndiNameEnvironment

removeServiceReferenceDescriptor

public void removeServiceReferenceDescriptor(ServiceReferenceDescriptor serviceRef)
Description copied from interface: WritableJndiNameEnvironment
Removes the specified service reference from the receiver.

Specified by:
removeServiceReferenceDescriptor in interface ServiceReferenceContainer
Specified by:
removeServiceReferenceDescriptor in interface WritableJndiNameEnvironment

getServiceReferenceByName

public ServiceReferenceDescriptor getServiceReferenceByName(java.lang.String name)
Looks up an service reference with the given name. Throws an IllegalArgumentException if it is not found.

Specified by:
getServiceReferenceByName in interface JndiNameEnvironment
Specified by:
getServiceReferenceByName in interface ServiceReferenceContainer
Returns:
ServiceReferenceDescriptor object

getMessageDestinationReferenceDescriptors

public java.util.Set<MessageDestinationReferenceDescriptor> getMessageDestinationReferenceDescriptors()
Description copied from interface: JndiNameEnvironment
Return a set of message destination reference descriptors.

Specified by:
getMessageDestinationReferenceDescriptors in interface JndiNameEnvironment
Specified by:
getMessageDestinationReferenceDescriptors in interface MessageDestinationReferenceContainer
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.

Specified by:
addMessageDestinationReferenceDescriptor in interface MessageDestinationReferenceContainer
Specified by:
addMessageDestinationReferenceDescriptor in interface WritableJndiNameEnvironment

removeMessageDestinationReferenceDescriptor

public void removeMessageDestinationReferenceDescriptor(MessageDestinationReferenceDescriptor msgDestRef)
Description copied from interface: WritableJndiNameEnvironment
Removes the specified message destination reference from the receiver.

Specified by:
removeMessageDestinationReferenceDescriptor in interface MessageDestinationReferenceContainer
Specified by:
removeMessageDestinationReferenceDescriptor in interface WritableJndiNameEnvironment

getMessageDestinationReferenceByName

public MessageDestinationReferenceDescriptor getMessageDestinationReferenceByName(java.lang.String name)
Looks up an message destination reference with the given name. Throws an IllegalArgumentException if it is not found.

Specified by:
getMessageDestinationReferenceByName in interface JndiNameEnvironment
Specified by:
getMessageDestinationReferenceByName in interface MessageDestinationReferenceContainer
Returns:
MessageDestinationReferenceDescriptor object

getJmsDestinationReferenceDescriptors

public java.util.Set<JmsDestinationReferenceDescriptor> getJmsDestinationReferenceDescriptors()
Return the set of JMS destination references this ejb declares.

Specified by:
getJmsDestinationReferenceDescriptors in interface JndiNameEnvironment
Specified by:
getJmsDestinationReferenceDescriptors in interface ResourceEnvReferenceContainer
Returns:
java.util.Set of JmsDestinationReferenceDescriptor objects

addJmsDestinationReferenceDescriptor

public void addJmsDestinationReferenceDescriptor(JmsDestinationReferenceDescriptor jmsDestReference)
Description copied from interface: WritableJndiNameEnvironment
Adds the specified JMS destination reference to the receiver.

Specified by:
addJmsDestinationReferenceDescriptor in interface ResourceEnvReferenceContainer
Specified by:
addJmsDestinationReferenceDescriptor in interface WritableJndiNameEnvironment

removeJmsDestinationReferenceDescriptor

public void removeJmsDestinationReferenceDescriptor(JmsDestinationReferenceDescriptor jmsDestReference)
Description copied from interface: WritableJndiNameEnvironment
Removes the specified JMS destination reference from the receiver.

Specified by:
removeJmsDestinationReferenceDescriptor in interface WritableJndiNameEnvironment

getJmsDestinationReferenceByName

public JmsDestinationReferenceDescriptor getJmsDestinationReferenceByName(java.lang.String name)
Return a reference to another ejb by the same name or throw an IllegalArgumentException.

Specified by:
getJmsDestinationReferenceByName in interface JndiNameEnvironment
Specified by:
getJmsDestinationReferenceByName in interface ResourceEnvReferenceContainer
Returns:
JmsDestinationReferenceDescriptor object

getResourceReferenceDescriptors

public java.util.Set<ResourceReferenceDescriptor> getResourceReferenceDescriptors()
Return the set of resource references this ejb declares.

Specified by:
getResourceReferenceDescriptors in interface JndiNameEnvironment
Specified by:
getResourceReferenceDescriptors in interface ResourceReferenceContainer
Returns:
java.util.Set of ResourceReferenceDescriptor objects

addResourceReferenceDescriptor

public void addResourceReferenceDescriptor(ResourceReferenceDescriptor resourceReference)
Adds a resource reference to me.

Specified by:
addResourceReferenceDescriptor in interface ResourceReferenceContainer
Specified by:
addResourceReferenceDescriptor in interface WritableJndiNameEnvironment
Parameters:
resourceReference - the ResourceReferenceDescriptor to add.

removeResourceReferenceDescriptor

public void removeResourceReferenceDescriptor(ResourceReferenceDescriptor resourceReference)
Removes the given resource reference from me.

Specified by:
removeResourceReferenceDescriptor in interface WritableJndiNameEnvironment
Parameters:
resourceReference - the ResourceReferenceDescriptor to remove.

getResourceReferenceByName

public ResourceReferenceDescriptor getResourceReferenceByName(java.lang.String name)
Return the resource object corresponding to the supplied name or throw an illegal argument exception.

Specified by:
getResourceReferenceByName in interface ResourceReferenceContainer

getEnvironmentPropertyByName

public EnvironmentProperty getEnvironmentPropertyByName(java.lang.String name)
Returns the environment property object searching on the supplied key. throws an illegal argument exception if no such environment property exists.

Specified by:
getEnvironmentPropertyByName in interface JndiNameEnvironment
Returns:
EnvironmentProperty descriptor

getEnvironmentProperties

public java.util.Set<EnvironmentProperty> getEnvironmentProperties()
Return a copy of the structure holding the environment properties.

Specified by:
getEnvironmentProperties in interface JndiNameEnvironment
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.

Specified by:
addEnvironmentProperty in interface WritableJndiNameEnvironment
Parameters:
environmentProperty - the EnvironmentProperty to add.

removeEnvironmentProperty

public void removeEnvironmentProperty(EnvironmentProperty environmentProperty)
Removes the given environment property from me.

Specified by:
removeEnvironmentProperty in interface WritableJndiNameEnvironment
Parameters:
environmentProperty - the EnvironmentProperty to remove.

getEntityManagerFactoryReferenceDescriptors

public java.util.Set<EntityManagerFactoryReferenceDescriptor> getEntityManagerFactoryReferenceDescriptors()
Description copied from interface: JndiNameEnvironment
Return a set of entity manager factory reference descriptors.

Specified by:
getEntityManagerFactoryReferenceDescriptors in interface JndiNameEnvironment

getEntityManagerFactoryReferenceByName

public EntityManagerFactoryReferenceDescriptor getEntityManagerFactoryReferenceByName(java.lang.String name)
Return the entity manager factory reference descriptor corresponding to the given name.

Specified by:
getEntityManagerFactoryReferenceByName in interface JndiNameEnvironment

addEntityManagerFactoryReferenceDescriptor

public void addEntityManagerFactoryReferenceDescriptor(EntityManagerFactoryReferenceDescriptor reference)
Specified by:
addEntityManagerFactoryReferenceDescriptor in interface WritableJndiNameEnvironment

getEntityManagerReferenceDescriptors

public java.util.Set<EntityManagerReferenceDescriptor> getEntityManagerReferenceDescriptors()
Description copied from interface: JndiNameEnvironment
Return a set of entity manager reference descriptors.

Specified by:
getEntityManagerReferenceDescriptors in interface JndiNameEnvironment

getEntityManagerReferenceByName

public EntityManagerReferenceDescriptor getEntityManagerReferenceByName(java.lang.String name)
Return the entity manager factory reference descriptor corresponding to the given name.

Specified by:
getEntityManagerReferenceByName in interface JndiNameEnvironment

addEntityManagerReferenceDescriptor

public void addEntityManagerReferenceDescriptor(EntityManagerReferenceDescriptor reference)
Specified by:
addEntityManagerReferenceDescriptor in interface WritableJndiNameEnvironment

getDataSourceDefinitionDescriptors

public java.util.Set<DataSourceDefinitionDescriptor> getDataSourceDefinitionDescriptors()
Description copied from interface: JndiNameEnvironment
Return a set of data-source-definition descriptors.

Specified by:
getDataSourceDefinitionDescriptors in interface JndiNameEnvironment
Returns:
java.util.Set of data-source-definition objects

addDataSourceDefinitionDescriptor

public void addDataSourceDefinitionDescriptor(DataSourceDefinitionDescriptor reference)
Description copied from interface: WritableJndiNameEnvironment
Adds the specified data-source-definition to the receiver.

Specified by:
addDataSourceDefinitionDescriptor in interface WritableJndiNameEnvironment
Parameters:
reference - DataSourceDefinitionDescriptor to add.

removeDataSourceDefinitionDescriptor

public void removeDataSourceDefinitionDescriptor(DataSourceDefinitionDescriptor reference)
Description copied from interface: WritableJndiNameEnvironment
Removes the specified data-source-definition from the receiver.

Specified by:
removeDataSourceDefinitionDescriptor in interface WritableJndiNameEnvironment
Parameters:
reference - DataSourceDefinitionDescriptor to remove.

getInjectableResourcesByClass

public java.util.List<InjectionCapable> getInjectableResourcesByClass(java.lang.String className)
Specified by:
getInjectableResourcesByClass in interface JndiNameEnvironment

getInjectionInfoByClass

public InjectionInfo getInjectionInfoByClass(java.lang.Class clazz)
Specified by:
getInjectionInfoByClass in interface JndiNameEnvironment

getDisableNonportableJndiNames

public java.lang.Boolean getDisableNonportableJndiNames()

setDisableNonportableJndiNames

public void setDisableNonportableJndiNames(java.lang.String disableOrNot)

getPostConstructDescriptors

public java.util.Set<LifecycleCallbackDescriptor> getPostConstructDescriptors()
Description copied from interface: JndiNameEnvironment
Return a set of post-construct descriptors.

Specified by:
getPostConstructDescriptors in interface JndiNameEnvironment
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.

Specified by:
addPostConstructDescriptor in interface WritableJndiNameEnvironment

getPostConstructDescriptorByClass

public LifecycleCallbackDescriptor getPostConstructDescriptorByClass(java.lang.String className)
Description copied from interface: JndiNameEnvironment
Return the post-construct descriptor corresponding to the given name.

Specified by:
getPostConstructDescriptorByClass in interface JndiNameEnvironment
Returns:
LifecycleCallbackDescriptor post-construct object

getPreDestroyDescriptors

public java.util.Set<LifecycleCallbackDescriptor> getPreDestroyDescriptors()
Description copied from interface: JndiNameEnvironment
Return a set of pre-destroy descriptors.

Specified by:
getPreDestroyDescriptors in interface JndiNameEnvironment
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.

Specified by:
addPreDestroyDescriptor in interface WritableJndiNameEnvironment

getPreDestroyDescriptorByClass

public LifecycleCallbackDescriptor getPreDestroyDescriptorByClass(java.lang.String className)
Description copied from interface: JndiNameEnvironment
Return the pre-destroy descriptor corresponding to the given name.

Specified by:
getPreDestroyDescriptorByClass in interface JndiNameEnvironment
Returns:
LifecycleCallbackDescriptor pre-destroy object

getEnterpriseBeansProperty

public java.lang.String getEnterpriseBeansProperty(java.lang.String key)

addEnterpriseBeansProperty

public void addEnterpriseBeansProperty(NameValuePairDescriptor newProp)

getEnterpriseBeansProperties

public java.util.List<NameValuePairDescriptor> getEnterpriseBeansProperties()


Copyright © 2012 GlassFish Community. All Rights Reserved.