JMS - ConnectionMetaData
A Connection provides a ConnectionMetaData object. This object provides the latest version of JMS supported by the provider as well as the provider’s product name and version.
It also provides a list of the JMS defined property names supported by the connection.
Sample Code:
ConnectionMetaData metaData = connection.getMetaData(); System.out.println("JMSVersion: " + metaData.getJMSVersion()); System.out.println("JMSMajorVersion: " + metaData.getJMSMajorVersion()); System.out.println("JMSMinorVersion: " + metaData.getJMSMinorVersion()); System.out.println("JMSProviderName: " + metaData.getJMSProviderName()); System.out.println("ProviderVersion: " + metaData.getProviderVersion()); System.out.println("ProviderMajorVersion: " + metaData.getProviderMajorVersion()); System.out.println("ProviderMinorVersion: " + metaData.getProviderMinorVersion()); Enumeration<?> JMSXPropertyNames = metaData.getJMSXPropertyNames(); System.out.print("JMSXPropertyNames: "); while (JMSXPropertyNames.hasMoreElements()) { String propertyName = (String) JMSXPropertyNames.nextElement(); System.out.print(propertyName + ", "); }
Output:
JMSVersion: 1.1 JMSMajorVersion: 1 JMSMinorVersion: 1 JMSProviderName: ActiveMQ ProviderVersion: 5.10.0 ProviderMajorVersion: 5 ProviderMinorVersion: 10 JMSXPropertyNames: JMSXUserID, JMSXGroupID, JMSXGroupSeq, JMSXDeliveryCount, JMSXProducerTXID,