org.objectweb.jonas_ejb.deployment.api
Class MessageDrivenDesc

java.lang.Object
  extended by org.objectweb.jonas_lib.deployment.api.DescriptionGroupDesc
      extended by org.objectweb.jonas_lib.deployment.api.JndiEnvRefsGroupDesc
          extended by org.objectweb.jonas_ejb.deployment.api.BeanDesc
              extended by org.objectweb.jonas_ejb.deployment.api.MessageDrivenDesc
All Implemented Interfaces:
DescriptionGroup, JndiEnvRefsGroup

public class MessageDrivenDesc
extends BeanDesc

Class to hold meta-information related to a message driven bean

Author:
Christophe Ney [cney@batisseurs.com] : Initial developer, Helene Joanin

Field Summary
protected static java.lang.String[] ACKMODE
           
protected  int acknowledgeMode
           
static int AUTO_ACKNOWLEDGE
           
static int DEFAULT_MAX_MESSAGES
           
protected  java.lang.String destination
           
protected  java.lang.String destinationJndiName
           
protected  java.lang.String destinationLink
           
protected  java.lang.Class destinationType
           
static int DUPS_OK_ACKNOWLEDGE
           
protected  boolean isTopicDestination
           
protected  ActivationConfigDesc mdActivationConfigDesc
           
protected  ActivationConfigDesc mdJonasActivationConfigDesc
           
protected  java.lang.String selector
           
protected static java.lang.String[] SUBS_DURABILITY
           
static int SUBS_DURABLE
           
static int SUBS_NON_DURABLE
           
protected  int subscriptionDurability
           
protected  int transactionType
           
protected  int txAttribute
           
 
Fields inherited from class org.objectweb.jonas_ejb.deployment.api.BeanDesc
BEAN_TRANSACTION_TYPE, beanIdentification, bf, cacheMax, clusterHomeDistributor, clusterRemoteDistributor, clusterReplicated, CONTAINER_TRANSACTION_TYPE, deploymentDesc, derivedBeanName, ejb10EnvProps, ejbClass, ejbName, ejbTimeoutSignature, fullDerivedBeanName, GENERATED_PREFIX, home, jndiLocalName, jndiName, local, localhome, logger, poolMin, remote, securityRoleRefDescList, timerTxAttribute, TRANS
 
Fields inherited from class org.objectweb.jonas_lib.deployment.api.DescriptionGroupDesc
description, displayName, largeIcon, smallIcon
 
Method Summary
 void check()
          Check that the message diven bean descriptor is valid
protected  void checkTxAttribute(MethodDesc md)
          check that trans-attribute is valid for bean
 int getAcknowledgeMode()
          Get the acknowledge-mode of the message driven bean.
 java.lang.String getDestination()
          Get the the destination name of the message driven bean.
 java.lang.String getDestinationJndiName()
          Get the the destination JNDI name of the message driven bean.
 java.lang.String getDestinationLink()
          Get the the destination link name of the message driven bean.
 java.lang.Class getDestinationType()
          Get the the destination type of the message driven bean.
 ActivationConfigDesc getJonasMdActivationConfigDesc()
           
 int getMaxMessages()
           
 ActivationConfigDesc getMdActivationConfigDesc()
           
 java.lang.String getSelector()
          Get the message-selector value of the message driven bean.
 int getSubscriptionDurability()
          Get the the durability of the subscription of the message driven bean.
 int getTransactionType()
          Get transaction management type of the message driven.
 int getTxAttribute()
          Return the transaction attribute for the onMessage method of Message driven bean
 boolean hasSelector()
          Assessor for existence of a message-selector for the message driven bean
 boolean isBeanManagedTransaction()
           
 boolean isRequired()
          Return true if tx attribute for onMessage is Required
 boolean isSubscriptionDurable()
           
 boolean isTopicDestination()
          Return true if it is a Topic destination
 java.lang.String toString()
          String representation of the object for test purpose
 
Methods inherited from class org.objectweb.jonas_ejb.deployment.api.BeanDesc
addEJBMethodDesc, addMethodDesc, checkRemoteException, checkRunAsMapping, checkValidTypesForRmi, getBeanFactory, getCacheMax, getClusterHomeDistributor, getClusterRemoteDistributor, 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, setBeanFactory, setClusterReplicated, setDeploymentDesc, setSasComponent, verifyRoleName
 
Methods inherited from class org.objectweb.jonas_lib.deployment.api.JndiEnvRefsGroupDesc
getEjbLocalRefDesc, getEjbRefDesc, getEnvEntryDesc, getMessageDestinationRefDesc, getResourceEnvRefDesc, getResourceRefDesc, getServiceRefDesc
 
Methods inherited from class org.objectweb.jonas_lib.deployment.api.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

AUTO_ACKNOWLEDGE

public static final int AUTO_ACKNOWLEDGE
See Also:
Constant Field Values

DUPS_OK_ACKNOWLEDGE

public static final int DUPS_OK_ACKNOWLEDGE
See Also:
Constant Field Values

ACKMODE

protected static final java.lang.String[] ACKMODE

SUBS_DURABLE

public static final int SUBS_DURABLE
See Also:
Constant Field Values

SUBS_NON_DURABLE

public static final int SUBS_NON_DURABLE
See Also:
Constant Field Values

SUBS_DURABILITY

protected static final java.lang.String[] SUBS_DURABILITY

DEFAULT_MAX_MESSAGES

public static final int DEFAULT_MAX_MESSAGES
See Also:
Constant Field Values

selector

protected java.lang.String selector

acknowledgeMode

protected int acknowledgeMode

subscriptionDurability

protected int subscriptionDurability

destinationType

protected java.lang.Class destinationType

txAttribute

protected int txAttribute

isTopicDestination

protected boolean isTopicDestination

transactionType

protected int transactionType

destinationJndiName

protected java.lang.String destinationJndiName

destinationLink

protected java.lang.String destinationLink

destination

protected java.lang.String destination

mdActivationConfigDesc

protected ActivationConfigDesc mdActivationConfigDesc

mdJonasActivationConfigDesc

protected ActivationConfigDesc mdJonasActivationConfigDesc
Method Detail

getTransactionType

public int getTransactionType()
Get transaction management type of the message driven.

Returns:
transaction type value within BEAN_TRANSACTION_TYPE,CONTAINER_TRANSACTION_TYPE

getTxAttribute

public int getTxAttribute()
Return the transaction attribute for the onMessage method of Message driven bean


isBeanManagedTransaction

public boolean isBeanManagedTransaction()
Returns:
true if BEAN_TRANSACTION_TYPE

getDestination

public java.lang.String getDestination()
Get the the destination name of the message driven bean.

Returns:
name of the destination of the message driven bean.

getDestinationJndiName

public java.lang.String getDestinationJndiName()
Get the the destination JNDI name of the message driven bean.

Returns:
JNDI name of the destination of the message driven bean.

getDestinationLink

public java.lang.String getDestinationLink()
Get the the destination link name of the message driven bean.

Returns:
link name of the destination of the message driven bean.

getDestinationType

public java.lang.Class getDestinationType()
Get the the destination type of the message driven bean.

Returns:
type of the destination of the message driven bean.

isTopicDestination

public boolean isTopicDestination()
Return true if it is a Topic destination


hasSelector

public boolean hasSelector()
Assessor for existence of a message-selector for the message driven bean

Returns:
true if message-selector is defined for the bean

getSelector

public java.lang.String getSelector()
Get the message-selector value of the message driven bean.

Returns:
value of the message selector return null if no selector

getAcknowledgeMode

public int getAcknowledgeMode()
Get the acknowledge-mode of the message driven bean.

Returns:
acknowledge-mode value within AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE

getSubscriptionDurability

public int getSubscriptionDurability()
Get the the durability of the subscription of the message driven bean.

Returns:
durability of the subscription value within SUBS_DURABLE, SUBS_NON_DURABLE

isSubscriptionDurable

public boolean isSubscriptionDurable()

isRequired

public boolean isRequired()
Return true if tx attribute for onMessage is Required


getMaxMessages

public int getMaxMessages()
Returns:
the maximum number of messages that can be assigned to a server session at one time. will be configurable in the future

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

check

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

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

toString

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

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

getMdActivationConfigDesc

public ActivationConfigDesc getMdActivationConfigDesc()
Returns:
the MessageDriven ActivationConfigDesc object

getJonasMdActivationConfigDesc

public ActivationConfigDesc getJonasMdActivationConfigDesc()
Returns:
the JOnAS MessageDriven ActivationConfigDesc object