org.jboss.webservice.transport.jms
Class JMSTransportSupport

java.lang.Object
  extended byorg.jboss.webservice.transport.jms.JMSTransportSupport
All Implemented Interfaces:
EnterpriseBean (src) , MessageDrivenBean (src) , MessageListener (src) , java.io.Serializable
Direct Known Subclasses:
OrganizationJMSEndpoint (src)

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

The abstract base class for MDBs that want to act as web service endpoints. A subclass should only need to implement the service endpoint interface.

See Also:
Serialized Form

Field Summary
protected  Logger (src) log
           
 
Constructor Summary
JMSTransportSupport()
           
 
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.
protected  java.lang.String getServiceName()
          Return the service name for this MDB
 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

JMSTransportSupport

public JMSTransportSupport()
Method Detail

getAxisServer

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


getServiceName

protected java.lang.String getServiceName()
Return the service name for this MDB


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