|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.axis2.transport.jms.JMSConnectionFactory
public class 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(String destinationJndi,
String serviceName)
Add a listen destination on this connection factory on behalf of the given service |
void |
addProperty(String key,
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 |
Map |
getDestinations()
Get the list of destinations associated with this connection factory |
String |
getJndiName()
Get the JNDI name of the actual factory |
String |
getName()
Return the name of the connection factory |
Hashtable |
getProperties()
Get the connection factory properties |
String |
getServiceNameForDestination(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(String destinationJndi)
Listen on the given destination from this connection factory. |
void |
removeDestination(String destinationJndi)
Remove listen destination on this connection factory |
void |
setJndiName(String jndiName)
Set the JNDI connection factory name |
void |
stop()
Close all connections, sessions etc.. and stop this connection factory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void connect() throws NamingException
NamingException
- if the connection factory cannot be foundpublic void setJndiName(String jndiName)
jndiName
- public void addDestination(String destinationJndi, String serviceName)
destinationJndi
- destination JNDI nameserviceName
- the service to which it belongspublic void removeDestination(String destinationJndi) throws javax.jms.JMSException
destinationJndi
- the JMS destination to be removed
javax.jms.JMSException
public void addProperty(String key, String value)
key
- value
- public String getName()
public String getJndiName()
public javax.jms.ConnectionFactory getConFactory()
public Map getDestinations()
public 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(String destinationJndi) throws javax.jms.JMSException
destinationJndi
- the JMS destination to listen on
javax.jms.JMSException
- on exceptionpublic String getServiceNameForDestination(String destination)
destination
- the destination name
public void stop()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |