org.jboss.webservice.transport.jms
Class DelegatingMessageDrivenBean

java.lang.Object
  extended byorg.jboss.webservice.transport.jms.DelegatingMessageDrivenBean
All Implemented Interfaces:
EnterpriseBean (src) , MessageDrivenBean (src) , MessageListener (src) , java.io.Serializable

public class DelegatingMessageDrivenBean
extends java.lang.Object
implements MessageDrivenBean (src) , MessageListener (src)

A basic MDB that delegates to an already insalled service.

See Also:
Serialized Form

Field Summary
protected  Logger (src) log
           
 
Constructor Summary
DelegatingMessageDrivenBean()
           
 
Method Summary
 void ejbCreate()
           
 void ejbRemove()
          A container invokes this method before it ends the life of the message-driven object.
protected  AxisServer (src) getAxisServer()
          Get the JBossWS installed Axis sever.
protected  Queue (src) getReplyQueue(BytesMessage (src)  message)
          Get the reply queue.
 void onMessage(Message (src)  message)
          All messages come in here, if it is a BytesMessage we pass it on for further processing.
protected  void processSOAPMessage(BytesMessage (src)  message)
          Read the SOAP message and pass it on to Axis.
protected  void sendResponse(Queue (src)  replyQueue, Message (src)  axisResponse)
          Respond to the call by sending a message to the reply queue
 void setMessageDrivenContext(MessageDrivenContext (src)  ctx)
          Set the associated message-driven context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected Logger (src)  log
Constructor Detail

DelegatingMessageDrivenBean

public DelegatingMessageDrivenBean()
Method Detail

getAxisServer

protected AxisServer (src)  getAxisServer()
Get the JBossWS installed Axis sever.


onMessage

public void onMessage(Message (src)  message)
All messages come in here, if it is a BytesMessage we pass it on for further processing.

Specified by:
onMessage in interface MessageListener (src)
Parameters:
message - the message passed to the listener

processSOAPMessage

protected void processSOAPMessage(BytesMessage (src)  message)
                           throws java.lang.Exception
Read the SOAP message and pass it on to Axis. The axisServer should have an installes service, which uses this MDB as pivot point.

Throws:
java.lang.Exception

getReplyQueue

protected Queue (src)  getReplyQueue(BytesMessage (src)  message)
                       throws JMSException (src) 
Get the reply queue.

Throws:
JMSException (src)

sendResponse

protected void sendResponse(Queue (src)  replyQueue,
                            Message (src)  axisResponse)
                     throws SOAPException (src) ,
                            java.io.IOException,
                            JMSException (src) 
Respond to the call by sending a message to the reply queue

Throws:
SOAPException (src)
java.io.IOException
JMSException (src)

ejbCreate

public void ejbCreate()

ejbRemove

public void ejbRemove()
               throws EJBException (src) 
A container invokes this method before it ends the life of the message-driven object.

Specified by:
ejbRemove in interface MessageDrivenBean (src)
Throws:
EJBException (src) - - Thrown by the method to indicate a failure caused by a system-level error.

setMessageDrivenContext

public void setMessageDrivenContext(MessageDrivenContext (src)  ctx)
                             throws EJBException (src) 
Set the associated message-driven context.

Specified by:
setMessageDrivenContext in interface MessageDrivenBean (src)
Parameters:
ctx - - A MessageDrivenContext interface for the instance.
Throws:
EJBException (src) - - Thrown by the method to indicate a failure caused by a system-level error.