org.ow2.jonas.deployment.ejb
Class SessionDesc

java.lang.Object
  extended by org.ow2.jonas.deployment.common.DescriptionGroupDesc
      extended by org.ow2.jonas.deployment.common.JndiEnvRefsGroupDesc
          extended by org.ow2.jonas.deployment.ejb.BeanDesc
              extended by org.ow2.jonas.deployment.ejb.SessionDesc
All Implemented Interfaces:
IDescriptionGroupDesc, IJNDIEnvRefsGroupDesc
Direct Known Subclasses:
SessionStatefulDesc, SessionStatelessDesc

public abstract class SessionDesc
extends BeanDesc

Base class to hold meta-information related to a session bean.

Author:
Christophe Ney [cney@batisseurs.com] : Initial developer, Helene Joanin : unsetting transaction attribute set to a default value.

Field Summary
protected  int transactionType
           
 
Fields inherited from class org.ow2.jonas.deployment.ejb.BeanDesc
BEAN_TRANSACTION_TYPE, beanIdentification, cacheMax, clusterReplicated, CONTAINER_TRANSACTION_TYPE, deploymentDesc, derivedBeanName, ejb10EnvProps, ejbClass, ejbName, ejbTimeoutSignature, fullDerivedBeanName, GENERATED_PREFIX, home, jndiLocalName, jndiName, local, localhome, poolMin, remote, securityRoleRefDescList, timerTxAttribute, TRANS
 
Fields inherited from class org.ow2.jonas.deployment.common.JndiEnvRefsGroupDesc
logger
 
Fields inherited from class org.ow2.jonas.deployment.common.DescriptionGroupDesc
description, displayName, largeIcon, smallIcon
 
Constructor Summary
SessionDesc(ClassLoader classLoader, Session ses, AssemblyDescriptor asd, JonasSession jSes, JLinkedList jMDRList, String filename)
          constructor: called when the DeploymentDescriptor is read.
 
Method Summary
 void check()
          Check that the bean descriptor is valid
protected  void checkTxAttribute(MethodDesc md)
          check that trans-attribute is valid for bean
 int getSessionTimeout()
          Get the session timeout value
 int getTransactionType()
          Get session transaction management type.
 int getWarningThreshold()
           
 boolean isBeanManagedTransaction()
          Returns true if bean managed transaction.
 boolean isMonitoringEnabled()
           
 boolean isMonitoringSettingsDefinedInDD()
           
 void setWarningThreshold(int warningThreshold)
           
 String toString()
          String representation of the object for test purpose
 
Methods inherited from class org.ow2.jonas.deployment.ejb.BeanDesc
addEJBMethodDesc, addMethodDesc, checkRemoteException, checkRunAsMapping, checkValidTypesForRmi, getCacheMax, getCluster, getDeploymentDesc, getDerivedBeanName, getEjb10Environment, getEjbClass, getEjbName, getEjbTimeoutSignature, getFullDerivedBeanName, getFullWrpHandleName, getFullWrpHomeName, getFullWrpLocalHomeName, getFullWrpLocalName, getFullWrpRemoteName, getHashCodeForIdentifier, getHomeClass, getIdentifier, getJndiLocalName, getJndiName, getLocalClass, getLocalHomeClass, getMethodDesc, getMethodDesc, getMethodDescIterator, getParentClass, getPoolMin, getRemoteClass, getRunAsPrincipalName, getRunAsRole, getSasComponent, getSecurityRoleRefDescList, getTimerTxAttribute, getWrpHandleName, getWrpHomeName, getWrpLocalHomeName, getWrpLocalName, getWrpRemoteName, hasDefinedLocalInterface, isClusterReplicated, loadExtraClasses, newMethodDescInstance, setCluster, setClusterReplicated, setDeploymentDesc, setJndiLocalName, setJndiName, setSasComponent, verifyRoleName
 
Methods inherited from class org.ow2.jonas.deployment.common.JndiEnvRefsGroupDesc
getEjbLocalRefDesc, getEjbRefDesc, getENCBindingHolder, getEnvEntryDesc, getMessageDestinationRefDesc, getPersistenceUnitRefs, getResourceEnvRefDesc, getResourceRefDesc, getServiceRefDesc, setENCBindingHolder
 
Methods inherited from class org.ow2.jonas.deployment.common.DescriptionGroupDesc
getDescription, getDisplayName, getLargeIcon, getSAXMsg, getSmallIcon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

transactionType

protected int transactionType
Constructor Detail

SessionDesc

public SessionDesc(ClassLoader classLoader,
                   Session ses,
                   AssemblyDescriptor asd,
                   JonasSession jSes,
                   JLinkedList jMDRList,
                   String filename)
            throws DeploymentDescException
constructor: called when the DeploymentDescriptor is read. Currently, called by both GenIC and createContainer.

Throws:
DeploymentDescException
Method Detail

checkTxAttribute

protected void checkTxAttribute(MethodDesc md)
                         throws DeploymentDescException
check that trans-attribute is valid for bean

Specified by:
checkTxAttribute in class BeanDesc
Parameters:
md - MethodDesc to check
Throws:
DeploymentDescException - When MethodDesc is not valid

getTransactionType

public int getTransactionType()
Get session transaction management type.

Returns:
transaction type value within BEAN_TRANSACTION_TYPE,CONTAINER_TRANSACTION_TYPE

isBeanManagedTransaction

public boolean isBeanManagedTransaction()
Returns true if bean managed transaction. (used by JOnAS Server)


getSessionTimeout

public int getSessionTimeout()
Get the session timeout value


check

public void check()
           throws DeploymentDescException
Check that the bean descriptor is valid

Overrides:
check in class BeanDesc
Throws:
DeploymentDescException - thrown for non-valid bean

toString

public String toString()
String representation of the object for test purpose

Specified by:
toString in interface IDescriptionGroupDesc
Overrides:
toString in class BeanDesc
Returns:
String representation of this object

isMonitoringSettingsDefinedInDD

public boolean isMonitoringSettingsDefinedInDD()

setWarningThreshold

public void setWarningThreshold(int warningThreshold)

isMonitoringEnabled

public boolean isMonitoringEnabled()

getWarningThreshold

public int getWarningThreshold()


Copyright © 2010 OW2 Consortium. All Rights Reserved.