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

2006-03-13 Thread fhanik
Author: fhanik
Date: Mon Mar 13 21:57:25 2006
New Revision: 385744

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

Modified:

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java?rev=385744&r1=385743&r2=385744&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java
 Mon Mar 13 21:57:25 2006
@@ -54,10 +54,7 @@
 boolean frag = (size>maxSize);
 if ( frag ) {
 frag(destination, msg, payload);
-}
-else {
-//byte[] flag = XByteBuffer.toBytes(frag);
-//msg.getMessage().append(flag,0,flag.length);
+} else {
 msg.getMessage().append(frag);
 super.sendMessage(destination, msg, payload);
 }



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



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

2006-03-13 Thread fhanik
Author: fhanik
Date: Mon Mar 13 21:44:46 2006
New Revision: 385742

URL: http://svn.apache.org/viewcvs?rev=385742&view=rev
Log:
Optimizing the interceptors

Modified:

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/group/interceptors/OrderInterceptor.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/mcast/McastMember.java

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

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelCoordinator.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelCoordinator.java?rev=385742&r1=385741&r2=385742&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelCoordinator.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelCoordinator.java
 Mon Mar 13 21:44:46 2006
@@ -37,6 +37,7 @@
 private ChannelReceiver clusterReceiver;
 private ChannelSender clusterSender;
 private MembershipService membershipService;
+private boolean started = false;
 
 public ChannelCoordinator() {
 
@@ -75,15 +76,18 @@
  * SND_RX_SEQ - starts the replication receiver
  * @throws ChannelException if a startup error occurs or the service is 
already started.
  */
-public void start(int svc) throws ChannelException {
+public synchronized void start() throws ChannelException {
 try {
+if (started) return;
+//must start the receiver first so that we can coordinate the port 
it
+//listens to with the local membership settings
+clusterReceiver.start();
+clusterSender.start();
 //synchronize, big time FIXME
 
membershipService.setLocalMemberProperties(getClusterReceiver().getHost(), 
getClusterReceiver().getPort());
-//end FIXME
-if ( (svc & Channel.SND_RX_SEQ) == Channel.SND_RX_SEQ) 
clusterReceiver.start();
-if ( (svc & Channel.SND_TX_SEQ) == Channel.SND_TX_SEQ) 
clusterSender.start();
-if ( (svc & Channel.MBR_RX_SEQ) == Channel.MBR_RX_SEQ) 
membershipService.start(MembershipService.MBR_RX);
-if ( (svc & Channel.MBR_TX_SEQ) == Channel.MBR_TX_SEQ) 
membershipService.start(MembershipService.MBR_TX);
+membershipService.start(MembershipService.MBR_RX);
+membershipService.start(MembershipService.MBR_TX);
+this.started = true;
 }catch ( ChannelException cx ) {
 throw cx;
 }catch ( Exception x ) {
@@ -102,14 +106,16 @@
  * SND_RX_SEQ - starts the replication receiver
  * @throws ChannelException if a startup error occurs or the service is 
already started.
  */
-public void stop(int svc) throws ChannelException {
+public void stop() throws ChannelException {
 try {
-if ( (svc & Channel.MBR_RX_SEQ) == Channel.MBR_RX_SEQ) 
membershipService.stop();
-if ( (svc & Channel.SND_RX_SEQ) == Channel.SND_RX_SEQ) 
clusterReceiver.stop();
-if ( (svc & Channel.SND_TX_SEQ) == Channel.SND_TX_SEQ) 
clusterSender.stop();
-if ( (svc & Channel.MBR_TX_SEQ) == Channel.MBR_RX_SEQ) 
membershipService.stop();
+membershipService.stop();
+clusterReceiver.stop();
+clusterSender.stop();
+membershipService.stop();
 }catch ( Exception x ) {
 throw new ChannelException(x);
+} finally {
+started = false;
 }
 
 }

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=385742&r1=385741&r2=385742&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 Mar 13 21:44:46 2006
@@ -173,7 +173,7 @@
  * @throws ChannelException if a startup error occurs or the service is 
already started

svn commit: r385731 - /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastMember.java

2006-03-13 Thread fhanik
Author: fhanik
Date: Mon Mar 13 20:35:40 2006
New Revision: 385731

URL: http://svn.apache.org/viewcvs?rev=385731&view=rev
Log:
removed commented out code

Modified:

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastMember.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastMember.java?rev=385731&r1=385730&r2=385731&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastMember.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/mcast/McastMember.java
 Mon Mar 13 20:35:40 2006
@@ -140,6 +140,11 @@
 public byte[] getData()  {
 return getData(true);
 }
+/**
+ * Highly optimized version of serializing a member into a byte array
+ * @param getalive boolean
+ * @return byte[]
+ */
 public byte[] getData(boolean getalive)  {
 //look in cache first
 if ( dataPkg!=null ) {
@@ -165,18 +170,12 @@
 long alive=System.currentTimeMillis()-getServiceStartTime();
 
 
-//reduce byte copying
-//System.arraycopy(XByteBuffer.toBytes((long)alive),0,data,0,8);
 XByteBuffer.toBytes((long)alive,data,0);
 
-//reduce byte copying
-//System.arraycopy(XByteBuffer.toBytes(port),0,data,8,4);
 XByteBuffer.toBytes(port,data,8);
 
 System.arraycopy(addr,0,data,12,addr.length);
 
-//reduce byte copying
-//System.arraycopy(XByteBuffer.toBytes(domaind.length),0,data,16,4);
 XByteBuffer.toBytes(domaind.length,data,16);
 
 System.arraycopy(domaind,0,data,20,domaind.length);



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



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

2006-03-13 Thread fhanik
Author: fhanik
Date: Mon Mar 13 20:20:19 2006
New Revision: 385730

URL: http://svn.apache.org/viewcvs?rev=385730&view=rev
Log:
removed commented out code

Modified:

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/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=385730&r1=385729&r2=385730&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 Mar 13 20:20:19 2006
@@ -346,7 +346,6 @@
 throw new ArrayIndexOutOfBoundsException("Unable to create data 
package, buffer is too small.");
 }
 System.arraycopy(START_DATA, 0, buffer, bufoff, START_DATA.length);
-//System.arraycopy(toBytes(data.length), 0, buffer, 
bufoff+START_DATA.length, 4);
 toBytes(data.length,buffer, bufoff+START_DATA.length);
 System.arraycopy(data, doff, buffer, bufoff+START_DATA.length + 4, 
dlength);
 System.arraycopy(END_DATA, 0, buffer, bufoff+START_DATA.length + 4 + 
data.length, END_DATA.length);



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



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

2006-03-13 Thread fhanik
Author: fhanik
Date: Mon Mar 13 20:17:54 2006
New Revision: 385729

URL: http://svn.apache.org/viewcvs?rev=385729&view=rev
Log:
More optimizations

Modified:

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/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=385729&r1=385728&r2=385729&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 Mar 13 20:17:54 2006
@@ -346,7 +346,8 @@
 throw new ArrayIndexOutOfBoundsException("Unable to create data 
package, buffer is too small.");
 }
 System.arraycopy(START_DATA, 0, buffer, bufoff, START_DATA.length);
-System.arraycopy(toBytes(data.length), 0, buffer, 
bufoff+START_DATA.length, 4);
+//System.arraycopy(toBytes(data.length), 0, buffer, 
bufoff+START_DATA.length, 4);
+toBytes(data.length,buffer, bufoff+START_DATA.length);
 System.arraycopy(data, doff, buffer, bufoff+START_DATA.length + 4, 
dlength);
 System.arraycopy(END_DATA, 0, buffer, bufoff+START_DATA.length + 4 + 
data.length, END_DATA.length);
 return buffer;



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



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

2006-03-13 Thread fhanik
Author: fhanik
Date: Mon Mar 13 20:11:59 2006
New Revision: 385728

URL: http://svn.apache.org/viewcvs?rev=385728&view=rev
Log:
Performance optimizations

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

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

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

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

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/bio/BioSender.java

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

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

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

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

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

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

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=385728&r1=385727&r2=385728&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 Mar 13 20:11:59 2006
@@ -104,7 +104,7 @@
  * 
  * @return Member
  */
-public Member getLocalMember() ;
+public Member getLocalMember(boolean incAlive) ;
 
 /**
  * 

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=385728&r1=385727&r2=385728&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 Mar 13 20:11:59 2006
@@ -60,7 +60,7 @@
  * 
  * @return Member
  */
-public Member getLocalMember() ;
+public Member getLocalMember(boolean incAliveTime) ;
 
 /**
  * 

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MembershipService.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MembershipService.java?rev=385728&r1=385727&r2=385728&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MembershipService.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MembershipService.java
 Mon Mar 13 20:11:59 2006
@@ -80,7 +80,7 @@
 /**
  * Returns the member object that defines this member
  */
-public Member getLocalMember();
+public Member getLocalMember(boolean incAliveTime);
 
 /**
  * Return all members by name

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelCoordinator.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelCoordinator.java?rev=385728&r1=385727&r2=385728&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelCoordinator.java
 (original)
+++ 
tomcat/container/tc5.5.x/

svn commit: r385711 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp: ./ bio/ nio/

2006-03-13 Thread fhanik
Author: fhanik
Date: Mon Mar 13 18:00:05 2006
New Revision: 385711

URL: http://svn.apache.org/viewcvs?rev=385711&view=rev
Log:
Completed more of the interfaces

Modified:

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

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

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/bio/BioSender.java

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

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

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

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

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/AbstractPooledSender.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/AbstractPooledSender.java?rev=385711&r1=385710&r2=385711&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/AbstractPooledSender.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/AbstractPooledSender.java
 Mon Mar 13 18:00:05 2006
@@ -15,14 +15,7 @@
  */
 package org.apache.catalina.tribes.tcp;
 
-import java.io.IOException;
 
-import org.apache.catalina.tribes.ChannelException;
-import org.apache.catalina.tribes.ChannelMessage;
-import org.apache.catalina.tribes.Member;
-import org.apache.catalina.tribes.tcp.DataSender;
-import org.apache.catalina.tribes.tcp.MultiPointSender;
-import org.apache.catalina.tribes.tcp.PooledSender;
 
 /**
  * Title: 
@@ -41,6 +34,7 @@
 protected boolean useDirectBuffer;
 protected int maxRetryAttempts;
 protected boolean autoConnect;
+protected int keepAliveCount;
 public AbstractPooledSender() {
 super();
 }
@@ -61,6 +55,10 @@
 this.autoConnect = autoConnect;
 }
 
+public void setKeepAliveCount(int keepAliveCount) {
+this.keepAliveCount = keepAliveCount;
+}
+
 public boolean getSuspect() {
 return suspect;
 }
@@ -75,5 +73,9 @@
 
 public boolean isAutoConnect() {
 return autoConnect;
+}
+
+public int getKeepAliveCount() {
+return keepAliveCount;
 }
 }

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=385711&r1=385710&r2=385711&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 Mar 13 18:00:05 2006
@@ -15,7 +15,7 @@
  */
 package org.apache.catalina.tribes.tcp;
 
-import org.apache.catalina.tribes.ChannelException;
+import java.io.IOException;
 
 /**
  * Title: 
@@ -30,7 +30,7 @@
  * @version 1.0
  */
 public interface DataSender {
-public void connect() throws ChannelException;
+public void connect() throws IOException;
 public void disconnect();
 public boolean isConnected();
 public void setRxBufSize(int size);
@@ -38,4 +38,5 @@
 public boolean keepalive();
 public void setTimeout(long timeout);
 public void setWaitForAck(boolean isWaitForAck);
+public void setKeepAliveCount(int maxRequests);
 }

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/MultiPointSender.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/MultiPointSender.java?rev=385711&r1=385710&r2=385711&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/MultiPointSender.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/MultiPointSender.jav

svn commit: r385682 - in /tomcat/container/tc5.5.x/modules/groupcom: etc/cluster-server.xml src/share/org/apache/catalina/tribes/tcp/bio/PooledMultiSender.java

2006-03-13 Thread fhanik
Author: fhanik
Date: Mon Mar 13 14:27:30 2006
New Revision: 385682

URL: http://svn.apache.org/viewcvs?rev=385682&view=rev
Log:
Added in a multi threaded blocking io sender

Added:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/PooledMultiSender.java
Modified:
tomcat/container/tc5.5.x/modules/groupcom/etc/cluster-server.xml

Modified: tomcat/container/tc5.5.x/modules/groupcom/etc/cluster-server.xml
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/etc/cluster-server.xml?rev=385682&r1=385681&r2=385682&view=diff
==
--- tomcat/container/tc5.5.x/modules/groupcom/etc/cluster-server.xml (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/etc/cluster-server.xml Mon Mar 13 
14:27:30 2006
@@ -316,7 +316,7 @@
autoConnect="true"
poolSize="25"/>
 

svn commit: r385675 - in /tomcat/container/tc5.5.x/modules/groupcom: src/share/org/apache/catalina/tribes/tcp/bio/ src/share/org/apache/catalina/tribes/tcp/nio/ src/share/org/apache/catalina/tribes/ti

2006-03-13 Thread fhanik
Author: fhanik
Date: Mon Mar 13 14:20:10 2006
New Revision: 385675

URL: http://svn.apache.org/viewcvs?rev=385675&view=rev
Log:
Fixed the map and the demo

Modified:

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

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

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

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

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

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

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/MultipointBioSender.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/MultipointBioSender.java?rev=385675&r1=385674&r2=385675&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/MultipointBioSender.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/MultipointBioSender.java
 Mon Mar 13 14:20:10 2006
@@ -11,7 +11,6 @@
 import org.apache.catalina.tribes.io.XByteBuffer;
 import org.apache.catalina.tribes.tcp.MultiPointSender;
 import org.apache.catalina.tribes.tcp.SenderState;
-import org.apache.catalina.tribes.tcp.nio.NioSender;
 
 /**
  * Title: 
@@ -96,7 +95,7 @@
 for (int i=0; ihttp://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioReceiver.java?rev=385675&r1=385674&r2=385675&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioReceiver.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioReceiver.java
 Mon Mar 13 14:20:10 2006
@@ -197,9 +197,6 @@
 (ServerSocketChannel) key.channel();
 SocketChannel channel = server.accept();
 
-//System.out.println("DEFAULT CHANNEL 
RX="+channel.socket().getReceiveBufferSize() +" our="+rxBufSize);
-//System.out.println("DEFAULT CHANNEL 
TX="+channel.socket().getSendBufferSize() +" our="+txBufSize);
-
 channel.socket().setReceiveBufferSize(rxBufSize);
 channel.socket().setSendBufferSize(txBufSize);
 Object attach = new ObjectReader(channel, 
selector,this);

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioSender.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioSender.java?rev=385675&r1=385674&r2=385675&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioSender.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioSender.java
 Mon Mar 13 14:20:10 2006
@@ -268,7 +268,7 @@
  * @return boolean
  * @todo Implement this org.apache.catalina.tribes.tcp.IDataSender method
  */
-public boolean checkKeepAlive() {
+public boolean keepalive() {
 return false;
 }
 /**

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/ParallelNioSender.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/ParallelNioSender.java?rev=385675&r1=385674&r2=385675&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/ParallelNioSender.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/ParallelNioSender.java
 Mon Mar 13 14:20:10 2006
@@ -279,8 +279,8 @@
 Map.Entry[] entries = (Map.Entry[])nioSenders.entrySet().toArray(new 
Map.Entry[nioSenders.size()]);
 for ( int i=0; ihttp://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java?rev=385675&r1=385674&r2=385675&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/

svn commit: r385667 - in /tomcat/container/tc5.5.x/modules/groupcom: etc/cluster-server.xml src/share/org/apache/catalina/tribes/tcp/bio/MultipointBioSender.java test/org/apache/catalina/tribes/demos/

2006-03-13 Thread fhanik
Author: fhanik
Date: Mon Mar 13 13:54:46 2006
New Revision: 385667

URL: http://svn.apache.org/viewcvs?rev=385667&view=rev
Log:
The blocking multipoint sender is working

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

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

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

Modified: tomcat/container/tc5.5.x/modules/groupcom/etc/cluster-server.xml
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/etc/cluster-server.xml?rev=385667&r1=385666&r2=385667&view=diff
==
--- tomcat/container/tc5.5.x/modules/groupcom/etc/cluster-server.xml (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/etc/cluster-server.xml Mon Mar 13 
13:54:46 2006
@@ -294,7 +294,7 @@
 mcastDropTime="3000"/>
 
 
 

svn commit: r385664 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio: BioSender.java MultiSocketSender.java

2006-03-13 Thread fhanik
Author: fhanik
Date: Mon Mar 13 13:45:27 2006
New Revision: 385664

URL: http://svn.apache.org/viewcvs?rev=385664&view=rev
Log:
Removed all synchronization, it happens in the class above

Removed:

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

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/BioSender.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/BioSender.java?rev=385664&r1=385663&r2=385664&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/BioSender.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/BioSender.java
 Mon Mar 13 13:45:27 2006
@@ -298,7 +298,7 @@
  * Connect other cluster member receiver 
  * @see org.apache.catalina.tribes.tcp.IDataSender#connect()
  */
-public synchronized void connect() throws ChannelException {
+public  void connect() throws ChannelException {
 try {
 openSocket();
 }catch ( Exception x ) {
@@ -312,7 +312,7 @@
  * 
  * @see IDataSender#disconnect()
  */
-public synchronized void disconnect() {
+public  void disconnect() {
 boolean connect = isConnected();
 closeSocket();
 if (connect) {
@@ -330,7 +330,7 @@
  * @return true, is socket close
  * @see DataSender#closeSocket()
  */
-public synchronized boolean keepalive() {
+public  boolean keepalive() {
 boolean isCloseSocket = true ;
 if(isConnected()) {
 if ((keepAliveTimeout > -1 && (System.currentTimeMillis() - 
keepAliveConnectTime) > keepAliveTimeout)
@@ -349,7 +349,7 @@
  * @see org.apache.catalina.tribes.tcp.IDataSender#sendMessage(,
  *  ChannelMessage)
  */
-public synchronized void sendMessage(byte[] data) throws IOException {
+public  void sendMessage(byte[] data) throws IOException {
 pushMessage(data);
 }
 
@@ -370,7 +370,7 @@
  * open real socket and set time out when waitForAck is enabled
  * is socket open return directly
  */
-protected synchronized void openSocket() throws IOException {
+protected  void openSocket() throws IOException {
if(isConnected()) return ;
try {
socket = new Socket();
@@ -399,7 +399,7 @@
  * @see DataSender#disconnect()
  * @see DataSender#closeSocket()
  */
-protected synchronized void closeSocket() {
+protected  void closeSocket() {
 if(isConnected()) {
  if (socket != null) {
 try {
@@ -434,7 +434,7 @@
  * @since 5.5.10
  */
 
-protected synchronized void pushMessage(byte[] data, boolean reconnect) 
throws IOException {
+protected  void pushMessage(byte[] data, boolean reconnect) throws 
IOException {
 keepalive();
 if ( reconnect ) closeSocket();
 if (!isConnected()) openSocket();
@@ -442,7 +442,7 @@
 writeData(data);
 }
 
-protected synchronized void pushMessage( byte[] data) throws IOException {
+protected  void pushMessage( byte[] data) throws IOException {
 boolean messageTransfered = false ;
 IOException exception = null;
 try {
@@ -480,7 +480,7 @@
  * @throws IOException
  * @since 5.5.10
  */
-protected synchronized void writeData(byte[] data) throws IOException { 
+protected  void writeData(byte[] data) throws IOException { 
 socket.getOutputStream().write(data);
 socket.getOutputStream().flush();
 if (getWaitForAck()) waitForAck();
@@ -493,7 +493,7 @@
  * @throws java.io.IOException
  * @throws java.net.SocketTimeoutException
  */
-protected synchronized void waitForAck() throws java.io.IOException {
+protected  void waitForAck() throws java.io.IOException {
 try {
 boolean ackReceived = false;
 ackbuf.clear();



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



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

2006-03-13 Thread fhanik
Author: fhanik
Date: Mon Mar 13 13:40:56 2006
New Revision: 385662

URL: http://svn.apache.org/viewcvs?rev=385662&view=rev
Log:
Fixed socket connection logic, too many methods doing the same thing, also, no 
timeout was set for connection timeout

Modified:

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/BioSender.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/BioSender.java?rev=385662&r1=385661&r2=385662&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/BioSender.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/BioSender.java
 Mon Mar 13 13:40:56 2006
@@ -28,6 +28,7 @@
 import org.apache.catalina.tribes.tcp.DataSender;
 import org.apache.catalina.tribes.tcp.SenderState;
 import org.apache.catalina.util.StringManager;
+import java.net.InetSocketAddress;
 
 /**
  * Send cluster messages with only one socket. Ack and keep Alive Handling is
@@ -73,7 +74,7 @@
 /**
  * is Socket really connected
  */
-private boolean isSocketConnected = false;
+private boolean connected = false;
 
 /**
  * sender is in suspect state (last transfer failed)
@@ -187,7 +188,7 @@
 }
 
 public boolean isConnected() {
-return isSocketConnected;
+return connected;
 }
 
 public boolean isSuspect() {
@@ -312,12 +313,12 @@
  * @see IDataSender#disconnect()
  */
 public synchronized void disconnect() {
-boolean connect = isConnected() ;
-closeSocket();
-if(connect) {
-if (log.isDebugEnabled())
-log.debug(sm.getString("IDataSender.disconnect", 
address.getHostAddress(),new Integer(port),new Long(0)));
-}
+boolean connect = isConnected();
+closeSocket();
+if (connect) {
+if (log.isDebugEnabled())
+log.debug(sm.getString("IDataSender.disconnect", 
address.getHostAddress(), new Integer(port), new Long(0)));
+}
 
 }
 
@@ -370,16 +371,19 @@
  * is socket open return directly
  */
 protected synchronized void openSocket() throws IOException {
-   if(isConnected())
-   return ;
+   if(isConnected()) return ;
try {
-createSocket();
-if (getWaitForAck()) socket.setSoTimeout((int) timeout);
-isSocketConnected = true;
-this.keepAliveCount = 0;
-this.keepAliveConnectTime = System.currentTimeMillis();
-if (log.isDebugEnabled())
-log.debug(sm.getString("IDataSender.openSocket", 
address.getHostAddress(), new Integer(port),new Long(0)));
+   socket = new Socket();
+   InetSocketAddress sockaddr = new InetSocketAddress(getAddress(), 
getPort());
+   socket.connect(sockaddr,(int)timeout);
+   socket.setSendBufferSize(getTxBufSize());
+   socket.setReceiveBufferSize(getRxBufSize());
+   socket.setSoTimeout( (int) timeout);
+   connected = true;
+   this.keepAliveCount = 0;
+   this.keepAliveConnectTime = System.currentTimeMillis();
+   if (log.isDebugEnabled())
+   log.debug(sm.getString("IDataSender.openSocket", 
address.getHostAddress(), new Integer(port), new Long(0)));
   } catch (IOException ex1) {
   getSenderState().setSuspect();
   if (log.isDebugEnabled())
@@ -390,17 +394,6 @@
  }
 
 /**
- * @throws IOException
- * @throws SocketException
- */
-protected synchronized void createSocket() throws IOException, 
SocketException {
-socket = new Socket(getAddress(), getPort());
-socket.setSendBufferSize(getTxBufSize());
-socket.setReceiveBufferSize(getRxBufSize());
-socket.setSoTimeout((int)timeout);
-}
-
-/**
  * close socket
  * 
  * @see DataSender#disconnect()
@@ -417,7 +410,7 @@
 }
 }
 this.keepAliveCount = 0;
-isSocketConnected = false;
+connected = false;
 if (log.isDebugEnabled())
 
log.debug(sm.getString("IDataSender.closeSocket",address.getHostAddress(), new 
Integer(port),new Long(0)));
}



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



svn commit: r385661 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp: ./ bio/ nio/

2006-03-13 Thread fhanik
Author: fhanik
Date: Mon Mar 13 13:33:03 2006
New Revision: 385661

URL: http://svn.apache.org/viewcvs?rev=385661&view=rev
Log:
Working on simplicity, removing all complex code, synchronization should be 
simple, but ideally, there should be none, two threads should never try to 
access the same socket

Added:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/BioSender.java
  - copied, changed from r385654, 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/SinglePointDataSender.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/MultipointBioSender.java
Removed:

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

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

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/bio/MultiSocketSender.java

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/ParallelNioSender.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=385661&r1=385660&r2=385661&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 Mar 13 13:33:03 2006
@@ -35,7 +35,7 @@
 public boolean isConnected();
 public void setRxBufSize(int size);
 public void setTxBufSize(int size);
-public boolean checkKeepAlive();
+public boolean keepalive();
 public void setTimeout(long timeout);
 public void setWaitForAck(boolean isWaitForAck);
 }

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/PooledSender.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/PooledSender.java?rev=385661&r1=385660&r2=385661&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/PooledSender.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/PooledSender.java
 Mon Mar 13 13:33:03 2006
@@ -52,7 +52,7 @@
 }
 
 public void returnSender(DataSender sender) {
-sender.checkKeepAlive();
+sender.keepalive();
 queue.returnSender(sender);
 }
 
@@ -125,7 +125,7 @@
 return poolSize;
 }
 
-public boolean checkKeepAlive() {
+public boolean keepalive() {
 //do nothing, the pool checks on every return
 return false;
 }

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationTransmitter.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationTransmitter.java?rev=385661&r1=385660&r2=385661&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationTransmitter.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationTransmitter.java
 Mon Mar 13 13:33:03 2006
@@ -128,18 +128,8 @@
  */
 
 public void heartbeat() {
-checkKeepAlive();
+
 }
-
-/**
- * Check all DataSender Socket to close socket at keepAlive mode
- * @see DataSender#checkKeepAlive()
- */
-public void checkKeepAlive() {
-getTransport().checkKeepAlive();
-}
-
-
 
 /**
  * add new cluster member and create sender ( s. replicationMode) transfer

Copied: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/BioSender.java
 (from r385654, 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/SinglePointDataSender.java)
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/BioSender.java?p2=tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/BioSender.java&p1=tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/SinglePoint

svn commit: r385644 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio: FastAsyncSocketSender.java util/FastQueue.java util/SmartQueue.java

2006-03-13 Thread fhanik
Author: fhanik
Date: Mon Mar 13 12:05:48 2006
New Revision: 385644

URL: http://svn.apache.org/viewcvs?rev=385644&view=rev
Log:
Removed the smart queue, not used anywhere.
removed stats from the FastQueue, stats can be collected elsewhere.
The FastAsyncSocketSender will go away, as the fast queue can be used in an 
interceptor that makes the replication asynchronous

Removed:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/util/SmartQueue.java
Modified:

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

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/FastAsyncSocketSender.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/FastAsyncSocketSender.java?rev=385644&r1=385643&r2=385644&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/FastAsyncSocketSender.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/FastAsyncSocketSender.java
 Mon Mar 13 12:05:48 2006
@@ -51,8 +51,7 @@
 
 private static int threadCounter = 1;
 
-private static org.apache.commons.logging.Log log = 
org.apache.commons.logging.LogFactory
-.getLog(FastAsyncSocketSender.class);
+private static org.apache.commons.logging.Log log = 
org.apache.commons.logging.LogFactory.getLog(FastAsyncSocketSender.class);
 
 /**
  * The descriptive information about this implementation.
@@ -157,31 +156,7 @@
 public void setQueueCheckLock(boolean checkLock) {
 queue.setCheckLock(checkLock);
 }
-/**
- * @return Returns the doStats.
- */
-public boolean isQueueDoStats() {
-return queue.isDoStats();
-}
-/**
- * @param doStats The doStats to set.
- */
-public void setQueueDoStats(boolean doStats) {
-queue.setDoStats(doStats);
-}
-/**
- * @return Returns the timeWait.
- */
-public boolean isQueueTimeWait() {
-return queue.isTimeWait();
-}
-/**
- * @param timeWait The timeWait to set.
- */
-public void setQueueTimeWait(boolean timeWait) {
-queue.setTimeWait(timeWait);
-}
-
+
 /**
  * @return Returns the inQueueCounter.
  */
@@ -194,20 +169,6 @@
  */
 public void setMaxQueueLength(int length) {
 queue.setMaxQueueLength(length);
-}
-
-/**
- * @return Returns the add wait times.
- */
-public long getQueueAddWaitTime() {
-return queue.getAddWait();
-}
-
-/**
- * @return Returns the add wait times.
- */
-public long getQueueRemoveWaitTime() {
-return queue.getRemoveWait();
 }
 
 /**

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/util/FastQueue.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/util/FastQueue.java?rev=385644&r1=385643&r2=385644&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/util/FastQueue.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/util/FastQueue.java
 Mon Mar 13 12:05:48 2006
@@ -29,8 +29,7 @@
  */
 public class FastQueue implements IQueue {
 
-private static org.apache.commons.logging.Log log = 
org.apache.commons.logging.LogFactory
-.getLog(FastQueue.class);
+private static org.apache.commons.logging.Log log = 
org.apache.commons.logging.LogFactory.getLog(FastQueue.class);
 
 /**
  * This is the actual queue
@@ -62,11 +61,6 @@
  */
 private boolean timeWait = false;
 
-/**
- * calc stats data
- */
-private boolean doStats = false;
-
 private boolean inAdd = false;
 
 private boolean inRemove = false;
@@ -95,50 +89,11 @@
 private boolean enabled = true;
 
 /**
- * calc all add objects
- */
-private long addCounter = 0;
-
-/**
- * calc all add objetcs in error state ( see limit queue length)
- */
-private long addErrorCounter = 0;
-
-/**
- * calc all remove objects
- */
-private long removeCounter = 0;
-
-/**
- * calc all remove objects failures (hupps probleme detection)
- */
-private long removeErrorCounter = 0;
-
-/**
- * Calc wait time thread
- */
-private long addWait = 0;
-
-/**
- * Calc remove time threads
- */
-private long removeWait = 0;
-
-/**
  *  max queue size
  *

svn commit: r385649 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp: ./ bio/ nio/

2006-03-13 Thread fhanik
Author: fhanik
Date: Mon Mar 13 12:14:57 2006
New Revision: 385649

URL: http://svn.apache.org/viewcvs?rev=385649&view=rev
Log:
Removed fast async socket sender, the async logic should not be on the socket 
level. the same functionality can very easy be achieved through a interceptor 
that uses the fast queue or a tipi on top of the channel.
The channel itself should only do one thing well, send messages, very fast and 
guaranteed. if the socket is async, then the error message can never trickle up 
to the sender, and the sender will never know that the message failed

Removed:

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

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

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

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/mbeans-descriptors.xml

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

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/LocalStrings.properties
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/LocalStrings.properties?rev=385649&r1=385648&r2=385649&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/LocalStrings.properties
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/LocalStrings.properties
 Mon Mar 13 12:14:57 2006
@@ -3,9 +3,6 @@
 AsyncSocketSender.send.error=Unable to asynchronously send session with 
id=[{0}] - message will be ignored.
 AsyncSocketSender.queue.empty=Queue in sender [{0}:{1,number,integer}] 
returned null element!
 cluster.mbean.register.already=MBean {0} already registered!
-FastAsyncSocketSender.setThreadPriority=[{0}:{1,number,integer}] set priority 
to {2}
-FastAsyncSocketSender.min.exception=[{0}:{1,number,integer}] new priority {2} 
< MIN_PRIORITY
-FastAsyncSocketSender.max.exception=[{0}:{1,number,integer}] new priority {2} 
> MAX_PRIORITY
 IDataSender.ack.eof=EOF reached at local port [{0}:{1,number,integer}]
 IDataSender.ack.receive=Got ACK at local port [{0}:{1,number,integer}]
 IDataSender.ack.missing=Unable to read acknowledgement from 
[{0}:{1,number,integer}] in {2,number,integer} ms. Disconnecting socket, and 
trying again.

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/SinglePointDataSender.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/SinglePointDataSender.java?rev=385649&r1=385648&r2=385649&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/SinglePointDataSender.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/SinglePointDataSender.java
 Mon Mar 13 12:14:57 2006
@@ -77,7 +77,6 @@
  * current sender socket
  */
 private Socket socket = null;
-private OutputStream socketout = null;
 
 /**
  * is Socket really connected
@@ -474,7 +473,6 @@
 socket.setSendBufferSize(getTxBufSize());
 socket.setReceiveBufferSize(getRxBufSize());
 socket.setSoTimeout((int)timeout);
-this.socketout = socket.getOutputStream();
 }
 
 /**
@@ -575,8 +573,8 @@
 isMessageTransferStarted = true ;
 }
 try {
-socketout.write(XByteBuffer.createDataPackage((ClusterData)data));
-socketout.flush();
+
socket.getOutputStream().write(XByteBuffer.createDataPackage((ClusterData)data));
+socket.getOutputStream().flush();
 if (getWaitForAck()) waitForAck();
 } finally {
 synchronized(this) {

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/mbeans-descriptors.xml
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/mbeans-descriptors.xml?rev=385649&r1=385648&r2=385649&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/mbeans-descriptors.xml
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/mbeans-descriptors.xml
 Mon Mar 13 12:14:57 2006
@@ -533,217 +533,6 @@
  

DO NOT REPLY [Bug 37819] - Build from source archive fails because of incorrect jasper.home property in build/build.xml

2006-03-13 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=37819


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2006-03-13 18:27 ---
Fixed. I removed the jasper2 directory from the source distro so it and svn
should have the same structure now.

-- 
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: r385609 - /tomcat/build/tc5.5.x/build.xml

2006-03-13 Thread markt
Author: markt
Date: Mon Mar 13 10:24:54 2006
New Revision: 385609

URL: http://svn.apache.org/viewcvs?rev=385609&view=rev
Log:
Remove references to jasper2 from the src distro. I missed these when removing 
the jasper2 references in previous commits.

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

Modified: tomcat/build/tc5.5.x/build.xml
URL: 
http://svn.apache.org/viewcvs/tomcat/build/tc5.5.x/build.xml?rev=385609&r1=385608&r2=385609&view=diff
==
--- tomcat/build/tc5.5.x/build.xml (original)
+++ tomcat/build/tc5.5.x/build.xml Mon Mar 13 10:24:54 2006
@@ -1377,7 +1377,6 @@
 
 
 
-
 
 
 
@@ -1419,7 +1418,7 @@
 
 
 
-
+
   
 
 



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



Re: PATCH: Out-of-box build apache-tomcat-5.5.1[56]-src fix

2006-03-13 Thread Mark Thomas
Yoav Shapira wrote:
> Darryl,
> Thanks for reporting this.  I saw it
> (http://issues.apache.org/bugzilla/show_bug.cgi?id=37819) before the
> release but forgot to fix it, so it will go into 5.5.17.  Thanks,
> 
> Yoav
> 
> On 3/13/06, Darryl L. Miles <[EMAIL PROTECTED]> wrote:
> 
>>Dear Developers,
>>
>>When following the build instructions at
>>http://tomcat.apache.org/tomcat-5.5-doc/building.html I needed to make a
>>couple of fixes to get it to build.

My bad. I missed the use of the jasper2 directory in the src distro
when removing the references to jasper 2 from the build. Now fixed.

Mark


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



svn commit: r385624 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp: ./ nio/

2006-03-13 Thread fhanik
Author: fhanik
Date: Mon Mar 13 11:19:56 2006
New Revision: 385624

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

Added:

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioReceiver.java
  - copied, changed from r385621, 
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/nio/ThreadPool.java
  - copied, changed from r385622, 
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/nio/WorkerThread.java
  - copied, changed from r385622, 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/WorkerThread.java
Removed:

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

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

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/mbeans-descriptors.xml

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

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/mbeans-descriptors.xml
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/mbeans-descriptors.xml?rev=385624&r1=385623&r2=385624&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/mbeans-descriptors.xml
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/mbeans-descriptors.xml
 Mon Mar 13 11:19:56 2006
@@ -87,7 +87,7 @@
   
 
   

Copied: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioReceiver.java
 (from r385621, 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationListener.java)
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioReceiver.java?p2=tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioReceiver.java&p1=tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationListener.java&r1=385621&r2=385624&rev=385624&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationListener.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/NioReceiver.java
 Mon Mar 13 11:19:56 2006
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.apache.catalina.tribes.tcp;
+package org.apache.catalina.tribes.tcp.nio;
 
 import java.io.IOException;
 import java.net.InetSocketAddress;
@@ -31,15 +31,14 @@
 import org.apache.catalina.tribes.MessageListener;
 import org.apache.catalina.tribes.io.ListenCallback;
 import org.apache.catalina.tribes.io.ObjectReader;
-import org.apache.catalina.tribes.tcp.nio.TcpReplicationThread;
+import org.apache.catalina.tribes.tcp.Constants;
 import org.apache.catalina.util.StringManager;
 
 /**
  * @author Filip Hanik
- * @author Peter Rossbach
  * @version $Revision: 379904 $ $Date: 2006-02-22 15:16:25 -0600 (Wed, 22 Feb 
2006) $
  */
-public class ReplicationListener implements Runnable, ChannelReceiver, 
ListenCallback {
+public class NioReceiver implements Runnable, ChannelReceiver, ListenCallback {
 /**
  * @todo make this configurable
  */
@@ -49,7 +48,7 @@
  */
 protected int txBufSize = 25188;
 
-protected static org.apache.commons.logging.Log log = 
org.apache.commons.logging.LogFactory.getLog(ReplicationListener.class);
+protected static org.apache.commons.logging.Log log = 
org.apache.commons.logging.LogFactory.getLog(NioReceiver.class);
 
 /**
  * The string manager for this package.
@@ -59,7 +58,7 @@
 /**
  * The descriptive information about this implementation.
  */
-private static final String info = "ReplicationListener/1.3";
+private static final String info = "NioReceiver/1.0";
 
 private ThreadPool pool = null;
 private int tcpThreadCount;
@@ -78,7 +77,7 @@
 private MessageListener listener = null;
 private boolean sync;
 private boolean direct;
-public Replicat

DO NOT REPLY [Bug 38950] - Problem with WebappClassLoader in background thread

2006-03-13 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=38950





--- Additional Comments From [EMAIL PROTECTED]  2006-03-13 19:16 ---
I have not fully understand and taken in your situation so please forgive me if
I have glossed over some details.  My understanding of Tomcat and ThreadDeath
exception generation is that it occurs when the WebappClassLoader has shutdown
because the Context is was created for has completed undeployment and so from a
Context lifecycle point of view everything should now be dead.

But some active thread is still doing work and may run for sometime before
ultimatly calling on the services of WebappClassLoader to load a new class, but
all the supporting infrastructure to do that job has now been cut away and
disposed of by TC (because the context is dead).

All of the code and execution threads that make up a Context instance MUST
adhere to the lifecycle of that Context as defined by the respective 
specification, this includes background threads.


Here are some of my best practices on the use of background threads within
webapp context's:

* You must be able to signal a thread cancellation to be able to control the
shutdown part of the background thread lifecycle. 

* You must put code into your ServletContextListener.destroyContext() that
broadcasts a controlled Thread cancellation to all background threads.

* Your must then reap (wait for the termination of) every single background
thread before allowing the #destroyContext() to return control back to the
container.

* It is advisable that all background threads must be able to detect their
cancellation signal, cleanup and terminate within a short period of time.  Maybe
realistic goals are in the order of 5 seconds to detect, 2 seconds to terminate.
 This means that your threads should not use design patterns that would put them
in a blocking state that would exceed these goals.



To help understand your problem better can you provide some details:

* The execution path to the ThreadDeath Exception.

* Is your JDBC driver in the $CATALINA_HOME/commons/ hiearachy ?

* Does your JDBC driver use or create any Singleton strong references ?

* Do you ever get this problem on first use after a container restart ?

* Are you only seeing this problem after at least on webapp/context reload has
taken place on the affected webapp ?

* Is a PhantomReference another name for a Weak Reference ?  What is that for
the technicaly naive.

* How do you create and setup your JDBC connection ?  Does the container manager
the connection instances or do you create them manually within the web-app ?


I can see how any code path could allow the execution of classes loaded from
WebappClassLoader before the class loader instance itself has been setup.  But I
can imagine a situation where you access an object that was created by a
previous instance that is now a zombie.  If this is what I think you are seeing
then you should be unable to re-create the problem of you restart the entire
container and deploy the web-app for the first time.

Can you use a container managed JDBC connection (if not already doing so).

-- 
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: r385620 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp: bio/MultiSocketSender.java mbeans-descriptors.xml

2006-03-13 Thread fhanik
Author: fhanik
Date: Mon Mar 13 11:04:41 2006
New Revision: 385620

URL: http://svn.apache.org/viewcvs?rev=385620&view=rev
Log:
Changed the name 

Modified:

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

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/mbeans-descriptors.xml

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/MultiSocketSender.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/MultiSocketSender.java?rev=385620&r1=385619&r2=385620&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/MultiSocketSender.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/MultiSocketSender.java
 Mon Mar 13 11:04:41 2006
@@ -180,7 +180,7 @@
 }
 
 public String toString() {
-StringBuffer buf = new StringBuffer("PooledSocketSender[");
+StringBuffer buf = new StringBuffer("MultiSocketSender[");
 buf.append(getHost()).append(":").append(getPort()).append("]");
 return buf.toString();
 }

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/mbeans-descriptors.xml
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/mbeans-descriptors.xml?rev=385620&r1=385619&r2=385620&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/mbeans-descriptors.xml
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/mbeans-descriptors.xml
 Mon Mar 13 11:04:41 2006
@@ -744,8 +744,8 @@
 
   
 
-  



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



svn commit: r385608 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio: ParallelNioSender.java PooledParallelSender.java

2006-03-13 Thread fhanik
Author: fhanik
Date: Mon Mar 13 10:11:41 2006
New Revision: 385608

URL: http://svn.apache.org/viewcvs?rev=385608&view=rev
Log:
minor changes, implemented checkKeepAlive on the parallelniosender

Modified:

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

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/ParallelNioSender.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/ParallelNioSender.java?rev=385608&r1=385607&r2=385608&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/ParallelNioSender.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/ParallelNioSender.java
 Mon Mar 13 10:11:41 2006
@@ -28,6 +28,7 @@
 import org.apache.catalina.tribes.io.ClusterData;
 import org.apache.catalina.tribes.io.XByteBuffer;
 import org.apache.catalina.tribes.tcp.MultiPointSender;
+import java.util.Map;
 
 /**
  * Title: 
@@ -210,6 +211,8 @@
 
 public void memberRemoved(Member member) {
 //disconnect senders
+NioSender sender = (NioSender)nioSenders.remove(member);
+if ( sender != null ) sender.disconnect();
 }
 
 
@@ -272,7 +275,15 @@
 
 public boolean checkKeepAlive() {
 //throw new UnsupportedOperationException("Method 
ParallelNioSender.checkKeepAlive() not implemented");
-return false;
+boolean result = false;
+Map.Entry[] entries = (Map.Entry[])nioSenders.entrySet().toArray(new 
Map.Entry[nioSenders.size()]);
+for ( int i=0; ihttp://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/PooledParallelSender.java?rev=385608&r1=385607&r2=385608&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/PooledParallelSender.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/nio/PooledParallelSender.java
 Mon Mar 13 10:11:41 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999,2004-2005 The Apache Software Foundation.
+ * Copyright 1999,2004-2006 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.



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



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

2006-03-13 Thread fhanik
Author: fhanik
Date: Mon Mar 13 10:01:17 2006
New Revision: 385607

URL: http://svn.apache.org/viewcvs?rev=385607&view=rev
Log:
Fixed build script

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

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=385607&r1=385606&r2=385607&view=diff
==
--- tomcat/container/tc5.5.x/modules/groupcom/build.xml (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/build.xml Mon Mar 13 10:01:17 2006
@@ -88,8 +88,6 @@
  
tofile="${catalina.build}/classes/org/apache/catalina/tribes/LocalStrings.properties"/>
 
-
 
 

svn commit: r385606 - in /tomcat/container/tc5.5.x/modules/groupcom: etc/ src/share/org/apache/catalina/tribes/ src/share/org/apache/catalina/tribes/tcp/ src/share/org/apache/catalina/tribes/tcp/bio/

2006-03-13 Thread fhanik
Author: fhanik
Date: Mon Mar 13 10:00:08 2006
New Revision: 385606

URL: http://svn.apache.org/viewcvs?rev=385606&view=rev
Log:
Refactoring the senders into a cleaner structure

Added:

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

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/MultiSocketSender.java
  - copied, changed from r385604, 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/bio/PooledSocketSender.java
Removed:

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

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

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

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

tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/util/IDynamicProperty.java
Modified:
tomcat/container/tc5.5.x/modules/groupcom/etc/cluster-server.xml

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/tcp/DataSender.java

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

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

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/bio/FastAsyncSocketSender.java

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

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

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

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

Modified: tomcat/container/tc5.5.x/modules/groupcom/etc/cluster-server.xml
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/etc/cluster-server.xml?rev=385606&r1=385605&r2=385606&view=diff
==
--- tomcat/container/tc5.5.x/modules/groupcom/etc/cluster-server.xml (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/etc/cluster-server.xml Mon Mar 13 
10:00:08 2006
@@ -305,12 +305,30 @@
 txBufSize="25188"/>
 
 
+
className="org.apache.catalina.tribes.tcp.ReplicationTransmitter">
+
+
+
+
+
 
 

Re: Tomcat 5.0 test environment

2006-03-13 Thread Yoav Shapira
Hi,
Simple: run "ant tester" ;)

Yoav

On 3/13/06, Andre Kammerl <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Is there somewhere an instruction available how to use the test cases that 
> are included in the Tomcat source?
>
> Regards
>
> André
>


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

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



Tomcat 5.0 test environment

2006-03-13 Thread Andre Kammerl
Hi,

Is there somewhere an instruction available how to use the test cases that are 
included in the Tomcat source? 

Regards

André

Re: PATCH: Out-of-box build apache-tomcat-5.5.1[56]-src fix

2006-03-13 Thread Yoav Shapira
Darryl,
Thanks for reporting this.  I saw it
(http://issues.apache.org/bugzilla/show_bug.cgi?id=37819) before the
release but forgot to fix it, so it will go into 5.5.17.  Thanks,

Yoav

On 3/13/06, Darryl L. Miles <[EMAIL PROTECTED]> wrote:
>
> Dear Developers,
>
> When following the build instructions at
> http://tomcat.apache.org/tomcat-5.5-doc/building.html I needed to make a
> couple of fixes to get it to build.
>
> Please accept this patch to correct the build errors that occur when
> following the instructions.
>
> --- build.xml~  2006-03-13 12:22:25.0 +
> +++ build.xml   2006-03-13 12:22:25.0 +
> @@ -26,7 +26,7 @@
>
>
>
> -  
> +  
>
>
>
> --- build/build.xml~2006-03-13 12:35:38.0 +
> +++ build/build.xml 2006-03-13 12:35:38.0 +
> @@ -29,7 +29,7 @@
>
>
>
> -  
> +  
>
> value="${ant.home}/lib/ant-launcher.jar"/>
>
> ...
>
>
> Thanks
>
> --
> Darryl L. Miles
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

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



DO NOT REPLY [Bug 38951] New: - internal tomcat handling interfere with webapps

2006-03-13 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=38951

   Summary: internal tomcat handling interfere with webapps
   Product: Tomcat 5
   Version: 5.5.7
  Platform: HP
OS/Version: HP-UX
Status: NEW
  Severity: normal
  Priority: P2
 Component: Servlet & JSP API
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


The way tomcat internally handle dispatching of some urls, like jsp and
ressources, by including $CATALINA_HOME/conf/web.xml, interfere with servlet
names available to webapps. The following names can not be used for a servlet in
a web.xml of a webapp:
default
jsp

eg. creating a web.xml with a servlet named 'default' end up with obscure
message from tomcat claiming this entry is already defined along with 2
stacktraces while, as i understand, default is a perfect valid servlet name
according to servlet specs.

Tomcat should clearly separate it's internal config (CATALINA/conf/web.xml) from
the webapp config to prevent this name conflicts. Whatever is in
CATALINA/conf/web.xml, this should not be taken into account when checking
webapp/WEB-INF/web.xml validity as webapp doesn't have to be aware of internal
server behaviour.

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



PATCH: Out-of-box build apache-tomcat-5.5.1[56]-src fix

2006-03-13 Thread Darryl L. Miles


Dear Developers,

When following the build instructions at 
http://tomcat.apache.org/tomcat-5.5-doc/building.html I needed to make a 
couple of fixes to get it to build.


Please accept this patch to correct the build errors that occur when 
following the instructions.


--- build.xml~  2006-03-13 12:22:25.0 +
+++ build.xml   2006-03-13 12:22:25.0 +
@@ -26,7 +26,7 @@
  
  
  
-  
+  

  

--- build/build.xml~2006-03-13 12:35:38.0 +
+++ build/build.xml 2006-03-13 12:35:38.0 +
@@ -29,7 +29,7 @@
  
  
  
-  
+  
  
  

...


Thanks

--
Darryl L. Miles



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



DO NOT REPLY [Bug 38950] New: - Problem with WebappClassLoader in background thread

2006-03-13 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=38950

   Summary: Problem with WebappClassLoader in background thread
   Product: Tomcat 5
   Version: 5.5.9
  Platform: Other
OS/Version: other
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


I have a servlet which has a background thread.  This thread does some database 
work, using the Postgresql JDBC-3 driver.  This driver uses PhantomReference 
objects, and when it come to create the first of these I get a ThreadDeath 
exception which seems to come from the check at the top of the loadClass to 
make sure the class loader is started (I am using 5.5.9 so the source does
not quite match the line numbers, but given that there are two loadClass 
functions I adjusted the line numbers).
Now this exception should not cause the loadClass to fail, it is merely to log
the fact that the ClassLoader is not started.  So maybe this is symptomatic of
a deaper problem.
So I tried using the Thread.getContextClassLoader method which got me a 
WebappClassLoader and using the start method, but this threw a 
LifecyleException.
I am running on the Sun SDK 1.5 with update 4 under Linux.
Looking at the list of known problems with the WebappClassLoader I could not 
see anything that suggested this was a known 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]



Re: [VOTE] Apache Tomcat v5.5.16 Stability

2006-03-13 Thread Henri Gomez
[X] Stable (no major issues)


Re: [VOTE] Apache Tomcat v5.5.16 Stability

2006-03-13 Thread Henri Gomez
> > [X] Stable (no major issues)
> > [ ] Beta (at least one major issue: please provide details)
> > [ ] Alpha (multiple significant issues: please provide details)
>
>