List of usage examples for javax.jms ConnectionMetaData getProviderVersion
String getProviderVersion() throws JMSException;
From source file:nl.nn.adapterframework.jms.JmsMessagingSourceFactory.java
public String getConnectionFactoryInfo(ConnectionFactory connectionFactory) { if (IbisContext.getApplicationServerType().equals("TIBCOAMX")) { // Workaround to prevent the following exception: // [org.apache.geronimo.connector.outbound.MCFConnectionInterceptor] - Error occurred creating ManagedConnection for org.apache.geronimo.connector.outbound.ConnectionInfo@####### // javax.resource.ResourceException: JMSJCA-E084: Failed to create session: The JNDI name is null return null; }//ww w. j a va 2s. com String info = null; Connection connection = null; try { connection = connectionFactory.createConnection(); ConnectionMetaData metaData = connection.getMetaData(); info = "jms provider name [" + metaData.getJMSProviderName() + "] jms provider version [" + metaData.getProviderVersion() + "] jms version [" + metaData.getJMSVersion() + "]"; } catch (JMSException e) { log.warn("Exception determining connection factory info", e); } finally { if (connection != null) { try { connection.close(); } catch (JMSException e1) { log.warn("Exception closing connection for metadata", e1); } } } return info; }