org.codehaus.activemq.itest.ejb
Class MessengerBean

java.lang.Object
  extended byorg.codehaus.activemq.itest.ejb.MessengerBean
All Implemented Interfaces:
EnterpriseBean, Serializable, SessionBean

public class MessengerBean
extends Object
implements SessionBean

This is a SSB that uses an outbound JMS Resource Adapter.

Version:
$Revision: 1.3 $
See Also:
Serialized Form

Constructor Summary
MessengerBean()
           
 
Method Summary
 void ejbActivate()
           
 void ejbCreate()
           
 void ejbPassivate()
           
 void ejbRemove()
           
 String receiveMessage(Destination dest, long timeout)
          Receives a message from a queue.
 void sendMessage(Destination dest, String text)
          Sends a message to a named queue.
 void sendMessage(Destination dest, String text, int reps)
          Sends a message to a named queue.
 void sendMessage(String text, int reps)
          Sends a message to queue.
 void setSessionContext(SessionContext sessionContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessengerBean

public MessengerBean()
Method Detail

ejbCreate

public void ejbCreate()

ejbRemove

public void ejbRemove()
Specified by:
ejbRemove in interface SessionBean

ejbActivate

public void ejbActivate()
Specified by:
ejbActivate in interface SessionBean

ejbPassivate

public void ejbPassivate()
Specified by:
ejbPassivate in interface SessionBean

setSessionContext

public void setSessionContext(SessionContext sessionContext)
Specified by:
setSessionContext in interface SessionBean

sendMessage

public void sendMessage(String text,
                        int reps)
                 throws RemoteException,
                        NamingException,
                        JMSException
Sends a message to queue.

Parameters:
text -
Throws:
RemoteException
NamingException
JMSException

sendMessage

public void sendMessage(Destination dest,
                        String text,
                        int reps)
                 throws RemoteException,
                        NamingException,
                        JMSException
Sends a message to a named queue.

Parameters:
text -
Throws:
RemoteException
NamingException
JMSException

sendMessage

public void sendMessage(Destination dest,
                        String text)
                 throws RemoteException,
                        NamingException,
                        JMSException
Sends a message to a named queue.

Parameters:
text -
Throws:
RemoteException
NamingException
JMSException

receiveMessage

public String receiveMessage(Destination dest,
                             long timeout)
                      throws RemoteException,
                             NamingException,
                             JMSException
Receives a message from a queue.

Parameters:
timeout -
Returns:
@throws java.rmi.RemoteException
Throws:
NamingException
JMSException
RemoteException


Copyright © 2004-2005 Protique, Ltd.. All Rights Reserved.