org.apache.axis2.transport.jms
Class JMSListener

java.lang.Object
  extended byorg.apache.axis2.transport.jms.JMSListener
All Implemented Interfaces:
TransportListener

public class JMSListener
extends java.lang.Object
implements TransportListener

The JMS Transport listener implementation. A JMS Listner will hold one or more JMS connection factories, which would be created at initialization time. This implementation does not support the creation of connection factories at runtime. This JMS Listener registers with Axis to be notified of service deployment/undeployment/start and stop, and enables or disables listening for messages on the destinations as appropriate.

A Service could state the JMS connection factory name and the destination name for use as Parameters in its services.xml as shown in the example below. If the connection name was not specified, it will use the connection factory named "default" (JMSConstants.DEFAULT_CONFAC_NAME) - if such a factory is defined in the Axis2.xml. If the destination name is not specified it will default to a JMS queue by the name of the service. If the destination should be a Topic, it should be created on the JMS implementation, and specified in the services.xml of the service.

myTopicConnectionFactory dynamicTopics/something.TestTopic


Field Summary
 
Fields inherited from interface org.apache.axis2.transport.TransportListener
HOST_ADDRESS, PARAM_PORT
 
Constructor Summary
JMSListener()
           
 
Method Summary
 void destroy()
           
 ConfigurationContext getConfigurationContext()
           
 EndpointReference getEPRForService(java.lang.String serviceName, java.lang.String ip)
          Returns the EPR for the given service and IP.
 EndpointReference[] getEPRsForService(java.lang.String serviceName, java.lang.String ip)
          Returns EPRs for the given service and IP.
 SessionContext getSessionContext(MessageContext messageContext)
          To get the sessionContext transport dependent manner.
 void init(ConfigurationContext axisConf, TransportInDescription transprtIn)
          This is the TransportListener initialization method invoked by Axis2
 void start()
          Start this JMS Listener (Transport Listener)
 void stop()
          Stop this transport listener and shutdown all of the connection factories
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMSListener

public JMSListener()
Method Detail

init

public void init(ConfigurationContext axisConf,
                 TransportInDescription transprtIn)
This is the TransportListener initialization method invoked by Axis2

Specified by:
init in interface TransportListener
Parameters:
axisConf - the Axis configuration context
transprtIn - the TransportIn description

start

public void start()
           throws AxisFault
Start this JMS Listener (Transport Listener)

Specified by:
start in interface TransportListener
Throws:
AxisFault

stop

public void stop()
Stop this transport listener and shutdown all of the connection factories

Specified by:
stop in interface TransportListener

getEPRsForService

public EndpointReference[] getEPRsForService(java.lang.String serviceName,
                                             java.lang.String ip)
                                      throws AxisFault
Returns EPRs for the given service and IP. (Picks up precomputed EPR)

Specified by:
getEPRsForService in interface TransportListener
Parameters:
serviceName - service name
ip - ignored
Returns:
the EPR for the service
Throws:
AxisFault - not used

getEPRForService

public EndpointReference getEPRForService(java.lang.String serviceName,
                                          java.lang.String ip)
                                   throws AxisFault
Returns the EPR for the given service and IP. (Picks up precomputed EPR)

Specified by:
getEPRForService in interface TransportListener
Parameters:
serviceName - service name
ip - ignored
Returns:
the EPR for the service
Throws:
AxisFault - not used

getConfigurationContext

public ConfigurationContext getConfigurationContext()

getSessionContext

public SessionContext getSessionContext(MessageContext messageContext)
Description copied from interface: TransportListener
To get the sessionContext transport dependent manner. So that transport listener can return its own implementation of session managment

Specified by:
getSessionContext in interface TransportListener
Parameters:
messageContext - : MessageContext which has all the relavent data
Returns:
SessionContext

destroy

public void destroy()
Specified by:
destroy in interface TransportListener


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.