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:
com.sun.enterprise.deployment.JndiNameEnvironment, com.sun.enterprise.deployment.Roles, com.sun.enterprise.deployment.types.EjbReferenceContainer, com.sun.enterprise.deployment.types.MessageDestinationReferenceContainer, com.sun.enterprise.deployment.types.ResourceEnvReferenceContainer, com.sun.enterprise.deployment.types.ResourceReferenceContainer, com.sun.enterprise.deployment.types.ServiceReferenceContainer, com.sun.enterprise.deployment.WritableJndiNameEnvironment, Serializable

public class EjbBundleDescriptorImpl extends com.sun.enterprise.deployment.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:
  • Constructor Details

    • EjbBundleDescriptorImpl

      public EjbBundleDescriptorImpl()
  • Method Details

    • getDefaultSpecVersion

      public String getDefaultSpecVersion()
      Specified by:
      getDefaultSpecVersion in class org.glassfish.deployment.common.RootDeploymentDescriptor
      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()
      Specified by:
      isEmpty in class org.glassfish.deployment.common.RootDeploymentDescriptor
    • setEjbClientJarUri

      public void setEjbClientJarUri(String ejbClientJarUri)
    • addApplicationException

      public void addApplicationException(EjbApplicationExceptionInfo appExc)
    • getApplicationExceptions

      public Map<String,EjbApplicationExceptionInfo> getApplicationExceptions()
    • getNamedDescriptors

      public Collection<com.sun.enterprise.deployment.NamedDescriptor> getNamedDescriptors()
      Return the set of NamedDescriptors that I have.
    • getNamedReferencePairs

      public Vector<com.sun.enterprise.deployment.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<com.sun.enterprise.deployment.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 class com.sun.enterprise.deployment.EjbBundleDescriptor
    • 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 class com.sun.enterprise.deployment.EjbBundleDescriptor
    • 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 class com.sun.enterprise.deployment.EjbBundleDescriptor
    • 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 class com.sun.enterprise.deployment.EjbBundleDescriptor
    • 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 class com.sun.enterprise.deployment.EjbBundleDescriptor
    • 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(com.sun.enterprise.deployment.EjbInterceptor interceptor)
    • getInterceptorByClassName

      public com.sun.enterprise.deployment.EjbInterceptor getInterceptorByClassName(String className)
      Specified by:
      getInterceptorByClassName in class com.sun.enterprise.deployment.EjbBundleDescriptor
    • hasInterceptors

      public boolean hasInterceptors()
    • getInterceptors

      public Set<com.sun.enterprise.deployment.EjbInterceptor> getInterceptors()
      Specified by:
      getInterceptors in class com.sun.enterprise.deployment.EjbBundleDescriptor
    • 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(org.glassfish.security.common.Role role)
      Removes the given org.glassfish.security.common.Role object from me.
      Specified by:
      removeRole in interface com.sun.enterprise.deployment.Roles
      Overrides:
      removeRole in class com.sun.enterprise.deployment.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 String getRelationshipsDescription()
      EJB2.0: get description for element.
    • setRelationshipsDescription

      public void setRelationshipsDescription(String relationshipsDescription)
      EJB2.0: set description for element.
    • 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 com.sun.enterprise.deployment.ResourceReferenceDescriptor getCMPResourceReference()
      Return the Resource I use for CMP.
    • setCMPResourceReference

      public void setCMPResourceReference(com.sun.enterprise.deployment.ResourceReferenceDescriptor resourceReference)
      Sets the resource reference I use for CMP.
    • getDescriptorByName

      public org.glassfish.deployment.common.Descriptor getDescriptorByName(String name)
    • getName

      public String getName()
      Returns my name.
      Overrides:
      getName in class org.glassfish.deployment.common.RootDeploymentDescriptor
    • 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 com.sun.enterprise.deployment.BundleDescriptor
      Returns:
      true if this bundle descriptor defines web service clients
    • getEjbServiceReferenceDescriptors

      public Set<com.sun.enterprise.deployment.ServiceReferenceDescriptor> getEjbServiceReferenceDescriptors()
      Specified by:
      getEjbServiceReferenceDescriptors in class com.sun.enterprise.deployment.EjbBundleDescriptor
      Returns:
      a set of service-ref from ejbs contained in this bundle this bundle or empty set if none
    • print

      public void print(StringBuffer toStringBuffer)
      Returns a formatted String representing my state.
      Overrides:
      print in class com.sun.enterprise.deployment.BundleDescriptor
    • getTracerVisitor

      public org.glassfish.deployment.common.DescriptorVisitor getTracerVisitor()
      Overrides:
      getTracerVisitor in class org.glassfish.deployment.common.RootDeploymentDescriptor
    • getBundleVisitor

      public com.sun.enterprise.deployment.util.ComponentVisitor getBundleVisitor()
      Overrides:
      getBundleVisitor in class com.sun.enterprise.deployment.BundleDescriptor
      Returns:
      the visitor for this bundle descriptor
    • visit

      public void visit(org.glassfish.deployment.common.DescriptorVisitor aVisitor)
      visit the descriptor and all sub descriptors with a DOL visitor implementation
      Overrides:
      visit in class org.glassfish.deployment.common.Descriptor
      Parameters:
      aVisitor - a visitor to traverse the descriptors
    • getModuleType

      public org.glassfish.api.deployment.archive.ArchiveType getModuleType()
      Specified by:
      getModuleType in class com.sun.enterprise.deployment.BundleDescriptor
      Returns:
      the module type for this bundle descriptor
    • setPersistenceManagerInuse

      public void setPersistenceManagerInuse(String id, String ver)
    • setPersistenceManagerInUse

      public void setPersistenceManagerInUse(PersistenceManagerInUse inuse)
    • getPersistenceManagerInUse

      public PersistenceManagerInUse getPersistenceManagerInUse()
    • addPersistenceManager

      public void addPersistenceManager(IASPersistenceManagerDescriptor pmDesc)
    • getPreferredPersistenceManager

      public IASPersistenceManagerDescriptor getPreferredPersistenceManager()
    • getPersistenceManagers

      public Vector<IASPersistenceManagerDescriptor> getPersistenceManagers()
    • addSecurityRoleMapping

      public void addSecurityRoleMapping(com.sun.enterprise.deployment.runtime.common.SecurityRoleMapping roleMapping)
    • getSecurityRoleMappings

      public List<com.sun.enterprise.deployment.runtime.common.SecurityRoleMapping> getSecurityRoleMappings()
    • findReferencedPUs

      public Collection<? extends com.sun.enterprise.deployment.PersistenceUnitDescriptor> findReferencedPUs()
      Overrides:
      findReferencedPUs in class com.sun.enterprise.deployment.BundleDescriptor
    • getEjbReferenceDescriptors

      public Set<com.sun.enterprise.deployment.EjbReferenceDescriptor> getEjbReferenceDescriptors()
      Returns the generated XML directory feturn the set of ejb references this ejb declares.
    • addEjbReferenceDescriptor

      public void addEjbReferenceDescriptor(com.sun.enterprise.deployment.EjbReferenceDescriptor ejbReference)
      Adds a reference to another ejb to me.
    • removeEjbReferenceDescriptor

      public void removeEjbReferenceDescriptor(com.sun.enterprise.deployment.EjbReferenceDescriptor ejbReference)
    • getEjbReferenceByName

      public com.sun.enterprise.deployment.types.EjbReference getEjbReferenceByName(String name)
      Return a reference to another ejb by the same name or throw an IllegalArgumentException.
    • getEjbReference

      public com.sun.enterprise.deployment.EjbReferenceDescriptor getEjbReference(String name)
    • getServiceReferenceDescriptors

      public Set<com.sun.enterprise.deployment.ServiceReferenceDescriptor> getServiceReferenceDescriptors()
    • addServiceReferenceDescriptor

      public void addServiceReferenceDescriptor(com.sun.enterprise.deployment.ServiceReferenceDescriptor serviceRef)
    • removeServiceReferenceDescriptor

      public void removeServiceReferenceDescriptor(com.sun.enterprise.deployment.ServiceReferenceDescriptor serviceRef)
    • getServiceReferenceByName

      public com.sun.enterprise.deployment.ServiceReferenceDescriptor getServiceReferenceByName(String name)
      Looks up an service reference with the given name. Throws an IllegalArgumentException if it is not found.
    • getMessageDestinationReferenceDescriptors

      public Set<com.sun.enterprise.deployment.MessageDestinationReferenceDescriptor> getMessageDestinationReferenceDescriptors()
    • addMessageDestinationReferenceDescriptor

      public void addMessageDestinationReferenceDescriptor(com.sun.enterprise.deployment.MessageDestinationReferenceDescriptor messageDestRef)
    • removeMessageDestinationReferenceDescriptor

      public void removeMessageDestinationReferenceDescriptor(com.sun.enterprise.deployment.MessageDestinationReferenceDescriptor msgDestRef)
    • getMessageDestinationReferenceByName

      public com.sun.enterprise.deployment.MessageDestinationReferenceDescriptor getMessageDestinationReferenceByName(String name)
      Looks up an message destination reference with the given name. Throws an IllegalArgumentException if it is not found.
    • getResourceEnvReferenceDescriptors

      public Set<com.sun.enterprise.deployment.ResourceEnvReferenceDescriptor> getResourceEnvReferenceDescriptors()
      Return the set of resource environment references this ejb declares.
    • addResourceEnvReferenceDescriptor

      public void addResourceEnvReferenceDescriptor(com.sun.enterprise.deployment.ResourceEnvReferenceDescriptor resourceEnvReference)
    • removeResourceEnvReferenceDescriptor

      public void removeResourceEnvReferenceDescriptor(com.sun.enterprise.deployment.ResourceEnvReferenceDescriptor resourceEnvReference)
    • getResourceEnvReferenceByName

      public com.sun.enterprise.deployment.ResourceEnvReferenceDescriptor getResourceEnvReferenceByName(String name)
      Return a reference to another ejb by the same name or throw an IllegalArgumentException.
    • getResourceReferenceDescriptors

      public Set<com.sun.enterprise.deployment.ResourceReferenceDescriptor> getResourceReferenceDescriptors()
      Return the set of resource references this ejb declares.
    • addResourceReferenceDescriptor

      public void addResourceReferenceDescriptor(com.sun.enterprise.deployment.ResourceReferenceDescriptor resourceReference)
      Adds a resource reference to me.
    • removeResourceReferenceDescriptor

      public void removeResourceReferenceDescriptor(com.sun.enterprise.deployment.ResourceReferenceDescriptor resourceReference)
      Removes the given resource reference from me.
    • getResourceReferenceByName

      public com.sun.enterprise.deployment.ResourceReferenceDescriptor getResourceReferenceByName(String name)
      Return the resource object corresponding to the supplied name or throw an illegal argument exception.
    • getEnvironmentPropertyByName

      public com.sun.enterprise.deployment.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.
    • getEnvironmentProperties

      public Set<com.sun.enterprise.deployment.EnvironmentProperty> getEnvironmentProperties()
      Return a copy of the structure holding the environment properties.
    • addEnvironmentProperty

      public void addEnvironmentProperty(com.sun.enterprise.deployment.EnvironmentProperty environmentProperty)
    • removeEnvironmentProperty

      public void removeEnvironmentProperty(com.sun.enterprise.deployment.EnvironmentProperty environmentProperty)
      Removes the given environment property from me.
    • getEntityManagerFactoryReferenceDescriptors

      public Set<com.sun.enterprise.deployment.EntityManagerFactoryReferenceDescriptor> getEntityManagerFactoryReferenceDescriptors()
    • getEntityManagerFactoryReferenceByName

      public com.sun.enterprise.deployment.EntityManagerFactoryReferenceDescriptor getEntityManagerFactoryReferenceByName(String name)
      Return the entity manager factory reference descriptor corresponding to the given name.
    • addEntityManagerFactoryReferenceDescriptor

      public void addEntityManagerFactoryReferenceDescriptor(com.sun.enterprise.deployment.EntityManagerFactoryReferenceDescriptor reference)
    • getEntityManagerReferenceDescriptors

      public Set<com.sun.enterprise.deployment.EntityManagerReferenceDescriptor> getEntityManagerReferenceDescriptors()
    • getEntityManagerReferenceByName

      public com.sun.enterprise.deployment.EntityManagerReferenceDescriptor getEntityManagerReferenceByName(String name)
      Return the entity manager factory reference descriptor corresponding to the given name.
    • addEntityManagerReferenceDescriptor

      public void addEntityManagerReferenceDescriptor(com.sun.enterprise.deployment.EntityManagerReferenceDescriptor reference)
    • getInjectableResourcesByClass

      public List<com.sun.enterprise.deployment.InjectionCapable> getInjectableResourcesByClass(String className)
    • getInjectionInfoByClass

      public com.sun.enterprise.deployment.InjectionInfo getInjectionInfoByClass(Class clazz)
    • getDisableNonportableJndiNames

      public Boolean getDisableNonportableJndiNames()
      Specified by:
      getDisableNonportableJndiNames in class com.sun.enterprise.deployment.EjbBundleDescriptor
    • setDisableNonportableJndiNames

      public void setDisableNonportableJndiNames(String disableOrNot)
    • getAroundConstructDescriptors

      public Set<com.sun.enterprise.deployment.LifecycleCallbackDescriptor> getAroundConstructDescriptors()
    • addAroundConstructDescriptor

      public void addAroundConstructDescriptor(com.sun.enterprise.deployment.LifecycleCallbackDescriptor aroundConstructDesc)
    • getAroundConstructDescriptorByClass

      public com.sun.enterprise.deployment.LifecycleCallbackDescriptor getAroundConstructDescriptorByClass(String className)
    • getPostConstructDescriptors

      public Set<com.sun.enterprise.deployment.LifecycleCallbackDescriptor> getPostConstructDescriptors()
    • addPostConstructDescriptor

      public void addPostConstructDescriptor(com.sun.enterprise.deployment.LifecycleCallbackDescriptor postConstructDesc)
    • getPostConstructDescriptorByClass

      public com.sun.enterprise.deployment.LifecycleCallbackDescriptor getPostConstructDescriptorByClass(String className)
    • getPreDestroyDescriptors

      public Set<com.sun.enterprise.deployment.LifecycleCallbackDescriptor> getPreDestroyDescriptors()
    • addPreDestroyDescriptor

      public void addPreDestroyDescriptor(com.sun.enterprise.deployment.LifecycleCallbackDescriptor preDestroyDesc)
    • getPreDestroyDescriptorByClass

      public com.sun.enterprise.deployment.LifecycleCallbackDescriptor getPreDestroyDescriptorByClass(String className)
    • getEnterpriseBeansProperty

      public String getEnterpriseBeansProperty(String key)
    • addEnterpriseBeansProperty

      public void addEnterpriseBeansProperty(com.sun.enterprise.deployment.NameValuePairDescriptor newProp)
    • getEnterpriseBeansProperties

      public List<com.sun.enterprise.deployment.NameValuePairDescriptor> getEnterpriseBeansProperties()
    • getInjectableResourcesByClass

      protected List<com.sun.enterprise.deployment.InjectionCapable> getInjectableResourcesByClass(String className, com.sun.enterprise.deployment.JndiNameEnvironment jndiNameEnv)
      Overrides:
      getInjectableResourcesByClass in class com.sun.enterprise.deployment.BundleDescriptor