Fields Summary |
---|
private static final Logger | _logger |
public static final String | MDB_CONTAINER_QUEUE_XACF |
public static final String | MDB_CONTAINER_TOPIC_XACF |
public static final String | MQ_DIR_NAME |
private static final String | DEFAULT_SERVER |
private static final String | DEFAULT_MQ_INSTANCE |
public static final String | DEFAULT_USER |
public static final String | DEFAULT_PASSWORD |
public static final String | DEFAULT_MAX_ACTIVE_CONSUMERS |
public static final String | MAX_ACTIVE_CONSUMERS_ATTRIBUTE |
public static final String | MAX_ACTIVE_CONSUMERS_PROPERTY |
private static final com.sun.enterprise.util.i18n.StringManager | _sm |
private static final boolean | debug |
Methods Summary |
---|
public static void | checkVersion(com.sun.messaging.jmq.jmsspi.JMSAdmin ja)
float version = 0.0f;
String vs = "?.?";
try {
vs = ja.getVersion();
version = Float.parseFloat(vs);
}
catch (Exception e) {
throw new RuntimeException("Error detected while parsing JMS " +
"provider SPI version string (" + vs + ").");
}
if (version < 2.0 || version >= 3.0)
throw new RuntimeException(
"Incorrect JMS Provider SPI version detected (" +
vs + ")." +
" Please make sure that you are using the correct" +
" version of the JMS provider.");
|
public static java.lang.String | clientIDPropertyName()
return getJMSAdmin().clientIDPropertyName();
|
public static java.lang.String | getBrokerInstanceName(java.lang.String asDomain, java.lang.String asInstance, JmsService js)Computes the instance name for the MQ broker.
ElementProperty[] jmsProperties = js.getElementProperty();
String instanceName = null;
String suffix = null;
if (jmsProperties != null) {
for (int ii=0; ii < jmsProperties.length; ii++) {
ElementProperty p = jmsProperties[ii];
String name = p.getName();
if (name.equals("instance-name"))
instanceName = p.getValue();
if (name.equals("instance-name-suffix"))
suffix = p.getValue();
if (name.equals("append-version") &&
Boolean.valueOf(p.getValue()).booleanValue()) {
suffix = Version.getMajorVersion() + "_" +
Version.getMinorVersion();
}
}
}
if (instanceName != null)
return instanceName;
if (asInstance.equals(DEFAULT_SERVER)) {
instanceName = DEFAULT_MQ_INSTANCE;
} else {
instanceName = asDomain + "_" + asInstance;
}
if (suffix != null)
instanceName = instanceName + "_" + suffix;
return instanceName;
|
public static java.lang.String | getDefaultMaxActiveConsumers()Getting default value for Maximum active Queue consumers.
return DEFAULT_MAX_ACTIVE_CONSUMERS;
|
public static java.lang.String | getDestinationName(Destination destination)
String name = null;
try {
name = (destination instanceof javax.jms.Queue) ?
((javax.jms.Queue) destination).getQueueName() :
((javax.jms.Topic) destination).getTopicName();
} catch(Exception e) {}
return name;
|
protected static com.sun.messaging.jmq.jmsspi.JMSAdmin | getJMSAdmin()
JMSAdmin jmsAdmin = JmsProviderLifecycle.getJMSAdmin();
if (jmsAdmin == null) {
jmsAdmin = getJMSAdminFactory().getJMSAdmin();
}
return jmsAdmin;
|
public static com.sun.messaging.jmq.jmsspi.JMSAdminFactory | getJMSAdminFactory()JMSAdminFactory is used to get a handle to the
administration capabilities of a JMS provider.
Use Class.forName() to bootstrap an instance
in order to avoid compile-time dependencies on
implementation class names.
JMSAdminFactory jmsAdminFactory = null;
Class jmsAdminFactoryClass = Class.forName("com.sun.messaging.jmq.admin.jmsspi.JMSAdminFactoryImpl");
jmsAdminFactory = (JMSAdminFactory)jmsAdminFactoryClass.newInstance();
checkVersion(jmsAdminFactory.getJMSAdmin());
return jmsAdminFactory;
|
public static java.lang.String | getMaxActiveConsumersAttribute()Getting Name Maximum active consumers attribute;
return MAX_ACTIVE_CONSUMERS_ATTRIBUTE;
|
public static java.lang.String | getMaxActiveConsumersProperty()Getting Name Maximum active consumers property;
return MAX_ACTIVE_CONSUMERS_PROPERTY;
|
public static java.lang.String | getXAConnectionFactoryName(java.lang.String connectionFactoryName)Form the name of the internal XA Connection Factory
for each javax.jms.ConnectionFactory
return "JMSXA" + connectionFactoryName + "__jmsxa";
|
public static void | validateJMSSelector(java.lang.String selector)Validate a JMS Selector for syntactic correctness.
getJMSAdmin().validateJMSSelector(selector);
|
public static java.lang.Object | wrapJMSConnectionFactoryObject(java.lang.Object obj)wrap a JMS standard XAQueue/TopicConnectionFactory or Queue/TopicConnectionFactory
This method is used for foreign (non-built-in) JMS provider
return getJMSAdmin().wrapJMSConnectionFactoryObject(obj);
|