Class MDBDescriptor

  extended byorg.mockejb.BasicEjbDescriptor
      extended byorg.mockejb.MDBDescriptor
All Implemented Interfaces:

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.

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


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

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


public void setIsTopic(boolean isTopic)


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".

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


public java.lang.String getConnectionFactoryJndiName()


public java.lang.String getDestinationJndiName()


public boolean isTopic()


public boolean isAlreadyBound()