Methods Summary |
---|
public void | addVendorConnectionFactoryProperties(org.apache.axis.transport.jms.JMSURLHelper jmsurl, java.util.HashMap cfConfig)Populates the connection factory config table with properties from
the JMS URL query string
// add the connection factory jndi name
String cfJNDIName = jmsurl.getPropertyValue(_CONNECTION_FACTORY_JNDI_NAME);
if (cfJNDIName != null)
cfConfig.put(CONNECTION_FACTORY_JNDI_NAME, cfJNDIName);
// add the initial ctx factory
String ctxFactory = jmsurl.getPropertyValue(CONTEXT_FACTORY);
if (ctxFactory != null)
cfConfig.put(CONTEXT_FACTORY, ctxFactory);
// add the provider url
String providerURL = jmsurl.getPropertyValue(PROVIDER_URL);
if (providerURL != null)
cfConfig.put(PROVIDER_URL, providerURL);
|
private javax.jms.ConnectionFactory | getConnectionFactory(java.util.HashMap cfProps)
if(cfProps == null)
throw new IllegalArgumentException("noCFProps");
String jndiName = (String)cfProps.get(CONNECTION_FACTORY_JNDI_NAME);
if(jndiName == null || jndiName.trim().length() == 0)
throw new IllegalArgumentException("noCFName");
Hashtable environment = new Hashtable(cfProps);
// set the context factory if provided in the JMS URL
String ctxFactory = (String)cfProps.get(CONTEXT_FACTORY);
if (ctxFactory != null)
environment.put(CONTEXT_FACTORY, ctxFactory);
// set the provider url if provided in the JMS URL
String providerURL = (String)cfProps.get(PROVIDER_URL);
if (providerURL != null)
environment.put(PROVIDER_URL, providerURL);
context = new InitialContext(environment);
return (ConnectionFactory)context.lookup(jndiName);
|
public javax.jms.Queue | getQueue(javax.jms.QueueSession session, java.lang.String name)
return (Queue)context.lookup(name);
|
public javax.jms.QueueConnectionFactory | getQueueConnectionFactory(java.util.HashMap cfConfig)
return (QueueConnectionFactory)getConnectionFactory(cfConfig);
|
public javax.jms.Topic | getTopic(javax.jms.TopicSession session, java.lang.String name)
return (Topic)context.lookup(name);
|
public javax.jms.TopicConnectionFactory | getTopicConnectionFactory(java.util.HashMap cfConfig)
return (TopicConnectionFactory)getConnectionFactory(cfConfig);
|
public boolean | isMatchingConnectionFactory(javax.jms.ConnectionFactory cf, org.apache.axis.transport.jms.JMSURLHelper originalJMSURL, java.util.HashMap cfProps)Check that the attributes of the candidate connection factory match the
requested connection factory properties.
JMSURLHelper jmsurl = (JMSURLHelper)cfProps.get(JMSConstants.JMS_URL);
// just check the connection factory jndi name
String cfJndiName = jmsurl.getPropertyValue(_CONNECTION_FACTORY_JNDI_NAME);
String originalCfJndiName = originalJMSURL.getPropertyValue(_CONNECTION_FACTORY_JNDI_NAME);
if (cfJndiName.equalsIgnoreCase(originalCfJndiName))
return true;
return false;
|