org.objectweb.jonas_ejb.deployment.api
Class MessageDrivenDesc

java.lang.Object
  |
  +--org.objectweb.jonas_ejb.deployment.api.BeanDesc
        |
        +--org.objectweb.jonas_ejb.deployment.api.MessageDrivenDesc

public class MessageDrivenDesc
extends BeanDesc

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

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

Field Summary
protected static java.lang.String[] ACKMODE
           
protected  int acknowledgeMode
           
static int AUTO_ACKNOWLEDGE
           
static int DEFAULT_MAX_MESSAGES
           
protected  java.lang.String destinationJndiName
           
protected  java.lang.Class destinationType
           
static int DUPS_OK_ACKNOWLEDGE
           
protected  boolean isTopicDestination
           
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, CONTAINER_TRANSACTION_TYPE, deploymentDesc, derivedBeanName, displayName, ejb10EnvProps, ejbClass, ejbLocalRefDesc, ejbName, ejbRefDesc, envEntryDesc, fullDerivedBeanName, home, jndiName, local, localhome, remote, resourceEnvRefDesc, resourceRefDesc, securityRoleRef, TRANS
 
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 getDestinationJndiName()
          Get the the destination JNDI name of the message driven bean.
 java.lang.Class getDestinationType()
          Get the the destination type of the message driven bean.
 int getMaxMessages()
           
 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()
          Return true if BEAN_TRANSACTION_TYPE
 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
addMethodDesc, checkRemoteException, getDeploymentDesc, getDerivedBeanName, getDisplayName, getEjb10Environment, getEjbClass, getEjbLocalRefDesc, getEjbName, getEjbRefDesc, getEnvEntryDesc, getFullDerivedBeanName, getFullWrpHandleName, getFullWrpHomeName, getFullWrpLocalHomeName, getFullWrpLocalName, getFullWrpRemoteName, getHomeClass, getIdentifierFromEjbName, getJndiLocalName, getJndiName, getLocalClass, getLocalHomeClass, getMethodDesc, getMethodDesc, getMethodDescIterator, getRemoteClass, getResourceEnvRefDesc, getResourceRefDesc, getRoleLink, getSecurityRoleNames, getWrpHandleName, getWrpHomeName, getWrpLocalHomeName, getWrpLocalName, getWrpRemoteName, newMethodDescInstance, setDeploymentDesc, verifyRoleName
 
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

DUPS_OK_ACKNOWLEDGE

public static final int DUPS_OK_ACKNOWLEDGE

ACKMODE

protected static final java.lang.String[] ACKMODE

SUBS_DURABLE

public static final int SUBS_DURABLE

SUBS_NON_DURABLE

public static final int SUBS_NON_DURABLE

SUBS_DURABILITY

protected static final java.lang.String[] SUBS_DURABILITY

DEFAULT_MAX_MESSAGES

public static final int DEFAULT_MAX_MESSAGES

transactionType

protected int transactionType

selector

protected java.lang.String selector

acknowledgeMode

protected int acknowledgeMode

subscriptionDurability

protected int subscriptionDurability

destinationType

protected java.lang.Class destinationType

destinationJndiName

protected java.lang.String destinationJndiName

txAttribute

protected int txAttribute

isTopicDestination

protected boolean isTopicDestination
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()
Return true if BEAN_TRANSACTION_TYPE

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()

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

isRequired

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

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.

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
Overrides:
checkTxAttribute in class BeanDesc

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
Overrides:
toString in class BeanDesc
Returns:
String representation of this object