Class EjbBundleDescriptorImpl

    • Constructor Detail

      • EjbBundleDescriptorImpl

        public EjbBundleDescriptorImpl()
    • 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.
      • getEjbClientJarUri

        public String getEjbClientJarUri()
        Return the empty String or the entry name of the ejb client JAR in my archive if I have one.
      • setEjbClientJarUri

        public void setEjbClientJarUri​(String ejbClientJarUri)
      • 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.
      • setupDataStructuresForRuntime

        public void setupDataStructuresForRuntime()
        Setup EJB Ids during deployment and shouldn't be called at runtime
      • 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
      • 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 EjbBundleDescriptor
      • getDescriptorIds

        public Collection<Long> getDescriptorIds()
        Returns:
        Collection of unique ID of EJBs within the same module
      • 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)
      • hasInterceptors

        public boolean hasInterceptors()
      • areResourceReferencesValid

        public boolean areResourceReferencesValid()
        Checks whether the role references my ejbs have reference roles that I have.
      • 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.
      • setCMPResourceReference

        public void setCMPResourceReference​(ResourceReferenceDescriptor resourceReference)
        Sets the resource reference I use for CMP.
      • 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
      • 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
      • setPersistenceManagerInuse

        public void setPersistenceManagerInuse​(String id,
                                               String ver)
      • getPersistenceManagers

        public Vector getPersistenceManagers()
      • addSecurityRoleMapping

        public void addSecurityRoleMapping​(SecurityRoleMapping roleMapping)
      • 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 class BundleDescriptor
        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.
      • getEntityManagerFactoryReferenceByName

        public EntityManagerFactoryReferenceDescriptor getEntityManagerFactoryReferenceByName​(String name)
        Return the entity manager factory reference descriptor corresponding to the given name.
      • getEntityManagerReferenceByName

        public EntityManagerReferenceDescriptor getEntityManagerReferenceByName​(String name)
        Return the entity manager factory reference descriptor corresponding to the given name.
      • setDisableNonportableJndiNames

        public void setDisableNonportableJndiNames​(String disableOrNot)
      • 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
      • getEnterpriseBeansProperty

        public String getEnterpriseBeansProperty​(String key)