| java.lang.Object org.apache.synapse.transport.jms.JMSConnectionFactory
JMSConnectionFactory | public class JMSConnectionFactory implements ExceptionListener(Code) | | Encapsulate a JMS Connection factory definition within an Axis2.xml
More than one JMS connection factory could be defined within an Axis2 XML
specifying the JMSListener as the transportReceiver.
These connection factories are created at the initialization of the
transportReceiver, and any service interested in using any of these could
specify the name of the factory and the destination through Parameters named
JMSConstants.CONFAC_PARAM and JMSConstants.DEST_PARAM as shown below.
myQueueConnectionFactory
TestQueue
If a connection factory is defined by a parameter named
JMSConstants.DEFAULT_CONFAC_NAME in the Axis2 XML, services which does not
explicitly specify a connection factory will be defaulted to it - if it is
defined in the Axis2 configuration.
e.g.
org.apache.activemq.jndi.ActiveMQInitialContextFactory
tcp://localhost:61616
TopicConnectionFactory
myTopicOne, myTopicTwo
org.apache.activemq.jndi.ActiveMQInitialContextFactory
tcp://localhost:61616
QueueConnectionFactory
myQueueOne, myQueueTwo
org.apache.activemq.jndi.ActiveMQInitialContextFactory
tcp://localhost:61616
ConnectionFactory
myDestinationOne, myDestinationTwo
|
JMSConnectionFactory | public JMSConnectionFactory(String name, ConfigurationContext cfgCtx)(Code) | | Create a JMSConnectionFactory for the given [axis2] name the
JNDI name of the actual ConnectionFactory
Parameters: name - the connection factory name specified in the axis2.xml for theTransportListener or the TransportSender using this Parameters: cfgCtx - the axis2 configuration context |
addDestination | public void addDestination(String destinationJNDIName, String destinationType, String serviceName)(Code) | | Add a listen destination on this connection factory on behalf of the given service
Parameters: destinationJNDIName - destination JNDI name Parameters: serviceName - the service to which it belongs |
connectAndListen | public synchronized void connectAndListen() throws JMSException, NamingException(Code) | | Begin [or restart] listening for messages on the list of destinations associated
with this connection factory. (Called during Axis2 initialization of
the Transport receivers, or after a disconnection has been detected)
When called from the JMS transport sender, this call simply acquires the actual
JMS connection factory from the JNDI, creates a new connection and starts it.
throws: JMSException - on exceptions throws: NamingException - on exceptions |
equals | public boolean equals(Object o)(Code) | | Is this connection factory referring to the same underlying connection factory passed in
Parameters: o - a JMSOutTransport object which specifies a connection factory true if this instance could be substituted for the out-transport |
getConFactory | public ConnectionFactory getConFactory()(Code) | | |
getConnFactoryJNDIName | public String getConnFactoryJNDIName()(Code) | | |
getConnectionFactoryType | public String getConnectionFactoryType()(Code) | | |
getDestination | public Destination getDestination(String destinationJNDIName)(Code) | | |
getEPRForDestination | public EndpointReference getEPRForDestination(String jndiDestination)(Code) | | Return the EPR for the JMS Destination with the given JNDI name
when using this connection factory
Parameters: jndiDestination - the JNDI name of the JMS Destionation the EPR for a service using this destination |
getReconnectTimeout | public long getReconnectTimeout()(Code) | | |
getServiceNameForDestination | public String getServiceNameForDestination(Destination dest, String jmsDestinationName)(Code) | | Return the service name using the JMS destination and its JNDI name
Parameters: dest - the JMS Destination Queue or Topic Parameters: jmsDestinationName - the JMS destination name the name of the service using the destination |
getServiceNameForDestinationName | public String getServiceNameForDestinationName(String jmsDestinationName)(Code) | | Return the service name using the JMS destination given by the JNDI name
Parameters: jmsDestinationName - the JMS destination name the name of the service using the destination |
getServiceNameForJNDIName | public String getServiceNameForJNDIName(String jndiDestinationName)(Code) | | Return the service name using the JMS destination given by the JNDI name
Parameters: jndiDestinationName - the JNDI name of the destination the name of the service using the destination |
getSessionForDestination | public Session getSessionForDestination(String destinationJNDIname)(Code) | | Create a session for sending to the given destination and save it on the jmsSessions Map
keyed by the destinatin JNDI name
Parameters: destinationJNDIname - the destination JNDI name a JMS Session to send messages to the destination using this connection factory |
onException | public void onException(JMSException e)(Code) | | |
removeDestination | public void removeDestination(String jndiDestinationName)(Code) | | Abort listening on the JMS destination from this connection factory
Parameters: jndiDestinationName - the JNDI name of the JMS destination to be removed |
setConnFactoryJNDIName | public void setConnFactoryJNDIName(String connFactoryJNDIName)(Code) | | |
setConnectionFactoryType | public void setConnectionFactoryType(String connectionFactoryType)(Code) | | |
setReconnectTimeout | public void setReconnectTimeout(long reconnectTimeout)(Code) | | |
startListeningOnDestination | public void startListeningOnDestination(String destinationJNDIname, String destinationType)(Code) | | Listen on the given destination from this connection factory. Used to
start listening on a destination associated with a newly deployed service
Parameters: destinationJNDIname - the JMS destination to listen on |
stop | public void stop()(Code) | | Close all connections, sessions etc.. and stop this connection factory
|
|
|