org.mockejb
Class MDBDescriptor

java.lang.Object
  extended byorg.mockejb.BasicEjbDescriptor
      extended byorg.mockejb.MDBDescriptor
All Implemented Interfaces:
java.io.Serializable

public class MDBDescriptor
extends BasicEjbDescriptor

Provides the information that MockEJB needs to "deploy" MDB. This includes JNDI names of the connection factory and destination. MockEJB uses its mock JMS implementation to create connection factory and destination and bind them to JNDI. It then creates MDB and sets it as the message listener to the destination.

Author:
Alexander Ananiev
See Also:
Serialized Form

Constructor Summary
MDBDescriptor(java.lang.String connectionFactoryJndiName, java.lang.String destinationJndiName, java.lang.Object bean)
          Creates a new instance of the descriptor.
 
Method Summary
 java.lang.String getConnectionFactoryJndiName()
           
 java.lang.String getDestinationJndiName()
           
 boolean isAlreadyBound()
           
 boolean isTopic()
           
 void setIsAlreadyBound(boolean isAlreadyBound)
          If set to True, MockEJB will assume that the connection factory and desination already exist and bound in JNDI.
 void setIsTopic(boolean isTopic)
           
 
Methods inherited from class org.mockejb.BasicEjbDescriptor
getBean, getBeanClass, getHomeClass, getIfaceClass, getJndiName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MDBDescriptor

public MDBDescriptor(java.lang.String connectionFactoryJndiName,
                     java.lang.String destinationJndiName,
                     java.lang.Object bean)
Creates a new instance of the descriptor.

Parameters:
connectionFactoryJndiName - JNDI name of the connection factory.
destinationJndiName - JNDI name of the desination. Queue is the default, unless isTopic is set.
bean - bean object. Must implement MessageListener interface.
Method Detail

setIsTopic

public void setIsTopic(boolean isTopic)

setIsAlreadyBound

public void setIsAlreadyBound(boolean isAlreadyBound)
If set to True, MockEJB will assume that the connection factory and desination already exist and bound in JNDI. Otherwise, MockEJB will try to create them using Mock JMS objects and bind them to JNDI. The default is "false".

Parameters:
isAlreadyBound - do not create destination and connection factory if set to true

getConnectionFactoryJndiName

public java.lang.String getConnectionFactoryJndiName()

getDestinationJndiName

public java.lang.String getDestinationJndiName()

isTopic

public boolean isTopic()

isAlreadyBound

public boolean isAlreadyBound()