activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r412670 - in /incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool: JmsClientSupport.java JmsClientSystemSupport.java JmsFactorySupport.java PerfReportGenerator.java
Date Thu, 08 Jun 2006 06:05:13 GMT
Author: aco
Date: Wed Jun  7 23:05:12 2006
New Revision: 412670

URL: http://svn.apache.org/viewvc?rev=412670&view=rev
Log:
- Added default values
- Added checking for NPE

Modified:
    incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsClientSupport.java
    incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsClientSystemSupport.java
    incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsFactorySupport.java
    incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/PerfReportGenerator.java

Modified: incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsClientSupport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsClientSupport.java?rev=412670&r1=412669&r2=412670&view=diff
==============================================================================
--- incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsClientSupport.java
(original)
+++ incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsClientSupport.java
Wed Jun  7 23:05:12 2006
@@ -29,6 +29,8 @@
 public class JmsClientSupport extends JmsFactorySupport {
     private static final Log log = LogFactory.getLog(JmsClientSupport.class);
 
+    public static final String DEFAULT_SPI_CLASS = "org.apache.activemq.tool.spi.ActiveMQPojoSPI";
+
     private static final String PREFIX_CONFIG_CLIENT = "client.";
     public  static final String SESSION_AUTO_ACKNOWLEDGE    = "autoAck";
     public  static final String SESSION_CLIENT_ACKNOWLEDGE  = "clientAck";
@@ -40,7 +42,7 @@
     protected Session       jmsSession;
 
     // Client settings
-    protected String  spiClass;
+    protected String  spiClass = DEFAULT_SPI_CLASS;
     protected boolean sessTransacted = false;
     protected String  sessAckMode    = SESSION_AUTO_ACKNOWLEDGE;
     protected String  destName       = "TEST.FOO";

Modified: incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsClientSystemSupport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsClientSystemSupport.java?rev=412670&r1=412669&r2=412670&view=diff
==============================================================================
--- incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsClientSystemSupport.java
(original)
+++ incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsClientSystemSupport.java
Wed Jun  7 23:05:12 2006
@@ -38,7 +38,7 @@
     protected Properties jmsClientSettings = new Properties();
     protected ThreadGroup clientThreadGroup;
     protected PerfMeasurementTool performanceSampler;
-    protected String reportDirectory;
+    protected String reportDirectory = "";
 
     protected int numClients = 1;
     protected int totalDests = 1;

Modified: incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsFactorySupport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsFactorySupport.java?rev=412670&r1=412669&r2=412670&view=diff
==============================================================================
--- incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsFactorySupport.java
(original)
+++ incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsFactorySupport.java
Wed Jun  7 23:05:12 2006
@@ -62,10 +62,12 @@
 
     public void setJmsFactorySettings(Properties jmsFactorySettings) {
         this.jmsFactorySettings = jmsFactorySettings;
-        try {
-            spiFactory.configureConnectionFactory(jmsFactory, jmsFactorySettings);
-        } catch (Exception e) {
-            log.warn(e);
+        if (spiFactory != null) {
+            try {
+                spiFactory.configureConnectionFactory(jmsFactory, jmsFactorySettings);
+            } catch (Exception e) {
+                log.warn(e);
+            }
         }
     }
 
@@ -79,10 +81,14 @@
             String val = settings.getProperty(key);
             setProperty(key, val);
         }
-        try {
-            spiFactory.configureConnectionFactory(jmsFactory, jmsFactorySettings);
-        } catch (Exception e) {
-            log.warn(e);
+
+        if (spiFactory != null) {
+            try {
+                spiFactory.configureConnectionFactory(jmsFactory, jmsFactorySettings);
+            } catch (Exception e) {
+                e.printStackTrace();
+                log.warn(e);
+            }
         }
     }
 

Modified: incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/PerfReportGenerator.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/PerfReportGenerator.java?rev=412670&r1=412669&r2=412670&view=diff
==============================================================================
--- incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/PerfReportGenerator.java
(original)
+++ incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/PerfReportGenerator.java
Wed Jun  7 23:05:12 2006
@@ -42,7 +42,8 @@
 
     public void startGenerateReport() {
 
-        setReportDirectory(this.getTestSettings().getProperty("sysTest.reportDirectory"));
+        setReportDirectory(this.getTestSettings().getProperty("sysTest.reportDirectory",
""));
+
 
         File reportDir = new File(getReportDirectory());
 



Mime
View raw message