com.sun.enterprise.deployment
Class EjbSessionDescriptor

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.EjbAbstractDescriptor
                  extended by com.sun.enterprise.deployment.EjbDescriptor
                      extended by com.sun.enterprise.deployment.EjbSessionDescriptor
All Implemented Interfaces:
JndiNameEnvironment, NamedDescriptor, EjbReferenceContainer, MessageDestinationReferenceContainer, ResourceEnvReferenceContainer, ResourceReferenceContainer, ServiceReferenceContainer, WritableJndiNameEnvironment, java.io.Serializable

public class EjbSessionDescriptor
extends EjbDescriptor

Objects of this kind represent the deployment information describing a single Session Ejb : { stateful , stateless, singleton }

Author:
Danny Coward
See Also:
Serialized Form

Nested Class Summary
static class EjbSessionDescriptor.AccessTimeoutHolder
           
static class EjbSessionDescriptor.ConcurrencyManagementType
           
 
Field Summary
static java.lang.String SINGLETON
           
static java.lang.String STATEFUL
          Idicates statefullness of a session ejb.
static java.lang.String STATELESS
          The String to indicate stalessness.
static java.lang.String TYPE
          The Session type String.
 
Fields inherited from class com.sun.enterprise.deployment.EjbDescriptor
BEAN_TRANSACTION_TYPE, CONTAINER_TRANSACTION_TYPE, DISTRIBUTED_TRANSACTION_SCOPE, isDistributedTxScope, LOCAL_TRANSACTION_SCOPE, runAsIdentity, securityIdentityDescription, transactionType, usesCallerIdentity, usesDefaultTransaction
 
Fields inherited from class com.sun.enterprise.deployment.Descriptor
DESCRIPTION_CHANGED, DESCRIPTOR_CHANGED, docType, LARGE_ICON_CHANGED, NAME_CHANGED, SMALL_ICON_CHANGED
 
Constructor Summary
EjbSessionDescriptor()
          Default constructor.
 
Method Summary
 void addAccessTimeoutMethod(MethodDescriptor methodDescriptor, long value, java.util.concurrent.TimeUnit unit)
           
 void addAfterBeginDescriptor(MethodDescriptor m)
           
 void addAfterCompletionDescriptor(MethodDescriptor m)
           
 void addAsynchronousMethod(MethodDescriptor m)
           
 void addBeforeCompletionDescriptor(MethodDescriptor m)
           
 void addConcurrentMethodFromXml(ConcurrentMethodDescriptor concMethod)
           
 void addInitMethod(EjbInitInfo initInfo)
           
 void addPostActivateDescriptor(LifecycleCallbackDescriptor postActivateDesc)
           
 void addPrePassivateDescriptor(LifecycleCallbackDescriptor prePassivateDesc)
           
 void addReadLockMethod(MethodDescriptor methodDescriptor)
           
 void addRemoveMethod(EjbRemovalInfo removalInfo)
           
 void addStatefulTimeoutDescriptor(TimeoutValueDescriptor timeout)
           
 void addWriteLockMethod(MethodDescriptor methodDescriptor)
           
 java.util.List<EjbSessionDescriptor.AccessTimeoutHolder> getAccessTimeoutInfo()
           
 java.util.List<MethodDescriptor> getAccessTimeoutMethods()
           
 MethodDescriptor getAfterBeginMethod()
          Returns the Method annotated @AfterBegin.
 MethodDescriptor getAfterCompletionMethod()
          Returns the Method annotated @AfterCompletion.
 java.util.Set<EjbRemovalInfo> getAllRemovalInfo()
           
 java.util.List<MethodDescriptor> getAsynchronousMethods()
           
 MethodDescriptor getBeforeCompletionMethod()
          Returns the Method annotated @AfterBegin.
 EjbSessionDescriptor.ConcurrencyManagementType getConcurrencyManagementType()
           
 java.lang.String[] getDependsOn()
           
 java.util.Set<EjbInitInfo> getInitMethods()
           
 boolean getInitOnStartup()
           
 java.lang.String getPortableJndiName(java.lang.String clientViewType)
          Return the fully-qualified portable JNDI name for a given client view (Remote, Local, or no-interface).
 java.util.Vector getPossibleTransactionAttributes()
          Returns the set of transaction attributes that can be assigned to methods of this ejb when in CMT mode.
 LifecycleCallbackDescriptor getPostActivateDescriptorByClass(java.lang.String className)
           
 java.util.Set<LifecycleCallbackDescriptor> getPostActivateDescriptors()
           
 LifecycleCallbackDescriptor getPrePassivateDescriptorByClass(java.lang.String className)
           
 java.util.Set<LifecycleCallbackDescriptor> getPrePassivateDescriptors()
           
 java.util.List<MethodDescriptor> getReadAndWriteLockMethods()
           
 java.util.List<MethodDescriptor> getReadLockMethods()
           
 EjbRemovalInfo getRemovalInfo(MethodDescriptor method)
           
 java.lang.String getSessionType()
          Returns the string STATELESS or STATEFUL according as to whether the bean is stateless or stateful.
 java.util.concurrent.TimeUnit getStatefulTimeoutUnit()
           
 java.lang.Long getStatefulTimeoutValue()
           
 java.lang.String getType()
          Returns the type of this bean - always "Session".
 java.util.List<MethodDescriptor> getWriteLockMethods()
           
 boolean hasAsynchronousMethods()
           
 boolean hasBeanManagedConcurrency()
           
 boolean hasContainerManagedConcurrency()
           
 boolean hasDependsOn()
           
 boolean hasInitMethods()
           
 boolean hasPostActivateMethod()
           
 boolean hasPrePassivateMethod()
           
 boolean hasRemoveMethods()
           
 boolean hasStatefulTimeout()
           
 boolean isAsynchronousMethod(java.lang.reflect.Method m)
           
 boolean isSessionTypeSet()
          Useful for certain annotation / .xml processing.
 boolean isSingleton()
           
 boolean isStateful()
           
 boolean isStateless()
          Returns true if I am describing a stateless session bean.
 void print(java.lang.StringBuffer toStringBuffer)
          Returns a formatted String of the attributes of this object.
 void setAfterBeginMethodIfNotSet(MethodDescriptor m)
          Set the Method annotated @AfterBegin.
 void setAfterCompletionMethodIfNotSet(MethodDescriptor m)
          Set the Method annotated @AfterCompletion.
 void setBeforeCompletionMethodIfNotSet(MethodDescriptor m)
          Set the Method annotated @BeforeCompletion.
 void setConcurrencyManagementType(EjbSessionDescriptor.ConcurrencyManagementType type)
           
 void setConcurrencyManagementTypeIfNotSet(EjbSessionDescriptor.ConcurrencyManagementType type)
           
 void setDependsOn(java.lang.String[] dep)
           
 void setDependsOnIfNotSet(java.lang.String[] dep)
           
 void setInitOnStartup(boolean flag)
           
 void setInitOnStartupIfNotAlreadySet(boolean flag)
           
 void setSessionType(java.lang.String sessionType)
          Accepts the Strings STATELESS / STATEFUL / SINGLETON
 void setStatefulTimeout(java.lang.Long value, java.util.concurrent.TimeUnit unit)
           
 void setTransactionType(java.lang.String transactionType)
          Sets the transaction type for this bean.
 void setType(java.lang.String type)
          Sets my type
 
Methods inherited from class com.sun.enterprise.deployment.EjbDescriptor
addAllInterfaceMethodsIn, addAroundInvokeDescriptor, addAroundTimeoutDescriptor, addDataSourceDefinitionDescriptor, addEjbDescriptor, addEjbReferenceDescriptor, addEntityManagerFactoryReferenceDescriptor, addEntityManagerReferenceDescriptor, addEnvironmentProperty, addFrameworkInterceptor, addInterceptorClass, addIORConfigurationDescriptor, addJmsDestinationReferenceDescriptor, addMessageDestinationReferenceDescriptor, addMethodLevelChain, addPermissionedMethod, addPostConstructDescriptor, addPreDestroyDescriptor, addResourceReferenceDescriptor, addRoleReference, addScheduledTimerDescriptor, addScheduledTimerDescriptorFromDD, addServiceReferenceDescriptor, allMechanismsRequireSSL, appendToInterceptorChain, applyDefaultClassToLifecycleMethods, applyInterceptors, getAllEjbReferencers, getApplication, getAroundInvokeDescriptorByClass, getAroundInvokeDescriptors, getAroundInvokeInterceptors, getAroundTimeoutDescriptorByClass, getAroundTimeoutDescriptors, getAroundTimeoutInterceptors, getBusinessMethodDescriptorFor, getCallbackInterceptors, getClientBusinessMethodDescriptors, getContainerTransaction, getContainerTransactionFor, getDataSourceDefinitionDescriptors, getEjbBundleDescriptor, getEjbClassName, getEjbImplClassName, getEJBLocalObjectImplClassName, getEJBObjectImplClassName, getEjbReference, getEjbReferenceDescriptors, getEjbTimeoutMethod, getEntityManagerFactoryReferenceByName, getEntityManagerFactoryReferenceDescriptors, getEntityManagerReferenceByName, getEntityManagerReferenceDescriptors, getEnvironmentProperties, getEnvironmentPropertyByName, getExcludedMethodDescriptors, getFieldDescriptors, getFields, getFrameworkInterceptors, getIASEjbExtraDescriptors, getInjectableResourcesByClass, getInjectionInfoByClass, getInterceptorChain, getInterceptorClasses, getInterceptorClassNames, getIORConfigurationDescriptors, getJmsDestinationReferenceByName, getJmsDestinationReferenceDescriptors, getLocalHomeImplClassName, getMessageDestinationReferenceByName, getMessageDestinationReferenceDescriptors, getMethodContainerTransactions, getMethodDescriptors, getMethodInterceptorsMap, getMethodPermissionsFor, getMethodPermissionsFromDD, getMethods, getMethods, getOptionalLocalBusinessMethods, getPermissionedMethodsByPermission, getPermissionedRoles, getPostConstructDescriptorByClass, getPostConstructDescriptors, getPreDestroyDescriptorByClass, getPreDestroyDescriptors, getRemoteHomeImplClassName, getResourceReferenceByName, getResourceReferenceDescriptors, getResourceReferenceDescriptors, getRoleReferenceByName, getRoleReferences, getRunAsIdentity, getScheduledTimerDescriptors, getSecurityBusinessMethodDescriptors, getSecurityIdentityDescription, getServiceReferenceByName, getServiceReferenceDescriptors, getStyledPermissionedMethodsByPermission, getTransactionMethodDescriptors, getTransactionMethods, getTransactionType, getTxBusinessMethodDescriptors, getUncheckedMethodDescriptors, getUniqueId, getUsesCallerIdentity, hasAroundInvokeMethod, hasAroundTimeoutMethod, hasInterceptorClass, hasPostConstructMethod, hasPreDestroyMethod, hasResolvedResourceReferences, hasScheduledTimerMethodFromDD, isDistributedTransactionScope, isTimedObject, isUsesDefaultTransaction, notifyNewModule, removeDataSourceDefinitionDescriptor, removeEjbReferenceDescriptor, removeEjbReferencer, removeEnvironmentProperty, removeJmsDestinationReferenceDescriptor, removeMessageDestinationReferenceDescriptor, removePermissionedMethod, removeResourceReferenceDescriptor, removeRoleReference, removeServiceReferenceDescriptor, setContainerTransactionFor, setDistributedTransactionScope, setEjbBundleDescriptor, setEjbClassName, setEJBLocalObjectImplClassName, setEJBObjectImplClassName, setEjbTimeoutMethod, setLocalHomeImplClassName, setMethodContainerTransactions, setRemoteHomeImplClassName, setRunAsIdentity, setSecurityIdentityDescription, setUniqueId, setUsesCallerIdentity, setUsesDefaultTransaction, visit, visit
 
Methods inherited from class com.sun.enterprise.deployment.EjbAbstractDescriptor
addLocalBusinessClassName, addNoInterfaceLocalBeanClass, addRemoteBusinessClassName, getHomeClassName, getJndiName, getLocalBusinessClassNames, getLocalClassName, getLocalHomeClassName, getMappedName, getNoInterfaceLocalBeanClasses, getRemoteBusinessClassNames, getRemoteClassName, getWebServiceEndpointInterfaceName, hasWebServiceEndpointInterface, isLocalBean, isLocalBusinessInterfacesSupported, isLocalInterfacesSupported, isRemoteBusinessInterfacesSupported, isRemoteInterfacesSupported, setHomeClassName, setJndiName, setLocalBean, setLocalClassName, setLocalHomeClassName, setMappedName, setRemoteClassName, setWebServiceEndpointInterfaceName
 
Methods inherited from class com.sun.enterprise.deployment.Descriptor
addDeploymentExtension, addPrefixMapping, createUniqueFilenameAmongst, createUniqueNameAmongst, createUniqueNameAmongstNamedDescriptors, fillDocType, getDeploymentExtensions, getDescription, getDisplayName, getDocType, getLargeIconUri, getLocalizedDescription, getLocalizedDescriptions, getLocalizedDisplayName, getLocalizedDisplayNames, getLocalizedLargeIconUri, getLocalizedLargeIconUris, getLocalizedSmallIconUri, getLocalizedSmallIconUris, getName, getPrefixMapping, getSmallIconUri, isBoundsChecking, setBoundsChecking, setDescription, setDisplayName, setLargeIconUri, setLocalizedDescription, setLocalizedDisplayName, setLocalizedLargeIconUri, setLocalizedSmallIconUri, setName, 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
 
Methods inherited from interface com.sun.enterprise.deployment.NamedDescriptor
getName
 

Field Detail

TYPE

public static final java.lang.String TYPE
The Session type String.

See Also:
Constant Field Values

STATELESS

public static final java.lang.String STATELESS
The String to indicate stalessness.

See Also:
Constant Field Values

STATEFUL

public static final java.lang.String STATEFUL
Idicates statefullness of a session ejb.

See Also:
Constant Field Values

SINGLETON

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

EjbSessionDescriptor

public EjbSessionDescriptor()
Default constructor.

Method Detail

getType

public java.lang.String getType()
Returns the type of this bean - always "Session".

Specified by:
getType in class EjbAbstractDescriptor

getSessionType

public java.lang.String getSessionType()
Returns the string STATELESS or STATEFUL according as to whether the bean is stateless or stateful.


setSessionType

public void setSessionType(java.lang.String sessionType)
Accepts the Strings STATELESS / STATEFUL / SINGLETON


isSessionTypeSet

public boolean isSessionTypeSet()
Useful for certain annotation / .xml processing. ejb-jar.xml might not set if it's only being used for sparse overriding.

Returns:

setType

public void setType(java.lang.String type)
Sets my type

Specified by:
setType in class EjbAbstractDescriptor

setTransactionType

public void setTransactionType(java.lang.String transactionType)
Sets the transaction type for this bean. Must be either BEAN_TRANSACTION_TYPE or CONTAINER_TRANSACTION_TYPE.

Specified by:
setTransactionType in class EjbDescriptor

isStateless

public boolean isStateless()
Returns true if I am describing a stateless session bean.


isStateful

public boolean isStateful()

isSingleton

public boolean isSingleton()

hasAsynchronousMethods

public boolean hasAsynchronousMethods()

addAsynchronousMethod

public void addAsynchronousMethod(MethodDescriptor m)

getAsynchronousMethods

public java.util.List<MethodDescriptor> getAsynchronousMethods()

isAsynchronousMethod

public boolean isAsynchronousMethod(java.lang.reflect.Method m)

addStatefulTimeoutDescriptor

public void addStatefulTimeoutDescriptor(TimeoutValueDescriptor timeout)

setStatefulTimeout

public void setStatefulTimeout(java.lang.Long value,
                               java.util.concurrent.TimeUnit unit)

hasStatefulTimeout

public boolean hasStatefulTimeout()

getStatefulTimeoutValue

public java.lang.Long getStatefulTimeoutValue()

getStatefulTimeoutUnit

public java.util.concurrent.TimeUnit getStatefulTimeoutUnit()

hasRemoveMethods

public boolean hasRemoveMethods()

getRemovalInfo

public EjbRemovalInfo getRemovalInfo(MethodDescriptor method)
Returns:
remove method info for the given method or null if the given method is not a remove method for this stateful session bean.

getAllRemovalInfo

public java.util.Set<EjbRemovalInfo> getAllRemovalInfo()

addRemoveMethod

public void addRemoveMethod(EjbRemovalInfo removalInfo)

hasInitMethods

public boolean hasInitMethods()

getInitMethods

public java.util.Set<EjbInitInfo> getInitMethods()

addInitMethod

public void addInitMethod(EjbInitInfo initInfo)

getPostActivateDescriptors

public java.util.Set<LifecycleCallbackDescriptor> getPostActivateDescriptors()

addPostActivateDescriptor

public void addPostActivateDescriptor(LifecycleCallbackDescriptor postActivateDesc)

getPostActivateDescriptorByClass

public LifecycleCallbackDescriptor getPostActivateDescriptorByClass(java.lang.String className)

hasPostActivateMethod

public boolean hasPostActivateMethod()

getPrePassivateDescriptors

public java.util.Set<LifecycleCallbackDescriptor> getPrePassivateDescriptors()

addPrePassivateDescriptor

public void addPrePassivateDescriptor(LifecycleCallbackDescriptor prePassivateDesc)

getPrePassivateDescriptorByClass

public LifecycleCallbackDescriptor getPrePassivateDescriptorByClass(java.lang.String className)

hasPrePassivateMethod

public boolean hasPrePassivateMethod()

getPossibleTransactionAttributes

public java.util.Vector getPossibleTransactionAttributes()
Description copied from class: EjbDescriptor
Returns the set of transaction attributes that can be assigned to methods of this ejb when in CMT mode. Elements are of type ContainerTransaction

Overrides:
getPossibleTransactionAttributes in class EjbDescriptor

addAfterBeginDescriptor

public void addAfterBeginDescriptor(MethodDescriptor m)

addBeforeCompletionDescriptor

public void addBeforeCompletionDescriptor(MethodDescriptor m)

addAfterCompletionDescriptor

public void addAfterCompletionDescriptor(MethodDescriptor m)

setAfterBeginMethodIfNotSet

public void setAfterBeginMethodIfNotSet(MethodDescriptor m)
Set the Method annotated @AfterBegin.


getAfterBeginMethod

public MethodDescriptor getAfterBeginMethod()
Returns the Method annotated @AfterBegin.


setBeforeCompletionMethodIfNotSet

public void setBeforeCompletionMethodIfNotSet(MethodDescriptor m)
Set the Method annotated @BeforeCompletion.


getBeforeCompletionMethod

public MethodDescriptor getBeforeCompletionMethod()
Returns the Method annotated @AfterBegin.


setAfterCompletionMethodIfNotSet

public void setAfterCompletionMethodIfNotSet(MethodDescriptor m)
Set the Method annotated @AfterCompletion.


getAfterCompletionMethod

public MethodDescriptor getAfterCompletionMethod()
Returns the Method annotated @AfterCompletion.


getInitOnStartup

public boolean getInitOnStartup()

setInitOnStartup

public void setInitOnStartup(boolean flag)

setInitOnStartupIfNotAlreadySet

public void setInitOnStartupIfNotAlreadySet(boolean flag)

getDependsOn

public java.lang.String[] getDependsOn()

hasDependsOn

public boolean hasDependsOn()

setDependsOn

public void setDependsOn(java.lang.String[] dep)

setDependsOnIfNotSet

public void setDependsOnIfNotSet(java.lang.String[] dep)

getConcurrencyManagementType

public EjbSessionDescriptor.ConcurrencyManagementType getConcurrencyManagementType()

hasContainerManagedConcurrency

public boolean hasContainerManagedConcurrency()

hasBeanManagedConcurrency

public boolean hasBeanManagedConcurrency()

setConcurrencyManagementType

public void setConcurrencyManagementType(EjbSessionDescriptor.ConcurrencyManagementType type)

setConcurrencyManagementTypeIfNotSet

public void setConcurrencyManagementTypeIfNotSet(EjbSessionDescriptor.ConcurrencyManagementType type)

addConcurrentMethodFromXml

public void addConcurrentMethodFromXml(ConcurrentMethodDescriptor concMethod)

addReadLockMethod

public void addReadLockMethod(MethodDescriptor methodDescriptor)

addWriteLockMethod

public void addWriteLockMethod(MethodDescriptor methodDescriptor)

getReadLockMethods

public java.util.List<MethodDescriptor> getReadLockMethods()

getWriteLockMethods

public java.util.List<MethodDescriptor> getWriteLockMethods()

getReadAndWriteLockMethods

public java.util.List<MethodDescriptor> getReadAndWriteLockMethods()

addAccessTimeoutMethod

public void addAccessTimeoutMethod(MethodDescriptor methodDescriptor,
                                   long value,
                                   java.util.concurrent.TimeUnit unit)

getAccessTimeoutMethods

public java.util.List<MethodDescriptor> getAccessTimeoutMethods()

getAccessTimeoutInfo

public java.util.List<EjbSessionDescriptor.AccessTimeoutHolder> getAccessTimeoutInfo()

print

public void print(java.lang.StringBuffer toStringBuffer)
Returns a formatted String of the attributes of this object.

Overrides:
print in class EjbDescriptor

getPortableJndiName

public java.lang.String getPortableJndiName(java.lang.String clientViewType)
Return the fully-qualified portable JNDI name for a given client view (Remote, Local, or no-interface).



Copyright © 2012 GlassFish Community. All Rights Reserved.