Re: New EL - Split Off from Tomcat 6

2006-02-27 Thread Remy Maucherat

Jacob Hookom wrote:
I would like to suggest splitting EL off as a separate library from 
Tomcat.  The EL-API is expected to rev in it's own specification in the 
future.  It is not have any dependencies on the Servlet API or JSP API 
and can be utilized in the same fashion as the commons-el project.


The trend a little earlier was to have all the code for Tomcat 6 in one 
repository, to make it easier to work with. There was no final decision, 
but for sure I would like to not reproduce the commons-logging situation 
(with a fully independent project).


Rémy

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



New EL - Split Off from Tomcat 6

2006-02-27 Thread Jacob Hookom
I would like to suggest splitting EL off as a separate library from 
Tomcat.  The EL-API is expected to rev in it's own specification in the 
future.  It is not have any dependencies on the Servlet API or JSP API 
and can be utilized in the same fashion as the commons-el project.


--
Jacob Hookom  -  Minneapolis

JSF-EG, JSF-RI, EL, Facelets


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



svn commit: r381498 - in /tomcat/container/tc5.5.x/modules/storeconfig-ha/src/share/org/apache/catalina/storeconfig: CatalinaClusterSF.java StoreRegistry.java

2006-02-27 Thread fhanik
Author: fhanik
Date: Mon Feb 27 15:51:52 2006
New Revision: 381498

URL: http://svn.apache.org/viewcvs?rev=381498&view=rev
Log:
Fixed imports for name change

Modified:

tomcat/container/tc5.5.x/modules/storeconfig-ha/src/share/org/apache/catalina/storeconfig/CatalinaClusterSF.java

tomcat/container/tc5.5.x/modules/storeconfig-ha/src/share/org/apache/catalina/storeconfig/StoreRegistry.java

Modified: 
tomcat/container/tc5.5.x/modules/storeconfig-ha/src/share/org/apache/catalina/storeconfig/CatalinaClusterSF.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/storeconfig-ha/src/share/org/apache/catalina/storeconfig/CatalinaClusterSF.java?rev=381498&r1=381497&r2=381498&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/storeconfig-ha/src/share/org/apache/catalina/storeconfig/CatalinaClusterSF.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/storeconfig-ha/src/share/org/apache/catalina/storeconfig/CatalinaClusterSF.java
 Mon Feb 27 15:51:52 2006
@@ -22,15 +22,14 @@
 import org.apache.catalina.Valve;
 import org.apache.catalina.cluster.CatalinaCluster;
 import org.apache.catalina.cluster.ClusterDeployer;
-import org.apache.catalina.groups.ChannelReceiver;
-import org.apache.catalina.groups.ChannelSender;
-import org.apache.catalina.groups.MembershipService;
-import org.apache.catalina.groups.MessageListener;
+import org.apache.catalina.tribes.ChannelReceiver;
+import org.apache.catalina.tribes.ChannelSender;
+import org.apache.catalina.tribes.MembershipService;
+import org.apache.catalina.tribes.MessageListener;
 import org.apache.catalina.cluster.tcp.SimpleTcpCluster;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.catalina.groups.ManagedChannel;
-import org.apache.catalina.groups.ChannelInterceptor;
+import org.apache.catalina.tribes.ManagedChannel;
 import java.util.Iterator;
 
 /**

Modified: 
tomcat/container/tc5.5.x/modules/storeconfig-ha/src/share/org/apache/catalina/storeconfig/StoreRegistry.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/storeconfig-ha/src/share/org/apache/catalina/storeconfig/StoreRegistry.java?rev=381498&r1=381497&r2=381498&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/storeconfig-ha/src/share/org/apache/catalina/storeconfig/StoreRegistry.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/storeconfig-ha/src/share/org/apache/catalina/storeconfig/StoreRegistry.java
 Mon Feb 27 15:51:52 2006
@@ -27,10 +27,10 @@
 import org.apache.catalina.Valve;
 import org.apache.catalina.cluster.CatalinaCluster;
 import org.apache.catalina.cluster.ClusterDeployer;
-import org.apache.catalina.groups.ChannelReceiver;
-import org.apache.catalina.groups.ChannelSender;
-import org.apache.catalina.groups.MembershipService;
-import org.apache.catalina.groups.MessageListener;
+import org.apache.catalina.tribes.ChannelReceiver;
+import org.apache.catalina.tribes.ChannelSender;
+import org.apache.catalina.tribes.MembershipService;
+import org.apache.catalina.tribes.MessageListener;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 



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



svn commit: r381497 - /tomcat/container/tc5.5.x/modules/build.xml

2006-02-27 Thread fhanik
Author: fhanik
Date: Mon Feb 27 15:48:43 2006
New Revision: 381497

URL: http://svn.apache.org/viewcvs?rev=381497&view=rev
Log:
Fixed so that the old config gets included if we don't want to use the new one

Modified:
tomcat/container/tc5.5.x/modules/build.xml

Modified: tomcat/container/tc5.5.x/modules/build.xml
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/build.xml?rev=381497&r1=381496&r2=381497&view=diff
==
--- tomcat/container/tc5.5.x/modules/build.xml (original)
+++ tomcat/container/tc5.5.x/modules/build.xml Mon Feb 27 15:48:43 2006
@@ -48,7 +48,7 @@
 
   
   
-  
+  
 
 
   



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



svn commit: r381491 - in /tomcat/container/tc5.5.x/modules: groupcom/build.xml ha/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java

2006-02-27 Thread fhanik
Author: fhanik
Date: Mon Feb 27 15:40:50 2006
New Revision: 381491

URL: http://svn.apache.org/viewcvs?rev=381491&view=rev
Log:
Fixed compilation issues and renamed the jar

Modified:
tomcat/container/tc5.5.x/modules/groupcom/build.xml

tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java

Modified: tomcat/container/tc5.5.x/modules/groupcom/build.xml
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/build.xml?rev=381491&r1=381490&r2=381491&view=diff
==
--- tomcat/container/tc5.5.x/modules/groupcom/build.xml (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/build.xml Mon Feb 27 15:40:50 2006
@@ -84,18 +84,18 @@
>
 
 
-
-
-
-
-
-
+
+
+
+
+
+

 
 
@@ -130,16 +130,16 @@
   
   
 
-
-   
+   


 
   
 
   
- 
+ 
   
   
   

Modified: 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java?rev=381491&r1=381490&r2=381491&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java
 Mon Feb 27 15:40:50 2006
@@ -777,11 +777,11 @@
 msg.setAddress(getLocalMember());
 if (dest != null) {
 if (!getLocalMember().equals(dest)) {
-channel.send(new Member[] {dest}, msg, 0);
+channel.send(new Member[] {dest}, msg);
 } else
 log.error("Unable to send message to local member " + msg);
 } else {
-channel.send(null,msg, 0);
+channel.send(null,msg);
 }
 } catch (Exception x) {
 log.error("Unable to send message through cluster sender.", x);



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



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

2006-02-27 Thread fhanik
Author: fhanik
Date: Mon Feb 27 15:34:46 2006
New Revision: 381488

URL: http://svn.apache.org/viewcvs?rev=381488&view=rev
Log:
Fixed so that the pause is not calculated in the send time

Modified:

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/demos/LoadTest.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/demos/LoadTest.java?rev=381488&r1=381487&r2=381488&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/demos/LoadTest.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/demos/LoadTest.java
 Mon Feb 27 15:34:46 2006
@@ -102,11 +102,11 @@
 printArray(msg.getMessage());
 }
 channel.send(null, msg);
+sendTime += (System.currentTimeMillis() - start);
 if ( pause > 0 ) {
 if ( debug) System.out.println("Pausing sender for 
"+pause+" ms.");
 Thread.sleep(pause);
 }
-sendTime += (System.currentTimeMillis() - start);
 } catch (ChannelException x) {
 log.error("Unable to send message.");
 Member[] faulty = x.getFaultyMembers();



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



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

2006-02-27 Thread fhanik
Author: fhanik
Date: Mon Feb 27 15:21:09 2006
New Revision: 381483

URL: http://svn.apache.org/viewcvs?rev=381483&view=rev
Log:
Groupchannel must call accept before it calls messageReceived

Modified:

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/GroupChannel.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/GroupChannel.java?rev=381483&r1=381482&r2=381483&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
 Mon Feb 27 15:21:09 2006
@@ -122,7 +122,8 @@
 } else {
 fwd = XByteBuffer.deserialize(msg.getMessage());
 }
-if ( channelListener != null ) 
channelListener.messageReceived(fwd,msg.getAddress());
+if ( channelListener != null && 
channelListener.accept(fwd,msg.getAddress())) 
+channelListener.messageReceived(fwd,msg.getAddress());
 }catch ( Exception x ) {
 log.error("Unable to deserialize channel message.",x);
 }



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



svn commit: r381480 - /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/TcpReplicationThread.java

2006-02-27 Thread fhanik
Author: fhanik
Date: Mon Feb 27 15:09:12 2006
New Revision: 381480

URL: http://svn.apache.org/viewcvs?rev=381480&view=rev
Log:
removed debug statement

Modified:

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/TcpReplicationThread.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/TcpReplicationThread.java?rev=381480&r1=381479&r2=381480&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/TcpReplicationThread.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/TcpReplicationThread.java
 Mon Feb 27 15:09:12 2006
@@ -54,10 +54,8 @@
 public synchronized void run()
 {
 if ( (getOptions() & OPTION_DIRECT_BUFFER) == OPTION_DIRECT_BUFFER ) {
-System.out.println("Creating a direct buffer");
 buffer = 
ByteBuffer.allocateDirect(ReplicationListener.BUFFER_RECEIVE_SIZE);
 }else {
-System.out.println("Creating a regular buffer");
 buffer = ByteBuffer.allocate 
(ReplicationListener.BUFFER_RECEIVE_SIZE);
 }
 while (doRun) {



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



svn commit: r381479 - /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/TcpReplicationThread.java

2006-02-27 Thread fhanik
Author: fhanik
Date: Mon Feb 27 15:08:03 2006
New Revision: 381479

URL: http://svn.apache.org/viewcvs?rev=381479&view=rev
Log:
removed not needed flag

Modified:

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/TcpReplicationThread.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/TcpReplicationThread.java?rev=381479&r1=381478&r2=381479&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/TcpReplicationThread.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/TcpReplicationThread.java
 Mon Feb 27 15:08:03 2006
@@ -131,7 +131,6 @@
 protected void drainChannel (SelectionKey key)
 throws Exception
 {
-boolean packetReceived=false;
 SocketChannel channel = (SocketChannel) key.channel();
 int count;
 buffer.clear();// make buffer empty



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



svn commit: r381477 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes: demos/LoadTest.java io/ObjectReader.java io/XByteBuffer.java tcp/ReplicationListener.java tcp/

2006-02-27 Thread fhanik
Author: fhanik
Date: Mon Feb 27 15:01:57 2006
New Revision: 381477

URL: http://svn.apache.org/viewcvs?rev=381477&view=rev
Log:
Added in the ability to use direct byte buffers on the ReplicationListener, 
didn't notice much difference

Modified:

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

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ObjectReader.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/tcp/ReplicationListener.java

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/demos/LoadTest.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/demos/LoadTest.java?rev=381477&r1=381476&r2=381477&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/demos/LoadTest.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/demos/LoadTest.java
 Mon Feb 27 15:01:57 2006
@@ -383,6 +383,7 @@
 channel.setChannelListener(test);
 channel.setMembershipListener(test);
 channel.start(channel.DEFAULT);
+Runtime.getRuntime().addShutdownHook(new Shutdown(channel));
 while ( threads > 1 ) {
 Thread t = new Thread(test);
 t.setDaemon(true);
@@ -394,6 +395,24 @@
 
 System.out.println("System test complete, sleeping to let threads 
finish.");
 Thread.sleep(60*1000*60);
-}
+} 
+
+public static class Shutdown extends Thread {
+ManagedChannel channel = null;
+public Shutdown(ManagedChannel channel) {
+this.channel = channel;
+}
+
+public void run() {
+System.out.println("Shutting down...");
+try {
+channel.stop(channel.DEFAULT);
+
+}catch ( Exception x ) {
+x.printStackTrace();
+}
+System.out.println("Channel stopped.");
+}
+}
 
 }

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ObjectReader.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ObjectReader.java?rev=381477&r1=381476&r2=381477&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ObjectReader.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ObjectReader.java
 Mon Feb 27 15:01:57 2006
@@ -80,6 +80,13 @@
  * @return number of messages that sended to callback
  * @throws java.io.IOException
  */
+public int append(ByteBuffer data, int len, boolean count) throws 
java.io.IOException {
+   buffer.append(data,len);
+   int pkgCnt = -1;
+   if ( count ) pkgCnt = buffer.countPackages();
+   return pkgCnt;
+   }
+
  public int append(byte[] data,int off,int len, boolean count) throws 
java.io.IOException {
 buffer.append(data,off,len);
 int pkgCnt = -1;

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java?rev=381477&r1=381476&r2=381477&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
 Mon Feb 27 15:01:57 2006
@@ -29,6 +29,7 @@
 import java.io.Serializable;
 import org.apache.catalina.tribes.Member;
 import java.util.UUID;
+import java.nio.ByteBuffer;
 
 /**
  * The XByteBuffer provides a dual functionality.
@@ -66,12 +67,12 @@
 /**
  * Default size on the initial byte buffer
  */
-static final int DEF_SIZE = 1024;
+public static final int DEF_SIZE = 2048;
  
 /**
  * Default size to extend the buffer with
  */
-static final int DEF_EXT  = 1024;
+public static final int DEF_EXT  = 1024;
 
 /**
  * Variable to hold the data
@@ -122,6 +123,27 @@
  * @param len - the number of bytes to append.
  * @return true if the data was appended correctly. Returns false if the 
package is incorrect, ie missing header or something, or the length of data is 0

DO NOT REPLY [Bug 38416] - Change Jakarta Tomcat Connector - Apache HowTo page

2006-02-27 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=38416


[EMAIL PROTECTED] changed:

   What|Removed |Added

Summary|php |Change Jakarta Tomcat
   ||Connector - Apache HowTo
   ||page




--- Additional Comments From [EMAIL PROTECTED]  2006-02-27 22:57 ---
Undid more munging by [EMAIL PROTECTED] (another munged summary)

-- 
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 36138] - mod_jk load balance algorithm that accounts for current worker load

2006-02-27 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=36138


[EMAIL PROTECTED] changed:

   What|Removed |Added

Summary|mod_jk  |mod_jk load balance
   ||algorithm that accounts for
   ||current worker load




--- Additional Comments From [EMAIL PROTECTED]  2006-02-27 22:50 ---
fixed summary back - someone ([EMAIL PROTECTED]) accidentally munged 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: r381458 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes: demos/LoadTest.java io/ClusterData.java io/ObjectReader.java tcp/TcpReplicationThread.java

2006-02-27 Thread fhanik
Author: fhanik
Date: Mon Feb 27 13:42:34 2006
New Revision: 381458

URL: http://svn.apache.org/viewcvs?rev=381458&view=rev
Log:
improved speed. countPackages doesn't have to be counted each time we append 
data, as this is a very frequent call

Modified:

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

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

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

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/demos/LoadTest.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/demos/LoadTest.java?rev=381458&r1=381457&r2=381458&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/demos/LoadTest.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/demos/LoadTest.java
 Mon Feb 27 13:42:34 2006
@@ -50,12 +50,13 @@
 
 static int messageSize = 0;
 
-public static int messagesSent = 0;
+public static long messagesSent = 0;
 public static long messageSendTime = 0;
 
-public static synchronized void addSendStats(int count, long time) {
+public static synchronized long addSendStats(long count, long time) {
 messagesSent+=count;
 messageSendTime+=time;
+return 0l;
 }
 
 
@@ -79,7 +80,7 @@
 
 public void run() {
 
-int counter = 0;
+long counter = 0;
 LoadMessage msg = new LoadMessage();
 int messageSize = LoadTest.messageSize;
 long sendTime = 0;
@@ -95,7 +96,7 @@
 }
 } else {
 try {
-msg.setMsgNr(++counter);
+msg.setMsgNr((int)++counter);
 long start = System.currentTimeMillis();
 if (debug) {
 printArray(msg.getMessage());
@@ -116,9 +117,11 @@
 }
 if ( (counter % statsInterval) == 0 && (counter > 0)) {
 //add to the global counter
-addSendStats(counter,sendTime);
+//counter = sendTime = addSendStats(counter,sendTime);
 //print from the global counter
-printSendStats(LoadTest.messagesSent, 
LoadTest.messageSize, LoadTest.messageSendTime);
+//printSendStats(LoadTest.messagesSent, 
LoadTest.messageSize, LoadTest.messageSendTime);
+printSendStats(counter, LoadTest.messageSize, sendTime);
+
 }
 
 }
@@ -128,7 +131,7 @@
 }
 }
 
-private void printSendStats(int counter, int messageSize, long sendTime) {
+private void printSendStats(long counter, int messageSize, long sendTime) {
 float cnt = (float)counter;
 float size = (float)messageSize;
 float time = (float)sendTime / 1000;

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ClusterData.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ClusterData.java?rev=381458&r1=381457&r2=381458&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ClusterData.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ClusterData.java
 Mon Feb 27 13:42:34 2006
@@ -25,6 +25,7 @@
 import java.io.ByteArrayInputStream;
 import java.io.ObjectInputStream;
 import java.util.UUID;
+import java.util.Arrays;
 
 /**
  * The cluster data class is used to transport around the byte array from
@@ -202,6 +203,25 @@
 System.arraycopy(b,offset,data.message,0,data.message.length);
 offset += data.message.length; //message data
 return data;
+}
+
+public static void main(String[] args) throws Exception {
+ClusterData data1 = new ClusterData();
+data1.setAddress(new 
McastMember("domain","127.0.0.1",1000,System.currentTimeMillis()));
+data1.setMessage(new byte[1024]);
+
+byte[] b = data1.getDataPackage();
+
+ClusterData data2 = ClusterData.getDataFromPackage(b);
+
+if ( !(data1.getAddress().equals(data2.getAddress())) ||
+ !(Arrays.equals(data1.getMessage(),data2.getMessage())) ||
+ !(Arrays.equals(data1.getUniqueId(),data2.getUniqueId())) ||
+ 

svn commit: r381446 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes: demos/ group/ io/ mcast/ tcp/

2006-02-27 Thread fhanik
Author: fhanik
Date: Mon Feb 27 13:07:39 2006
New Revision: 381446

URL: http://svn.apache.org/viewcvs?rev=381446&view=rev
Log:
Optimized all serialization of all messaging. ClusterData is now transferred as 
a byte array directly.


Modified:

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

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/io/ClusterData.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/mcast/McastMember.java

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

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/demos/LoadTest.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/demos/LoadTest.java?rev=381446&r1=381445&r2=381446&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/demos/LoadTest.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/demos/LoadTest.java
 Mon Feb 27 13:07:39 2006
@@ -50,6 +50,13 @@
 
 static int messageSize = 0;
 
+public static int messagesSent = 0;
+public static long messageSendTime = 0;
+
+public static synchronized void addSendStats(int count, long time) {
+messagesSent+=count;
+messageSendTime+=time;
+}
 
 
 public LoadTest(ManagedChannel channel, 
@@ -108,7 +115,10 @@
 }
 }
 if ( (counter % statsInterval) == 0 && (counter > 0)) {
-printSendStats(counter, messageSize, sendTime);
+//add to the global counter
+addSendStats(counter,sendTime);
+//print from the global counter
+printSendStats(LoadTest.messagesSent, 
LoadTest.messageSize, LoadTest.messageSendTime);
 }
 
 }
@@ -122,7 +132,7 @@
 float cnt = (float)counter;
 float size = (float)messageSize;
 float time = (float)sendTime / 1000;
-log.info("SEND STATS*"+
+log.info("SEND STATS-"+Thread.currentThread().getName()+"*"+
  "\n\tMessage count:"+counter+
  "\n\tTotal bytes  :"+(long)(size*cnt)+
  "\n\tTotal seconds:"+(time)+
@@ -179,9 +189,9 @@
 if ( (messagesReceived%statsInterval)==0 || 
(messagesReceived==msgCount)) {
 float bytes = 
(float)(((LoadMessage)msg).getMessage().length*messagesReceived);
 float seconds = ((float)(System.currentTimeMillis()-receiveStart)) 
/ 1000f;
-log.info("RECEIVE STATS*"+
+log.info("RECEIVE 
STATS-"+Thread.currentThread().getName()+"*"+
  "\n\tMessage count :"+(long)messagesReceived+
- "\n\tTotal bytes   :"+bytes+
+ "\n\tTotal bytes   :"+(long)bytes+
  "\n\tTime since 1st:"+seconds+" seconds"+
  "\n\tBytes/second  :"+(bytes/seconds)+
  "\n\tMBytes/second :"+(bytes/seconds/1024f/1024f));
@@ -237,7 +247,7 @@
 
 public byte[] getMessage() {
 byte[] data = new byte[size+4];
-System.arraycopy(XByteBuffer.toBytes(msgNr),0,data,0,4);
+XByteBuffer.toBytes(msgNr,data,0);
 if ( message != null ) {
 System.arraycopy(message, 0, data, 4, message.length);
 }else {
@@ -271,6 +281,7 @@
"[-gzip]  \n\t\t"+
"[-pause nrofsecondstopausebetweensends]  \n\t\t"+
"[-sender pooled|fastasyncqueue]  \n\t\t"+
+   "[-threads numberofsenderthreads]  \n\t\t"+
"[-break (halts execution on exception)]\n"+
"Example:\n\t"+
"java LoadTest -port 4004\n\t"+
@@ -291,6 +302,7 @@
 int count = 100;
 int stats = 1;
 boolean breakOnEx = false;
+int threads = 1;
 String sender = "pooled";
 if ( args.length == 0 ) {
 args = new String[] {"-help"};
@@ -302,6 +314,8 @@
 sender = args[++i];
 } else if ("-port".equals(args[i])) {
 port = Integer.parseInt(args[++i]);
+} else if ("-threads".equals(args[i])) {
+t

Re: FW: My Query

2006-02-27 Thread Mark Thomas
This question belongs on the users list, not the dev list. See
http://tomcat.apache.org/lists.html for details.

Mark
[EMAIL PROTECTED]


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



DO NOT REPLY [Bug 37933] - Bugs in Tomcat

2006-02-27 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=37933


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Additional Comments From [EMAIL PROTECTED]  2006-02-27 20:39 ---
*** Bug 38797 has been marked as a duplicate of this bug. ***

-- 
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 38797] - 5.5.12 and 5.5.15 emit different code on

2006-02-27 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=38797


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE




--- Additional Comments From [EMAIL PROTECTED]  2006-02-27 20:39 ---


*** This bug has been marked as a duplicate of 37933 ***

-- 
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 13723] - Tom Cat does not start

2006-02-27 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=13723


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2006-02-27 19:31 ---
Michael, your bug is different, please open a new Bugzilla issue for it.  Yours
has to do with the AprEndpoint / APR connector, brand new to Tomcat 5.5, and
does not have to do with the JIT/HotSpot/JDK 1.2.2 issues encountered earlier.

-- 
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: r381403 - /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/DataSender.java

2006-02-27 Thread fhanik
Author: fhanik
Date: Mon Feb 27 10:22:16 2006
New Revision: 381403

URL: http://svn.apache.org/viewcvs?rev=381403&view=rev
Log:
Initial cleanup, getting ready to create a NIO data sender for faster 
throughput.

Modified:

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/DataSender.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/DataSender.java?rev=381403&r1=381402&r2=381403&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/DataSender.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/DataSender.java
 Mon Feb 27 10:22:16 2006
@@ -34,25 +34,23 @@
  * @author Peter Rossbach
  * @author Filip Hanik
  * @version $Revision: 377484 $ $Date: 2006-02-13 15:00:05 -0600 (Mon, 13 Feb 
2006) $
- * @since 5.5.7
+ * @since 5.5.16
  */
 public class DataSender implements IDataSender {
 
-private static org.apache.commons.logging.Log log = 
org.apache.commons.logging.LogFactory
-.getLog(DataSender.class);
+private static org.apache.commons.logging.Log log = 
org.apache.commons.logging.LogFactory.getLog(DataSender.class);
 
 /**
  * The string manager for this package.
  */
-protected static StringManager sm = StringManager
-.getManager(Constants.Package);
+protected static StringManager sm = 
StringManager.getManager(Constants.Package);
 
 // - Instance Variables
 
 /**
  * The descriptive information about this implementation.
  */
-private static final String info = "DataSender/2.1";
+private static final String info = "DataSender/3.0";
 
 /**
  * receiver address
@@ -678,20 +676,17 @@
return ;
try {
 createSocket();
-if (isWaitForAck())
-socket.setSoTimeout((int) ackTimeout);
+if (isWaitForAck()) socket.setSoTimeout((int) ackTimeout);
 isSocketConnected = true;
 socketOpenCounter++;
 this.keepAliveCount = 0;
 this.keepAliveConnectTime = System.currentTimeMillis();
 if (log.isDebugEnabled())
-log.debug(sm.getString("IDataSender.openSocket", address
-.getHostAddress(), new Integer(port),new 
Long(socketOpenCounter)));
+log.debug(sm.getString("IDataSender.openSocket", 
address.getHostAddress(), new Integer(port),new Long(socketOpenCounter)));
   } catch (IOException ex1) {
 socketOpenFailureCounter++ ;
 if (log.isDebugEnabled())
-log.debug(sm.getString("IDataSender.openSocket.failure",
-address.getHostAddress(), new Integer(port),new 
Long(socketOpenFailureCounter)), ex1);
+
log.debug(sm.getString("IDataSender.openSocket.failure",address.getHostAddress(),
 new Integer(port),new Long(socketOpenFailureCounter)), ex1);
 throw ex1;
 }
 
@@ -725,8 +720,7 @@
 isSocketConnected = false;
 socketCloseCounter++;
 if (log.isDebugEnabled())
-log.debug(sm.getString("IDataSender.closeSocket",
-address.getHostAddress(), new Integer(port),new 
Long(socketCloseCounter)));
+
log.debug(sm.getString("IDataSender.closeSocket",address.getHostAddress(), new 
Integer(port),new Long(socketCloseCounter)));
}
 }
 
@@ -791,62 +785,48 @@
  * @throws java.io.IOException
  * @since 5.5.10
  */
-protected void pushMessage( ChannelMessage data)
-throws java.io.IOException {
-long time = 0 ;
-if(doProcessingStats) {
-time = System.currentTimeMillis();
-}
-boolean messageTransfered = false ;
+
+protected void pushMessage(ChannelMessage data, boolean reconnect) throws 
java.io.IOException {
 synchronized(this) {
 checkKeepAlive();
-if (!isConnected())
-openSocket();
-else if(keepAliveTimeout > -1)
-this.keepAliveConnectTime = System.currentTimeMillis();
+if ( reconnect ) closeSocket();
+if (!isConnected()) openSocket();
+else if(keepAliveTimeout > -1) this.keepAliveConnectTime = 
System.currentTimeMillis();
 }
+writeData(data);
+
+}
+
+protected void pushMessage( ChannelMessage data) throws 
java.io.IOException {
+long time = 0 ;
+if(doProcessingStats) time = System.currentTimeMillis();
+boolean messageTransfered = false ;
 IOException exception = null;
 try {
- 

svn commit: r381400 - /tomcat/container/tc5.5.x/modules/groupcom/to-do.txt

2006-02-27 Thread fhanik
Author: fhanik
Date: Mon Feb 27 10:07:54 2006
New Revision: 381400

URL: http://svn.apache.org/viewcvs?rev=381400&view=rev
Log:
Moved items from the todo list

Modified:
tomcat/container/tc5.5.x/modules/groupcom/to-do.txt

Modified: tomcat/container/tc5.5.x/modules/groupcom/to-do.txt
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/to-do.txt?rev=381400&r1=381399&r2=381400&view=diff
==
--- tomcat/container/tc5.5.x/modules/groupcom/to-do.txt (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/to-do.txt Mon Feb 27 10:07:54 2006
@@ -1,13 +1,10 @@
 To Do:
 
 Tasks:
-2. Unique id, send it in byte array instead of string
-3. DataSender or ReplicationTransmitter swallows IOException, this should be
-reflected up the channel and the sending app should be notified that the
-message did not send successfully
 4. ChannelMessage.getMessage should return streamable, that way we can wrap,
 pass it around and all those good things without having to copy byte arrays
 left and right
+5. NIO and IO DataSender, since the IO is blocking
 
 Interceptors to create
 1. OrderInterceptor - guarantees the order of messages
@@ -31,3 +28,8 @@
 Notes: 
 
 
+2. Unique id, send it in byte array instead of string
+
+3. DataSender or ReplicationTransmitter swallows IOException, this should be
+Notes: This has only been fixed for the pooled synchronized. the fastasynch
+aint working that well



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



svn commit: r381399 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/demos: ./ LoadTest.java

2006-02-27 Thread fhanik
Author: fhanik
Date: Mon Feb 27 10:02:08 2006
New Revision: 381399

URL: http://svn.apache.org/viewcvs?rev=381399&view=rev
Log:
Added in a very usable functionality/load test

Added:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/demos/

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

Added: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/demos/LoadTest.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/demos/LoadTest.java?rev=381399&view=auto
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/demos/LoadTest.java
 (added)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/demos/LoadTest.java
 Mon Feb 27 10:02:08 2006
@@ -0,0 +1,374 @@
+package org.apache.catalina.tribes.demos;
+
+import org.apache.catalina.tribes.Member;
+import org.apache.catalina.tribes.MembershipListener;
+import org.apache.catalina.tribes.ChannelListener;
+import java.io.Serializable;
+import org.apache.catalina.tribes.ManagedChannel;
+import java.io.Externalizable;
+import java.io.ObjectOutput;
+import java.io.IOException;
+import java.util.Random;
+import java.io.ObjectInput;
+import org.apache.catalina.tribes.io.XByteBuffer;
+import org.apache.catalina.tribes.tcp.ReplicationListener;
+import org.apache.catalina.tribes.group.GroupChannel;
+import org.apache.catalina.tribes.tcp.ReplicationTransmitter;
+import org.apache.catalina.tribes.mcast.McastService;
+import org.apache.catalina.tribes.ByteMessage;
+import org.apache.catalina.tribes.group.interceptors.GzipInterceptor;
+import org.apache.catalina.tribes.ChannelException;
+
+
+/**
+ * Title: 
+ *
+ * Description: 
+ *
+ * Copyright: Copyright (c) 2005
+ *
+ * Company: 
+ *
+ * @author not attributable
+ * @version 1.0
+ */
+public class LoadTest implements MembershipListener,ChannelListener, Runnable {
+protected static org.apache.commons.logging.Log log = 
org.apache.commons.logging.LogFactory.getLog(LoadTest.class);
+public static Object mutex = new Object();
+public boolean doRun = true;
+
+public long bytesReceived = 0;
+public int  messagesReceived = 0;
+public boolean send = true;
+public boolean debug = false;
+public int msgCount = 100;
+ManagedChannel channel=null;
+public int statsInterval = 1;
+public long pause = 0;
+public boolean breakonChannelException = false;
+public long receiveStart = 0;
+
+static int messageSize = 0;
+
+
+
+public LoadTest(ManagedChannel channel, 
+boolean send,
+int msgCount,
+boolean debug,
+long pause,
+int stats,
+boolean breakOnEx) {
+this.channel = channel;
+this.send = send;
+this.msgCount = msgCount;
+this.debug = debug;
+this.pause = pause;
+this.statsInterval = stats;
+this.breakonChannelException = breakOnEx;
+}
+
+
+
+public void run() {
+
+int counter = 0;
+LoadMessage msg = new LoadMessage();
+int messageSize = LoadTest.messageSize;
+long sendTime = 0;
+try {
+while (counter < msgCount) {
+if (channel.getMembers().length == 0 || (!send)) {
+synchronized (mutex) {
+try {
+mutex.wait();
+} catch (InterruptedException x) {
+log.info("Thread interrupted from wait");
+}
+}
+} else {
+try {
+msg.setMsgNr(++counter);
+long start = System.currentTimeMillis();
+if (debug) {
+printArray(msg.getMessage());
+}
+channel.send(null, msg);
+if ( pause > 0 ) {
+if ( debug) System.out.println("Pausing sender for 
"+pause+" ms.");
+Thread.sleep(pause);
+}
+sendTime += (System.currentTimeMillis() - start);
+} catch (ChannelException x) {
+log.error("Unable to send message.");
+Member[] faulty = x.getFaultyMembers();
+for (int i=0; i 0)) {
+printSendStats(counter, messageSize, sendTime);
+}
+
+}
+}catch ( Exception x ) {
+x.printStackTrace();
+printSendStats(counter, messageSize, sendTime);
+}
+}
+
+private void prin

svn commit: r381396 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java

2006-02-27 Thread remm
Author: remm
Date: Mon Feb 27 09:50:22 2006
New Revision: 381396

URL: http://svn.apache.org/viewcvs?rev=381396&view=rev
Log:
- Use the right error field.

Modified:

tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=381396&r1=381395&r2=381396&view=diff
==
--- 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java 
(original)
+++ 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java 
Mon Feb 27 09:50:22 2006
@@ -1083,7 +1083,7 @@
 if (errn >  Status.APR_OS_START_USERERR) {
errn -=  Status.APR_OS_START_USERERR;
 }
-log.error(sm.getString("endpoint.poll.fail", "" + 
(-rv), Error.strerror(-rv)));
+log.error(sm.getString("endpoint.poll.fail", "" + 
errn, Error.strerror(errn)));
 // Handle poll critical failure
 synchronized (this) {
 destroy();



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



svn commit: r381395 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes: ChannelMessage.java group/GroupChannel.java io/ClusterData.java tcp/FastAsyncSocketSender.java

2006-02-27 Thread fhanik
Author: fhanik
Date: Mon Feb 27 09:44:54 2006
New Revision: 381395

URL: http://svn.apache.org/viewcvs?rev=381395&view=rev
Log:
unique Id for cluster data is now a 16 digit byte array for faster serialization

Modified:

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

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/io/ClusterData.java

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelMessage.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelMessage.java?rev=381395&r1=381394&r2=381395&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelMessage.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelMessage.java
 Mon Feb 27 09:44:54 2006
@@ -57,9 +57,9 @@
  * Each message must have a unique ID, in case of using async replication,
  * and a smart queue, this id is used to replace messages not yet sent.
  *
- * @return String
+ * @return byte
  */
-public String getUniqueId();
+public byte[] getUniqueId();
 
 public void setMessage(byte[] data);
 

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/GroupChannel.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/GroupChannel.java?rev=381395&r1=381394&r2=381395&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
 Mon Feb 27 09:44:54 2006
@@ -18,14 +18,12 @@
 
 import org.apache.catalina.tribes.ChannelException;
 import org.apache.catalina.tribes.ChannelInterceptor;
-import org.apache.catalina.tribes.Channel;
 import org.apache.catalina.tribes.ChannelMessage;
 import org.apache.catalina.tribes.ChannelReceiver;
 import org.apache.catalina.tribes.ChannelSender;
 import org.apache.catalina.tribes.Member;
 import org.apache.catalina.tribes.MembershipListener;
 import org.apache.catalina.tribes.MembershipService;
-import org.apache.catalina.tribes.MessageListener;
 import org.apache.catalina.tribes.io.ClusterData;
 import org.apache.catalina.tribes.io.XByteBuffer;
 import java.io.Serializable;
@@ -82,6 +80,16 @@
 super.heartbeat();
 }
 
+
+public byte[] getUUID() {
+UUID id = UUID.randomUUID();
+long msb = id.getMostSignificantBits();
+long lsb = id.getLeastSignificantBits();
+byte[] data = new byte[16];
+System.arraycopy(XByteBuffer.toBytes(msb),0,data,0,8);
+System.arraycopy(XByteBuffer.toBytes(lsb),0,data,8,8);
+return data;
+}
 /**
  * Send a message to one or more members in the cluster
  * @param destination Member[] - the destinations, null or zero length 
means all
@@ -95,7 +103,7 @@
 int options = 0;
 ClusterData data = new ClusterData();
 data.setAddress(getLocalMember());
-data.setUniqueId(UUID.randomUUID().toString());
+data.setUniqueId(getUUID());
 data.setTimestamp(System.currentTimeMillis());
 byte[] b = null;
 if ( msg instanceof ByteMessage ){

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ClusterData.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ClusterData.java?rev=381395&r1=381394&r2=381395&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ClusterData.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ClusterData.java
 Mon Feb 27 09:44:54 2006
@@ -39,7 +39,7 @@
 private int options = 0 ;
 private byte[] message ;
 private long timestamp ;
-private String uniqueId ;
+private byte[] uniqueId ;
 private Member address;
 
 public ClusterData() {}
@@ -50,7 +50,7 @@
  * @param message message data
  * @param timestamp message creation date
  */
-public ClusterData(String uniqueId, byte[] message, long timestamp) {
+public ClusterData(byte[] uniqueId, byte[] message, long timestamp) {
 t

DO NOT REPLY [Bug 38797] New: - 5.5.12 and 5.5.15 emit different code on

2006-02-27 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=38797

   Summary: 5.5.12 and 5.5.15 emit different code on

   Product: Tomcat 5
   Version: 5.5.14
  Platform: Other
OS/Version: other
Status: NEW
  Severity: normal
  Priority: P2
 Component: Jasper
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


Compiling this code:



results in this with the Jasper of Tomcat 5.5.15:

out.write(org.apache.jasper.runtime.JspRuntimeLibrary.toString(org.apache.jasper.runtime.JspRuntimeLibrary.handleGetProperty(_jspx_page_context.getAttribute("person",
PageContext.PAGE_SCOPE), "name")));

And this with the Jasper of Tomcat 5.5.12 and before (checked 5.5.12, 5.0.28 and
some versions in between):

out.write(org.apache.jasper.runtime.JspRuntimeLibrary.toString(org.apache.jasper.runtime.JspRuntimeLibrary.handleGetProperty(_jspx_page_context.findAttribute("person"),
"name")));

My property is in the session's scope, so the property is not found and an
exception is thrown:

SCHWERWIEGEND: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Attempted a bean operation on a null object.
at
org.apache.jasper.runtime.JspRuntimeLibrary.handleGetProperty(JspRuntimeLibrary.java:601)
at
org.apache.jsp.title_jsp._jspx_meth_iku_restricted_0(org.apache.jsp.title_jsp:146)
at org.apache.jsp.title_jsp._jspService(org.apache.jsp.title_jsp:104)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)

BTW: version 5.5.15 is missing in the bugzilla, so I selected 5.5.14

-- 
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: r381388 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes: ./ group/ group/interceptors/ tcp/

2006-02-27 Thread fhanik
Author: fhanik
Date: Mon Feb 27 09:16:26 2006
New Revision: 381388

URL: http://svn.apache.org/viewcvs?rev=381388&view=rev
Log:
enhanced error handling throughout the stack

Modified:

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

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

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

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

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

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/GzipInterceptor.java

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

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelException.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelException.java?rev=381388&r1=381387&r2=381388&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelException.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelException.java
 Mon Feb 27 09:16:26 2006
@@ -15,6 +15,9 @@
  */
 package org.apache.catalina.tribes;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+
 /**
  * Channel Exception 
  * @author Filip Hanik
@@ -23,6 +26,7 @@
 
 public class ChannelException
 extends Exception {
+private ArrayList faultyMembers=null;
 public ChannelException() {
 super();
 }
@@ -37,6 +41,25 @@
 
 public ChannelException(Throwable cause) {
 super(cause);
+}
+
+public void addFaultyMember(Member mbr) {
+if ( this.faultyMembers==null ) this.faultyMembers = new ArrayList();
+faultyMembers.add(mbr);
+}
+
+public void setFaultyMembers(ArrayList faultyMembers) {
+this.faultyMembers = faultyMembers;
+}
+
+public void setFaultyMembers(Member[] faultyMembers) {
+if ( this.faultyMembers==null ) this.faultyMembers = new ArrayList();
+this.faultyMembers.addAll(Arrays.asList(faultyMembers));
+}
+
+public Member[] getFaultyMembers() {
+if ( this.faultyMembers==null ) return new Member[0];
+return (Member[])faultyMembers.toArray(new 
Member[faultyMembers.size()]);
 }
 
 }

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelInterceptor.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelInterceptor.java?rev=381388&r1=381387&r2=381388&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelInterceptor.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelInterceptor.java
 Mon Feb 27 09:16:26 2006
@@ -38,7 +38,7 @@
 
 public ChannelInterceptor getPrevious();
 
-public void sendMessage(Member[] destination, ChannelMessage msg, 
InterceptorPayload payload) throws IOException;
+public void sendMessage(Member[] destination, ChannelMessage msg, 
InterceptorPayload payload) throws ChannelException;
 
 public void messageReceived(ChannelMessage data);
 

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelSender.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelSender.java?rev=381388&r1=381387&r2=381388&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelSender.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelSender.java
 Mon Feb 27 09:16:26 2006
@@ -38,8 +38,6 @@
 
 public void sendMessage(ChannelMessage message, Member member) throws 
java.io.IOException;
 
-public void sendMessage(ChannelMessage message) throws java.io.IOException;
-
 public boolean getWaitForAck();
 public void setWaitForAck(boolean isWaitForAck);
 }

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelCoordinator.java
URL: 

DO NOT REPLY [Bug 38795] New: - StandardContext doesn't always reset thread's contextClassLoader

2006-02-27 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=38795

   Summary: StandardContext doesn't always reset thread's
contextClassLoader
   Product: Tomcat 5
   Version: Unknown
  Platform: Other
OS/Version: other
Status: NEW
  Severity: critical
  Priority: P2
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


org.apache.catalina.core.StandardContext.stop() method changes the current
thead's context classloader but does not always reset it if an exception is 
thrown.

It resets the classloader in the finally clause of a try statement, but the try
statement begins too late. If an exception is thrown before the try statament is
reached, the contextClassLoader is not reset to its original value.

Here's the code fragment:

// Binding thread
ClassLoader oldCCL = bindThread();

// Stop our filters
filterStop();

// Stop our application listeners
listenerStop();

// Stop ContainerBackgroundProcessor thread
super.threadStop();

if ((manager != null) && (manager instanceof Lifecycle)) {
((Lifecycle) manager).stop();
}

// Finalize our character set mapper
setCharsetMapper(null);

// Normal container shutdown processing
if (log.isDebugEnabled())
log.debug("Processing standard container shutdown");
// Notify our interested LifecycleListeners
lifecycle.fireLifecycleEvent(STOP_EVENT, null);
started = false;

try {
...

} finally {

// Unbinding thread
unbindThread(oldCCL);

}


An exception is sometimes thrown in this statement (which is before the try
statement):

if ((manager != null) && (manager instanceof Lifecycle)) {
((Lifecycle) manager).stop();
}

due to bug 30489 (java.lang.IllegalStateException: removeAttribute: Session
already invalidated)


Leaving the substituted classLoader severely disrupts the JBoss deployment
scanner causing it to throw an exception and fail in each loop. Restarting JBoss
is required to recover from this problem.

-- 
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: r381374 - /tomcat/container/tc5.5.x/modules/groupcom/to-do.txt

2006-02-27 Thread fhanik
Author: fhanik
Date: Mon Feb 27 08:30:46 2006
New Revision: 381374

URL: http://svn.apache.org/viewcvs?rev=381374&view=rev
Log:
Added in more useful features

Modified:
tomcat/container/tc5.5.x/modules/groupcom/to-do.txt

Modified: tomcat/container/tc5.5.x/modules/groupcom/to-do.txt
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/to-do.txt?rev=381374&r1=381373&r2=381374&view=diff
==
--- tomcat/container/tc5.5.x/modules/groupcom/to-do.txt (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/to-do.txt Mon Feb 27 08:30:46 2006
@@ -5,6 +5,9 @@
 3. DataSender or ReplicationTransmitter swallows IOException, this should be
 reflected up the channel and the sending app should be notified that the
 message did not send successfully
+4. ChannelMessage.getMessage should return streamable, that way we can wrap,
+pass it around and all those good things without having to copy byte arrays
+left and right
 
 Interceptors to create
 1. OrderInterceptor - guarantees the order of messages



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



svn commit: r381371 - /tomcat/container/tc5.5.x/modules/groupcom/to-do.txt

2006-02-27 Thread fhanik
Author: fhanik
Date: Mon Feb 27 08:17:30 2006
New Revision: 381371

URL: http://svn.apache.org/viewcvs?rev=381371&view=rev
Log:
Added to-do's

Modified:
tomcat/container/tc5.5.x/modules/groupcom/to-do.txt

Modified: tomcat/container/tc5.5.x/modules/groupcom/to-do.txt
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/to-do.txt?rev=381371&r1=381370&r2=381371&view=diff
==
--- tomcat/container/tc5.5.x/modules/groupcom/to-do.txt (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/to-do.txt Mon Feb 27 08:17:30 2006
@@ -1,9 +1,30 @@
-waitForAck - should only mean, we received the message, not for the message to 
get processesed.
-This should improve throughput, and an interceptor can do waitForCompletion
+To Do:
+
+Tasks:
+2. Unique id, send it in byte array instead of string
+3. DataSender or ReplicationTransmitter swallows IOException, this should be
+reflected up the channel and the sending app should be notified that the
+message did not send successfully
 
 Interceptors to create
-OrderInterceptor - guarantees the order of messages
-WaitForCompletionInterceptor - waits for the message to get processed by all 
receivers before returning
-FragmentationInterceptor - splits up messages that are larger than X bytes.
-CoordinatorInterceptor - manages the selection of a cluster coordinator
+1. OrderInterceptor - guarantees the order of messages
+2. WaitForCompletionInterceptor - waits for the message to get processed by 
all receivers before returning
+  (This is useful when synchronized=false and waitForAck=false, to improve
+parallel processing, but you want to have all messages sent in parallel and
+don't return until all have been processed on the remote end.)
+3. FragmentationInterceptor - splits up messages that are larger than X bytes.
+4. CoordinatorInterceptor - manages the selection of a cluster coordinator
+5. VirtualSynchronyInterceptor - not sure we want to build this one, it would 
be
+pretty slow, but it would guarantee that all messages were received, to the
+members in that group in that time.
+
+Tasks Completed
+1. True synchronized/asynchronized replication enabled using flags
+Sender.sendAck/Receiver.waitForAck/Receiver.synchronized 
+Task Desc: waitForAck - should only mean, we received the message, not for the
+message to get processesed. This should improve throughput, and an interceptor
+can do waitForCompletion
+Status: Complete
+Notes: 
+
 



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



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

2006-02-27 Thread fhanik
Author: fhanik
Date: Mon Feb 27 07:43:00 2006
New Revision: 381364

URL: http://svn.apache.org/viewcvs?rev=381364&view=rev
Log:
Created a load test, also implemented a "synchronized/asynchronized" option, 
since we are using TCP.

Added:

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

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

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

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

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

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/io/ListenCallback.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ObjectReader.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/mcast/McastMember.java

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

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

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationListener.jbx

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

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

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

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/WorkerThread.java
tomcat/container/tc5.5.x/modules/ha/etc/cluster-server.xml

Added: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ByteMessage.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ByteMessage.java?rev=381364&view=auto
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ByteMessage.java
 (added)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ByteMessage.java
 Mon Feb 27 07:43:00 2006
@@ -0,0 +1,44 @@
+/*
+ * Copyright 1999,2004-2005 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;
+
+import java.io.Serializable;
+
+/**
+ * A byte message is not serialized and deserialized by the channel
+ * @author Filip Hanik
+ * @version $Revision: 304032 $, $Date: 2005-07-27 10:11:55 -0500 (Wed, 27 Jul 
2005) $
+ */
+
+public class ByteMessage implements Serializable {
+private byte[] message;
+
+public ByteMessage() {
+
+}
+public ByteMessage(byte[] data) {
+message = data;
+}
+
+public byte[] getMessage() {
+return message;
+}
+
+public void setMessage(byte[] message) {
+this.message = message;
+}
+
+}
\ No newline at end of file

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Channel.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Channel.java?rev=381364&r1=381363&r2=381364&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Channel.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Channel.java
 Mon Feb 27 07:43:00 2006
@@ -74,7 +74,7 @@
  * @param options int - sender options, see class documentation
  * @return ClusterMessage[] - the replies from the members, if any. 
  */
-public void send(Member[] destination, Serializable msg, int options) 
throws ChannelException;
+public void send(Member[] destination, Serializable msg) throws 
ChannelException;
 
 
 /**

Modified: 

DO NOT REPLY [Bug 38757] - Receiving HotSpot Virtual Machine

2006-02-27 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=38757





--- Additional Comments From [EMAIL PROTECTED]  2006-02-27 16:05 ---
Also the bug is invalid (a JVM HotSpot Bug), here the solution:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6346871

Workaround: 
place a file into $TOMCAT_HOME which is named 
.hotspot_compiler
and contains:
exclude org/jacorb/orb/Delegate non_existent

we had the same problem with the request method, so you might want to add this 
too:
exclude org/jacorb/orb/Delegate non_existent

OR switch to a previous VM Version 1.5_02 should work. 

-- 
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 27617] - ppt and vsd MIME types should be included in web.xml

2006-02-27 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=27617


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |




--- Additional Comments From [EMAIL PROTECTED]  2006-02-27 15:41 ---
The lines in web.xml currently distributed with Tomcat 5.0.28 do not work for
Internet Exploder.  Further, the web.xml file omits an entry for "PPS"
(power-point show) files.

Details: I hit problems while attempting to provide access to powerpoint files
using Tomcat 5.0.28.  That version is distributed with these lines in web.xml:


ppt
application/powerpoint


I compared the mime-types with entries in Apache 2.20 mime.types file,
where I find only this:

application/vnd.ms-powerpointppt

Based on my tests, Firefox works fine with the application/powerpoint
entry, but IE does not.  IE seems to require the
application/vnd.ms-powerpoint variation, and Firefox accepts that as
well.  I used the following to replace what is shown above with good results:


ppt
application/vnd.ms-powerpoint


pps
application/vnd.ms-powerpoint


Please consider using these entries in the web.xml distributed with Tomcat.

I do not have Visio, so could not test the behavior of IE on a Visio file, but
that probably should be checked as well.

I contacted Scott Pontillo, the original reporter of this bug, and he made the
following suggestion:

>As a longer-term solution to this problem, maybe it would be good to
>establish a process for importing the entries from the native Apache
>server periodically? It seems they are kept more up-to-date for that
>product...

I've taken it upon myself to reopen the bug since it is easily reproducible and
seems like such a minor issue.  I apologize if this was premature.  Thanks for
listening. 

-- 
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 27122] - IE plugins cannot access components through Tomcat 5 over SSL

2006-02-27 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=27122





--- Additional Comments From [EMAIL PROTECTED]  2006-02-27 15:24 ---
I would like to add my support for the previous request to make the caching
headers (Pragma and Cache-Control) configurable in Tomcat 5.0.x.  

Brief history: I use Tomcat 5.0.28 for a small webapp.  It sits behind Apache,
which does SSL and forwards requests to Tomcat via mod_jk.  Users access the
webapp stricly with SSL.  The webapp's doc area has a few static power-point
files, and that's where this problem bit me: IE users could not get power-point
files.

To figure out what headers Tomcat sets in responses, I turned on the
RequestDumperValve in the server.xml file.  Then I saw that every single request
-- whether .gif, .html, .css, .ppt, or .jsp -- gets "Cache-Control: no-cache"
and "Pragma: no cache" in the response headers.

While these headers are absolutely appropriate for JSP pages, they are wholly
unnecessary for static content.  I want my users' browsers to cache static
content like CSS sheets, images, etc. and thereby make fewer requests to my
server.  Everybody wins.

This thread helped me understand the problem:
http://forum.java.sun.com/thread.jspa?threadID=233446&start=0&tstart=0 

I finally used the solution from here, with one modification:
http://www.jspinsider.com/content/dev/afessh/another-filter-every-site-should-have.html
Jayson Falkner explains servlet filters that set response headers; this means 
web browsers will cache items like pictures and other static content.  Note that
his code does "addHeader" but that does NOT work; you have to do "setHeader" to
overrride the cache-control that Tomcat adds.

I am of the strong opinion that Tomcat needs some configuration setting so users
like me can tell the container what caching policy to apply by default.  Maybe
something along the lines of a mime-types file would allow the caching policy to
be set based on file suffixes or file-name patterns. 

Please consider this request seriously.  I am not a Tomcat dev and don't want to
reopen this bug myself.  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]



DO NOT REPLY [Bug 38776] - [PATCH] Jsp generated servlet classes have bad SourceFile attribute

2006-02-27 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=38776


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2006-02-27 15:18 ---
Thanks for fixing this issue.

-- 
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: r381342 - /tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/compiler/JDTCompiler.java

2006-02-27 Thread remm
Author: remm
Date: Mon Feb 27 06:15:09 2006
New Revision: 381342

URL: http://svn.apache.org/viewcvs?rev=381342&view=rev
Log:
- 38776: Fix source file attribute.
- Submitted by Olivier Thomann.

Modified:
tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/compiler/JDTCompiler.java

Modified: 
tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/compiler/JDTCompiler.java
URL: 
http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/compiler/JDTCompiler.java?rev=381342&r1=381341&r2=381342&view=diff
==
--- tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/compiler/JDTCompiler.java 
(original)
+++ tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/compiler/JDTCompiler.java 
Mon Feb 27 06:15:09 2006
@@ -93,7 +93,7 @@
 }
 
 public char[] getFileName() {
-return className.toCharArray();
+return sourceFile.toCharArray();
 }
 
 public char[] getContents() {



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



svn commit: r381341 - /tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/JDTCompiler.java

2006-02-27 Thread remm
Author: remm
Date: Mon Feb 27 06:10:39 2006
New Revision: 381341

URL: http://svn.apache.org/viewcvs?rev=381341&view=rev
Log:
- 38776: Fix source file attribute.
- Submitted by Olivier Thomann.

Modified:
tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/JDTCompiler.java

Modified: 
tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/JDTCompiler.java
URL: 
http://svn.apache.org/viewcvs/tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/JDTCompiler.java?rev=381341&r1=381340&r2=381341&view=diff
==
--- tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/JDTCompiler.java 
(original)
+++ tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/JDTCompiler.java 
Mon Feb 27 06:10:39 2006
@@ -93,7 +93,7 @@
 }
 
 public char[] getFileName() {
-return className.toCharArray();
+return sourceFile.toCharArray();
 }
 
 public char[] getContents() {



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



DO NOT REPLY [Bug 38788] - TCP Worker thread in cluster caught java.io.IOException

2006-02-27 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=38788


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2006-02-27 14:09 ---
It is not an error to worry about. It is an incorrectly reported warning.
The sender TomcatA will periodically close its connections, and TomcatB reports
this as an error. Nothing to worry about, and in Tomcat 5.5.16 this has been
fixed  to only report a 1 line warning.

-- 
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: Cluster redesign

2006-02-27 Thread Filip Hanik - Dev Lists
its been taken care of, go back and read the thread "New clustering 
module proposal - WAS: Long rants"


Filip

dietmar mueller wrote:

Hello List,

1st: sorry for my bad english.
2nd: you do a great job
3th: the reason for this posting.

I use tomcat for some years in our production environment with many
success. Since 3 month we use the great cluster functionallity. I watch
the development from the clustersupport since about 1 year.

Before I use the version 5.5.15 on our production enviroment I made many
test and found also bugs in the cluster implementation. What I saw is in
this time is, that this cluster implementation grow to a very good and
very stable pice of software.

But since some days I saw massive changes in the sourcecode with some
serious changes in the design.

Now I am in doubt what happend.
Why does the design change in this release?
Why do the developers don't wait to the 6 Release?
Are all my tests for nothing with the next release?

Do I have to test the complete cluster, with the next version from
tomcat, for some weeks after this redesign?

Isn't cluster2 the right way for this changes, then I can test the new
implementations when I need it and not when I need version 5.5.16!

regards Dietmar


-
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]



FW: My Query

2006-02-27 Thread Reeta Aggarwal








 

 

-Original Message-
From: Reeta Aggarwal
[mailto:[EMAIL PROTECTED] 
Sent: Monday, February 27, 2006 3:47 PM
To: 'dev@tomcat.apache.org'
Subject: My Query

 

Hi

 I have a query
related to tomcat. I have attached logs that I am getting when I am trying to
start tomcat using org.apache.catalina.startup.Embedded through a script in
which I have added some more jar files related to my application. I am getting
an exception as shown in the logs. I got stuck to this problem. I will be
highly thankful to you for any kind of help from your side

Thanks

Regards

Reeta

 






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

Re: Change process (Was: Persistent storage of sessions, why no Principal?)

2006-02-27 Thread Roland Turner (Apache)
On Sun, 2006-02-26 at 20:37 +, Mark Thomas wrote:

> I doubt there has been see-sawing. 4.1.x and 5.x have been developed
> in parallel so it is more likely that the change was made on the 4.1.x
> and the 5.0.x branch at roughly the same time although I haven't been
> back through the SVN logs to confirm this.

I hadn't considered this (in retrospect, obvious) possibility. Thanks.

> As to the why, searching the archives for "serialize principal" turned
> up this thread:
> http://marc.theaimsgroup.com/?l=tomcat-dev&m=107841409104907&w=2

Interesting. I had been searching Google which, bizarely, was not (and
is not) turning that thread up. The next poster in that thread is
jfarcand himself, so you've given me someone to ask. Many thanks.

- Raz


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