Re: svn commit: r380835 -/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java

2006-02-25 Thread Filip Hanik - Dev Lists

yep, my tests went through fine

Rainer Jung wrote:

Hi Filip,

I did a little exercise with Java 6 and Solaris DTrace.

The change is in fact OK, although I first thought that the 
DeltaRequest will no longer be initialized:


DeltaManager.createSession() calls

   ManagerBase.createSession()

which in turns calls

  DeltaManager.createEmptySession()
 DeltaManager.getNewDeltaSession()
DeltaSession.()
   DeltaSession.resetDeltaRequest()

So the DeltaRequest still gets initialized correctly :)

Thanks

Rainer

[EMAIL PROTECTED] wrote:

Author: fhanik
Date: Fri Feb 24 14:19:22 2006
New Revision: 380835

URL: http://svn.apache.org/viewcvs?rev=380835&view=rev
Log:
Fix for bug http://issues.apache.org/bugzilla/show_bug.cgi?id=38740
looks like we got trigger happy with the resetDeltaRequest
Thanks to Nick Wesselman and Rainer Jung that pointed this out.


Modified:

tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java 



Modified: 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java 

URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java?rev=380835&r1=380834&r2=380835&view=diff 

== 

--- 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java 
(original)
+++ 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java 
Fri Feb 24 14:19:22 2006

@@ -605,7 +605,6 @@
 }
 
 DeltaSession session = (DeltaSession) 
super.createSession(sessionId) ;

-session.resetDeltaRequest();
 if (distribute) {
 sendCreateSession(session.getId(), session);
 }
@@ -633,7 +632,6 @@
 counterSend_EVT_SESSION_CREATED++;
 send(msg);
 }
-session.resetDeltaRequest();
 }
  /**



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




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



Re: never say never...

2006-02-25 Thread Leon Rosenberg
On 2/25/06, Wade Chandler <[EMAIL PROTECTED]> wrote:
> I thought about not even writing this.  Then I thought
> about not even submitting it.  Don't take it
> personally how ever it hits anyone.  I think it's
> fair.
>
> I think it runs both ways.  I think most of the Tomcat
> developers are really great.  I think an unnamed
> developer could learn how to be a little nicer.  I
> think a good number of users could as well.  There is
> no good excuse for simply being mean and nasty for
> users nor developers.
>
+1

...

> Anyways, many thanks to the Tomcat developers.  I
> think almost every one of them are really great guys (and/or girls)

+1 and another +1

>
> Wade
>

Leon

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



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

2006-02-25 Thread fhanik
Author: fhanik
Date: Sat Feb 25 03:58:40 2006
New Revision: 380923

URL: http://svn.apache.org/viewcvs?rev=380923&view=rev
Log:
Completed server.xml refactoring and separated out cluster communication, 
referred to as channel from session replication

Added:

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

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

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

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/cluster/MessageListener.java

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

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

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

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

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

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

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

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

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

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

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

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

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/cluster/Channel.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/cluster/Channel.java?rev=380923&r1=380922&r2=380923&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/cluster/Channel.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/cluster/Channel.java
 Sat Feb 25 03:58:40 2006
@@ -15,6 +15,8 @@
  */
 package org.apache.catalina.cluster;
 
+import java.io.Serializable;
+
 /**
  * Channel interface
  * A channel is an object that manages a group of members.
@@ -72,7 +74,7 @@
  * @param options int - sender options, see class documentation
  * @return ClusterMessage[] - the replies from the members, if any. 
  */
-public ChannelMessage[] send(Member[] destination, ChannelMessage msg, int 
options) throws ChannelException;
+public ChannelMessage[] send(Member[] destination, Serializable msg, int 
options) throws ChannelException;
 
 
 public void setClusterSender(ChannelSender sender);
@@ -85,7 +87,7 @@
 public void heartbeat();
 
 public void setMembershipListener(MembershipListener listener);
-public void setMessageListener(MessageListener listener);
+public void setChannelListener(ChannelListener listener);
 
 /**
  * has members

Added: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/cluster/ChannelListener.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/cluster/ChannelListener.java?rev=380923&view=auto
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/cluster/ChannelListener.java
 (added)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/cluster/ChannelListener.java
 Sat Feb 25 03:58:40 2006
@@ -0,0 +1,37 @@
+/*
+ * 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.catalina.cluster;
+
+import java.io.Serializable;
+
+public interface ChannelListener {
+
+/**
+ * Receive a message from the clust

svn commit: r380925 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina: cluster/ groups/ groups/demos/ groups/group/ groups/group/interceptors/ groups/io/ groups/mcast/ grou

2006-02-25 Thread fhanik
Author: fhanik
Date: Sat Feb 25 04:11:35 2006
New Revision: 380925

URL: http://svn.apache.org/viewcvs?rev=380925&view=rev
Log:
Refactored messaging package

Added:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/groups/
  - copied from r380924, 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/cluster/
Removed:

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

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

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

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

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/groups/ChannelListener.java

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

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

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

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/groups/Constants.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/groups/InterceptorPayload.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/groups/Member.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/groups/MembershipListener.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/groups/MembershipService.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/groups/MessageListener.java

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

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

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

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

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

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

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

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

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

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

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

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/groups/mcast/Constants.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/groups/mcast/McastMember.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/groups/mcast/McastMembership.java

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

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

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

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

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

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

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

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

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

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

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

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

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

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

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/groups/tcp/T

svn commit: r380936 [2/2] - in /tomcat/container/tc5.5.x/modules: ./ groupcom/ groupcom/src/share/org/apache/catalina/groups/ groupcom/src/share/org/apache/catalina/groups/demos/ groupcom/src/share/or

2006-02-25 Thread fhanik
Added: tomcat/container/tc5.5.x/modules/ha/etc/cluster-server.xml
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/ha/etc/cluster-server.xml?rev=380936&view=auto
==
--- tomcat/container/tc5.5.x/modules/ha/etc/cluster-server.xml (added)
+++ tomcat/container/tc5.5.x/modules/ha/etc/cluster-server.xml Sat Feb 25 
07:25:56 2006
@@ -0,0 +1,386 @@
+
+
+
+
+
+
+
+  
+  
+  
+  
+  
+
+  
+  
+
+
+
+
+
+
+
+  
+
+  
+
+  
+  
+
+
+
+
+
+
+   
+   
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 
+ 
+
+
+
+  
+  
+
+  
+
+  
+  
+
+  
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+  
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+   
+
+  
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  
+
+
+
+  
+
+

Modified: 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/CatalinaCluster.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/CatalinaCluster.java?rev=380936&r1=380935&r2=380936&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/CatalinaCluster.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/CatalinaCluster.java
 Sat Feb 25 07:25:56 2006
@@ -23,8 +23,10 @@
 import org.apache.catalina.Manager;
 import org.apache.catalina.Valve;
 import org.apache.commons.logging.Log;
-import org.apache.catalina.cluster.io.ReplicationStream;
+import org.apache.catalina.groups.io.ReplicationStream;
 import java.io.IOException;
+import org.apache.catalina.groups.Channel;
+import org.apache.catalina.groups.Member;
 
 
 
@@ -124,5 +126,6 @@
 public Valve[] getValves();
 
 public void setChannel(Channel channel);
+public Channel getChannel();
 
 }

Modified: 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/ClusterDeployer.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/ClusterDeployer.java?rev=380936&r1=380935&r2=380936&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/ClusterDeployer.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/ClusterDeployer.java
 Sat Feb 25 07:25:56 2006
@@ -26,6 +26,7 @@
 import org.apache.catalina.LifecycleException;
 import java.io.IOException;
 import java.net.URL;
+import org.apache.catalina.groups.MessageListener;
 
 public interface ClusterDeployer extends MessageListener {
 /**

Modified: 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/ClusterListener.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/ClusterListener.java?rev=380936&r1=380935&r2=380936&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/ClusterListener.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/ClusterListener.java
 Sat Feb 25 07:25:56 2006
@@ -20,6 +20,8 @@
 
 
 import org.apache.catalina.util.StringManager;
+import org.apache.catalina.groups.MessageListener;
+import org.apache.catalina.groups.ChannelMessage;
 
 
 /**

Added: 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/ClusterMessage.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/ClusterMessage.java?rev=380936&view=auto
==
--- 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/ClusterMessage.java
 (added)
+++ 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/ClusterMessage.java
 Sat Feb 25 07:25:56 2006
@@ -0,0 +1,33 @@
+/*
+ * Copyright 1999,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 

svn commit: r380938 - /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/groups/group/interceptors/GzipInterceptor.java

2006-02-25 Thread fhanik
Author: fhanik
Date: Sat Feb 25 07:46:37 2006
New Revision: 380938

URL: http://svn.apache.org/viewcvs?rev=380938&view=rev
Log:
Completed the first round of successful tests

Modified:

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/groups/group/interceptors/GzipInterceptor.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/groups/group/interceptors/GzipInterceptor.java?rev=380938&r1=380937&r2=380938&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/groups/group/interceptors/GzipInterceptor.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/groups/group/interceptors/GzipInterceptor.java
 Sat Feb 25 07:46:37 2006
@@ -25,6 +25,7 @@
 import java.io.ByteArrayInputStream;
 import java.util.zip.GZIPInputStream;
 import java.util.zip.GZIPOutputStream;
+import java.util.Arrays;
 
 
 
@@ -35,7 +36,8 @@
  * @version 1.0
  */
 public class GzipInterceptor extends ChannelInterceptorBase {
-   
+public static final int DEFAULT_BUFFER_SIZE = 2048;
+
 public void sendMessage(Member[] destination, ChannelMessage msg, 
InterceptorPayload payload) throws IOException {
 try {
 msg.setMessage(compress(msg.getMessage()));
@@ -55,7 +57,7 @@
 }
 }
 
-public byte[] compress(byte[] data) throws IOException {
+public static byte[] compress(byte[] data) throws IOException {
 ByteArrayOutputStream bout = new ByteArrayOutputStream();
 GZIPOutputStream gout = new GZIPOutputStream(bout);
 gout.write(data);
@@ -64,14 +66,29 @@
 return bout.toByteArray();
 }
 
-public byte[] decompress(byte[] data) throws IOException {
+/**
+ * @todo Fix to create an automatically growing buffer.
+ * @param data byte[]
+ * @return byte[]
+ * @throws IOException
+ */
+public static byte[] decompress(byte[] data) throws IOException {
 ByteArrayInputStream bin = new ByteArrayInputStream(data);
 GZIPInputStream gin = new GZIPInputStream(bin);
-byte[] tmp = new byte[data.length];
+byte[] tmp = new byte[DEFAULT_BUFFER_SIZE];
 int length = gin.read(tmp);
 byte[] result = new byte[length];
 System.arraycopy(tmp,0,result,0,length);
 return result;
+}
+
+public static void main(String[] arg) throws Exception {
+byte[] data = new byte[1024];
+Arrays.fill(data,(byte)1);
+byte[] compress = compress(data);
+byte[] decompress = decompress(compress);
+System.out.println("Debug test");
+
 }
 
 }



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



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

2006-02-25 Thread fhanik
Author: fhanik
Date: Sat Feb 25 07:49:22 2006
New Revision: 380939

URL: http://svn.apache.org/viewcvs?rev=380939&view=rev
Log:
To do list

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

Added: 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=380939&view=auto
==
--- tomcat/container/tc5.5.x/modules/groupcom/to-do.txt (added)
+++ tomcat/container/tc5.5.x/modules/groupcom/to-do.txt Sat Feb 25 07:49:22 2006
@@ -0,0 +1,9 @@
+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
+
+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
+



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



RE: never say never...

2006-02-25 Thread Wade Chandler
--- Bill Barker <[EMAIL PROTECTED]> wrote:

>  
> 
> > -Original Message-
> > From: Wade Chandler
> [mailto:[EMAIL PROTECTED] 
> > Sent: Friday, February 24, 2006 4:57 PM
> > To: Tomcat Developers List
> > Subject: Re: never say never...
> > 
> > --- "William A. Rowe, Jr." <[EMAIL PROTECTED]>
> > wrote:
> 
> > 
> > Anyways, many thanks to the Tomcat developers.  I
> > think almost every one of them are really great
> guys.
> 
> I'm not certain how Amy is going to take that ;-).
> 
> > 
> > Wade
> > 
Yes to be politically correct.  :-D They are really
great people.

Wade

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



DTrace analysis of TC-Cluster Multicast

2006-02-25 Thread Rainer Jung

Hi,

I started to trace TC cluster with DTrace. I did a first simple exam for
the mcast subcomplex. CPU usage and especially elapsed times might be
slightly larger than expected, because I used the more intrusive
extended DTrace probes.

All tests were done with JDK 1.6.0 build 72 on Solaris 10 SPARC, using a
T2000 system (8 cores with 4 Threads each).

Method  allocationelapsed  cpu
mcast/McastServiceImpl.send()1328B   40ms6.7ms
mcast/McastServiceImpl.receive()  744-760B   23-510ms3.5ms

So this does not look very bad, but I inspected, where cpu time is used
and objects get allocated:

1) send cpu time, elapsed time and allocation, per send

  cpu elapsed alloc
6.7ms  40.3ms 1328B  McastServiceImpl.send()

6.3ms  37.6ms 1296BMcastMember.getData()

1.3ms   7.6ms  136B   ... getName().getBytes();
0.9ms   5.3ms  120B   ... getDomain().getBytes();
3.6ms  21.2ms  880B   ... java.net.InetAddress.getByName(host)...

It's interesting, that the last three statements are responsible for 85%
of the allocation and 90% of the cpu usage. This seems unnecessary,
because for sending multicast heartbeat, name, domain and host do not
change, so they could be buffered easily.

2) receive cpu time, elapsed time and allocation, per receive

  cpu  elapsedalloc
3.5ms 23-510ms 744-760B McastServiceImpl.receive()

0.1ms  3-485ms   0B   socket.receive()
2.8ms   17.9ms 640B   McastMember.getMember()

1.4ms8.1ms  160Bnew String(named),
1.0ms5.6ms  128Bnew String(domaind),
0.1ms0.6ms  112BaddressToString(addr),

0.3ms2.7ms   16B  ... membership.memberAlive(m)  [Only 50%]
0.2ms2.3ms   32B  ... membership.expire(timeToExpiration);
...

The calls to memberAlive are much faster in ~50% of the calls.

Here most interesting is the fact, that the string construction takes
70% of total cpu time. I inspected, why this is so. For the next trace I
had to increase the depth I traced, so elapsed times go a little up. The
columns are:

- ">" or "<": ">" means start of method, "<" end of method
- stack depth relative to the receive method
- cpu time
- elapsed time
- allocated bytes
- class and method


3 -  -- java/lang/String.
4 -  -- java/lang/String.
5 -  -- java/lang/StringCoding.decode
6 -  -- java/lang/StringCoding.decode
7 -  -- java/lang/StringCoding.deref

< 7 0.1ms  0.7ms0 java/lang/StringCoding.deref

7 -  -- java/lang/StringCoding$StringDecoder.decode
8 -  -- java/nio/ByteBuffer.wrap

< 8 0.1ms  0.5ms   48 java/nio/ByteBuffer.wrap

8 -  -- java/nio/CharBuffer.wrap

< 8 0.1ms  0.5ms   48 java/nio/CharBuffer.wrap

8 -  -- java/nio/charset/CharsetDecoder.decode

< 8 0.7ms  4.4ms0 java/nio/charset/CharsetDecoder.decode
< 7 1.1ms  7.8ms  160 java/lang/StringCoding$StringDecoder.decode
< 6 1.2ms  9.1ms  160 java/lang/StringCoding.decode
< 5 1.2ms  9.5ms  160 java/lang/StringCoding.decode
< 4 1.3ms 10.1ms  160 java/lang/String.
< 3 1.3ms 10.2ms  160 java/lang/String.

So we can see, that most of the cpu time is needed inside

- java/nio/charset/CharsetDecoder.decode: 0.7ms
- java/lang/StringCoding.deref: 0.1ms
- java/nio/ByteBuffer.wrap: 0.1ms
- java/nio/CharBuffer.wrap: 0.1ms

Maybe it would help to use a more byte-oriented format in the heartbeat
messages and to not convert from it. String conversions might be
restrictable to the case when logging in debug mode.

Cheers,

Rainer


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



svn commit: r380998 - in /tomcat/sandbox: bin/ java/org/apache/tomcat/standalone/ java/org/apache/tomcat/util/net/ js-bin/ webapps/

2006-02-25 Thread costin
Author: costin
Date: Sat Feb 25 13:35:16 2006
New Revision: 380998

URL: http://svn.apache.org/viewcvs?rev=380998&view=rev
Log:
Few adjustments

Added:
tomcat/sandbox/java/org/apache/tomcat/standalone/SingleMain.java
tomcat/sandbox/js-bin/
tomcat/sandbox/webapps/
Modified:
tomcat/sandbox/bin/jam_tomcat.sh
tomcat/sandbox/java/org/apache/tomcat/standalone/Main.java
tomcat/sandbox/java/org/apache/tomcat/standalone/WebappsMain.java
tomcat/sandbox/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java
tomcat/sandbox/java/org/apache/tomcat/util/net/SimpleEndpoint.java

Modified: tomcat/sandbox/bin/jam_tomcat.sh
URL: 
http://svn.apache.org/viewcvs/tomcat/sandbox/bin/jam_tomcat.sh?rev=380998&r1=380997&r2=380998&view=diff
==
--- tomcat/sandbox/bin/jam_tomcat.sh (original)
+++ tomcat/sandbox/bin/jam_tomcat.sh Sat Feb 25 13:35:16 2006
@@ -1,3 +1,4 @@
+#!/bin/sh 
 
-BASE=..
-jamvm -Xms32M -cp 
$BASE/runtime/tomcat-all-runtime.jar:$BASE/repository/mx4j-3.0.1/lib/mx4j.jar 
org.apache.catalina.startup.Bootstrap start
+BASE=`pwd`/..
+jamvm -Xms32M -cp 
$BASE/sandbox/runtime/tomcat-runtime.jar:$BASE/repository/mx4j-3.0.1/lib/mx4j.jar
 org.apache.tomcat.standalone.Main $*

Modified: tomcat/sandbox/java/org/apache/tomcat/standalone/Main.java
URL: 
http://svn.apache.org/viewcvs/tomcat/sandbox/java/org/apache/tomcat/standalone/Main.java?rev=380998&r1=380997&r2=380998&view=diff
==
--- tomcat/sandbox/java/org/apache/tomcat/standalone/Main.java (original)
+++ tomcat/sandbox/java/org/apache/tomcat/standalone/Main.java Sat Feb 25 
13:35:16 2006
@@ -31,14 +31,19 @@
 return;
 }
 String dispatch = args[0];
+// default: use conf/, server.xml, etc
 String launcher = "org.apache.catalina.startup.Bootstrap";
 if( "-webapps".equals(dispatch) ) {
+// webapps dir, autodeploy
 launcher = "org.apache.tomcat.standalone.WebappsMain";
-} else if("-app".equals(dispatch)) {
-launcher = "org.apache.tomcat.standalone.SimpleAppsMain";  
  
+} else if("-single".equals(dispatch)) {
+// one webapp, using web.xml
+launcher = "org.apache.tomcat.standalone.SingleMain";
 } else if("-etomcat".equals(dispatch)) {
+// explicit control, no XML
 launcher = "org.apache.tomcat.standalone.ETomcat";
 } else if("-coyote".equals(dispatch)) {
+// only http11, no servlets
 launcher = "org.apache.coyote.standalone.Main";
 }
 try {

Added: tomcat/sandbox/java/org/apache/tomcat/standalone/SingleMain.java
URL: 
http://svn.apache.org/viewcvs/tomcat/sandbox/java/org/apache/tomcat/standalone/SingleMain.java?rev=380998&view=auto
==
--- tomcat/sandbox/java/org/apache/tomcat/standalone/SingleMain.java (added)
+++ tomcat/sandbox/java/org/apache/tomcat/standalone/SingleMain.java Sat Feb 25 
13:35:16 2006
@@ -0,0 +1,52 @@
+/*
+ */
+package org.apache.tomcat.standalone;
+
+import org.apache.catalina.core.StandardContext;
+import org.apache.catalina.startup.ContextConfig;
+
+/**
+ * Start tomcat using server.xml and web.xml and regular config files 
+ * 
+ * @author Costin Manolache
+ */
+public class SingleMain extends ETomcat {
+
+public static void main( String args[] ) {
+try {
+SingleMain etomcat = new SingleMain();
+
+etomcat.initServer(null);
+etomcat.initConnector(8000);
+
+// Use this to load indivitdual webapp, without auto-deployment
+etomcat.initHost("localhost");
+
+if( args.length < 2 ) {
+etomcat.initWebXmlApp("/", "webapps/ROOT");
+} else {
+etomcat.initWebapp(args[0], args[1]);
+etomcat.initWebappDefaults();
+}
+
+etomcat.start();
+} catch (Exception e) {
+// TODO Auto-generated catch block
+e.printStackTrace();
+}
+}
+
+public StandardContext initWebXmlApp(String path, String dir) {
+ctx = new StandardContext();
+ctx.setPath( path );
+ctx.setDocBase(dir);
+
+// web.xml reader
+ContextConfig ctxCfg = new ContextConfig();
+ctx.addLifecycleListener( ctxCfg );
+
+host.addChild(ctx);
+return ctx;
+}
+
+}

Modified: tomcat/sandbox/java/org/apache/tomcat/standalone/WebappsMain.java
URL: 
http://svn.apache.org/viewcvs/tomcat/sandbox/java/org/apache/tomcat/standalone/WebappsMain.java?rev=380998&r1=380997&r2=380998&view=diff
==
--- tomcat/sandbox/java/org/apache/tomcat/standalone/WebappsMain.java (ori

Re: DTrace analysis of TC-Cluster Multicast

2006-02-25 Thread Filip Hanik - Dev Lists
Cool Rainer, interesting numbers. Can you run the same numbers on the 
new module groupcom.
I have done some optimizations there, for example, the name isn't 
broadcasted. And I am about to remove the domain, instead of having a 
default one. also, I agree, lets not translate the 4byte IP and the 
4byte port when receiving it. instead, member comparisons can be done on 
the byte array level, excellent suggestion.


After that I won't be spending to much focus on this issue, as a 
heartbeat do not really have to be optimized. The heartbeat runs *very* 
infrequently and it not a critical piece.


Instead I am gonna start reworking the data senders, there are way too 
many synchronized calls locking down the sockets, the code is somewhat 
cluttered then I am gonna move on to serialization. In the current 
cluster module, too much gets serialized, in the new module "ha" I have 
already removed a lot of serialization and will continue stripping it out.


Filip

Rainer Jung wrote:

Hi,

I started to trace TC cluster with DTrace. I did a first simple exam for
the mcast subcomplex. CPU usage and especially elapsed times might be
slightly larger than expected, because I used the more intrusive
extended DTrace probes.

All tests were done with JDK 1.6.0 build 72 on Solaris 10 SPARC, using a
T2000 system (8 cores with 4 Threads each).

Method  allocationelapsed  cpu
mcast/McastServiceImpl.send()1328B   40ms6.7ms
mcast/McastServiceImpl.receive()  744-760B   23-510ms3.5ms

So this does not look very bad, but I inspected, where cpu time is used
and objects get allocated:

1) send cpu time, elapsed time and allocation, per send

  cpu elapsed alloc
6.7ms  40.3ms 1328B  McastServiceImpl.send()

6.3ms  37.6ms 1296BMcastMember.getData()

1.3ms   7.6ms  136B   ... getName().getBytes();
0.9ms   5.3ms  120B   ... getDomain().getBytes();
3.6ms  21.2ms  880B   ... java.net.InetAddress.getByName(host)...

It's interesting, that the last three statements are responsible for 85%
of the allocation and 90% of the cpu usage. This seems unnecessary,
because for sending multicast heartbeat, name, domain and host do not
change, so they could be buffered easily.

2) receive cpu time, elapsed time and allocation, per receive

  cpu  elapsedalloc
3.5ms 23-510ms 744-760B McastServiceImpl.receive()

0.1ms  3-485ms   0B   socket.receive()
2.8ms   17.9ms 640B   McastMember.getMember()

1.4ms8.1ms  160Bnew String(named),
1.0ms5.6ms  128Bnew String(domaind),
0.1ms0.6ms  112BaddressToString(addr),

0.3ms2.7ms   16B  ... membership.memberAlive(m)  [Only 50%]
0.2ms2.3ms   32B  ... membership.expire(timeToExpiration);
...

The calls to memberAlive are much faster in ~50% of the calls.

Here most interesting is the fact, that the string construction takes
70% of total cpu time. I inspected, why this is so. For the next trace I
had to increase the depth I traced, so elapsed times go a little up. The
columns are:

- ">" or "<": ">" means start of method, "<" end of method
- stack depth relative to the receive method
- cpu time
- elapsed time
- allocated bytes
- class and method


3 -  -- java/lang/String.
4 -  -- java/lang/String.
5 -  -- java/lang/StringCoding.decode
6 -  -- java/lang/StringCoding.decode
7 -  -- java/lang/StringCoding.deref

< 7 0.1ms  0.7ms0 java/lang/StringCoding.deref

7 -  -- java/lang/StringCoding$StringDecoder.decode
8 -  -- java/nio/ByteBuffer.wrap

< 8 0.1ms  0.5ms   48 java/nio/ByteBuffer.wrap

8 -  -- java/nio/CharBuffer.wrap

< 8 0.1ms  0.5ms   48 java/nio/CharBuffer.wrap

8 -  -- java/nio/charset/CharsetDecoder.decode

< 8 0.7ms  4.4ms0 java/nio/charset/CharsetDecoder.decode
< 7 1.1ms  7.8ms  160 java/lang/StringCoding$StringDecoder.decode
< 6 1.2ms  9.1ms  160 java/lang/StringCoding.decode
< 5 1.2ms  9.5ms  160 java/lang/StringCoding.decode
< 4 1.3ms 10.1ms  160 java/lang/String.
< 3 1.3ms 10.2ms  160 java/lang/String.

So we can see, that most of the cpu time is needed inside

- java/nio/charset/CharsetDecoder.decode: 0.7ms
- java/lang/StringCoding.deref: 0.1ms
- java/nio/ByteBuffer.wrap: 0.1ms
- java/nio/CharBuffer.wrap: 0.1ms

Maybe it would help to use a more byte-oriented format in the heartbeat
messages and to not convert from it. String conversions might be
restrictable to the case when logging in debug mode.

Cheers,

Rainer


-
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: DTrace analysis of TC-Cluster Multicast

2006-02-25 Thread Rainer Jung
I agree, heartbeat is not that important w.r.t. performance. I used it 
as a simple test for how DTrace will be able to help. And at least in 
that nearly trivial test case the results are already interesting.


Another thing that DTrace can check is lock contention. So there's more 
to come :)


Do you have a working build of groupcom? I could trace some of the group 
communication.


I hope you will not sacrifice synchronization correctness for 
performance ...


Rainer

Filip Hanik - Dev Lists wrote:
Cool Rainer, interesting numbers. Can you run the same numbers on the 
new module groupcom.
I have done some optimizations there, for example, the name isn't 
broadcasted. And I am about to remove the domain, instead of having a 
default one. also, I agree, lets not translate the 4byte IP and the 
4byte port when receiving it. instead, member comparisons can be done on 
the byte array level, excellent suggestion.


After that I won't be spending to much focus on this issue, as a 
heartbeat do not really have to be optimized. The heartbeat runs *very* 
infrequently and it not a critical piece.


Instead I am gonna start reworking the data senders, there are way too 
many synchronized calls locking down the sockets, the code is somewhat 
cluttered then I am gonna move on to serialization. In the current 
cluster module, too much gets serialized, in the new module "ha" I have 
already removed a lot of serialization and will continue stripping it out.


Filip

Rainer Jung wrote:

Hi,

I started to trace TC cluster with DTrace. I did a first simple exam for
the mcast subcomplex. CPU usage and especially elapsed times might be
slightly larger than expected, because I used the more intrusive
extended DTrace probes.

All tests were done with JDK 1.6.0 build 72 on Solaris 10 SPARC, using a
T2000 system (8 cores with 4 Threads each).

Method  allocationelapsed  cpu
mcast/McastServiceImpl.send()1328B   40ms6.7ms
mcast/McastServiceImpl.receive()  744-760B   23-510ms3.5ms

So this does not look very bad, but I inspected, where cpu time is used
and objects get allocated:

1) send cpu time, elapsed time and allocation, per send

  cpu elapsed alloc
6.7ms  40.3ms 1328B  McastServiceImpl.send()

6.3ms  37.6ms 1296BMcastMember.getData()

1.3ms   7.6ms  136B   ... getName().getBytes();
0.9ms   5.3ms  120B   ... getDomain().getBytes();
3.6ms  21.2ms  880B   ... java.net.InetAddress.getByName(host)...

It's interesting, that the last three statements are responsible for 85%
of the allocation and 90% of the cpu usage. This seems unnecessary,
because for sending multicast heartbeat, name, domain and host do not
change, so they could be buffered easily.

2) receive cpu time, elapsed time and allocation, per receive

  cpu  elapsedalloc
3.5ms 23-510ms 744-760B McastServiceImpl.receive()

0.1ms  3-485ms   0B   socket.receive()
2.8ms   17.9ms 640B   McastMember.getMember()

1.4ms8.1ms  160Bnew String(named),
1.0ms5.6ms  128Bnew String(domaind),
0.1ms0.6ms  112BaddressToString(addr),

0.3ms2.7ms   16B  ... membership.memberAlive(m)  [Only 50%]
0.2ms2.3ms   32B  ... membership.expire(timeToExpiration);
...

The calls to memberAlive are much faster in ~50% of the calls.

Here most interesting is the fact, that the string construction takes
70% of total cpu time. I inspected, why this is so. For the next trace I
had to increase the depth I traced, so elapsed times go a little up. The
columns are:

- ">" or "<": ">" means start of method, "<" end of method
- stack depth relative to the receive method
- cpu time
- elapsed time
- allocated bytes
- class and method


3 -  -- java/lang/String.
4 -  -- java/lang/String.
5 -  -- java/lang/StringCoding.decode
6 -  -- java/lang/StringCoding.decode
7 -  -- java/lang/StringCoding.deref

< 7 0.1ms  0.7ms0 java/lang/StringCoding.deref

7 -  -- java/lang/StringCoding$StringDecoder.decode
8 -  -- java/nio/ByteBuffer.wrap

< 8 0.1ms  0.5ms   48 java/nio/ByteBuffer.wrap

8 -  -- java/nio/CharBuffer.wrap

< 8 0.1ms  0.5ms   48 java/nio/CharBuffer.wrap

8 -  -- java/nio/charset/CharsetDecoder.decode

< 8 0.7ms  4.4ms0 java/nio/charset/CharsetDecoder.decode
< 7 1.1ms  7.8ms  160 java/lang/StringCoding$StringDecoder.decode
< 6 1.2ms  9.1ms  160 java/lang/StringCoding.decode
< 5 1.2ms  9.5ms  160 java/lang/StringCoding.decode
< 4 1.3ms 10.1ms  160 java/lang/String.
< 3 1.3ms 10.2ms  160 java/lang/String.

So we can see, that most of the cpu time is needed inside

- java/nio/charset/CharsetDecoder.decode: 0.7ms
- java/lang/StringCoding.deref: 0.1ms
- java/nio/ByteBuffer.wrap: 0.1ms
- java/nio/CharBuffer.wrap: 0.1ms

Maybe it would help to use a more byte-oriented format in the heartbeat
messages and to not convert from it. String conversions might be
restrictable to 

Re: DTrace analysis of TC-Cluster Multicast

2006-02-25 Thread Filip Hanik - Dev Lists
correctness can be achieved in many different ways,  synchronization 
just happens to be the easiest one.
The build is working, including session replication (modules 
groupcom,ha,storeconfig-ha), just uncomment one line in 
container/modules/build.properties and tomcat builds the new modules 
instead of the old.

I have a lot of refactoring and optimization left to do.

Filip


Rainer Jung wrote:
I agree, heartbeat is not that important w.r.t. performance. I used it 
as a simple test for how DTrace will be able to help. And at least in 
that nearly trivial test case the results are already interesting.


Another thing that DTrace can check is lock contention. So there's 
more to come :)


Do you have a working build of groupcom? I could trace some of the 
group communication.


I hope you will not sacrifice synchronization correctness for 
performance ...


Rainer

Filip Hanik - Dev Lists wrote:
Cool Rainer, interesting numbers. Can you run the same numbers on the 
new module groupcom.
I have done some optimizations there, for example, the name isn't 
broadcasted. And I am about to remove the domain, instead of having a 
default one. also, I agree, lets not translate the 4byte IP and the 
4byte port when receiving it. instead, member comparisons can be done 
on the byte array level, excellent suggestion.


After that I won't be spending to much focus on this issue, as a 
heartbeat do not really have to be optimized. The heartbeat runs 
*very* infrequently and it not a critical piece.


Instead I am gonna start reworking the data senders, there are way 
too many synchronized calls locking down the sockets, the code is 
somewhat cluttered then I am gonna move on to serialization. In the 
current cluster module, too much gets serialized, in the new module 
"ha" I have already removed a lot of serialization and will continue 
stripping it out.


Filip



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



svn commit: r381024 - /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/groups/demos/Draw.java

2006-02-25 Thread fhanik
Author: fhanik
Date: Sat Feb 25 15:40:22 2006
New Revision: 381024

URL: http://svn.apache.org/viewcvs?rev=381024&view=rev
Log:
minor changes

Modified:

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/groups/demos/Draw.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/groups/demos/Draw.java?rev=381024&r1=381023&r2=381024&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/groups/demos/Draw.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/groups/demos/Draw.java
 Sat Feb 25 15:40:22 2006
@@ -32,12 +32,13 @@
 import org.apache.catalina.groups.Channel;
 import org.apache.catalina.groups.ManagedChannel;
 import org.apache.catalina.groups.ChannelListener;
+import org.apache.catalina.groups.MembershipListener;
 /**
  * Shared whiteboard, each new instance joins the same group. Each instance 
chooses a random color,
  * mouse moves are broadcast to all group members, which then apply them to 
their canvas
  * @author Bela Ban, Oct 17 2001
  */
-public class Draw implements ActionListener, ChannelListener {
+public class Draw implements ActionListener, 
ChannelListener,MembershipListener {
 static LogFactoryImpl dependencyhack = new LogFactoryImpl();
 static org.apache.commons.logging.impl.SimpleLog depHack2 = new 
org.apache.commons.logging.impl.SimpleLog("test");
 
@@ -58,14 +59,15 @@
 boolean no_channel = false;
 boolean jmx;
 
-public Draw(int port, boolean debug, boolean cummulative, boolean 
no_channel, boolean jmx) throws Exception {
+public Draw(int port, boolean debug, boolean cummulative, boolean 
no_channel, boolean jmx,
+String bind) throws Exception {
 this.no_channel = no_channel;
 this.jmx = jmx;
 if (no_channel)
 return;
 
 ReplicationListener rl = new ReplicationListener();
-rl.setTcpListenAddress("auto");
+rl.setTcpListenAddress(bind);
 rl.setTcpListenPort(port);
 rl.setTcpSelectorTimeout(100);
 rl.setTcpThreadCount(4);
@@ -79,6 +81,7 @@
 
 McastService service = new McastService();
 service.setMcastAddr("228.0.0.5");
+//service.setMcastBindAddress("0.0.0.0");
 service.setMcastFrequency(500);
 service.setMcastDropTime(5000);
 service.setMcastPort(45565);
@@ -90,6 +93,7 @@
 channel.start(channel.DEFAULT);
 
 channel.setChannelListener(this);
+channel.setMembershipListener(this);
 
 if (debug) {
 }
@@ -112,6 +116,7 @@
 boolean no_channel = false;
 boolean jmx = false;
 String group_name = null;
+String bind = "auto";
 
 for (int i = 0; i < args.length; i++) {
 if ("-help".equals(args[i])) {
@@ -142,13 +147,19 @@
 group_name = args[++i];
 continue;
 }
+
+if ("-bind".equals(args[i])) {
+bind = args[++i];
+continue;
+}
+
 
 help();
 return;
 }
 
 try {
-draw = new Draw(port, debug, cummulative, no_channel, jmx);
+draw = new Draw(port, debug, cummulative, no_channel, jmx,bind);
 if (group_name != null)
 draw.setGroupName(group_name);
 draw.go();



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



svn commit: r381026 - in /tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster: ./ deploy/ session/ tcp/

2006-02-25 Thread fhanik
Author: fhanik
Date: Sat Feb 25 15:43:51 2006
New Revision: 381026

URL: http://svn.apache.org/viewcvs?rev=381026&view=rev
Log:
Refactored new module name

Modified:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Modified: 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/CatalinaCluster.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/CatalinaCluster.java?rev=381026&r1=381025&r2=381026&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/CatalinaCluster.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/CatalinaCluster.java
 Sat Feb 25 15:43:51 2006
@@ -23,10 +23,10 @@
 import org.apache.catalina.Manager;
 import org.apache.catalina.Valve;
 import org.apache.commons.logging.Log;
-import org.apache.catalina.groups.io.ReplicationStream;
+import org.apache.catalina.tribes.io.ReplicationStream;
 import java.io.IOException;
-import org.apache.catalina.groups.Channel;
-import org.apache.catalina.groups.Member;
+import org.apache.catalina.tribes.Channel;
+import org.apache.catalina.tribes.Member;
 
 
 

Modified: 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/ClusterDeployer.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/ClusterDeployer.java?rev=381026&r1=381025&r2=381026&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/ClusterDeployer.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/ClusterDeployer.java
 Sat Feb 25 15:43:51 2006
@@ -26,7 +26,7 @@
 import org.apache.catalina.LifecycleException;
 import java.io.IOException;
 import java.net.URL;
-import org.apache.catalina.groups.MessageListener;
+import org.apache.catalina.tribes.MessageListener;
 
 public interface ClusterDeployer extends MessageListener {
 /**

Modified: 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/ClusterListener.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/ClusterListener.java?rev=381026&r1=381025&r2=381026&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/ClusterListener.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/ClusterListener.java
 Sat Feb 25 15:43:51 2006
@@ -20,8 +20,8 @@
 
 
 import org.apache.catalina.util.StringManager;
-import org.apache.catalina.groups.MessageListener;
-import org.apache.catalina.groups.ChannelMessage;
+import org.apache.catalina.tribes.MessageListener;
+import org.apache.catalina.tribes.ChannelMessage;
 
 
 /**

Modified: 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/ClusterMessage.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/ClusterMessage.java?rev=381026&r1=381025&r2=381026&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/ClusterMessage.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/cluster/

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

2006-02-25 Thread fhanik
Author: fhanik
Date: Sat Feb 25 15:45:29 2006
New Revision: 381027

URL: http://svn.apache.org/viewcvs?rev=381027&view=rev
Log:
move to the correct location

Added:
tomcat/container/tc5.5.x/modules/groupcom/test/org/
tomcat/container/tc5.5.x/modules/groupcom/test/org/apache/
tomcat/container/tc5.5.x/modules/groupcom/test/org/apache/catalina/
tomcat/container/tc5.5.x/modules/groupcom/test/org/apache/catalina/tribes/

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

tomcat/container/tc5.5.x/modules/groupcom/test/org/apache/catalina/tribes/demos/Draw.java
  - copied unchanged from r381025, 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/demos/Draw.java
Removed:

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


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



svn commit: r381028 - /tomcat/container/tc5.5.x/modules/ha/etc/cluster-server.xml

2006-02-25 Thread fhanik
Author: fhanik
Date: Sat Feb 25 15:47:59 2006
New Revision: 381028

URL: http://svn.apache.org/viewcvs?rev=381028&view=rev
Log:
refactored module name

Modified:
tomcat/container/tc5.5.x/modules/ha/etc/cluster-server.xml

Modified: tomcat/container/tc5.5.x/modules/ha/etc/cluster-server.xml
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/ha/etc/cluster-server.xml?rev=381028&r1=381027&r2=381028&view=diff
==
--- tomcat/container/tc5.5.x/modules/ha/etc/cluster-server.xml (original)
+++ tomcat/container/tc5.5.x/modules/ha/etc/cluster-server.xml Sat Feb 25 
15:47:59 2006
@@ -285,29 +285,29 @@
  useDirtyFlag="true"
  notifyListenersOnReplication="true">
 
-
+
 
 
 
 
 
 
-
+
 
 
 

Strange Google search text for Tomcat

2006-02-25 Thread Yoav Shapira
Hi,
When I do a Google search for Tomcat, the first result is
tomcat.apache.org as expected, but the snippet line that google
displays is strange, saying something about Tomcat growing into a
fuller J2EE container.  Does anyone have a clue where the line under
the top result ("has grown into...") comes from?

Attaching a screenshot to show this, though it's easy to reproduce by
just googling for tomcat...

--
Yoav Shapira
System Design and Management Fellow
MIT Sloan School of Management
Cambridge, MA, USA
[EMAIL PROTECTED] / www.yoavshapira.com

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

Re: Strange Google search text for Tomcat

2006-02-25 Thread Costin Manolache
If you do a search for the snippet, one of the first links is in the
directory - 
http://www.google.com/Top/Computers/Programming/Languages/Java/Server-Side/Servlets/Servlet_Engines/

Searching for resin or servletexec will also show the snippents from
the directory - so it's likely the source.

Don't know how it could be fixed - either submit it with the right
description, or maybe ask to become an editor ?

Costin
( with standard disclaimers, I just did a quick search :-)


On 2/25/06, Yoav Shapira <[EMAIL PROTECTED]> wrote:
> Hi,
> When I do a Google search for Tomcat, the first result is
> tomcat.apache.org as expected, but the snippet line that google
> displays is strange, saying something about Tomcat growing into a
> fuller J2EE container.  Does anyone have a clue where the line under
> the top result ("has grown into...") comes from?
>
> Attaching a screenshot to show this, though it's easy to reproduce by
> just googling for tomcat...
>
> --
> Yoav Shapira
> System Design and Management Fellow
> MIT Sloan School of Management
> Cambridge, MA, USA
> [EMAIL PROTECTED] / www.yoavshapira.com
>
>
>
> -
> 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]