Context ctx = new InitialContext(env);
QueueConnectionFactory qFactory = (QueueConnectionFactory)
ctx.lookup("QueueCF");
QueueConnection qConnect = qFactory.createQueueConnection();
ConnectionMetaData metadata = qConnect.getMetaData();
System.out.println("JMS Version: " +
metadata.getJMSMajorVersion() + "." +
metadata.getJMSMinorVersion());
System.out.println("JMS Provider: " +
metadata.getJMSProviderName());
System.out.println("JMSX Properties Supported: ");
Enumeration e = metadata.getJMSXPropertyNames();
while (e.hasMoreElements()) {
System.out.println(" " + e.nextElement());
}
} catch (Exception ex) {
ex.printStackTrace();