activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r416592 - in /incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool: AbstractJmsClient.java properties/JmsClientProperties.java
Date Fri, 23 Jun 2006 07:40:05 GMT
Author: aco
Date: Fri Jun 23 00:40:05 2006
New Revision: 416592

URL: http://svn.apache.org/viewvc?rev=416592&view=rev
Log:
- Added properties and display for provider name/version, jms version, and jms properties

Modified:
    incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClient.java
    incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsClientProperties.java

Modified: incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClient.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClient.java?rev=416592&r1=416591&r2=416592&view=diff
==============================================================================
--- incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClient.java
(original)
+++ incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClient.java
Fri Jun 23 00:40:05 2006
@@ -17,6 +17,8 @@
 package org.apache.activemq.tool;
 
 import org.apache.activemq.tool.properties.JmsClientProperties;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 import javax.jms.ConnectionFactory;
 import javax.jms.Connection;
@@ -25,6 +27,8 @@
 import javax.jms.Destination;
 
 public abstract class AbstractJmsClient {
+    private static final Log log = LogFactory.getLog(AbstractJmsClient.class);
+
     protected ConnectionFactory factory;
     protected Connection jmsConnection;
     protected Session jmsSession;
@@ -74,7 +78,16 @@
     public Connection getConnection() throws JMSException {
         if (jmsConnection == null) {
             jmsConnection = factory.createConnection();
+
+            getClient().setJmsProvider(jmsConnection.getMetaData().getJMSProviderName() +
jmsConnection.getMetaData().getProviderVersion());
+            getClient().setJmsVersion("JMS " + jmsConnection.getMetaData().getJMSVersion());
+            getClient().setJmsProperties(jmsConnection.getMetaData().getJMSXPropertyNames().toString());
         }
+
+        log.info("Using JMS Connection:" +
+                " Provider=" + getClient().getJmsProvider() +
+                " JMS Spec=" + getClient().getJmsVersion() +
+                " JMS Properties=" + getClient().getJmsProperties());
         return jmsConnection;
     }
 

Modified: incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsClientProperties.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsClientProperties.java?rev=416592&r1=416591&r2=416592&view=diff
==============================================================================
--- incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsClientProperties.java
(original)
+++ incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsClientProperties.java
Fri Jun 23 00:40:05 2006
@@ -27,6 +27,10 @@
     protected String  sessAckMode    = SESSION_AUTO_ACKNOWLEDGE;
     protected boolean sessTransacted = false;
 
+    protected String jmsProvider = null;
+    protected String jmsVersion = null;
+    protected String jmsProperties = null;
+
     public String getDestName() {
         return destName;
     }
@@ -57,5 +61,29 @@
 
     public void setSessTransacted(boolean sessTransacted) {
         this.sessTransacted = sessTransacted;
+    }
+
+    public String getJmsProvider() {
+        return jmsProvider;
+    }
+
+    public void setJmsProvider(String jmsProvider) {
+        this.jmsProvider = jmsProvider;
+    }
+
+    public String getJmsVersion() {
+        return jmsVersion;
+    }
+
+    public void setJmsVersion(String jmsVersion) {
+        this.jmsVersion = jmsVersion;
+    }
+
+    public String getJmsProperties() {
+        return jmsProperties;
+    }
+
+    public void setJmsProperties(String jmsProperties) {
+        this.jmsProperties = jmsProperties;
     }
 }



Mime
View raw message