Fields Summary |
---|
private static final String | QCF_CLASS |
private static final String | TCF_CLASS |
public static final String | BROKER_URLSonicConnectionFactory parameter valid for either domain. This should
be used as a key in the environment map passed into calls to
createConnector in JMSConnectorFactory .
This is a required property.
The value must be a java.lang.String
See the SonicMQ documentation for information on this property |
public static final String | DEFAULT_USERNAMESonicConnectionFactory parameter valid for either domains. This should
be used as a key in the environment map passed into calls to
createConnector in JMSConnectorFactory
This is a required property for secure brokers.
The value must be a java.lang.String
See the SonicMQ documentation for information on this property |
public static final String | DEFAULT_PASSWORDSonicConnectionFactory parameter valid for either domain. This should
be used as a key in the environment map passed into calls to
createConnector in JMSConnectorFactory
This is a required property for secure brokers.
The value must be a java.lang.String
See the SonicMQ documentation for information on this property |
public static final String | PING_INTERVALSonicConnectionFactory parameter valid for either domain. This should
be used as a key in the environment map passed into calls to
createConnector in JMSConnectorFactory
The value must be a java.lang.Long
See the SonicMQ documentation for information on this property |
public static final String | RECONNECT_INTERVALSonicConnectionFactory parameter valid for either domain. This should
be used as a key in the environment map passed into calls to
createConnector in JMSConnectorFactory
The value must be a java.lang.Integer
See the SonicMQ documentation for information on this property |
public static final String | RECONNECT_TIMEOUTSonicConnectionFactory parameter valid for either domain. This should
be used as a key in the environment map passed into calls to
createConnector in JMSConnectorFactory
The value must be a java.lang.Integer
See the SonicMQ documentation for information on this property |
public static final String | CONNECT_IDSonicConnectionFactory parameter valid for either domain. This should
be used as a key in the environment map passed into calls to
createConnector in JMSConnectorFactory
The value must be a java.lang.String
See the SonicMQ documentation for information on this property |
public static final String | CONNECTION_URLSSonicConnectionFactory parameter valid for either domain. This should
be used as a key in the environment map passed into calls to
createConnector in JMSConnectorFactory
The value must be a java.lang.String
See the SonicMQ documentation for information on this property |
public static final String | LOAD_BALANCINGSonicConnectionFactory parameter valid for either domain. This should
be used as a key in the environment map passed into calls to
createConnector in JMSConnectorFactory
The value must be a java.lang.Boolean
See the SonicMQ documentation for information on this property |
public static final String | MONITOR_INTERVALSonicConnectionFactory parameter valid for either domain. This should
be used as a key in the environment map passed into calls to
createConnector in JMSConnectorFactory
The value must be a java.lang.Long
See the SonicMQ documentation for information on this property |
public static final String | PERSISTENT_DELIVERYSonicConnectionFactory parameter valid for either domain. This should
be used as a key in the environment map passed into calls to
createConnector in JMSConnectorFactory
The value must be a java.lang.Boolean
See the SonicMQ documentation for information on this property |
public static final String | SEQUENTIALSonicConnectionFactory parameter valid for either domain. This should
be used as a key in the environment map passed into calls to
createConnector in JMSConnectorFactory
The value must be a java.lang.Boolean
See the SonicMQ documentation for information on this property |
public static final String | PREFETCH_COUNTSonicConnectionFactory parameter valid for the PTP domain. This should
be used as a key in the environment map passed into calls to
createConnector in JMSConnectorFactory
The value must be a java.lang.Integer
See the SonicMQ documentation for information on this property |
public static final String | PREFETCH_THRESHOLDSonicConnectionFactory parameter valid for the PTP domain. This should
be used as a key in the environment map passed into calls to
createConnector in JMSConnectorFactory
The value must be a java.lang.Integer
See the SonicMQ documentation for information on this property |
public static final String | SELECTOR_AT_BROKERSonicConnectionFactory parameter valid for the PubSub domain. This should
be used as a key in the environment map passed into calls to
createConnector in JMSConnectorFactory
The value must be a java.lang.Boolean
See the SonicMQ documentation for information on this property |
Methods Summary |
---|
public void | addVendorConnectionFactoryProperties(org.apache.axis.transport.jms.JMSURLHelper jmsurl, java.util.HashMap cfProps)Extract Sonic-specific properties from the JMS URL
if (jmsurl.getPropertyValue(BROKER_URL) != null)
cfProps.put(BROKER_URL, jmsurl.getPropertyValue(BROKER_URL));
if (jmsurl.getPropertyValue(DEFAULT_USERNAME) != null)
cfProps.put(DEFAULT_USERNAME, jmsurl.getPropertyValue(DEFAULT_USERNAME));
if (jmsurl.getPropertyValue(DEFAULT_PASSWORD) != null)
cfProps.put(DEFAULT_PASSWORD, jmsurl.getPropertyValue(DEFAULT_PASSWORD));
if (jmsurl.getPropertyValue(PING_INTERVAL) != null)
cfProps.put(PING_INTERVAL, jmsurl.getPropertyValue(PING_INTERVAL));
if (jmsurl.getPropertyValue(RECONNECT_INTERVAL) != null)
cfProps.put(RECONNECT_INTERVAL, jmsurl.getPropertyValue(RECONNECT_INTERVAL));
if (jmsurl.getPropertyValue(RECONNECT_TIMEOUT) != null)
cfProps.put(RECONNECT_TIMEOUT, jmsurl.getPropertyValue(RECONNECT_TIMEOUT));
if (jmsurl.getPropertyValue(CONNECT_ID) != null)
cfProps.put(CONNECT_ID, jmsurl.getPropertyValue(CONNECT_ID));
if (jmsurl.getPropertyValue(CONNECTION_URLS) != null)
cfProps.put(CONNECTION_URLS, jmsurl.getPropertyValue(CONNECTION_URLS));
if (jmsurl.getPropertyValue(LOAD_BALANCING) != null)
cfProps.put(LOAD_BALANCING, jmsurl.getPropertyValue(LOAD_BALANCING));
if (jmsurl.getPropertyValue(MONITOR_INTERVAL) != null)
cfProps.put(MONITOR_INTERVAL, jmsurl.getPropertyValue(MONITOR_INTERVAL));
if (jmsurl.getPropertyValue(PERSISTENT_DELIVERY) != null)
cfProps.put(PERSISTENT_DELIVERY, jmsurl.getPropertyValue(PERSISTENT_DELIVERY));
if (jmsurl.getPropertyValue(SEQUENTIAL) != null)
cfProps.put(SEQUENTIAL, jmsurl.getPropertyValue(SEQUENTIAL));
if (jmsurl.getPropertyValue(PREFETCH_COUNT) != null)
cfProps.put(PREFETCH_COUNT, jmsurl.getPropertyValue(PREFETCH_COUNT));
if (jmsurl.getPropertyValue(PREFETCH_THRESHOLD) != null)
cfProps.put(PREFETCH_THRESHOLD, jmsurl.getPropertyValue(PREFETCH_THRESHOLD));
if (jmsurl.getPropertyValue(SELECTOR_AT_BROKER) != null)
cfProps.put(SELECTOR_AT_BROKER, jmsurl.getPropertyValue(SELECTOR_AT_BROKER));
|
public javax.jms.QueueConnectionFactory | getQueueConnectionFactory(java.util.HashMap cfConfig)
cfConfig = (HashMap)cfConfig.clone();
cfConfig.put(CONNECTION_FACTORY_CLASS, QCF_CLASS);
return super.getQueueConnectionFactory(cfConfig);
|
public javax.jms.TopicConnectionFactory | getTopicConnectionFactory(java.util.HashMap cfConfig)
cfConfig = (HashMap)cfConfig.clone();
cfConfig.put(CONNECTION_FACTORY_CLASS, TCF_CLASS);
return super.getTopicConnectionFactory(cfConfig);
|
private boolean | isAnotherSubscriberConnected(javax.jms.JMSException jmse)
Exception linkedException = jmse.getLinkedException();
if(linkedException != null &&
linkedException instanceof EUserAlreadyConnected)
{
return true;
}
return false;
|
public boolean | isConnectionDropped(javax.jms.JMSException jmse)
return ErrorCodes.testException(jmse, ErrorCodes.ERR_CONNECTION_DROPPED);
|
public boolean | isMatchingConnectionFactory(javax.jms.ConnectionFactory cf, org.apache.axis.transport.jms.JMSURLHelper jmsurl, java.util.HashMap cfProps)Check that the attributes of the candidate connection factory match the
requested connection factory properties.
String brokerURL = null;
String connectionURLs = null;
boolean loadBalancing = false;
boolean sequential = false;
if (cf instanceof progress.message.jclient.QueueConnectionFactory)
{
progress.message.jclient.QueueConnectionFactory qcf =
(progress.message.jclient.QueueConnectionFactory)cf;
// get existing queue connection factory properties
brokerURL = qcf.getBrokerURL();
connectionURLs = qcf.getConnectionURLs();
loadBalancing = qcf.getLoadBalancing();
sequential = qcf.getSequential();
}
else if (cf instanceof progress.message.jclient.TopicConnectionFactory)
{
progress.message.jclient.TopicConnectionFactory tcf =
(progress.message.jclient.TopicConnectionFactory)cf;
// get existing topic connection factory properties
brokerURL = tcf.getBrokerURL();
connectionURLs = tcf.getConnectionURLs();
loadBalancing = tcf.getLoadBalancing();
sequential = tcf.getSequential();
}
// compare broker url
String propertyBrokerURL = (String)cfProps.get(BROKER_URL);
if (!brokerURL.equals(propertyBrokerURL))
return false;
// compare connection url list
String propertyConnectionURLs = (String)cfProps.get(CONNECTION_URLS);
if ((connectionURLs != null) && (propertyConnectionURLs != null))
{
if (!connectionURLs.equalsIgnoreCase(propertyConnectionURLs))
return false;
// check sequential if connection urls have been set
String tmpSequential = (String)cfProps.get(SEQUENTIAL);
boolean propertySequential = true;
if (tmpSequential != null)
propertySequential = Boolean.getBoolean(tmpSequential);
if (sequential != propertySequential)
return false;
}
else if ((connectionURLs != null) || (propertyConnectionURLs != null))
return false;
// compare load balancing flag
String tmpLoadBalancing = (String)cfProps.get(LOAD_BALANCING);
boolean propertyLoadBalancing = false;
if (tmpLoadBalancing != null)
propertyLoadBalancing = Boolean.getBoolean(tmpLoadBalancing);
if (loadBalancing != propertyLoadBalancing)
return false;
return true;
|
private boolean | isNetworkFailure(javax.jms.JMSException jmse)
Exception linkedException = jmse.getLinkedException();
if(linkedException != null &&
linkedException instanceof ENetworkFailure)
{
return true;
}
return false;
|
private boolean | isQueueMissing(javax.jms.JMSException jmse)
String message = jmse.getMessage();
if(message != null && message.startsWith("Queue not found"))
{
return true;
}
return false;
|
public boolean | isRecoverable(java.lang.Throwable thrown, int action)
//the super class cannot be trusted for on exception because it always
//returns false
if(action != ON_EXCEPTION_ACTION && !super.isRecoverable(thrown, action))
return false;
if(!(thrown instanceof JMSException))
return true;
JMSException jmse = (JMSException)thrown;
switch(action)
{
case CONNECT_ACTION:
if(isNetworkFailure(jmse))
return false;
break;
case SUBSCRIBE_ACTION:
if(isQueueMissing(jmse) || isAnotherSubscriberConnected(jmse))
return false;
break;
case ON_EXCEPTION_ACTION:
if(isConnectionDropped(jmse))
return false;
break;
}
return true;
|