Class EjbDescriptor

java.lang.Object
java.util.Observable
org.glassfish.deployment.common.DynamicAttributesDescriptor
org.glassfish.deployment.common.Descriptor
com.sun.enterprise.deployment.CommonResourceDescriptor
com.sun.enterprise.deployment.EjbBeanDescriptor
org.glassfish.ejb.deployment.descriptor.EjbDescriptor
All Implemented Interfaces:
com.sun.enterprise.deployment.EjbDescriptor, com.sun.enterprise.deployment.JndiNameEnvironment, com.sun.enterprise.deployment.NamedDescriptor, 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
Direct Known Subclasses:
DummyEjbDescriptor, EjbEntityDescriptor, EjbMessageBeanDescriptor, EjbSessionDescriptor

public abstract class EjbDescriptor extends com.sun.enterprise.deployment.EjbBeanDescriptor
This abstract class encapsulates the meta-information describing Entity, Session and MessageDriven EJBs.
Author:
Danny Coward, Sanjeev Krishnan
See Also:
  • Field Summary

    Fields inherited from interface com.sun.enterprise.deployment.EjbDescriptor

    BEAN_TRANSACTION_TYPE, CONTAINER_TRANSACTION_TYPE
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Default constructor.
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addAroundInvokeDescriptor(com.sun.enterprise.deployment.LifecycleCallbackDescriptor aroundInvokeDesc)
    Adds the descriptor if there is no other with the same lifecycle callback class.
    void
    addAroundTimeoutDescriptor(com.sun.enterprise.deployment.LifecycleCallbackDescriptor aroundTimeoutDesc)
     
    void
    addFrameworkInterceptor(com.sun.enterprise.deployment.InterceptorDescriptor interceptor)
     
    void
    Add a classname for a no-interface view of the local ejb
    void
    Since ejb-class is optional, in some cases the lifecycle-class for AroundInvoke, PostConstruct, etc.
    void
    Derive all interceptors that are applicable to this bean.
    void
     
    com.sun.enterprise.deployment.LifecycleCallbackDescriptor
     
    final Set<com.sun.enterprise.deployment.LifecycleCallbackDescriptor>
     
    List<com.sun.enterprise.deployment.EjbInterceptor>
    getAroundInvokeInterceptors(com.sun.enterprise.deployment.MethodDescriptor businessMethod)
     
    com.sun.enterprise.deployment.LifecycleCallbackDescriptor
     
    final Set<com.sun.enterprise.deployment.LifecycleCallbackDescriptor>
     
    List<com.sun.enterprise.deployment.EjbInterceptor>
    getAroundTimeoutInterceptors(com.sun.enterprise.deployment.MethodDescriptor businessMethod)
     
    List<com.sun.enterprise.deployment.EjbInterceptor>
    getCallbackInterceptors(com.sun.enterprise.deployment.LifecycleCallbackDescriptor.CallbackType type)
     
    abstract String
     
    getContainerTransactionFor(com.sun.enterprise.deployment.MethodDescriptor methodDescriptor)
    Fetches the assigned container transaction object for the given method object.
     
     
     
    List<com.sun.enterprise.deployment.InterceptorDescriptor>
     
     
    Set<com.sun.enterprise.deployment.LifecycleCallbackDescriptor>
     
     
    final Hashtable<com.sun.enterprise.deployment.MethodDescriptor,ContainerTransaction>
     
     
     
     
     
    Collection<com.sun.enterprise.deployment.MethodDescriptor>
     
    protected Collection<com.sun.enterprise.deployment.MethodDescriptor>
     
    boolean
     
    boolean
     
    void
    print(StringBuffer toStringBuffer)
     
    void
    setContainerTransactionFor(com.sun.enterprise.deployment.MethodDescriptor methodDescriptor, ContainerTransaction containerTx)
    Sets the container transaction for the given method descriptor.
    void
    setEjbBundleDescriptor(com.sun.enterprise.deployment.EjbBundleDescriptor bundleDescriptor)
     
    void
     
    void
     
    void
     
    void
    setMethodContainerTransactions(Hashtable<com.sun.enterprise.deployment.MethodDescriptor,ContainerTransaction> methodContainerTransactions)
    Sets the container transactions for all the method descriptors of this ejb.
    void
     
    void
    setSecurityIdentityDescription(String securityIdentityDescription)
     
    void
    Have default method transaction if isBoundsChecking is on.
    final void
    visit(org.glassfish.deployment.common.DescriptorVisitor aVisitor)
     

    Methods inherited from class com.sun.enterprise.deployment.EjbBeanDescriptor

    addAllInterfaceMethodsIn, addEjbReferenceDescriptor, addEntityManagerFactoryReferenceDescriptor, addEntityManagerReferenceDescriptor, addEnvironmentProperty, addInterceptorClass, addIORConfigurationDescriptor, addLocalBusinessClassName, addMessageDestinationReferenceDescriptor, addMethodLevelChain, addPermissionedMethod, addPostConstructDescriptor, addPreDestroyDescriptor, addRemoteBusinessClassName, addResourceDescriptor, addResourceEnvReferenceDescriptor, addResourceReferenceDescriptor, addRoleReference, addScheduledTimerDescriptor, addScheduledTimerDescriptorFromDD, addServiceReferenceDescriptor, allMechanismsRequireSSL, appendToInterceptorChain, copyEjbDescriptor, getAllResourcesDescriptors, getAllResourcesDescriptors, getApplication, getDenyAllMethodPermission, getEjbClassName, getEjbReference, getEjbReferenceDescriptors, getEjbTimeoutMethod, getEntityManagerFactoryReferenceByName, getEntityManagerFactoryReferenceDescriptors, getEntityManagerReferenceByName, getEntityManagerReferenceDescriptors, getEnvironmentProperties, getEnvironmentPropertyByName, getHomeClassName, getInjectableResourcesByClass, getInjectionInfoByClass, getInterceptorChain, getInterceptorClasses, getInterceptorClassNames, getIORConfigurationDescriptors, getJndiName, getLocalBusinessClassNames, getLocalClassName, getLocalHomeClassName, getMappedName, getMessageDestinationReferenceByName, getMessageDestinationReferenceDescriptors, getMethodDescriptors, getMethodInterceptorsMap, getMethodPermissionsFor, getMethodPermissionsFromDD, getName, getPermissionedMethodsByPermission, getPermissionedRoles, getPermitAllMethodDescriptors, getPostConstructDescriptorByClass, getPostConstructDescriptors, getPreDestroyDescriptorByClass, getPreDestroyDescriptors, getRemoteBusinessClassNames, getRemoteClassName, getResourceDescriptors, getResourceEnvReferenceByName, getResourceEnvReferenceDescriptors, getResourceReferenceByName, getResourceReferenceDescriptors, getResourceReferenceDescriptors, getRoleReferenceByName, getRoleReferences, getRunAsIdentity, getScheduledTimerDescriptors, getSecurityBusinessMethodDescriptors, getServiceReferenceByName, getServiceReferenceDescriptors, getStyledPermissionedMethodsByPermission, getTransactionType, getTxBusinessMethodDescriptors, getUniqueId, getUsesCallerIdentity, getWebServiceEndpointInterfaceName, hasInterceptorClass, hasScheduledTimerMethodFromDD, hasWebServiceEndpointInterface, isLocalBean, isLocalBusinessInterfacesSupported, isLocalInterfacesSupported, isRemoteBusinessInterfacesSupported, isRemoteInterfacesSupported, isTimedObject, notifyNewModule, removeEjbReferenceDescriptor, removeEnvironmentProperty, removeMessageDestinationReferenceDescriptor, removePermissionedMethod, removeResourceDescriptor, removeResourceEnvReferenceDescriptor, removeResourceReferenceDescriptor, removeRole, removeRoleReference, removeServiceReferenceDescriptor, setEjbClassName, setEjbTimeoutMethod, setHomeClassName, setInterceptorChain, setInterceptorClasses, setJndiName, setLocalBean, setLocalClassName, setLocalHomeClassName, setMappedName, setMethodInterceptorsMap, setRemoteClassName, setRunAsIdentity, setTransactionType, setUniqueId, setUsesCallerIdentity, setWebServiceEndpointInterfaceName

    Methods inherited from class com.sun.enterprise.deployment.CommonResourceDescriptor

    getResourceDescriptor

    Methods inherited from class org.glassfish.deployment.common.Descriptor

    addDescriptorExtension, addPrefixMapping, createUniqueFilenameAmongst, createUniqueNameAmongst, createUniqueNameAmongstNamedDescriptors, getDeploymentExtensions, getDescription, getDescriptorExtension, getDescriptorExtensions, getDisplayName, getLargeIconUri, getLocalizedDescription, getLocalizedDescriptions, getLocalizedDisplayName, getLocalizedDisplayNames, getLocalizedLargeIconUri, getLocalizedLargeIconUris, getLocalizedSmallIconUri, getLocalizedSmallIconUris, getPrefixMapping, getSmallIconUri, isBoundsChecking, setBoundsChecking, setDescription, setDisplayName, setLargeIconUri, setLocalizedDescription, setLocalizedDisplayName, setLocalizedLargeIconUri, setLocalizedSmallIconUri, setName, setSmallIconUri

    Methods inherited from class org.glassfish.deployment.common.DynamicAttributesDescriptor

    addExtraAttribute, getExtraAttribute, getExtraAttributes, removeExtraAttribute, toString

    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.EjbDescriptor

    getEjbImplClassName, getEjbTypeForDisplay, getType
  • Constructor Details

    • EjbDescriptor

      protected EjbDescriptor()
      Default constructor.
    • EjbDescriptor

      public EjbDescriptor(EjbDescriptor other)
  • Method Details

    • getContainerFactoryQualifier

      public abstract String getContainerFactoryQualifier()
    • getIASEjbExtraDescriptors

      public IASEjbExtraDescriptors getIASEjbExtraDescriptors()
      Returns:
      the extra iAS specific info (not in the RI DID) in the iAS DTD. no setter. You have to modify some fields of the returned object to change it.
    • copyEjbDescriptor

      public void copyEjbDescriptor(EjbDescriptor other)
    • getEjbBundleDescriptor

      public final EjbBundleDescriptorImpl getEjbBundleDescriptor()
    • setEjbBundleDescriptor

      public void setEjbBundleDescriptor(com.sun.enterprise.deployment.EjbBundleDescriptor bundleDescriptor)
    • getEJBLocalObjectImplClassName

      public String getEJBLocalObjectImplClassName()
      Returns:
      the classname of the EJBLocalObject impl.
    • setEJBLocalObjectImplClassName

      public void setEJBLocalObjectImplClassName(String className)
      Parameters:
      className - the EJBLocalObject implementation classname of the ejb.
    • getEJBObjectImplClassName

      public String getEJBObjectImplClassName()
      Returns:
      the classname of the EJBObject impl.
    • setEJBObjectImplClassName

      public void setEJBObjectImplClassName(String className)
      Parameters:
      className - EJBObject implementation classname of the ejb.
    • getLocalHomeImplClassName

      public String getLocalHomeImplClassName()
      Returns:
      the classname of the Local home impl.
    • setLocalHomeImplClassName

      public void setLocalHomeImplClassName(String className)
      Parameters:
      className - the Local home implementation classname of the ejb.
    • getRemoteHomeImplClassName

      public String getRemoteHomeImplClassName()
      Returns:
      the classname of the remote home impl.
    • setRemoteHomeImplClassName

      public void setRemoteHomeImplClassName(String className)
      Parameters:
      className - remote home implementation classname of the ejb.
    • getNoInterfaceLocalBeanClasses

      public Set<String> getNoInterfaceLocalBeanClasses()
      Returns:
      all the public classes of this no-interface local ejb
    • addNoInterfaceLocalBeanClass

      public void addNoInterfaceLocalBeanClass(String className)
      Add a classname for a no-interface view of the local ejb
      Parameters:
      className - fully qualified class name for the interface
    • hasAroundInvokeMethod

      public boolean hasAroundInvokeMethod()
    • getAroundInvokeDescriptors

      public final Set<com.sun.enterprise.deployment.LifecycleCallbackDescriptor> getAroundInvokeDescriptors()
    • getAroundInvokeDescriptorByClass

      public com.sun.enterprise.deployment.LifecycleCallbackDescriptor getAroundInvokeDescriptorByClass(String className)
      Parameters:
      className -
      Returns:
      LifecycleCallbackDescriptor with LifecycleCallbackDescriptor.getLifecycleCallbackClass() of a given
    • getAroundInvokeInterceptors

      public List<com.sun.enterprise.deployment.EjbInterceptor> getAroundInvokeInterceptors(com.sun.enterprise.deployment.MethodDescriptor businessMethod)
      Parameters:
      businessMethod - intercepted method
      Returns:
      the ordered list of interceptor info for AroundInvoke behavior of a particular business method. This list *does* include the info on any bean class interceptor. If present, this would always be the last element in the list because of the precedence defined by the spec.
    • addAroundInvokeDescriptor

      public void addAroundInvokeDescriptor(com.sun.enterprise.deployment.LifecycleCallbackDescriptor aroundInvokeDesc)
      Adds the descriptor if there is no other with the same lifecycle callback class.
      Parameters:
      aroundInvokeDesc -
    • hasAroundTimeoutMethod

      public boolean hasAroundTimeoutMethod()
    • getAroundTimeoutDescriptors

      public final Set<com.sun.enterprise.deployment.LifecycleCallbackDescriptor> getAroundTimeoutDescriptors()
    • getAroundTimeoutDescriptorByClass

      public com.sun.enterprise.deployment.LifecycleCallbackDescriptor getAroundTimeoutDescriptorByClass(String className)
    • getAroundTimeoutInterceptors

      public List<com.sun.enterprise.deployment.EjbInterceptor> getAroundTimeoutInterceptors(com.sun.enterprise.deployment.MethodDescriptor businessMethod)
      Parameters:
      businessMethod - intercepted method
      Returns:
      the ordered list of interceptor info for AroundTimeout behavior of a particular business method. This list *does* include the info on any bean class interceptor. If present, this would always be the last element in the list because of the precedence defined by the spec.
    • addAroundTimeoutDescriptor

      public void addAroundTimeoutDescriptor(com.sun.enterprise.deployment.LifecycleCallbackDescriptor aroundTimeoutDesc)
    • getFrameworkInterceptors

      public List<com.sun.enterprise.deployment.InterceptorDescriptor> getFrameworkInterceptors()
    • addFrameworkInterceptor

      public void addFrameworkInterceptor(com.sun.enterprise.deployment.InterceptorDescriptor interceptor)
    • getSecurityIdentityDescription

      public String getSecurityIdentityDescription()
      Returns:
      the description field of security-identity
    • setSecurityIdentityDescription

      public void setSecurityIdentityDescription(String securityIdentityDescription)
      Parameters:
      securityIdentityDescription - the description field of security-identity
    • setUsesDefaultTransaction

      public void setUsesDefaultTransaction()
      Have default method transaction if isBoundsChecking is on.
    • applyDefaultClassToLifecycleMethods

      public void applyDefaultClassToLifecycleMethods()
      Since ejb-class is optional, in some cases the lifecycle-class for AroundInvoke, PostConstruct, etc. methods on the bean-class is not known at processing time and must be applied lazily. As such, this method should only be called if the ejb-class has been set on this EjbDescriptor.
    • getLifecycleCallbackDescriptors

      public Set<com.sun.enterprise.deployment.LifecycleCallbackDescriptor> getLifecycleCallbackDescriptors()
    • applyInterceptors

      public void applyInterceptors(InterceptorBindingTranslator bindingTranslator)
      Derive all interceptors that are applicable to this bean.
    • getCallbackInterceptors

      public List<com.sun.enterprise.deployment.EjbInterceptor> getCallbackInterceptors(com.sun.enterprise.deployment.LifecycleCallbackDescriptor.CallbackType type)
      Parameters:
      type - LifecycleCallbackDescriptor.CallbackType used as a filter
      Returns:
      the ordered list of interceptor info for a particular callback event type. This list *does* include the info on any bean class callback. If present, this would always be the last element in the list because of the precedence defined by the spec.
    • getMethodContainerTransactions

      public final Hashtable<com.sun.enterprise.deployment.MethodDescriptor,ContainerTransaction> getMethodContainerTransactions()
      Returns:
      a copy of the mapping held internally of method descriptors to container transaction objects.
    • setMethodContainerTransactions

      public void setMethodContainerTransactions(Hashtable<com.sun.enterprise.deployment.MethodDescriptor,ContainerTransaction> methodContainerTransactions) throws IllegalArgumentException
      Sets the container transactions for all the method descriptors of this ejb. The Hashtable is keyed by method descriptor and the values are the corresponding container transaction objects..
      Throws:
      IllegalArgumentException - if this ejb has transaction type BEAN_TRANSACTION_TYPE.
    • setContainerTransactionFor

      public void setContainerTransactionFor(com.sun.enterprise.deployment.MethodDescriptor methodDescriptor, ContainerTransaction containerTx) throws IllegalArgumentException
      Sets the container transaction for the given method descriptor.
      Throws:
      IllegalArgumentException - if this ejb has transaction type BEAN_TRANSACTION_TYPE.
    • getContainerTransactionFor

      public ContainerTransaction getContainerTransactionFor(com.sun.enterprise.deployment.MethodDescriptor methodDescriptor)
      Fetches the assigned container transaction object for the given method object.
      Returns:
      ContainerTransaction or null.
    • getTransactionMethodDescriptors

      public Collection<com.sun.enterprise.deployment.MethodDescriptor> getTransactionMethodDescriptors()
      Returns:
      the collection of MethodDescriptors to which ContainerTransactions may be assigned.
    • getTransactionMethods

      protected Collection<com.sun.enterprise.deployment.MethodDescriptor> getTransactionMethods(ClassLoader classLoader)
      Returns:
      a collection of MethodDescriptor for methods which may have a associated transaction attribute
    • getMethods

      public List<Method> getMethods()
      Returns:
      the ejb method objects, i.e. the methods on the home and remote interfaces.
    • print

      public void print(StringBuffer toStringBuffer)
      Overrides:
      print in class com.sun.enterprise.deployment.EjbBeanDescriptor
    • visit

      public final void visit(org.glassfish.deployment.common.DescriptorVisitor aVisitor)
      Overrides:
      visit in class org.glassfish.deployment.common.Descriptor