|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.axis2.transport.jms.JMSConnectionFactory
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.
Method Summary | |
void |
addDestination(java.lang.String destinationJndi,
java.lang.String serviceName)
Add a listen destination on this connection factory on behalf of the given service |
void |
addProperty(java.lang.String key,
java.lang.String value)
Add a property to the connection factory |
void |
connect()
Connect to the actual JMS connection factory specified by the JNDI name |
javax.jms.ConnectionFactory |
getConFactory()
Get the actual underlying connection factory |
java.lang.String |
getDestinationName(java.lang.String destinationJndi)
Return the provider specific Destination name if any for the destination with the given JNDI name |
java.util.Map |
getDestinations()
Get the list of destinations (JNDI) associated with this connection factory |
EndpointReference |
getEPRForDestination(java.lang.String destination)
Return the EPR for the JMS Destination with the given JNDI name and using this connection factory |
java.lang.String |
getJndiName()
Get the JNDI name of the actual factory |
java.lang.String |
getName()
Return the name of the connection factory |
java.util.Hashtable |
getProperties()
Get the connection factory properties |
java.lang.String |
getServiceByDestination(java.lang.String destinationName)
|
java.lang.String |
getServiceNameForDestination(java.lang.String destination)
Return the service name using this destination |
void |
listen(JMSMessageReceiver msgRcvr)
Begin listening for messages on the list of destinations associated with this connection factory. |
void |
listenOnDestination(java.lang.String destinationJndi)
Listen on the given destination from this connection factory. |
void |
removeDestination(java.lang.String destinationJndi)
Remove listen destination on this connection factory |
void |
setJndiName(java.lang.String jndiName)
Set the JNDI connection factory name |
void |
stop()
Close all connections, sessions etc.. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public void connect() throws javax.naming.NamingException
javax.naming.NamingException
- if the connection factory cannot be foundpublic void setJndiName(java.lang.String jndiName)
jndiName
- public void addDestination(java.lang.String destinationJndi, java.lang.String serviceName)
destinationJndi
- destination JNDI nameserviceName
- the service to which it belongspublic void removeDestination(java.lang.String destinationJndi) throws javax.jms.JMSException
destinationJndi
- the JMS destination to be removed
if
- an error occurs trying to stop listening for messages before removal
javax.jms.JMSException
public void addProperty(java.lang.String key, java.lang.String value)
key
- value
- public java.lang.String getName()
public java.lang.String getJndiName()
public javax.jms.ConnectionFactory getConFactory()
public java.util.Map getDestinations()
public java.util.Hashtable getProperties()
public void listen(JMSMessageReceiver msgRcvr) throws javax.jms.JMSException
msgRcvr
- the message receiver which will process received messages
javax.jms.JMSException
- on exceptionspublic void listenOnDestination(java.lang.String destinationJndi) throws javax.jms.JMSException
destinationJndi
- the JMS destination to listen on
javax.jms.JMSException
- on exceptionpublic java.lang.String getServiceNameForDestination(java.lang.String destination)
destination
- the destination name
public void stop()
public java.lang.String getDestinationName(java.lang.String destinationJndi)
destinationJndi
- the JNDI name of the destination
public EndpointReference getEPRForDestination(java.lang.String destination)
destination
- the JNDI name of the JMS Destionation
public java.lang.String getServiceByDestination(java.lang.String destinationName)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |