站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 webservice API Documentation 英文版文档

DelegatingMessageDrivenBean (JBossWS API) - JBoss 4.0.1 sp1 webservice API Documentation 英文版文档


org.jboss.webservice.transport.jms
Class DelegatingMessageDrivenBean

java.lang.Object
  extended byorg.jboss.webservice.transport.jms.DelegatingMessageDrivenBean
All Implemented Interfaces:
javax.ejb.EnterpriseBean, javax.ejb.MessageDrivenBean, javax.jms.MessageListener, Serializable

public class DelegatingMessageDrivenBean
extends Object
implements javax.ejb.MessageDrivenBean, javax.jms.MessageListener

A basic MDB that delegates to an already insalled service.

Author:
thomas.diesler@jboss.org
See Also:
Serialized Form

Field Summary
protected  org.jboss.logging.Logger 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  org.apache.axis.server.AxisServer getAxisServer()
          Get the JBossWS installed Axis sever.
protected  javax.jms.Queue getReplyQueue(javax.jms.BytesMessage message)
          Get the reply queue.
 void onMessage(javax.jms.Message message)
          All messages come in here, if it is a BytesMessage we pass it on for further processing.
protected  void processSOAPMessage(javax.jms.BytesMessage message)
          Read the SOAP message and pass it on to Axis.
protected  void sendResponse(javax.jms.Queue replyQueue, org.apache.axis.Message axisResponse)
          Respond to the call by sending a message to the reply queue
 void setMessageDrivenContext(javax.ejb.MessageDrivenContext 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 org.jboss.logging.Logger log
Constructor Detail

DelegatingMessageDrivenBean

public DelegatingMessageDrivenBean()
Method Detail

getAxisServer

protected org.apache.axis.server.AxisServer getAxisServer()
Get the JBossWS installed Axis sever.


onMessage

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

Specified by:
onMessage in interface javax.jms.MessageListener

processSOAPMessage

protected void processSOAPMessage(javax.jms.BytesMessage message)
                           throws 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:
Exception

getReplyQueue

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

Throws:
javax.jms.JMSException

sendResponse

protected void sendResponse(javax.jms.Queue replyQueue,
                            org.apache.axis.Message axisResponse)
                     throws javax.xml.soap.SOAPException,
                            IOException,
                            javax.jms.JMSException
Respond to the call by sending a message to the reply queue

Throws:
javax.xml.soap.SOAPException
IOException
javax.jms.JMSException

ejbCreate

public void ejbCreate()

ejbRemove

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

Specified by:
ejbRemove in interface javax.ejb.MessageDrivenBean
Throws:
javax.ejb.EJBException

setMessageDrivenContext

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

Specified by:
setMessageDrivenContext in interface javax.ejb.MessageDrivenBean
Throws:
javax.ejb.EJBException


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.