org.apache.cactus.spi.server
Class MessageDrivenBeanRedirector

java.lang.Object
  extended by org.apache.cactus.spi.server.MessageDrivenBeanRedirector
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.MessageDrivenBean, javax.jms.MessageListener

public class MessageDrivenBeanRedirector
extends java.lang.Object
implements javax.ejb.MessageDrivenBean, javax.jms.MessageListener

Generic Message Driven Bean redirector that calls a test method on the server side.

Since:
1.4
Version:
$Id$
Author:
Vincent Massol
See Also:
Serialized Form

Constructor Summary
MessageDrivenBeanRedirector()
           
 
Method Summary
 void ejbCreate()
          Called by the container to create an instance of this Message Driven bean.
 void ejbRemove()
          The container invokes this method when the instance is about to be discarded.
 void onMessage(javax.jms.Message theMessage)
          Receives a message from a JMS Queue and make it available to the test case.
 void setMessageDrivenContext(javax.ejb.MessageDrivenContext theContext)
          Sets the Message context (automatically called by the container).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageDrivenBeanRedirector

public MessageDrivenBeanRedirector()
Method Detail

setMessageDrivenContext

public void setMessageDrivenContext(javax.ejb.MessageDrivenContext theContext)
Sets the Message context (automatically called by the container).

Specified by:
setMessageDrivenContext in interface javax.ejb.MessageDrivenBean
Parameters:
theContext - the Message context

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
Called by the container to create an instance of this Message Driven bean.

Throws:
javax.ejb.CreateException - see the EJB specification

ejbRemove

public void ejbRemove()
The container invokes this method when the instance is about to be discarded. This might happens if the container needs to reduce the size of the pool.

Specified by:
ejbRemove in interface javax.ejb.MessageDrivenBean

onMessage

public void onMessage(javax.jms.Message theMessage)
Receives a message from a JMS Queue and make it available to the test case.

Specified by:
onMessage in interface javax.jms.MessageListener
Parameters:
theMessage - the JMS Message


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.