DO NOT REPLY [Bug 39606] New: - Tomcat Not working on Windows XP Network

2006-05-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39606

   Summary: Tomcat Not working on Windows XP Network
   Product: Tomcat 5
   Version: 5.5.17
  Platform: Other
OS/Version: Windows XP
Status: NEW
  Severity: blocker
  Priority: P1
 Component: Unknown
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


Hello Friends,

I m running Tomcat 5.5.17 on a P4 2.4GHZ with 256MB RAM machine. Tomcat is 
working fine on the server, but if i try to call Tomcat from any other machine 
in the same network it didnt detects Tomcat. Ping is working fine in the 
network.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 39606] - Tomcat Not working on Windows XP Network

2006-05-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39606





--- Additional Comments From [EMAIL PROTECTED]  2006-05-18 09:16 ---
Without sounding rude, where is the actual "BUG" of part this BLOCKER bug 
report ?  

Apart from "Tomcat should be working" but isn't.  Either you have not supplied
enough details to describe the bug or you are requesting help and support. 
Bugzilla isn't a support forum, if you want support please take a look at the
tomcat-users list or hire a professional consultant.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 39606] - Tomcat Not working on Windows XP Network

2006-05-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39606


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2006-05-18 09:18 ---
This has nothing to do with Tomcat.
You might want to check you network and firewall settings.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svn commit: r407241 - in /tomcat/tc6.0.x/trunk/java/org/apache: catalina/ catalina/connector/ catalina/servlets/ coyote/ajp/ coyote/http11/ tomcat/util/net/

2006-05-18 Thread Remy Maucherat

Bill Barker wrote:

tomcat/tc6.0.x/trunk/java/org/apache/catalina/CometProcessor.j
ava Wed May 17 05:55:39 2006
@@ -0,0 +1,21 @@


You forgot to include the license on this.


That's true. It's probably not the only issue, though :)

Rémy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 39609] New: - can not resolve class in .zip format in WEB-INF/lib

2006-05-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39609

   Summary: can not resolve class in .zip format in WEB-INF/lib
   Product: Tomcat 5
   Version: 5.5.17
  Platform: Other
OS/Version: Windows XP
Status: NEW
  Severity: normal
  Priority: P2
 Component: Unknown
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


tomcat can load class within WEB-INF/lib in .zip file format

i found that it can not find hive/ognl in my app, i change hive.zip to hive.jar 
and ognl.zip to ognl.jar, so it works now

i havn't test it in other lib path

please resolve this problem thx

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 39609] - can not resolve class in .zip format in WEB-INF/lib

2006-05-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39609


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2006-05-18 12:58 ---
files in the lib dir must end in .jar

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 39609] - can not resolve class in .zip format in WEB-INF/lib

2006-05-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39609





--- Additional Comments From [EMAIL PROTECTED]  2006-05-18 14:04 ---
some java library(just like APACHE-hivemind/oracle/ognl/javassist..) was 
distributed with .zip file, and any other appserver support .zip file

and this 'issue' was so easy

is that was principle that has no reason?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r407555 - in /tomcat/container/tc5.5.x/modules/groupcom: ./ src/share/org/apache/catalina/tribes/group/interceptors/ test/java/org/apache/catalina/tribes/demos/

2006-05-18 Thread fhanik
Author: fhanik
Date: Thu May 18 07:15:27 2006
New Revision: 407555

URL: http://svn.apache.org/viewvc?rev=407555&view=rev
Log:
Added throughput interceptor to measure send speed

Added:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
Modified:
tomcat/container/tc5.5.x/modules/groupcom/VERSION

tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/ChannelCreator.java

tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/LoadTest.java

Modified: tomcat/container/tc5.5.x/modules/groupcom/VERSION
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/VERSION?rev=407555&r1=407554&r2=407555&view=diff
==
--- tomcat/container/tc5.5.x/modules/groupcom/VERSION (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/VERSION Thu May 18 07:15:27 2006
@@ -1,3 +1,6 @@
+0.9.2.3
+  - Keep alive pings for AbstractReplicatedMap
+  - Improved TcpFailureDetector
 0.9.2.2
   - removed getMemberProperties from the membership interface
 0.9.2.1

Added: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java?rev=407555&view=auto
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
 (added)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
 Thu May 18 07:15:27 2006
@@ -0,0 +1,86 @@
+/*
+ * Copyright 1999,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ */
+
+package org.apache.catalina.tribes.group.interceptors;
+
+import org.apache.catalina.tribes.ChannelException;
+import org.apache.catalina.tribes.ChannelMessage;
+import org.apache.catalina.tribes.Member;
+import org.apache.catalina.tribes.group.ChannelInterceptorBase;
+import org.apache.catalina.tribes.group.InterceptorPayload;
+import org.apache.catalina.tribes.io.ChannelData;
+import org.apache.catalina.tribes.io.XByteBuffer;
+import java.text.DecimalFormat;
+
+
+
+/**
+ *
+ *
+ * @author Filip Hanik
+ * @version 1.0
+ */
+public class ThroughputInterceptor extends ChannelInterceptorBase {
+
+double mbTx = 0;
+double mbRx = 0;
+double timeTx = 0;
+long msgTxCnt = 1;
+long msgRxCnt = 1;
+int interval = 1;
+DecimalFormat df = new DecimalFormat("##.00");
+
+public void sendMessage(Member[] destination, ChannelMessage msg, 
InterceptorPayload payload) throws ChannelException {
+long bytes = 
XByteBuffer.getDataPackageLength(((ChannelData)msg).getDataPackage().length);
+long start = System.currentTimeMillis();
+super.sendMessage(destination,msg,payload);
+long stop = System.currentTimeMillis();
+timeTx+= ((double)(stop-start))/1000d;
+mbTx += ((double)bytes)/(1024d*1024d);
+if ( msgTxCnt % interval == 0 ) report();
+msgTxCnt++;
+}
+
+public void messageReceived(ChannelMessage msg) {
+long bytes = 
XByteBuffer.getDataPackageLength(((ChannelData)msg).getDataPackage().length);
+mbRx += ((double)bytes)/(1024d*1024d);
+if ( msgRxCnt % interval == 0 ) report();
+msgRxCnt++;
+}
+
+public void report() {
+StringBuffer buf = new StringBuffer("ThroughputInterceptor 
Report[\n\tTx Msg:");
+buf.append(msgTxCnt).append(" messages\n\tSent:");
+buf.append(df.format(mbTx));
+buf.append(" MB\n\tTime:");
+buf.append(df.format(timeTx));
+buf.append(" seconds\n\tSpeed:");
+buf.append(df.format(mbTx/timeTx));
+buf.append(" MB/sec\n\tRx Msg:");
+buf.append(msgRxCnt);
+buf.append(" messages\n\tReceived:");
+buf.append(df.format(mbRx)).append(" MB]\n");
+System.out.println(buf);
+}
+
+public void setInterval(int interval) {
+this.interval = interval;
+}
+
+public int getInterval() {
+return interval;
+}
+
+}

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/trib

svn commit: r407578 - in /tomcat/container/tc5.5.x/modules/groupcom: src/share/org/apache/catalina/tribes/group/interceptors/ src/share/org/apache/catalina/tribes/io/ src/share/org/apache/catalina/tri

2006-05-18 Thread fhanik
Author: fhanik
Date: Thu May 18 09:07:47 2006
New Revision: 407578

URL: http://svn.apache.org/viewvc?rev=407578&view=rev
Log:
Added in a bytepool, to cache byte[] for faster access
This pool can still be tuned, but as is, its already performing quite well.
Pool is compatible with 1.4 as the pool will no-pool

Added:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/BytePool.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/BytePool15Impl.java
Modified:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/MemberImpl.java

tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/ChannelCreator.java

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java?rev=407578&r1=407577&r2=407578&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
 Thu May 18 09:07:47 2006
@@ -23,6 +23,7 @@
 import org.apache.catalina.tribes.io.ChannelData;
 import org.apache.catalina.tribes.io.XByteBuffer;
 import java.text.DecimalFormat;
+import org.apache.catalina.tribes.membership.MemberImpl;
 
 
 
@@ -41,9 +42,10 @@
 long msgRxCnt = 1;
 int interval = 1;
 DecimalFormat df = new DecimalFormat("##.00");
+int addrlength = 0;
 
 public void sendMessage(Member[] destination, ChannelMessage msg, 
InterceptorPayload payload) throws ChannelException {
-long bytes = 
XByteBuffer.getDataPackageLength(((ChannelData)msg).getDataPackage().length);
+long bytes = 
XByteBuffer.getDataPackageLength(((ChannelData)msg).getDataPackageLength(addrlength));
 long start = System.currentTimeMillis();
 super.sendMessage(destination,msg,payload);
 long stop = System.currentTimeMillis();
@@ -73,6 +75,11 @@
 buf.append(" messages\n\tReceived:");
 buf.append(df.format(mbRx)).append(" MB]\n");
 System.out.println(buf);
+}
+
+public void start(int svc) throws ChannelException{
+super.start(svc);
+addrlength = ((MemberImpl)getLocalMember(true)).getData().length;
 }
 
 public void setInterval(int interval) {

Added: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/BytePool.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/BytePool.java?rev=407578&view=auto
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/BytePool.java
 (added)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/BytePool.java
 Thu May 18 09:07:47 2006
@@ -0,0 +1,93 @@
+/*
+ * Copyright 1999,2004-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.catalina.tribes.io;
+
+import org.apache.commons.logging.LogFactory;
+
+import org.apache.commons.logging.Log;
+
+/**
+ *
+ * @author Filip Hanik
+ * 
+ * @version 1.0
+ */
+public class BytePool {
+protected static Log log = LogFactory.getLog(BytePool.class);
+
+public static int DEFAULT_POOL_SIZE = 100*1024*1024; //100MB
+
+
+
+protected static BytePool instance = null;
+protected BytePoolAPI pool = null;
+
+private BytePool(BytePoolAPI pool) {
+this.pool = pool;
+}
+
+public byte[] getArray(int minSize) {
+if ( pool != null ) return pool.getArray(minSize);
+else return new byte[minSize];
+}
+
+public byte[]

svn commit: r407586 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership: McastService.java McastServiceImpl.java

2006-05-18 Thread fhanik
Author: fhanik
Date: Thu May 18 09:36:45 2006
New Revision: 407586

URL: http://svn.apache.org/viewvc?rev=407586&view=rev
Log:
Moved sleep to where it belongs

Modified:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastService.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastService.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastService.java?rev=407586&r1=407585&r2=407586&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastService.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastService.java
 Thu May 18 09:36:45 2006
@@ -272,10 +272,7 @@
 this);
 
 impl.start(level);
-   long memberwait = 
(Long.parseLong(properties.getProperty("mcastFrequency"))*4);
-if(log.isInfoEnabled())
-log.info("Sleeping for "+memberwait+" milliseconds to establish 
cluster membership");
-Thread.sleep(memberwait);
+   
 
 }
 

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java?rev=407586&r1=407585&r2=407586&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java
 Thu May 18 09:36:45 2006
@@ -194,6 +194,10 @@
 receiver.setDaemon(true);
 receiver.start();
 valid = true;
+long memberwait = sendFrequency*4;
+if(log.isInfoEnabled())
+log.info("Sleeping for "+memberwait+" milliseconds to 
establish cluster membership");
+try {Thread.sleep(memberwait);}catch (InterruptedException 
ignore){}
 } 
 if ( (level & Channel.MBR_TX_SEQ)==Channel.MBR_TX_SEQ ) {
 if ( sender != null ) throw new 
IllegalStateException("McastService.send already running.");



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r407603 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes: group/interceptors/ io/ membership/

2006-05-18 Thread fhanik
Author: fhanik
Date: Thu May 18 11:25:46 2006
New Revision: 407603

URL: http://svn.apache.org/viewvc?rev=407603&view=rev
Log:
Remove the byte[] pool, its the wrong approach, will implement a buffer cache 
instead
Add in the ability to calculate the size of a data package without serializing 
it

Removed:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/BytePool.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/BytePool15Impl.java
Modified:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/MemberImpl.java

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java?rev=407603&r1=407602&r2=407603&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
 Thu May 18 11:25:46 2006
@@ -45,7 +45,7 @@
 int addrlength = 0;
 
 public void sendMessage(Member[] destination, ChannelMessage msg, 
InterceptorPayload payload) throws ChannelException {
-long bytes = 
XByteBuffer.getDataPackageLength(((ChannelData)msg).getDataPackageLength(addrlength));
+long bytes = 
XByteBuffer.getDataPackageLength(((ChannelData)msg).getDataPackageLength());
 long start = System.currentTimeMillis();
 super.sendMessage(destination,msg,payload);
 long stop = System.currentTimeMillis();

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java?rev=407603&r1=407602&r2=407603&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java
 Thu May 18 11:25:46 2006
@@ -164,14 +164,14 @@
 setUniqueId(data);
 }
 
-public int getDataPackageLength(int addrlength) {
+public int getDataPackageLength() {
 int length = 
 4 + //options
 8 + //timestamp  off=4
 4 + //unique id length off=12
 uniqueId.length+ //id data off=12+uniqueId.length
 4 + //addr length off=12+uniqueId.length+4
-addrlength+ //member data off=12+uniqueId.length+4+add.length
+((MemberImpl)address).getDataLength()+ //member data 
off=12+uniqueId.length+4+add.length
 4 + //message length off=12+uniqueId.length+4+add.length+4
 message.getLength();
 return length;
@@ -184,7 +184,7 @@
  */
 public byte[] getDataPackage()  {
 byte[] addr = ((MemberImpl)address).getData(false);
-int length = getDataPackageLength(addr.length);
+int length = getDataPackageLength();
 byte[] data = new byte[length];
 int offset = 0;
 XByteBuffer.toBytes(options,data,offset);

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java?rev=407603&r1=407602&r2=407603&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java
 Thu May 18 11:25:46 2006
@@ -94,8 +94,7 @@
  * @todo use a pool of byte[] for performance
  */
 public XByteBuffer(int size, boolean discard) {
-//buf = new byte[size];
-buf = BytePool.getBytePool().getArray(size);
+buf = new byte[size];
 this.discard = discard;
 }
 
@@ -105,13 +104,12 @@
 
 public XByteBuffer(byte[] data, int size,boolean discard) {
 int length = Math.max(data.length,size);
-//buf = new byte[length];
-buf = BytePoo

svn commit: r407605 - in /tomcat/tc6.0.x/trunk/java/org/apache: catalina/ catalina/connector/ catalina/servlets/ coyote/ coyote/http11/ tomcat/util/net/

2006-05-18 Thread remm
Author: remm
Date: Thu May 18 11:29:07 2006
New Revision: 407605

URL: http://svn.apache.org/viewvc?rev=407605&view=rev
Log:
- Ok, it seems to work at least a little bit (hopefully, nobody tried it before 
this). Overall, the
  changes are fairly limited.
- In the end, I prefer adding a new method in Adapter, although it is easy to 
change back.
- I'll try to add the examples webapp back, and add the obligatory chat servlet 
(so lame ...).

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/CometProcessor.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/servlets/CometServlet.java
tomcat/tc6.0.x/trunk/java/org/apache/coyote/Adapter.java
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/CometProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/CometProcessor.java?rev=407605&r1=407604&r2=407605&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/CometProcessor.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/CometProcessor.java Thu May 
18 11:29:07 2006
@@ -1,3 +1,20 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
 package org.apache.catalina;
 
 import java.io.IOException;
@@ -8,13 +25,56 @@
 
 public interface CometProcessor {
 
+/**
+ * Begin will be called by the main service method of the servlet at the 
beginning 
+ * of the processing of the connection. It can be used to initialize any 
relevant 
+ * fields using the request and response objects.
+ * 
+ * @param request
+ * @param response
+ * @throws IOException
+ * @throws ServletException
+ */
 public void begin(HttpServletRequest request, HttpServletResponse response)
 throws IOException, ServletException;
+
+/**
+ * End may be called to end the processing of the request. Fields that have
+ * been initialized in the begin method should be reset.
+ * 
+ * @param request
+ * @param response
+ * @throws IOException
+ * @throws ServletException
+ */
 public void end(HttpServletRequest request, HttpServletResponse response)
 throws IOException, ServletException;
 
+/**
+ * Error will be called by the container in the case where an IO exception
+ * or a similar unrecoverable error occurs on the connection. Fields that 
have
+ * been initialized in the begin method should be reset.
+ * 
+ * @param request
+ * @param response
+ * @throws IOException
+ * @throws ServletException
+ */
 public void error(HttpServletRequest request, HttpServletResponse response)
 throws IOException, ServletException;
+
+/**
+ * This indicates that input data is available, and that one read can be 
made
+ * without blocking. The available and ready methods of the InputStream or
+ * Reader may be used to determine if there is a risk of blocking: the 
servlet
+ * should read while data is reported available, and can make one 
additional read
+ * without blocking.
+ * 
+ * @param request
+ * @param response
+ * @throws IOException
+ * @throws ServletException
+ */
 public void read(HttpServletRequest request, HttpServletResponse response)
 throws IOException, ServletException;
 

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=407605&r1=407604&r2=407605&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
Thu May 18 11:29:07 2006
@@ -103,6 +103,56 @@
 
 //  Adapter Methods
 
+
+/**
+ * Event method.
+ * 
+ * @return false to indicate an error, expected or not
+ */
+public boo

svn commit: r407615 - /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java

2006-05-18 Thread fhanik
Author: fhanik
Date: Thu May 18 12:03:27 2006
New Revision: 407615

URL: http://svn.apache.org/viewvc?rev=407615&view=rev
Log:
Fixed synchronization issues upon startup, and always using a soTimeout

Modified:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java?rev=407615&r1=407614&r2=407615&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java
 Thu May 18 12:03:27 2006
@@ -166,11 +166,12 @@
 log.info("Setting multihome multicast interface to:" 
+mcastBindAddress);
 socket.setInterface(mcastBindAddress);
 } //end if
-if ( mcastSoTimeout >= 0 ) {
-   if(log.isInfoEnabled())
-log.info("Setting cluster mcast soTimeout to "+mcastSoTimeout);
-socket.setSoTimeout(mcastSoTimeout);
-}
+//force a so timeout so that we don't block forever
+if ( mcastSoTimeout <= 0 ) mcastSoTimeout = (int)sendFrequency;
+if(log.isInfoEnabled())
+log.info("Setting cluster mcast soTimeout to "+mcastSoTimeout);
+socket.setSoTimeout(mcastSoTimeout);
+
 if ( mcastTTL >= 0 ) {
if(log.isInfoEnabled())
 log.info("Setting cluster mcast TTL to " + mcastTTL);
@@ -198,6 +199,8 @@
 if(log.isInfoEnabled())
 log.info("Sleeping for "+memberwait+" milliseconds to 
establish cluster membership");
 try {Thread.sleep(memberwait);}catch (InterruptedException 
ignore){}
+if(log.isInfoEnabled())
+log.info("Done sleeping, membership established.");
 } 
 if ( (level & Channel.MBR_TX_SEQ)==Channel.MBR_TX_SEQ ) {
 if ( sender != null ) throw new 
IllegalStateException("McastService.send already running.");
@@ -260,7 +263,6 @@
  * @throws IOException
  */
 public void receive() throws IOException {
-checkExpired();
 try {
 socket.receive(receivePacket);
 byte[] data = new byte[receivePacket.getLength()];
@@ -283,17 +285,21 @@
 //since the receive thread is the same thread
 //that does membership expiration
 }
+checkExpired();
 }
-
-protected synchronized void checkExpired() {
-MemberImpl[] expired = membership.expire(timeToExpiration);
-for ( int i=0; i

svn commit: r407616 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership: McastService.java McastServiceImpl.java

2006-05-18 Thread fhanik
Author: fhanik
Date: Thu May 18 12:15:12 2006
New Revision: 407616

URL: http://svn.apache.org/viewvc?rev=407616&view=rev
Log:
Fixed order of component creation

Modified:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastService.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastService.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastService.java?rev=407616&r1=407615&r2=407616&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastService.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastService.java
 Thu May 18 12:15:12 2006
@@ -409,8 +409,8 @@
 p.setProperty("bindAddress","localhost");
 p.setProperty("memberDropTime","3000");
 p.setProperty("mcastFrequency","500");
-p.setProperty("tcpListenPort",args[1]);
-p.setProperty("tcpListenHost",args[0]);
+p.setProperty("tcpListenPort","4000");
+p.setProperty("tcpListenHost","127.0.0.1");
 service.setProperties(p);
 service.start();
 Thread.sleep(60*1000*60);

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java?rev=407616&r1=407615&r2=407616&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java
 Thu May 18 12:15:12 2006
@@ -140,11 +140,14 @@
 MembershipListener service)
 throws IOException {
 this.member = member;
-address = mcastAddress;
+this.address = mcastAddress;
 this.port = port;
 this.mcastSoTimeout = soTimeout;
 this.mcastTTL = ttl;
 this.mcastBindAddress = bind;
+this.timeToExpiration = expireTime;
+this.service = service;
+this.sendFrequency = sendFrequency;
 setupSocket();
 sendPacket = new DatagramPacket(new byte[1024],1024);
 sendPacket.setAddress(address);
@@ -153,9 +156,6 @@
 receivePacket.setAddress(address);
 receivePacket.setPort(port);
 membership = new Membership(member);
-timeToExpiration = expireTime;
-this.service = service;
-this.sendFrequency = sendFrequency;
 }
 
 protected void setupSocket() throws IOException {



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 33104] - HttpServerletResponseWrapper deprecation errors with JDK 1.5

2006-05-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33104


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |




--- Additional Comments From [EMAIL PROTECTED]  2006-05-18 20:02 ---
(In reply to comment #2)
> The javax.servlet.* pacakges must be written to J2SE 1.3 as per the 2.4 
servlet
> spec. Therefore you will get deprecation warnings with later versions of 
J2SE.

I'm reopening this.

Per the 2.4 spec, J2SE 1.3 is the minimum version of the underlying 
Java Platform with which servlet containers must be built. 

Since the JDK Tomcat 5.5 requires is 1.5, it should be written to it.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 33104] - HttpServerletResponseWrapper deprecation errors with JDK 1.5

2006-05-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33104


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 33104] - HttpServerletResponseWrapper deprecation errors with JDK 1.5

2006-05-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33104


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Greg Wilkins' blog on async servlet API

2006-05-18 Thread Yoav Shapira

Hola,
Just an FYI likely to be of interest to readers of this list:

Most of you probably read planetapache.org, but in case you didn't, it
linked to an interesting post from Greg Wilkins (the Jetty dude) on  a
standard API for async servlets (aka servlet continuations):
http://www.mortbay.com/MB/log/gregw/?permalink=asyncServlets.html

--
Yoav Shapira
Nimalex LLC
1 Mifflin Place, Suite 310
Cambridge, MA, USA
[EMAIL PROTECTED] / www.yoavshapira.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 33104] - HttpServerletResponseWrapper deprecation errors with JDK 1.5

2006-05-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33104


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |




--- Additional Comments From [EMAIL PROTECTED]  2006-05-18 20:44 ---
Remy, May I PLEASE have an answer rather as to why it is invalid, than simply 
marking this as invalid without comment.

I cannot be that the spec requires you to implement javax.servlet.* code to 
the 1.3 JDK, when methods you call are deprecated in the 1.5 JDK your code 
requires.

Presumably those deprecated methods won't exist in the next JDK, so Tomcat 5.5 
cannot possibly even compile under it. 

Is that what youre claiming to be the case? Say it ain't so. Please.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 33104] - HttpServerletResponseWrapper deprecation errors with JDK 1.5

2006-05-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33104


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2006-05-18 20:50 ---
First, Tomcat 5.5 does not require J2SE 5, it works with J2SE 1.4 as well.

Second, Tomcat 5.x as an implementation of the Servlet Spec v2.4 is required to
be compilable under JDK 1.3, which it is, so these methods must be kept in.

With Tomcat 6 it will be a different story, these methods will be removed.

And even if you were right, this would be at best an enhancement request, not a
bug, because they're warnings and not errors.

Finally, please don't reopen this item without discussing it on tomcat-dev
first.  The mailing list is a much better forum for talk and explanations than
Bugzilla.  Thanks.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Greg Wilkins' blog on async servlet API

2006-05-18 Thread Costin Manolache

I saw it - not sure I understand ( and if I understand - I don't like it too
much :-),
but it would be great to have something common and not very complicated.


Costin

On 5/18/06, Yoav Shapira <[EMAIL PROTECTED]> wrote:


Hola,
Just an FYI likely to be of interest to readers of this list:

Most of you probably read planetapache.org, but in case you didn't, it
linked to an interesting post from Greg Wilkins (the Jetty dude) on  a
standard API for async servlets (aka servlet continuations):
http://www.mortbay.com/MB/log/gregw/?permalink=asyncServlets.html

--
Yoav Shapira
Nimalex LLC
1 Mifflin Place, Suite 310
Cambridge, MA, USA
[EMAIL PROTECTED] / www.yoavshapira.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




May Chun Chew/FEA/PEC is out of the office.

2006-05-18 Thread May Chun Chew

I will be out of the office starting  05/19/2006 and will not return until
05/22/2006.

I will respond to your message when I return. For urgent matters, pls
contact Lim Siong Pew at [EMAIL PROTECTED] or 63629384


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 33104] - HttpServerletResponseWrapper deprecation errors with JDK 1.5

2006-05-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33104





--- Additional Comments From [EMAIL PROTECTED]  2006-05-18 21:05 ---
Fair enough. Not reopening. Will follow up on dev list after subscribing.

Please note this was asked on tomcat-user and struts-user, and no answers came.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r407634 - in /tomcat/container/tc5.5.x/modules/groupcom: src/share/org/apache/catalina/tribes/group/ src/share/org/apache/catalina/tribes/group/interceptors/ src/share/org/apache/catalina/

2006-05-18 Thread fhanik
Author: fhanik
Date: Thu May 18 14:12:23 2006
New Revision: 407634

URL: http://svn.apache.org/viewvc?rev=407634&view=rev
Log:
The throughput interceptor now measures throughput correctly and taking both 
multithreading and multiple destinations into account.
Implemented a pool of buffers used by the group to send data down the stack

Added:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/BufferPool.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/BufferPool15Impl.java
Modified:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/GroupChannel.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioSender.java

tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/ChannelCreator.java

tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/LoadTest.java

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/GroupChannel.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/GroupChannel.java?rev=407634&r1=407633&r2=407634&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/GroupChannel.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/GroupChannel.java
 Thu May 18 14:12:23 2006
@@ -38,6 +38,7 @@
 import org.apache.catalina.tribes.io.XByteBuffer;
 import org.apache.catalina.tribes.UniqueId;
 import org.apache.catalina.tribes.Heartbeat;
+import org.apache.catalina.tribes.io.BufferPool;
 
 /**
  * The default implementation of a Channel.
@@ -184,6 +185,7 @@
  */
 public UniqueId send(Member[] destination, Serializable msg, int options, 
ErrorHandler handler) throws ChannelException {
 if ( msg == null ) throw new ChannelException("Cant send a NULL 
message");
+XByteBuffer buffer = null;
 try {
 if ( destination == null || destination.length == 0) throw new 
ChannelException("No destination given");
 ChannelData data = new ChannelData(true);//generates a unique Id
@@ -198,7 +200,8 @@
 options = options & (~SEND_OPTIONS_BYTE_MESSAGE);
 }
 data.setOptions(options);
-XByteBuffer buffer = new XByteBuffer(b.length+128,false);
+//XByteBuffer buffer = new XByteBuffer(b.length+128,false);
+buffer = BufferPool.getBufferPool().getBuffer(b.length+128, false);
 buffer.append(b,0,b.length);
 data.setMessage(buffer);
 InterceptorPayload payload = null;
@@ -211,6 +214,8 @@
 }catch ( Exception x ) {
 if ( x instanceof ChannelException ) throw (ChannelException)x;
 throw new ChannelException(x);
+} finally {
+if ( buffer != null ) 
BufferPool.getBufferPool().returnBuffer(buffer);
 }
 }
 

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java?rev=407634&r1=407633&r2=407634&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
 Thu May 18 14:12:23 2006
@@ -44,7 +44,7 @@
 private boolean run = false;
 private Thread msgDispatchThread = null;
 protected long currentSize = 0;
-private boolean useDeepClone = false;
+private boolean useDeepClone = true;
 
 public MessageDispatchInterceptor() {
 setOptionFlag(Channel.SEND_OPTIONS_ASYNCHRONOUS);

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java?rev=407634&r1=407633&r2=407634&view=diff
==

Deprecation Warnings in ServletRequestWrapper

2006-05-18 Thread Joe Hertz
http://issues.apache.org/bugzilla/show_bug.cgi?id=33104

Closed ostensibly as the spec claims the container must be compilable under JDK 
1.3.

I only see this: 

J2SE 1.3 is the minimum version of the underlying Java platform with which 
servlet containers must be built.

Humor me here. How does "minimum" imply you cant require something stricter? If 
it did, and 1.4 deprecated code you used, and 1.5 removed it entirely, wouldn't 
you be stuck?





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Deprecation Warnings in ServletRequestWrapper

2006-05-18 Thread Yoav Shapira

Hola,
First, I read it as the container must be compile-able under J2SE 1.3,
so maybe we have a different understanding of minimum.

Second, why require something stricter if we don't have to?
Especially now, in what would be the 18th release of Tomcat 5.5,
thereby causing pain those users who do run on JDK 1.3, just to get
rid of some deprecation warnings that don't make any difference to
anyone except you two apparently?

Yoav

On 5/18/06, Joe Hertz <[EMAIL PROTECTED]> wrote:

http://issues.apache.org/bugzilla/show_bug.cgi?id=33104

Closed ostensibly as the spec claims the container must be compilable under JDK 
1.3.

I only see this:

J2SE 1.3 is the minimum version of the underlying Java platform with which 
servlet containers must be built.

Humor me here. How does "minimum" imply you cant require something stricter? If 
it did, and 1.4 deprecated code you used, and 1.5 removed it entirely, wouldn't you be 
stuck?





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Yoav Shapira
Nimalex LLC
1 Mifflin Place, Suite 310
Cambridge, MA, USA
[EMAIL PROTECTED] / www.yoavshapira.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r407636 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors: MessageDispatchInterceptor.java ThroughputInterceptor.java

2006-05-18 Thread fhanik
Author: fhanik
Date: Thu May 18 14:31:20 2006
New Revision: 407636

URL: http://svn.apache.org/viewvc?rev=407636&view=rev
Log:
Fixed the interceptors, async start logic

Modified:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java?rev=407636&r1=407635&r2=407636&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
 Thu May 18 14:31:20 2006
@@ -61,6 +61,7 @@
 }
 addAndGetCurrentSize(msg.getMessage().getLength());
 } else {
+System.out.println("Not queueing the message");
 super.sendMessage(destination, msg, payload);
 }
 }
@@ -104,7 +105,7 @@
 //start the thread
 if (!run ) {
 synchronized (this) {
-if ( !run && ((svc & Channel.SND_TX_SEQ)==svc) ) {//only start 
with the sender
+if ( !run && ((svc & Channel.SND_TX_SEQ)==Channel.SND_TX_SEQ) 
) {//only start with the sender
 msgDispatchThread = new Thread(this);
 msgDispatchThread.setName("MessageDispatchThread");
 msgDispatchThread.setDaemon(true);

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java?rev=407636&r1=407635&r2=407636&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
 Thu May 18 14:31:20 2006
@@ -43,7 +43,7 @@
 double timeTx = 0;
 AtomicLong msgTxCnt = new AtomicLong(1);
 AtomicLong msgRxCnt = new AtomicLong(1);
-AtomicLong msgTxErr = new AtomicLong(1);
+AtomicLong msgTxErr = new AtomicLong(0);
 int interval = 1;
 AtomicInteger access = new AtomicInteger(0);
 long start = 0;



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Creating a context and deploying a new application on the fly. I tried but haven`t succeed please help :-)

2006-05-18 Thread David Gagnon

Hi,

 I want my tomcat have war unpacked on the disk.  The application will 
only be deployed when it receives a message...


I tried with the following code without success.  My biggest problem for 
now is how to specify info for the jdbc connection. 


StandardContext context = new StandardContext();
   
context.setDocBase("F:\\projects\\applicationServer\\var\\deploy\\base");

   context.setPath("/as2");
   context.setCrossContext(true);
   context.setReloadable(false);

   ContextResource resource = new ContextResource();
   resource.setName("jdbc/reference");
   resource.setAuth("Container");
   resource.setType("javax.sql.DataSource");
   resource.setProperty("driverClassName", 
"org.postgresql.Driver");
   resource.setProperty("url", 
"jdbc:postgresql://127.0.0.1:5432/unikommerce");

   resource.setProperty("username", "admin");
   resource.setProperty("password", "admin");
   resource.setProperty("maxActive", "25");
   resource.setProperty("maxIdle", "10");
   resource.setProperty("maxWait", "-1");

   //context.getApplicationLifecycleListeners().get

//resource.set;

/*
type="javax.sql.DataSource" 
driverClassName="org.postgresql.Driver"
 
url="jdbc:postgresql://127.0.0.1:5432/unikommerce"
 username="admin" password="admin" 
maxActive="25" maxIdle="10" maxWait="-1"/>


*/


   ContextConfig contextConfig = new ContextConfig();
   context.addLifecycleListener(contextConfig);

//NamingContextListener l = new NamingContextListener();
//l.addResource(resource);
//contextConfig.setDefaultContextXml();

//container.setManager();
   container.addChild(context);


So far the application get deployed but fail because the JDBC resource 
is not available. 


Any help on how to do this will be greatly appreciated !

Thanks
best regards
/David



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Creating a context and deploying a new application on the fly. I tried but haven`t succeed please help :-)

2006-05-18 Thread Yoav Shapira

Hola,
Why not just set autoDeploy="false" on your Host in server.xml, put
your webapp in the appBase directory like you normally would, and use
the manager interface (JMX, HTML, ant, your choice) to send the deploy
command?  That way you don't have to write any code...

Yoav

On 5/18/06, David Gagnon <[EMAIL PROTECTED]> wrote:

Hi,

  I want my tomcat have war unpacked on the disk.  The application will
only be deployed when it receives a message...

I tried with the following code without success.  My biggest problem for
now is how to specify info for the jdbc connection.

StandardContext context = new StandardContext();

context.setDocBase("F:\\projects\\applicationServer\\var\\deploy\\base");
context.setPath("/as2");
context.setCrossContext(true);
context.setReloadable(false);

ContextResource resource = new ContextResource();
resource.setName("jdbc/reference");
resource.setAuth("Container");
resource.setType("javax.sql.DataSource");
resource.setProperty("driverClassName",
"org.postgresql.Driver");
resource.setProperty("url",
"jdbc:postgresql://127.0.0.1:5432/unikommerce");
resource.setProperty("username", "admin");
resource.setProperty("password", "admin");
resource.setProperty("maxActive", "25");
resource.setProperty("maxIdle", "10");
resource.setProperty("maxWait", "-1");

//context.getApplicationLifecycleListeners().get

//resource.set;

/*


*/


ContextConfig contextConfig = new ContextConfig();
context.addLifecycleListener(contextConfig);

//NamingContextListener l = new NamingContextListener();
//l.addResource(resource);
//contextConfig.setDefaultContextXml();

//container.setManager();
container.addChild(context);


So far the application get deployed but fail because the JDBC resource
is not available.

Any help on how to do this will be greatly appreciated !

Thanks
best regards
/David



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Yoav Shapira
Nimalex LLC
1 Mifflin Place, Suite 310
Cambridge, MA, USA
[EMAIL PROTECTED] / www.yoavshapira.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Deprecation Warnings in ServletRequestWrapper

2006-05-18 Thread Bill Barker
 

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On 
> Behalf Of Yoav Shapira
> Sent: Thursday, May 18, 2006 2:21 PM
> To: Tomcat Developers List
> Subject: Re: Deprecation Warnings in ServletRequestWrapper
> 
> Hola,
> First, I read it as the container must be compile-able under J2SE 1.3,
> so maybe we have a different understanding of minimum.
> 
> Second, why require something stricter if we don't have to?
> Especially now, in what would be the 18th release of Tomcat 5.5,
> thereby causing pain those users who do run on JDK 1.3, just to get
> rid of some deprecation warnings that don't make any difference to
> anyone except you two apparently?
> 

And, more to the point, the deprecated methods are still part of the 2.5
spec :), and so still must be included.  What would be possible in TC 6 is
to do:
   @SuppressWarnings("deprecation")
   public void setStatus(int sc, String sm) { ...

This would at least allow compiling the servlet-api without deprecation
warnings.  Of course, you are free to annotate your own classes anyway you
want :).

> Yoav
> 
> On 5/18/06, Joe Hertz <[EMAIL PROTECTED]> wrote:
> > http://issues.apache.org/bugzilla/show_bug.cgi?id=33104
> >
> > Closed ostensibly as the spec claims the container must be 
> compilable under JDK 1.3.
> >
> > I only see this:
> >
> > J2SE 1.3 is the minimum version of the underlying Java 
> platform with which servlet containers must be built.
> >
> > Humor me here. How does "minimum" imply you cant require 
> something stricter? If it did, and 1.4 deprecated code you 
> used, and 1.5 removed it entirely, wouldn't you be stuck?
> >
> >
> >
> >
> >
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> -- 
> Yoav Shapira
> Nimalex LLC
> 1 Mifflin Place, Suite 310
> Cambridge, MA, USA
> [EMAIL PROTECTED] / www.yoavshapira.com
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 



This message is intended only for the use of the person(s) listed above as the 
intended recipient(s), and may contain information that is PRIVILEGED and 
CONFIDENTIAL.  If you are not an intended recipient, you may not read, copy, or 
distribute this message or any attachment. If you received this communication 
in error, please notify us immediately by e-mail and then delete all copies of 
this message and any attachments.

In addition you should be aware that ordinary (unencrypted) e-mail sent through 
the Internet is not secure. Do not send confidential or sensitive information, 
such as social security numbers, account numbers, personal identification 
numbers and passwords, to us via ordinary (unencrypted) e-mail.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Deprecation Warnings in ServletRequestWrapper

2006-05-18 Thread Joe Hertz
>Second, why require something stricter if we don't have to?
>Especially now, in what would be the 18th release of Tomcat 5.5,
>thereby causing pain those users who do run on JDK 1.3, just to get
>rid of some deprecation warnings that don't make any difference to
>anyone except you two apparently?

I think your brush is a tad broad here.

BillyJoeJimBobServletWriter won't ever get these warnings unless he happens to 
wrap the Tomcat implementations of HttpServletRequest or HttpServletResponse 
AND uses the 1.5 JDK. Assuming he fits that category, he might write to 
Tomcat-user or he might not. If he does, if he had my experience when asking 
about it, he'll get no response at all. Then he MIGHT search bugzilla, find a 
bug that was closed due to an apparent spec misread, re open it, and have it 
reclosed without comment by the Tomcat PMC.

Only *then* did I get to this point. Then I got told I'm one of two people who 
apparently cared about it.

What I'm saying here is please don't imply my concern is over-the-top because I 
happen be the guy who successfully jumped through all of the hurdles put in the 
way of people like me. Suffice it to say, I happen to think your sampling 
method to determine the complaint ratio is rather skewed.

-Joe





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Deprecation Warnings in ServletRequestWrapper

2006-05-18 Thread Joe Hertz
> Second, why require something stricter if we don't have to?
> Especially now, in what would be the 18th release of Tomcat 5.5,
> thereby causing pain those users who do run on JDK 1.3, just to get
> rid of some deprecation warnings that don't make any difference to
> anyone except you two apparently?
>
>And, more to the point, the deprecated methods are still part of the 2.5
>spec :), and so still must be included.  What would be possible in TC 6 is
>to do:
>   @SuppressWarnings("deprecation")
>   public void setStatus(int sc, String sm) { ...
>
>This would at least allow compiling the servlet-api without deprecation
>warnings.  Of course, you are free to annotate your own classes anyway you
>want :).

Interesting you point that out, as comments in the bug claims it's being fixed 
in TC 6.

If the logic is, "We didn't read the spec right and then we ignored the bug 
when it was first reported too, and in the time since we have acquired users 
everywhere who are now dependent on our error", there are two options.

1) Fix it, tell the 1.3 JDK people they got lucky to have support this far.

2) Mark the bug WONTFIX, not INVALID. You take your chances with the next JDK.

Because like I said before, as long as these deprecated methods are being used, 
Tomcat's javax.servlet.* implementation's days are numbers. The next JDK won't 
have these methods. Then it's game over. No compilation under the next JDK. If 
the spec hasn't changed, nor your interpretation of it, then it's no left-turn, 
no right-turn, whaddyadoo..

So are you guys _REALLY_ sure this is what the spec is saying with regard to 
JDK 1.3 support?

-Joe




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r407648 - in /tomcat/container/tc5.5.x/modules/groupcom: src/share/org/apache/catalina/tribes/group/interceptors/ src/share/org/apache/catalina/tribes/transport/bio/util/ test/java/org/apa

2006-05-18 Thread fhanik
Author: fhanik
Date: Thu May 18 15:34:14 2006
New Revision: 407648

URL: http://svn.apache.org/viewvc?rev=407648&view=rev
Log:
Implemented the async using java.util.concurrent for the 1.5 package. much 
better results

Modified:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatch15Interceptor.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/bio/util/LinkObject.java

tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/ChannelCreator.java

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatch15Interceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatch15Interceptor.java?rev=407648&r1=407647&r2=407648&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatch15Interceptor.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatch15Interceptor.java
 Thu May 18 15:34:14 2006
@@ -14,8 +14,14 @@
  */
 package org.apache.catalina.tribes.group.interceptors;
 
+import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.atomic.AtomicLong;
 
+import org.apache.catalina.tribes.ChannelMessage;
+import org.apache.catalina.tribes.Member;
+import org.apache.catalina.tribes.group.InterceptorPayload;
+import org.apache.catalina.tribes.transport.bio.util.LinkObject;
+
 /**
  * 
  * Same implementation as the MessageDispatchInterceptor
@@ -28,6 +34,7 @@
 public class MessageDispatch15Interceptor extends MessageDispatchInterceptor {
 
 protected AtomicLong currentSize = new AtomicLong(0);
+protected LinkedBlockingQueue queue = new LinkedBlockingQueue();
 
 public long getCurrentSize() {
 return currentSize.get();
@@ -41,5 +48,34 @@
 currentSize.set(value);
 return value;
 }
+
+public boolean addToQueue(ChannelMessage msg, Member[] destination, 
InterceptorPayload payload) {
+LinkObject obj = new LinkObject(msg,destination,payload);
+return queue.offer(obj);
+}
+
+public LinkObject removeFromQueue() {
+LinkObject head = null;
+try {
+head = (LinkObject)queue.take();
+}catch ( InterruptedException x ) {}
+return head;
+}
+
+public void startQueue() {
+msgDispatchThread = new Thread(this);
+
msgDispatchThread.setName("MessageDispatch15Interceptor.MessageDispatchThread");
+msgDispatchThread.setDaemon(true);
+msgDispatchThread.setPriority(Thread.MAX_PRIORITY);
+run = true;
+msgDispatchThread.start();
+}
+
+public void stopQueue() {
+run = false;
+msgDispatchThread.interrupt();
+setAndGetCurrentSize(0);
+}
+
 
 }

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java?rev=407648&r1=407647&r2=407648&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
 Thu May 18 15:34:14 2006
@@ -37,14 +37,15 @@
  * @version 1.0
  */
 public class MessageDispatchInterceptor extends ChannelInterceptorBase 
implements Runnable {
-private static org.apache.commons.logging.Log log = 
org.apache.commons.logging.LogFactory.getLog(MessageDispatchInterceptor.class);
+protected static org.apache.commons.logging.Log log = 
org.apache.commons.logging.LogFactory.getLog(MessageDispatchInterceptor.class);
 
-private long maxQueueSize = 1024*1024*64; //64MB
-private FastQueue queue = new FastQueue();
-private boolean run = false;
-private Thread msgDispatchThread = null;
+protected long maxQueueSize = 1024*1024*64; //64MB
+protected FastQueue queue = new FastQueue();
+protected boolean run = false;
+protected Thread msgDispatchThread = null;
 protected long currentSize = 0;
-private boolean useDeepClone = true;
+protected boolean useDeepClone = true;
+protected boolean alwaysSend = true;
 
 public MessageDispatchInterceptor() {
 setOptionF

Re: Creating a context and deploying a new application on the fly. I tried but haven`t succeed please help :-)

2006-05-18 Thread David Gagnon

Hi! :-)

   My problem it that I don`t know at boot time how much applications I 
will need.  I want a sample web app and deploy it on X different context 
(/as1, /as2).
So I would like to have a simple application (exploded war directory) 
and deploy it X time usinng each time a different Resource (to connect 
to a different database).


So I cannot write (or think I cannot) a context.xml file neither I can 
specify a context in server.xml.  ...


I will look again into JMX, HTML or ant interface to see if I cannot 
find any Idea.


Best Regards
/David



Shapira wrote:


Hola,
Why not just set autoDeploy="false" on your Host in server.xml, put
your webapp in the appBase directory like you normally would, and use
the manager interface (JMX, HTML, ant, your choice) to send the deploy
command?  That way you don't have to write any code...

Yoav

On 5/18/06, David Gagnon <[EMAIL PROTECTED]> wrote:


Hi,

  I want my tomcat have war unpacked on the disk.  The application will
only be deployed when it receives a message...

I tried with the following code without success.  My biggest problem for
now is how to specify info for the jdbc connection.

StandardContext context = new StandardContext();

context.setDocBase("F:\\projects\\applicationServer\\var\\deploy\\base"); 


context.setPath("/as2");
context.setCrossContext(true);
context.setReloadable(false);

ContextResource resource = new ContextResource();
resource.setName("jdbc/reference");
resource.setAuth("Container");
resource.setType("javax.sql.DataSource");
resource.setProperty("driverClassName",
"org.postgresql.Driver");
resource.setProperty("url",
"jdbc:postgresql://127.0.0.1:5432/unikommerce");
resource.setProperty("username", "admin");
resource.setProperty("password", "admin");
resource.setProperty("maxActive", "25");
resource.setProperty("maxIdle", "10");
resource.setProperty("maxWait", "-1");

//context.getApplicationLifecycleListeners().get

//resource.set;

/*


*/


ContextConfig contextConfig = new ContextConfig();
context.addLifecycleListener(contextConfig);

//NamingContextListener l = new NamingContextListener();
//l.addResource(resource);
//contextConfig.setDefaultContextXml();

//container.setManager();
container.addChild(context);


So far the application get deployed but fail because the JDBC resource
is not available.

Any help on how to do this will be greatly appreciated !

Thanks
best regards
/David



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]









-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r407665 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes: group/interceptors/ThroughputInterceptor.java io/ChannelData.java io/XByteBuffer.java

2006-05-18 Thread fhanik
Author: fhanik
Date: Thu May 18 16:48:15 2006
New Revision: 407665

URL: http://svn.apache.org/viewvc?rev=407665&view=rev
Log:
Small performance improvements

Modified:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java?rev=407665&r1=407664&r2=407665&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
 Thu May 18 16:48:15 2006
@@ -79,7 +79,7 @@
 }
 
 public void messageReceived(ChannelMessage msg) {
-long bytes = 
XByteBuffer.getDataPackageLength(((ChannelData)msg).getDataPackage().length);
+long bytes = 
XByteBuffer.getDataPackageLength(((ChannelData)msg).getDataPackageLength());
 mbRx += ((double)bytes)/(1024d*1024d);
 if ( msgRxCnt.get() % interval == 0 ) report(timeTx);
 msgRxCnt.addAndGet(1);

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java?rev=407665&r1=407664&r2=407665&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java
 Thu May 18 16:48:15 2006
@@ -183,12 +183,16 @@
  * @return byte[]
  */
 public byte[] getDataPackage()  {
-byte[] addr = ((MemberImpl)address).getData(false);
 int length = getDataPackageLength();
 byte[] data = new byte[length];
 int offset = 0;
+return getDataPackage(data,offset);
+}
+
+public byte[] getDataPackage(byte[] data, int offset)  {
+byte[] addr = ((MemberImpl)address).getData(false);
 XByteBuffer.toBytes(options,data,offset);
-offset = 4; //options
+offset += 4; //options
 XByteBuffer.toBytes(timestamp,data,offset);
 offset += 8; //timestamp
 XByteBuffer.toBytes(uniqueId.length,data,offset);

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java?rev=407665&r1=407664&r2=407665&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java
 Thu May 18 16:48:15 2006
@@ -332,13 +332,39 @@
  * Creates a complete data package
  * @param indata - the message data to be contained within the package
  * @param compressed - compression flag for the indata buffer
- * @return - a full package (header,compress,size,data,footer)
+ * @return - a full package (header,size,data,footer)
  * 
  */
 public static byte[] createDataPackage(ChannelData cdata) {
-return createDataPackage(cdata.getDataPackage());
+//return createDataPackage(cdata.getDataPackage());
+//avoid one extra byte array creation
+int dlength = cdata.getDataPackageLength();
+int length = getDataPackageLength(dlength);
+byte[] data = new byte[length];
+int offset = 0;
+System.arraycopy(START_DATA, 0, data, offset, START_DATA.length);
+offset += START_DATA.length;
+toBytes(dlength,data, START_DATA.length);
+offset += 4;
+cdata.getDataPackage(data,offset);
+offset += dlength;
+System.arraycopy(END_DATA, 0, data, offset, END_DATA.length);
+offset += END_DATA.length;
+return data;
 }
 
+public static byte[] createDataPackage(byte[] data, int doff, int dlength, 
byte[] buffer, int bufoff) {
+if ( (buffer.length-bufoff) > getDataPackageLength(dlength) ) {
+throw new ArrayIndexOutOfBoundsException("Unable to create data 
package, bu

Re: svn commit: r407661 [1/3] - in /tomcat/sandbox/java/org/apache/tomcat/util/modeler: ./ modules/

2006-05-18 Thread Remy Maucherat

[EMAIL PROTECTED] wrote:

Author: costin
Date: Thu May 18 16:27:34 2006
New Revision: 407661

URL: http://svn.apache.org/viewvc?rev=407661&view=rev
Log:
Refactored modeler - using DynamicMbeans instead of model mbeans.

The name 'modeler' is still valid - it 'models' mbeans, but it doesn't have to 
use
the heavy ModelMBean interfaces. 

Most of the model-related features, and other things not used in tomcat are removed. 


Tested on tomcat6 - but since it's a big change I want to have it in sandbox 
first


If it mostly works, you can do it in the main tree directly. More people 
(including me) will test it that way.


Rémy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r407667 - /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java

2006-05-18 Thread fhanik
Author: fhanik
Date: Thu May 18 17:06:09 2006
New Revision: 407667

URL: http://svn.apache.org/viewvc?rev=407667&view=rev
Log:
Tiny perf improvement

Modified:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java?rev=407667&r1=407666&r2=407667&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java
 Thu May 18 17:06:09 2006
@@ -231,7 +231,9 @@
 System.arraycopy(b,offset,addr,0,addr.length);
 data.setAddress(MemberImpl.getMember(addr));
 offset += addr.length; //addr data
-data.message = new XByteBuffer(new 
byte[XByteBuffer.toInt(b,offset)],false);
+int xsize = XByteBuffer.toInt(b,offset);
+//data.message = new XByteBuffer(new byte[xsize],false);
+data.message = BufferPool.getBufferPool().getBuffer(xsize,false);
 offset += 4; //message length
 
System.arraycopy(b,offset,data.message.getBytesDirect(),0,data.message.getLength());
 offset += data.message.getLength(); //message data



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r407669 - /tomcat/container/branches/tc4.1.x/BUILDING.txt

2006-05-18 Thread markt
Author: markt
Date: Thu May 18 17:19:53 2006
New Revision: 407669

URL: http://svn.apache.org/viewvc?rev=407669&view=rev
Log:
JMX is required for building.

Modified:
tomcat/container/branches/tc4.1.x/BUILDING.txt

Modified: tomcat/container/branches/tc4.1.x/BUILDING.txt
URL: 
http://svn.apache.org/viewvc/tomcat/container/branches/tc4.1.x/BUILDING.txt?rev=407669&r1=407668&r2=407669&view=diff
==
--- tomcat/container/branches/tc4.1.x/BUILDING.txt (original)
+++ tomcat/container/branches/tc4.1.x/BUILDING.txt Thu May 18 17:19:53 2006
@@ -241,29 +241,10 @@
   distribution resides in its own directory.
 
 
-(13) Steps (14)-(26) are optional, but are necessary to build a complete binary
- distribution of Tomcat 4.x. Set the "full.dist" property to "on" in the
- build.properties file (see step (27)) to build a complete distribution.
- Regular contributors to Tomcat are encouraged to use the complete build 
- option.
-
-
-(14) Download and Install JDBC Optional Package API Binary Distribution
-
-* Download the JDBC Optional Pacakge API package (version 2.0) from:
-
-http://java.sun.com/products/jdbc/download.html
-
-* Place the jar in a convenient location.
-
-
-(15) Download and Install an implementation of the JMX 1.0 specification. This
+(13) Download and Install an implementation of the JMX 1.0 specification. This
  can be either MX4J (http://mx4j.sourceforge.net) or Sun JMX 1.0 Reference 
  Implementation.
 
-NOTE:  This step is only required if you wish to build the Config/Admin
-web application.
-
 NOTE:  The Tomcat binaries are distrbuted with MX4J.
 
 * Download MX4J (version 1.0 or later) from
@@ -277,6 +258,23 @@
 
 * Unpack MX4J or the reference implementation into a convenient location 
   so that it resides in its own subdirectory.
+
+
+(14) Steps (15)-(26) are optional, but are necessary to build a complete binary
+ distribution of Tomcat 4.x. Set the "full.dist" property to "on" in the
+ build.properties file (see step (27)) to build a complete distribution.
+ Regular contributors to Tomcat are encouraged to use the complete build 
+ option.
+
+
+(15) Download and Install JDBC Optional Package API Binary Distribution
+
+* Download the JDBC Optional Pacakge API package (version 2.0) from:
+
+http://java.sun.com/products/jdbc/download.html
+
+* Place the jar in a convenient location.
+
 
 (16) Download and Install the Java Activation Framework
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r407670 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes: group/interceptors/ transport/ transport/bio/ transport/nio/

2006-05-18 Thread fhanik
Author: fhanik
Date: Thu May 18 17:21:11 2006
New Revision: 407670

URL: http://svn.apache.org/viewvc?rev=407670&view=rev
Log:
Major performance improvement to use the buffer pool for incoming messages,
interceptors will have to be careful since they need to deepclone the message 
if they wish to store it

Modified:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/OrderInterceptor.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/ReceiverBase.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/WorkerThread.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/bio/BioReceiver.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/bio/BioReplicationThread.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioReceiver.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioReplicationThread.java

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java?rev=407670&r1=407669&r2=407670&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java
 Thu May 18 17:21:11 2006
@@ -45,6 +45,7 @@
 protected HashMap fragpieces = new HashMap();
 private int maxSize = 1024*100;
 private long expire = 1000 * 60; //one minute expiration
+protected boolean deepclone = true;
 
 
 public void sendMessage(Member[] destination, ChannelMessage msg, 
InterceptorPayload payload) throws ChannelException {
@@ -90,7 +91,7 @@
 public void defrag(ChannelMessage msg ) { 
 FragKey key = new FragKey(msg.getUniqueId());
 FragCollection coll = getFragCollection(key,msg);
-coll.addMessage(msg);
+coll.addMessage((ChannelMessage)msg.deepclone());
 
 if ( coll.complete() ) {
 removeFragCollection(key);

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/OrderInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/OrderInterceptor.java?rev=407670&r1=407669&r2=407670&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/OrderInterceptor.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/OrderInterceptor.java
 Thu May 18 17:21:11 2006
@@ -74,7 +74,7 @@
 public void messageReceived(ChannelMessage msg) {
 int msgnr = 
XByteBuffer.toInt(msg.getMessage().getBytesDirect(),msg.getMessage().getLength()-4);
 msg.getMessage().trim(4);
-MessageOrder order = new MessageOrder(msgnr,msg);
+MessageOrder order = new 
MessageOrder(msgnr,(ChannelMessage)msg.deepclone());
 if ( processIncoming(order) ) processLeftOvers(msg.getAddress(),false);
 }
 

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/ReceiverBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/ReceiverBase.java?rev=407670&r1=407669&r2=407670&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/ReceiverBase.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/ReceiverBase.java
 Thu May 18 17:21:11 2006
@@ -67,6 +67,7 @@
 private int soLingerTime = 3;
 private int soTrafficClass = 0x04 | 0x08 | 0x010;
 private int timeout = 15000; //15 seconds
+private boolean useBufferPool = true;
 
 
 public ReceiverBase() {
@@ -289,6 +290,10 @@
 return timeout;
 }
 
+public boolean getUseBufferPool() {
+return useBufferPool;
+}
+
 public void setTcpSelectorTimeout(long selTimeout) {
 tcpSelectorTimeout = selTimeout;
 }
@@ -362,7 +367,11 @@
 public void set

Re: Deprecation Warnings in ServletRequestWrapper

2006-05-18 Thread Mark Thomas
Joe Hertz wrote:
> Because like I said before, as long as these deprecated methods are being 
> used, Tomcat's javax.servlet.* implementation's days are numbers. The next 
> JDK won't have these methods. Then it's game over. No compilation under the 
> next JDK. If the spec hasn't changed, nor your interpretation of it, then 
> it's no left-turn, no right-turn, whaddyadoo..

First off, a correction. It isn't Tomcat's implementation of the
javax.servlet.* classes, it is Sun's.

Secondly, my understanding of deprecation is that where part of an API
is deprecated it might not be included future versions of the API
therefore users of the API should not (note: 'should not' rather than
'must not') use the deprecated elements.

The deprecated methods are part of the API and are still included in the
spec (and marked as deprecated in the spec). Since they are in the spec,
they must be implemented.

There are a couple of places where Tomcat implements javax.servlet.*
interfaces that include deprecated methods. Tomcat needs to implement
the deprecated methods. It is valid, although inadvisable, to use a
deprecated method. Therefore Tomcat needs to implement that method in
case the user code makes use of it. As soon as the spec removes the
deprecated methods they will be removed from the javax.servlet.* and we
can clear out all the references to them in the Tomcat code.

> So are you guys _REALLY_ sure this is what the spec is saying with regard to 
> JDK 1.3 support?

I am not sure about the 1.3 reasoning but I am 100% these methods need
to be there.

Mark

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r407671 - in /tomcat/tc6.0.x/trunk/java/org/apache/catalina: CometProcessor.java connector/CoyoteAdapter.java servlets/CometServlet.java

2006-05-18 Thread remm
Author: remm
Date: Thu May 18 17:44:04 2006
New Revision: 407671

URL: http://svn.apache.org/viewvc?rev=407671&view=rev
Log:
- Add example read method.
- Return value for read errors (as an option compared with throwing an 
exception).
- Add some javadocs.

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/CometProcessor.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/servlets/CometServlet.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/CometProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/CometProcessor.java?rev=407671&r1=407670&r2=407671&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/CometProcessor.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/CometProcessor.java Thu May 
18 17:44:04 2006
@@ -30,8 +30,10 @@
  * of the processing of the connection. It can be used to initialize any 
relevant 
  * fields using the request and response objects.
  * 
- * @param request
- * @param response
+ * @param request The HTTP servlet request instance, which can be accessed
+ *asynchronously at any time until the end or error methods are 
called
+ * @param response The HTTP servlet response instance, which can be 
accessed
+ *asynchronously at any time until the end or error methods are 
called
  * @throws IOException
  * @throws ServletException
  */
@@ -40,7 +42,9 @@
 
 /**
  * End may be called to end the processing of the request. Fields that have
- * been initialized in the begin method should be reset.
+ * been initialized in the begin method should be reset. After this method 
has
+ * been called, the request and response objects, as well as all their 
dependent
+ * objects will be recycled and used to process other requests.
  * 
  * @param request
  * @param response
@@ -53,7 +57,9 @@
 /**
  * Error will be called by the container in the case where an IO exception
  * or a similar unrecoverable error occurs on the connection. Fields that 
have
- * been initialized in the begin method should be reset.
+ * been initialized in the begin method should be reset. After this method 
has
+ * been called, the request and response objects, as well as all their 
dependent
+ * objects will be recycled and used to process other requests.
  * 
  * @param request
  * @param response
@@ -68,14 +74,19 @@
  * without blocking. The available and ready methods of the InputStream or
  * Reader may be used to determine if there is a risk of blocking: the 
servlet
  * should read while data is reported available, and can make one 
additional read
- * without blocking.
+ * without blocking. When encountering a read error or an EOF, the servlet 
MUST
+ * report it by either returning null or throwing an exception such as an 
+ * IOException. 
  * 
  * @param request
  * @param response
- * @throws IOException
+ * @throws IOException An IOException may be thrown to indicate an IO 
error, 
+ * or that the EOF has been reached on the connection
  * @throws ServletException
+ * @return false if the read attempt returned an EOF; alternately, it is 
also
+ * valid to throw an IOException
  */
-public void read(HttpServletRequest request, HttpServletResponse response)
+public boolean read(HttpServletRequest request, HttpServletResponse 
response)
 throws IOException, ServletException;
 
 }

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=407671&r1=407670&r2=407671&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
Thu May 18 17:44:04 2006
@@ -128,7 +128,15 @@
 if (error) {
 servlet.error(request.getRequest(), 
response.getResponse());
 } else {
-servlet.read(request.getRequest(), response.getResponse());
+if (!servlet.read(request.getRequest(), 
response.getResponse())) {
+error = true;
+request.removeAttribute("org.apache.tomcat.comet");
+try {
+servlet.error(request.getRequest(), 
response.getResponse());
+} catch (Throwable th) {
+log.error(sm.getString("coyoteAdapter.service"), 
th);
+}
+}
 

svn commit: r407672 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java

2006-05-18 Thread costin
Author: costin
Date: Thu May 18 17:56:28 2006
New Revision: 407672

URL: http://svn.apache.org/viewvc?rev=407672&view=rev
Log:
Downgrade to DynamicMBeans in method signatures - there is no need to use Model 
here, 
the mbean server doesn't care.

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java?rev=407672&r1=407671&r2=407672&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Thu 
May 18 17:56:28 2006
@@ -19,6 +19,7 @@
 
 import java.util.Hashtable;
 
+import javax.management.DynamicMBean;
 import javax.management.MBeanException;
 import javax.management.MBeanServer;
 import javax.management.MalformedObjectNameException;
@@ -139,7 +140,7 @@
  *
  * @exception Exception if an MBean cannot be created or registered
  */
-static ModelMBean createMBean(Connector connector)
+static DynamicMBean createMBean(Connector connector)
 throws Exception {
 
 String mname = createManagedName(connector);
@@ -151,7 +152,7 @@
 String domain = managed.getDomain();
 if (domain == null)
 domain = mserver.getDefaultDomain();
-ModelMBean mbean = managed.createMBean(connector);
+DynamicMBean mbean = managed.createMBean(connector);
 ObjectName oname = createObjectName(domain, connector);
 if( mserver.isRegistered( oname ))  {
 mserver.unregisterMBean(oname);
@@ -170,7 +171,7 @@
  *
  * @exception Exception if an MBean cannot be created or registered
  */
-static ModelMBean createMBean(Context context)
+static DynamicMBean createMBean(Context context)
 throws Exception {
 
 String mname = createManagedName(context);
@@ -182,7 +183,7 @@
 String domain = managed.getDomain();
 if (domain == null)
 domain = mserver.getDefaultDomain();
-ModelMBean mbean = managed.createMBean(context);
+DynamicMBean mbean = managed.createMBean(context);
 ObjectName oname = createObjectName(domain, context);
 if( mserver.isRegistered(oname)) {
 log.debug("Already registered " + oname);
@@ -202,7 +203,7 @@
  *
  * @exception Exception if an MBean cannot be created or registered
  */
-static ModelMBean createMBean(ContextEnvironment environment)
+static DynamicMBean createMBean(ContextEnvironment environment)
 throws Exception {
 
 String mname = createManagedName(environment);
@@ -214,7 +215,7 @@
 String domain = managed.getDomain();
 if (domain == null)
 domain = mserver.getDefaultDomain();
-ModelMBean mbean = managed.createMBean(environment);
+DynamicMBean mbean = managed.createMBean(environment);
 ObjectName oname = createObjectName(domain, environment);
 if( mserver.isRegistered( oname ))  {
 mserver.unregisterMBean(oname);
@@ -233,7 +234,7 @@
  *
  * @exception Exception if an MBean cannot be created or registered
  */
-static ModelMBean createMBean(ContextResource resource)
+static DynamicMBean createMBean(ContextResource resource)
 throws Exception {
 
 String mname = createManagedName(resource);
@@ -245,7 +246,7 @@
 String domain = managed.getDomain();
 if (domain == null)
 domain = mserver.getDefaultDomain();
-ModelMBean mbean = managed.createMBean(resource);
+DynamicMBean mbean = managed.createMBean(resource);
 ObjectName oname = createObjectName(domain, resource);
 if( mserver.isRegistered( oname ))  {
 mserver.unregisterMBean(oname);
@@ -264,7 +265,7 @@
  *
  * @exception Exception if an MBean cannot be created or registered
  */
-static ModelMBean createMBean(ContextResourceLink resourceLink)
+static DynamicMBean createMBean(ContextResourceLink resourceLink)
 throws Exception {
 
 String mname = createManagedName(resourceLink);
@@ -276,7 +277,7 @@
 String domain = managed.getDomain();
 if (domain == null)
 domain = mserver.getDefaultDomain();
-ModelMBean mbean = managed.createMBean(resourceLink);
+DynamicMBean mbean = managed.createMBean(resourceLink);
 ObjectName oname = createObjectName(domain, resourceLink);
 if( mserver.isRegistered( oname ))  {
 mserver.unregisterMBean(oname);
@@ -294,7 +295,7 @@
  *
  * @exception Exception if an MBean cannot be created or registered
  */
-static ModelMBean createMBean(Engine engine)
+static DynamicMBean createMBean(Engine engine)
 throws Exce

svn commit: r407673 - /tomcat/tc6.0.x/trunk/java/org/apache/jk/common/ModJkMX.java

2006-05-18 Thread costin
Author: costin
Date: Thu May 18 17:57:15 2006
New Revision: 407673

URL: http://svn.apache.org/viewvc?rev=407673&view=rev
Log:
AFAIK mod_jk2 is deprecated - and I doubt anyone is using this. If they do - 
can be 
reverted.

Removed:
tomcat/tc6.0.x/trunk/java/org/apache/jk/common/ModJkMX.java


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r407674 - in /tomcat/connectors/trunk/coyote/src/java/org/apache/coyote: tomcat3/ tomcat4/

2006-05-18 Thread costin
Author: costin
Date: Thu May 18 17:58:16 2006
New Revision: 407674

URL: http://svn.apache.org/viewvc?rev=407674&view=rev
Log:
Cleaning up the sandbox

Removed:
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat3/
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r407675 - /tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/memory/

2006-05-18 Thread costin
Author: costin
Date: Thu May 18 17:59:12 2006
New Revision: 407675

URL: http://svn.apache.org/viewvc?rev=407675&view=rev
Log:
Unused

Removed:
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/memory/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r407676 - /tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/

2006-05-18 Thread costin
Author: costin
Date: Thu May 18 18:00:47 2006
New Revision: 407676

URL: http://svn.apache.org/viewvc?rev=407676&view=rev
Log:
Duplicates

Removed:
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/ActionCode.java
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/ActionHook.java
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Adapter.java
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Constants.java
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/InputBuffer.java
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/OutputBuffer.java
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Processor.java

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/ProtocolHandler.java
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Request.java

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/RequestGroupInfo.java
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/RequestInfo.java
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Response.java


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svn commit: r407661 [1/3] - in /tomcat/sandbox/java/org/apache/tomcat/util/modeler: ./ modules/

2006-05-18 Thread Costin Manolache

In few days, for now I want to run them side-by-side and test a bit more.
If you want to play with it - just replace the util.modeler package.



Costin

On 5/18/06, Remy Maucherat <[EMAIL PROTECTED]> wrote:


[EMAIL PROTECTED] wrote:
> Author: costin
> Date: Thu May 18 16:27:34 2006
> New Revision: 407661
>
> URL: http://svn.apache.org/viewvc?rev=407661&view=rev
> Log:
> Refactored modeler - using DynamicMbeans instead of model mbeans.
>
> The name 'modeler' is still valid - it 'models' mbeans, but it doesn't
have to use
> the heavy ModelMBean interfaces.
>
> Most of the model-related features, and other things not used in tomcat
are removed.
>
> Tested on tomcat6 - but since it's a big change I want to have it in
sandbox first

If it mostly works, you can do it in the main tree directly. More people
(including me) will test it that way.

Rémy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: svn commit: r407674 - in /tomcat/connectors/trunk/coyote/src/java/org/apache/coyote: tomcat3/ tomcat4/

2006-05-18 Thread Mark Thomas
[EMAIL PROTECTED] wrote:
> Author: costin
> Date: Thu May 18 17:58:16 2006
> New Revision: 407674
> 
> URL: http://svn.apache.org/viewvc?rev=407674&view=rev
> Log:
> Cleaning up the sandbox
> 
> Removed:
> tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat3/
> tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/

-1

This isn't the sandbox.

Mark

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svn commit: r407674 - in /tomcat/connectors/trunk/coyote/src/java/org/apache/coyote: tomcat3/ tomcat4/

2006-05-18 Thread Costin Manolache

Wow, my mistake - not sure what eclipse did.

Anyone know how to rollback on svn ??

Costin

On 5/18/06, Mark Thomas <[EMAIL PROTECTED]> wrote:


[EMAIL PROTECTED] wrote:
> Author: costin
> Date: Thu May 18 17:58:16 2006
> New Revision: 407674
>
> URL: http://svn.apache.org/viewvc?rev=407674&view=rev
> Log:
> Cleaning up the sandbox
>
> Removed:
> tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat3/
> tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/

-1

This isn't the sandbox.

Mark

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: svn commit: r407674 - in /tomcat/connectors/trunk/coyote/src/java/org/apache/coyote: tomcat3/ tomcat4/

2006-05-18 Thread Mark Thomas
You do an svn copy and specify the version number. Not sure of the exact
syntax. I use Tortoise SVN and do a "revert this version" from the log view.

I'll do this now.

Mark

Costin Manolache wrote:
> Wow, my mistake - not sure what eclipse did.
> 
> Anyone know how to rollback on svn ??
> 
> Costin
> 
> On 5/18/06, Mark Thomas <[EMAIL PROTECTED]> wrote:
>>
>> [EMAIL PROTECTED] wrote:
>> > Author: costin
>> > Date: Thu May 18 17:58:16 2006
>> > New Revision: 407674
>> >
>> > URL: http://svn.apache.org/viewvc?rev=407674&view=rev
>> > Log:
>> > Cleaning up the sandbox
>> >
>> > Removed:
>> > tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat3/
>> > tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/
>>
>> -1
>>
>> This isn't the sandbox.
>>
>> Mark
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svn commit: r407674 - in /tomcat/connectors/trunk/coyote/src/java/org/apache/coyote: tomcat3/ tomcat4/

2006-05-18 Thread Mark Thomas
Mark Thomas wrote:
> You do an svn copy and specify the version number. Not sure of the exact
> syntax. I use Tortoise SVN and do a "revert this version" from the log view.
> 
> I'll do this now.

Hmmm. Not working. Back to the command line...

Once i have worked out what it is, I'll post it here for future reference.

Mark

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r407677 - in /tomcat/connectors/trunk/coyote/src/java/org/apache/coyote: tomcat3/ tomcat4/

2006-05-18 Thread costin
Author: costin
Date: Thu May 18 18:24:04 2006
New Revision: 407677

URL: http://svn.apache.org/viewvc?rev=407677&view=rev
Log:
Rollback, bad eclipse ( or bad copy )...

Added:
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat3/
  - copied from r407673, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat3/

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat3/CoyoteInterceptor2.java
  - copied unchanged from r407673, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat3/CoyoteInterceptor2.java

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat3/Tomcat3Adapter.java
  - copied unchanged from r407673, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat3/Tomcat3Adapter.java

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat3/Tomcat3Request.java
  - copied unchanged from r407673, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat3/Tomcat3Request.java

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat3/Tomcat3Response.java
  - copied unchanged from r407673, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat3/Tomcat3Response.java
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/
  - copied from r407673, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/Constants.java
  - copied unchanged from r407673, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/Constants.java

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java
  - copied unchanged from r407673, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteConnector.java
  - copied unchanged from r407673, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteConnector.java

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteInputStream.java
  - copied unchanged from r407673, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteInputStream.java

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteOutputStream.java
  - copied unchanged from r407673, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteOutputStream.java

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyotePrincipal.java
  - copied unchanged from r407673, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyotePrincipal.java

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteRequest.java
  - copied unchanged from r407673, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteRequest.java

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteRequestFacade.java
  - copied unchanged from r407673, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteRequestFacade.java

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java
  - copied unchanged from r407673, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponseFacade.java
  - copied unchanged from r407673, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponseFacade.java

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteServerSocketFactory.java
  - copied unchanged from r407673, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteServerSocketFactory.java

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteWriter.java
  - copied unchanged from r407673, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteWriter.java

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings.properties
  - copied unchanged from r407673, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings.properties

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings_es.properties
  - copied unchanged from r407673, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings_es.properties

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings_fr.properties
  - copied unchanged from r407673, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings_fr.properties

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings_ja.properties
  - copied unchanged from r407673, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings_ja.properties

tomcat/connectors/trunk/coyote/src/jav

Re: svn commit: r407674 - in /tomcat/connectors/trunk/coyote/src/java/org/apache/coyote: tomcat3/ tomcat4/

2006-05-18 Thread Costin Manolache

Thanks. I found the command, rolling back.

On 5/18/06, Mark Thomas <[EMAIL PROTECTED]> wrote:


You do an svn copy and specify the version number. Not sure of the exact
syntax. I use Tortoise SVN and do a "revert this version" from the log
view.

I'll do this now.

Mark

Costin Manolache wrote:
> Wow, my mistake - not sure what eclipse did.
>
> Anyone know how to rollback on svn ??
>
> Costin
>
> On 5/18/06, Mark Thomas <[EMAIL PROTECTED]> wrote:
>>
>> [EMAIL PROTECTED] wrote:
>> > Author: costin
>> > Date: Thu May 18 17:58:16 2006
>> > New Revision: 407674
>> >
>> > URL: http://svn.apache.org/viewvc?rev=407674&view=rev
>> > Log:
>> > Cleaning up the sandbox
>> >
>> > Removed:
>> >
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat3/
>> >
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/
>>
>> -1
>>
>> This isn't the sandbox.
>>
>> Mark
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Creating a context and deploying a new application on the fly.

2006-05-18 Thread Thomas Whitmore
Hi David,

Looks like there may be a problem with your Context Resource code.
>From your programmatic configuration:

>ContextResource resource = new ContextResource();
>resource.setName("jdbc/reference");

>From your commented 'origin' example:

> type="javax.sql.DataSource" 

Try setting the ContextResource.Name as per your original; assuming the 
'origin' example is what your app was coded to work with and that you are 
re-implementing this from XML to a programmatic config,  the mis-matched name 
would be erroneous.

Hi Yoav.


Cheers,
Thomas


svn commit: r407678 - /tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/

2006-05-18 Thread costin
Author: costin
Date: Thu May 18 18:25:12 2006
New Revision: 407678

URL: http://svn.apache.org/viewvc?rev=407678&view=rev
Log:
Rolling back

Added:
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/ActionCode.java
  - copied unchanged from r407675, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/ActionCode.java
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/ActionHook.java
  - copied unchanged from r407675, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/ActionHook.java
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Adapter.java
  - copied unchanged from r407675, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Adapter.java
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Constants.java
  - copied unchanged from r407675, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Constants.java
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/InputBuffer.java
  - copied unchanged from r407675, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/InputBuffer.java
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/OutputBuffer.java
  - copied unchanged from r407675, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/OutputBuffer.java
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Processor.java
  - copied unchanged from r407675, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Processor.java

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/ProtocolHandler.java
  - copied unchanged from r407675, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/ProtocolHandler.java
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Request.java
  - copied unchanged from r407675, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Request.java

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/RequestGroupInfo.java
  - copied unchanged from r407675, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/RequestGroupInfo.java
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/RequestInfo.java
  - copied unchanged from r407675, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/RequestInfo.java
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Response.java
  - copied unchanged from r407675, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Response.java


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r407679 - in /tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/memory: ./ MemoryProtocolHandler.java

2006-05-18 Thread costin
Author: costin
Date: Thu May 18 18:26:17 2006
New Revision: 407679

URL: http://svn.apache.org/viewvc?rev=407679&view=rev
Log:
Rollback

Added:
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/memory/
  - copied from r407674, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/memory/

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/memory/MemoryProtocolHandler.java
  - copied unchanged from r407674, 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/memory/MemoryProtocolHandler.java


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svn commit: r407678 - /tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/

2006-05-18 Thread Mark Thomas
[EMAIL PROTECTED] wrote:
> Author: costin
> Date: Thu May 18 18:25:12 2006
> New Revision: 407678
> 
> URL: http://svn.apache.org/viewvc?rev=407678&view=rev
> Log:
> Rolling back

Thanks.

Mark


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svn commit: r407674 - in /tomcat/connectors/trunk/coyote/src/java/org/apache/coyote: tomcat3/ tomcat4/

2006-05-18 Thread Costin Manolache

For future reference:

svn merge -r REVISION_OF_BAD_CHANGE:REV-1 .
svn commit

Ex: svn merge -r 407674:407673 .

I hope this doesn't break anything else.

Costin

On 5/18/06, Mark Thomas <[EMAIL PROTECTED]> wrote:


Mark Thomas wrote:
> You do an svn copy and specify the version number. Not sure of the exact
> syntax. I use Tortoise SVN and do a "revert this version" from the log
view.
>
> I'll do this now.

Hmmm. Not working. Back to the command line...

Once i have worked out what it is, I'll post it here for future reference.

Mark

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




svn commit: r407685 - /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java

2006-05-18 Thread fhanik
Author: fhanik
Date: Thu May 18 18:52:17 2006
New Revision: 407685

URL: http://svn.apache.org/viewvc?rev=407685&view=rev
Log:
More accurate reporting 

Modified:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java?rev=407685&r1=407684&r2=407685&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
 Thu May 18 18:52:17 2006
@@ -39,6 +39,7 @@
 protected static org.apache.commons.logging.Log log = 
org.apache.commons.logging.LogFactory.getLog(ThroughputInterceptor.class);
 
 double mbTx = 0;
+double mbAppTx = 0;
 double mbRx = 0;
 double timeTx = 0;
 AtomicLong msgTxCnt = new AtomicLong(1);
@@ -61,6 +62,7 @@
 throw x;
 } 
 mbTx += ((double)(bytes*destination.length))/(1024d*1024d);
+mbAppTx += ((double)(bytes))/(1024d*1024d);
 if ( access.addAndGet(-1) == 0 ) {
 long stop = System.currentTimeMillis();
 timeTx += ( (double) (stop - start)) / 1000d;
@@ -89,11 +91,15 @@
 StringBuffer buf = new StringBuffer("ThroughputInterceptor 
Report[\n\tTx Msg:");
 buf.append(msgTxCnt).append(" messages\n\tSent:");
 buf.append(df.format(mbTx));
-buf.append(" MB\n\tTime:");
+buf.append(" MB (total)\n\tSent:");
+buf.append(df.format(mbAppTx));
+buf.append(" MB (application)\n\tTime:");
 buf.append(df.format(timeTx));
 buf.append(" seconds\n\tSpeed:");
 buf.append(df.format(mbTx/timeTx));
-buf.append(" MB/sec\n\tError Msg:");
+buf.append(" MB/sec (total)\n\tSpeed:");
+buf.append(df.format(mbAppTx/timeTx));
+buf.append(" MB/sec (application)\n\tError Msg:");
 buf.append(msgTxErr).append("\n\tRx Msg:");
 buf.append(msgRxCnt);
 buf.append(" messages\n\tReceived:");



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r407687 - /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java

2006-05-18 Thread fhanik
Author: fhanik
Date: Thu May 18 19:08:54 2006
New Revision: 407687

URL: http://svn.apache.org/viewvc?rev=407687&view=rev
Log:
fixed bug

Modified:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java?rev=407687&r1=407686&r2=407687&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
 Thu May 18 19:08:54 2006
@@ -43,7 +43,7 @@
 double mbRx = 0;
 double timeTx = 0;
 AtomicLong msgTxCnt = new AtomicLong(1);
-AtomicLong msgRxCnt = new AtomicLong(1);
+AtomicLong msgRxCnt = new AtomicLong(0);
 AtomicLong msgTxErr = new AtomicLong(0);
 int interval = 1;
 AtomicInteger access = new AtomicInteger(0);
@@ -83,8 +83,10 @@
 public void messageReceived(ChannelMessage msg) {
 long bytes = 
XByteBuffer.getDataPackageLength(((ChannelData)msg).getDataPackageLength());
 mbRx += ((double)bytes)/(1024d*1024d);
-if ( msgRxCnt.get() % interval == 0 ) report(timeTx);
 msgRxCnt.addAndGet(1);
+if ( msgRxCnt.get() % interval == 0 ) report(timeTx);
+super.messageReceived(msg);
+
 }
 
 public void report(double timeTx) {



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



re: context folders and Delete on tomcat root; funny [Bug 39594]

2006-05-18 Thread Thomas Whitmore
Hi people, Pedro,

This is both a sad & funny true story. 

http://issues.apache.org/bugzilla/show_bug.cgi?id=39594

> We were trying to make our servlets use relative  path so that our deplayment 
> would 
> be faster. In the  process we try putting $Catalina_home in the path for the 
> base doc
> [etc]

> After this we noticed a folder called $CATALINA_HOME in the root dir for 
> tomacat, we 
> never created such a  dir so we whent ahead and deleted it. For our surprise, 
> that 
> folder was linked to the root folder for tomcat  and deleted everything. 

---

As I said, this was both humorous and tragic. Humorous because Tomcat and it's 
folders thoughtfully nuked Pedro's root - I can just see the expression on his 
face and mouth hanging slightly open. Gotcha!

Tragic, because Remy is going to mark this issue as 'RESOLVED WILL-NOT-FIX'. 
No, Pedro, this is intended behaviour. It's better than the Deployer in 5.0 
because I wrote it. Anyone can write a different deployer implementation. If 
you don't like it, you can use a different platform. Anyone can use a different 
platform. Have a nice day.

??? what ??!

---

Sorry about the humour Pedro -- I've had similar happen to me and can only 
laugh because I know what a ghastly suprise this is.

What really makes this funny, is that all this amusement comes from Remy 
rewriting the Context/ Deployer implementation in 5.5 and coming over all 
defensive about its defects... marking all reported issues in this area as 
RESOLVED (they're not) WILL-NOT-FIX (he won't).  Well, at least the second part 
is true.


Go on, prove me right.


Cheers,
Thomas

PS:  Full and absolute good faith - any pointed comments have come *after* 
seeing defects & bug reports from others systematically being ignored & blown 
off.  If people come to me with a problem in my code, I fix it first, ask about 
future/ related requirements, check against design cases and stub these for 
future coverage... sometimes 2 - 5 years ahead.  Sure beats telling people to 
f** off.

svn commit: r407689 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes: group/interceptors/TcpFailureDetector.java io/ChannelData.java

2006-05-18 Thread fhanik
Author: fhanik
Date: Thu May 18 19:39:45 2006
New Revision: 407689

URL: http://svn.apache.org/viewvc?rev=407689&view=rev
Log:
Fixed data extraction bug

Modified:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java?rev=407689&r1=407688&r2=407689&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
 Thu May 18 19:39:45 2006
@@ -170,10 +170,10 @@
 
 //check suspect members if they are still alive,
 //if not, simply issue the memberDisappeared message
-
-for (Iterator i = suspect.keySet().iterator(); i.hasNext(); ) {
-MemberImpl m = (MemberImpl)i.next();
-if (!memberAlive(m)) {
+MemberImpl[] keys = (MemberImpl[])suspect.keySet().toArray(new 
MemberImpl[suspect.size()]);
+for (int i=0; ihttp://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java?rev=407689&r1=407688&r2=407689&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java
 Thu May 18 19:39:45 2006
@@ -235,8 +235,9 @@
 //data.message = new XByteBuffer(new byte[xsize],false);
 data.message = BufferPool.getBufferPool().getBuffer(xsize,false);
 offset += 4; //message length
-
System.arraycopy(b,offset,data.message.getBytesDirect(),0,data.message.getLength());
-offset += data.message.getLength(); //message data
+System.arraycopy(b,offset,data.message.getBytesDirect(),0,xsize);
+data.message.append(b,offset,xsize);
+offset += xsize; //message data
 return data;
 }
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r407690 - /tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/LoadTest.java

2006-05-18 Thread fhanik
Author: fhanik
Date: Thu May 18 19:52:31 2006
New Revision: 407690

URL: http://svn.apache.org/viewvc?rev=407690&view=rev
Log:
minor adjustment

Modified:

tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/LoadTest.java

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/LoadTest.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/LoadTest.java?rev=407690&r1=407689&r2=407690&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/LoadTest.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/LoadTest.java
 Thu May 18 19:52:31 2006
@@ -136,7 +136,7 @@
 }
 } else {
 try {
-msg.setMsgNr((int)++total);
+//msg.setMsgNr((int)++total);
 counter++;
 if (debug) {
 printArray(msg.getMessage());
@@ -276,24 +276,9 @@
 
 }
 
-public LoadMessage(int nr) {
-this.nr = nr;
-}
-
-public int getMsgNr() {
-return XByteBuffer.toInt(getMessage(),0);
-}
-
-public void setMsgNr(int nr) {
-XByteBuffer.toBytes(nr,getMessage(),0);
-}
-
 public byte[] getMessage() {
 if ( message == null ) {
-byte[] data = new byte[size+4];
-XByteBuffer.toBytes(nr,data,0);
-System.arraycopy(outdata, 0, data, 4, outdata.length);
-this.message = data;
+message = outdata;
 }
 return message;
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 39600] - A lot of connection in TIME_WAIT state on Tomcat clients

2006-05-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39600





--- Additional Comments From [EMAIL PROTECTED]  2006-05-19 04:35 ---
TIME_WAIT state isn't such a big problem on Linux anymore (in like last 4
years+).  The only memory overhead in the kernel is specialized timewait
structure not a full network socket.  cat /proc/slabinfo  | grep tw_sock

Some would argue that if the shutdownInput()/shutdownOutput() cycles of the
network socket can be controlled to leave the client holding the TIME_WAIT that
is better than leaving the server with it.  As under normal load you spread this
facet of TCP networking our across many hosts (when you give it the client).

A TCP closing handshake does not have to be a 4 way event, this is just the
ideal theoretial the RFC states (imagine both ends closing at the same time and
the initial FINs crossing in flight).  In anycase this is a kernel level issue
not a TC issue, as it does not matter how badly any application configures a
socket, it is still the kernels job to produce correct TCP on the wire no matter
what.


May I ask what configuration you are running with TC HTTP Server socket ?

* Java Sockets (the default on 8080)
* APJ1x Connector (the default on 8007)
* ApachePortableRuntime (genrally requires a bit of setting up to get going)


Now time to pin the tail on the donkey:

If you are using Java Sockets directly to clients, from SVN Revision: 407700 at
./tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java:707

< try { if (socket != null) socket.close (); }

> try { if (socket != null) { socket.shutdownOutput();
>socket.close (); } }

Might alter that behaviour.


It is unclear to me where you think there is a problem.  Your test requests I
use localhost (127.0.0.1) to test, but this makes me both the client and the
server, so if any TIME_WAIT is going to happen my host is definatly going to 
get it.

The only cause for concern here would be if you are saying that when you compare
Apache-Httpd, Squid and Tomcat under high load characteristics you find that
Apache-Httpd and Squid have few/no TIME_WAIT sockets at either the client or
server ends of the HTTP connection but with Tomcat you are getting many (at the
client end you state) then that would be something to investigate.  As they
should perform the same and I would guess it is a socket shutdown issue at the
root of it.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r407715 [2/2] - in /tomcat/sandbox: ./ java/org/apache/coyote/adapters/ java/org/apache/coyote/http11/ java/org/apache/coyote/http11/apr/ java/org/apache/coyote/standalone/ java/org/apache

2006-05-18 Thread costin
Added: tomcat/sandbox/java/org/apache/tomcat/util/loader/Repository.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/java/org/apache/tomcat/util/loader/Repository.java?rev=407715&view=auto
==
--- tomcat/sandbox/java/org/apache/tomcat/util/loader/Repository.java (added)
+++ tomcat/sandbox/java/org/apache/tomcat/util/loader/Repository.java Thu May 
18 22:18:18 2006
@@ -0,0 +1,480 @@
+/*
+ * Copyright 1999,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.tomcat.util.loader;
+
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Vector;
+
+
+/**
+ * A group of modules and libraries. 
+ * 
+ * Modules can have one or more jars and class dirs. Classloaders are created 
+ * from modules when the module is started are be disposed when the module is 
stopped.
+ * 
+ * The module will delegate to the associated repository in addition to the 
+ * normal delegation rules. The repository will search on all sibling modules.
+ * This mechanism is defined in the MLetClassLoader and is also used by JBoss 
and
+ * few other servers. 
+ * 
+ * TODO: explain more ( or point to the right jboss/mlet pages )
+ * TODO: explain how this can be used for webapps to support better 
partitioning 
+ *
+ * @author Costin Manolache
+ */
+public class Repository {
+   
+private static final boolean 
DEBUG=Loader.getProperty("loader.debug.Repository") != null;
+
+// Allows the (experimental) use of jar indexes
+// Right now ( for small set of jars, incomplete build ) it's a tiny 3.5 
-> 3.4 sec dif.
+private static final boolean 
USE_IDX=Loader.getProperty("loader.Repository.noIndex") == null;
+
+private Vector loaders=new Vector();
+private String name;
+private Vector grpModules=new Vector();
+private transient Loader loader;
+
+private transient RepositoryClassLoader groupClassLoader;
+private Hashtable prefixes=new Hashtable();
+
+// For delegation
+private ClassLoader parentClassLoader;
+private Repository parent;
+
+
+private Repository() {
+}
+
+public Repository(Loader loader) {
+if( loader== null ) throw new NullPointerException();
+this.loader=loader;
+}
+
+public Loader getLoader() {
+return loader;
+}
+
+void addModule(  Module mod ) {
+mod.setRepository( this );
+
+grpModules.addElement(mod);
+if( loader.listener!=null ) {
+loader.listener.moduleAdd(mod);
+}
+
+if( parentClassLoader != null ) 
+mod.setParentClassLoader( parentClassLoader );
+
+if(! mod.isStarted()) {
+mod.start();
+//log("started " + mod);
+} else {
+//log("already started " + mod);
+}
+
+try {
+if( USE_IDX ) {
+processJarIndex(mod);
+// TODO: if we are in the initial starting, write cache only 
once
+// TODO: write it only if there is a change in the timestamp
+writeCacheIdx();
+}
+} catch (Exception e) {
+// TODO Auto-generated catch block
+e.printStackTrace();
+}
+
+}
+
+public void newModule( String path ) {
+Module m=new Module();
+m.setPath( path );
+addModule( m );
+}
+
+public Enumeration getModules() {
+return grpModules.elements();
+}
+
+/** Reload any module that is modified
+ */
+public void checkReload() {
+try {
+Enumeration mE=grpModules.elements();
+while( mE.hasMoreElements() ) {
+Module m=(Module)mE.nextElement();
+boolean modif=m.modified();
+log("Modified " + m + " " + modif);
+
+if( modif ) {
+m.stop();
+m.start();
+}
+}
+} catch( Throwable t ) {
+t.printStackTrace();
+}
+}
+
+/** Verify if any module is modified. This is a deep search, including 
dirs.
+ *  Expensive operation.
+ *  
+ * @return
+ */
+public boolean isModified() {
+try {
+  

svn commit: r407717 - in /tomcat/sandbox: Tomcat5.5.launch Tomcat6Sandbox.launch

2006-05-18 Thread costin
Author: costin
Date: Thu May 18 22:25:26 2006
New Revision: 407717

URL: http://svn.apache.org/viewvc?rev=407717&view=rev
Log:
Switched the launcher - will launch in tomcat6/build, with sandbox in classpath
before tomcat6.


Added:
tomcat/sandbox/Tomcat6Sandbox.launch
Removed:
tomcat/sandbox/Tomcat5.5.launch

Added: tomcat/sandbox/Tomcat6Sandbox.launch
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/Tomcat6Sandbox.launch?rev=407717&view=auto
==
--- tomcat/sandbox/Tomcat6Sandbox.launch (added)
+++ tomcat/sandbox/Tomcat6Sandbox.launch Thu May 18 22:25:26 2006
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: context folders and Delete on tomcat root; funny [Bug 39594]

2006-05-18 Thread Bill Barker
I know that this is just going to result in Remy telling me to Not Feed The 
Trolls again, but hey, the list has been a bit slow of late :).

>"Thomas Whitmore" <[EMAIL PROTECTED]> wrote in message 
>news:[EMAIL PROTECTED]
>Hi people, Pedro,
>
>This is both a sad & funny true story.
>
>http://issues.apache.org/bugzilla/show_bug.cgi?id=39594
>
>> We were trying to make our servlets use relative  path so that our 
>> deplayment would
>> be faster. In the  process we try putting $Catalina_home in the path for 
>> the base doc
>> [etc]
>
>> After this we noticed a folder called $CATALINA_HOME in the root dir for 
>> tomacat, we
>> never created such a  dir so we whent ahead and deleted it. For our 
>> surprise, that
>> folder was linked to the root folder for tomcat  and deleted everything.
>
>---
>
>As I said, this was both humorous and tragic. Humorous because Tomcat and 
>it's folders >thoughtfully nuked Pedro's root - I can just see the 
>expression on his face and mouth >hanging slightly open. Gotcha!
>
>Tragic, because Remy is going to mark this issue as 'RESOLVED 
>WILL-NOT-FIX'. No, >Pedro, this is intended behaviour. It's better than the 
>Deployer in 5.0 because I wrote it. >Anyone can write a different deployer 
>implementation. If you don't like it, you can use a >different platform. 
>Anyone can use a different platform. Have a nice day.
>
>??? what ??!
>
>---
>
>Sorry about the humour Pedro -- I've had similar happen to me and can only 
>laugh >because I know what a ghastly suprise this is.
>
>What really makes this funny, is that all this amusement comes from Remy 
>rewriting the >Context/ Deployer implementation in 5.5 and coming over all 
>defensive about its defects... >marking all reported issues in this area as 
>RESOLVED (they're not) WILL-NOT-FIX (he >won't).  Well, at least the second 
>part is true.
>

Probably.  Remy is currently pretty much the only Tomcat developer currently 
interested in the Deployer (*I'm* certainly not interested :).

>
>Go on, prove me right.
>

And, here you go and totally misunderstand the nature of Open Source 
Development.  It is not up to the Tomcat developers to prove you right, 
since you got what you paid for :).  If you want the Deployer "fixed", then 
start submitting quality patches to it.  Until then, quit writing checks 
against other peoples time (whom, I might again add, you are *not* paying 
:).

>
>Cheers,
>Thomas
>
>PS:  Full and absolute good faith - any pointed comments have come *after* 
>seeing >defects & bug reports from others systematically being ignored & 
>blown off.  If people >come to me with a problem in my code, I fix it 
>first, ask about future/ related requirements, >check against design cases 
>and stub these for future coverage... sometimes 2 - 5 years >ahead.  Sure 
>beats telling people to f** off.

Remy may lack some people skills, but hey, he's French ;-).




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]