activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r515682 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport: TransportServerThreadSupport.java TransportThreadSupport.java
Date Wed, 07 Mar 2007 18:27:26 GMT
Author: rajdavies
Date: Wed Mar  7 10:27:25 2007
New Revision: 515682

URL: http://svn.apache.org/viewvc?view=rev&rev=515682
Log:
allow thread stack size to be configurable

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerThreadSupport.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerThreadSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerThreadSupport.java?view=diff&rev=515682&r1=515681&r2=515682
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerThreadSupport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerThreadSupport.java
Wed Mar  7 10:27:25 2007
@@ -37,6 +37,7 @@
     private boolean daemon = true;
     private boolean joinOnStop = true;
     private Thread runner;
+    private long stackSize=0;//should be a multiple of 128k
 
     public TransportServerThreadSupport() {
     }
@@ -70,7 +71,7 @@
 
     protected void doStart() throws Exception {
         log.info("Listening for connections at: " + getConnectURI());
-        runner = new Thread(this, "ActiveMQ Transport Server: "+toString());
+        runner = new Thread(null,this, "ActiveMQ Transport Server: "+toString(),stackSize);
         runner.setDaemon(daemon);
         runner.setPriority(ThreadPriorities.BROKER_MANAGEMENT);
         runner.start();
@@ -81,5 +82,21 @@
             runner.join();
             runner = null;
         }
+    }
+
+    
+    /**
+     * @return the stackSize
+     */
+    public long getStackSize(){
+        return this.stackSize;
+    }
+
+    
+    /**
+     * @param stackSize the stackSize to set
+     */
+    public void setStackSize(long stackSize){
+        this.stackSize=stackSize;
     }
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java?view=diff&rev=515682&r1=515681&r2=515682
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java
Wed Mar  7 10:27:25 2007
@@ -29,6 +29,7 @@
 
     private boolean daemon = false;
     private Thread runner;
+    private long stackSize=0;//should be a multiple of 128k
 
     public boolean isDaemon() {
         return daemon;
@@ -39,8 +40,24 @@
     }
 
     protected void doStart() throws Exception {
-        runner = new Thread(this, "ActiveMQ Transport: "+toString());
+        runner = new Thread(null,this, "ActiveMQ Transport: "+toString(),stackSize);
         runner.setDaemon(daemon);
         runner.start();
+    }
+
+    
+    /**
+     * @return the stackSize
+     */
+    public long getStackSize(){
+        return this.stackSize;
+    }
+
+    
+    /**
+     * @param stackSize the stackSize to set
+     */
+    public void setStackSize(long stackSize){
+        this.stackSize=stackSize;
     }
 }



Mime
View raw message