| |
|
| java.lang.Object org.apache.axis2.transport.jms.JMSConnectionFactory
JMSConnectionFactory | public class JMSConnectionFactory (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 | JMSConnectionFactory(String name, String jndiName)(Code) | | Create a JMSConnectionFactory for the given Axis2 name and JNDI name
Parameters: name - the local Axis2 name of the connection factory Parameters: jndiName - the JNDI name of the actual connection factory used |
JMSConnectionFactory | JMSConnectionFactory(String name)(Code) | | Create a JMSConnectionFactory for the given Axis2 name
Parameters: name - the local Axis2 name of the connection factory |
addDestination | public void addDestination(String destinationJndi, String serviceName)(Code) | | Add a listen destination on this connection factory on behalf of the given service
Parameters: destinationJndi - destination JNDI name Parameters: serviceName - the service to which it belongs |
addProperty | public void addProperty(String key, String value)(Code) | | Add a property to the connection factory
Parameters: key - Parameters: value - |
connect | public void connect() throws NamingException(Code) | | Connect to the actual JMS connection factory specified by the JNDI name
throws: NamingException - if the connection factory cannot be found |
getConFactory | public ConnectionFactory getConFactory()(Code) | | Get the actual underlying connection factory
actual connection factory |
getDestinationName | public String getDestinationName(String destinationJndi)(Code) | | Return the provider specific Destination name if any for the destination with the given
JNDI name
Parameters: destinationJndi - the JNDI name of the destination the provider specific Destination name or null if cannot be found |
getDestinations | public Map getDestinations()(Code) | | Get the list of destinations (JNDI) associated with this connection factory
destinations to service maping |
getEPRForDestination | public EndpointReference getEPRForDestination(String destination)(Code) | | Return the EPR for the JMS Destination with the given JNDI name and using
this connection factory
Parameters: destination - the JNDI name of the JMS Destionation the EPR |
getJndiName | public String getJndiName()(Code) | | Get the JNDI name of the actual factory
the jndi name of the actual connection factory |
getJndiPass | public String getJndiPass()(Code) | | Get the JNDI name of the actual factory password
the jndi name of the actual connection factory password |
getJndiUser | public String getJndiUser()(Code) | | Get the JNDI name of the actual factory username
the jndi name of the actual connection factory username |
getName | public String getName()(Code) | | Return the name of the connection factory
the Axis2 name of this factory |
getPass | public String getPass()(Code) | | This is the real password for the connection factory after the JNDI lookup
the real password for the connection factory after the JNDI lookup |
getProperties | public Hashtable getProperties()(Code) | | Get the connection factory properties
properties |
getServiceByDestination | public String getServiceByDestination(String destinationName)(Code) | | |
getServiceNameForDestination | public String getServiceNameForDestination(String destination)(Code) | | Return the service name using this destination
Parameters: destination - the destination name the service which uses the given destination, or null |
getUser | public String getUser()(Code) | | This is the real username for the connection factory after the JNDI lookup
the eal username for the connection factory after the JNDI lookup |
listen | public void listen(JMSMessageReceiver msgRcvr) throws JMSException(Code) | | Begin listening for messages on the list of destinations associated
with this connection factory. (Called during Axis2 initialization of
the Transport receivers)
Parameters: msgRcvr - the message receiver which will process received messages throws: JMSException - on exceptions |
listenOnDestination | public void listenOnDestination(String destinationJndi) throws JMSException(Code) | | Listen on the given destination from this connection factory. Used to
start listening on a destination associated with a newly deployed service
Parameters: destinationJndi - the JMS destination to listen on throws: JMSException - on exception |
removeDestination | public void removeDestination(String destinationJndi) throws JMSException(Code) | | Remove listen destination on this connection factory
Parameters: destinationJndi - the JMS destination to be removed if an error occurs trying to stop listening for messages before removal |
setJndiName | public void setJndiName(String jndiName)(Code) | | Set the JNDI connection factory name
Parameters: jndiName - |
setJndiPass | public void setJndiPass(String jndiPass)(Code) | | Get the JNDI name of the actual factory password
the jndi name of the actual connection factory password |
setJndiUser | public void setJndiUser(String jndiUser)(Code) | | Get the JNDI name of the actual factory username
the jndi name of the actual connection factory username |
stop | public void stop()(Code) | | Close all connections, sessions etc.. and stop this connection factory
|
|
|
|