Re: TC 5.0.x releases

2007-04-26 Thread Jean-Frederic
On Wed, 2007-04-25 at 21:37 -0500, Yoav Shapira wrote:
> Hi,
> 
> On 4/25/07, Remy Maucherat <[EMAIL PROTECTED]> wrote:
> > > I'll do it if no-one else steps forward.
> >
> > A vote is needed to elect a new RM, so if you're candidate for the job,
> > you can post the vote.
> 
> Why is a vote needed?  We have to vote on the release itself
> obviously, but I think any committer can cut out a release given lazy
> consensus...

Looking in the archives there was votes in past or a kind of
announcement like: New RM for Tomcat x.y

But that does prevent anyone to ask and do the release because we vote
the releases.

Cheers

Jean-Frederic

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



How to integrate tomcat with windows AD to authenticate users.

2007-04-26 Thread Draper, Billy

Are there any good tutorial or HOW TOs on enabling windows AD
authentication with Tomcat?

Thanks,

Billy


This e-mail, facsimile, or letter and any files or attachments transmitted with 
it contains information that is confidential and privileged. This information 
is intended only for the use of the individual(s) and entity(ies) to whom it is 
addressed. If you are the intended recipient, further disclosures are 
prohibited without proper authorization. If you are not the intended recipient, 
any disclosure, copying, printing, or use of this information is strictly 
prohibited and possibly a violation of federal or state law and regulations. If 
you have received this information in error, please notify Baylor Health Care 
System immediately at 1-866-402-1661 or via e-mail at [EMAIL PROTECTED] Baylor 
Health Care System, its subsidiaries, and affiliates hereby claim all 
applicable privileges related to this information.

Re: Candidate binaries for 6.0.12

2007-04-26 Thread Yoav Shapira

On 4/25/07, Remy Maucherat <[EMAIL PROTECTED]> wrote:

The candidates binaries in which I suppose a horrible bug will be found
in about 5 minutes are available here:
http://people.apache.org/~remm/tomcat-6/v6.0.12/


Looks solid to me.  Thanks for cutting it.

Yoav

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



svn commit: r532800 - in /tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport: MultiPointSender.java ReplicationTransmitter.java bio/MultipointBioSender.java bio/PooledMultiSender.java nio/

2007-04-26 Thread fhanik
Author: fhanik
Date: Thu Apr 26 09:52:29 2007
New Revision: 532800

URL: http://svn.apache.org/viewvc?view=rev&rev=532800
Log:
Change the name to a more appropriate name

Modified:

tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/MultiPointSender.java

tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/ReplicationTransmitter.java

tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/MultipointBioSender.java

tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/PooledMultiSender.java

tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/ParallelNioSender.java

tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/PooledParallelSender.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/MultiPointSender.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/MultiPointSender.java?view=diff&rev=532800&r1=532799&r2=532800
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/MultiPointSender.java
 (original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/MultiPointSender.java
 Thu Apr 26 09:52:29 2007
@@ -33,6 +33,6 @@
 public void setTxBufSize(int size);
 public void setMaxRetryAttempts(int attempts);
 public void setDirectBuffer(boolean directBuf);
-public void memberAdded(Member member);
-public void memberDisappeared(Member member);
+public void add(Member member);
+public void remove(Member member);
 }

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/ReplicationTransmitter.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/ReplicationTransmitter.java?view=diff&rev=532800&r1=532799&r2=532800
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/ReplicationTransmitter.java
 (original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/ReplicationTransmitter.java
 Thu Apr 26 09:52:29 2007
@@ -116,7 +116,7 @@
  * @see 
org.apache.catalina.tribes.ClusterSender#add(org.apache.catalina.tribes.Member)
  */
 public synchronized void add(Member member) {
-getTransport().memberAdded(member);
+getTransport().add(member);
 }
 
 /**
@@ -125,7 +125,7 @@
  * @see 
org.apache.catalina.tribes.ClusterSender#remove(org.apache.catalina.tribes.Member)
  */
 public synchronized void remove(Member member) {
-getTransport().memberDisappeared(member);
+getTransport().remove(member);
 }
 
 // - protected

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/MultipointBioSender.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/MultipointBioSender.java?view=diff&rev=532800&r1=532799&r2=532800
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/MultipointBioSender.java
 (original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/MultipointBioSender.java
 Thu Apr 26 09:52:29 2007
@@ -107,11 +107,11 @@
 if ( x != null ) throw x;
 }
 
-public void memberAdded(Member member) {
+public void add(Member member) {
 
 }
 
-public void memberDisappeared(Member member) {
+public void remove(Member member) {
 //disconnect senders
 BioSender sender = (BioSender)bioSenders.remove(member);
 if ( sender != null ) sender.disconnect();

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/PooledMultiSender.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/PooledMultiSender.java?view=diff&rev=532800&r1=532799&r2=532800
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/PooledMultiSender.java
 (original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/PooledMultiSender.java
 Thu Apr 26 09:52:29 2007
@@ -70,11 +70,11 @@
 }
 
 
-public void memberAdded(Member member) {
+public void add(Member member) {
 
 }
 
-public void memberDisappeared(Member member) {
+public void remove(Member member) {
 //disconnect senders
 } 
 

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/ParallelNioSender.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/ParallelNioSender.java?view=diff&rev=532800&r1=532799&r2=532800

How to configure tomcat pool connection

2007-04-26 Thread Mario Medina
Hi!

How can I configure a pool connection in tomcat?

I tryed a lot making a context.xml in META-INF and web.xml in WEB-INF,

using the parameters that i found on some how-tos and manuals, but I get
the problem 

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
class '' for connect URL 'null'

is like the project didn't know anything about the configuration i'm
creating.

Thanks

-- 
Dios te Bendice


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



svn commit: r532865 - in /tomcat/tc6.0.x/trunk: java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java java/org/apache/catalina/ha/tcp/mbeans-descriptors.xml webapps/docs/changelog.xml webapps/docs/con

2007-04-26 Thread pero
Author: pero
Date: Thu Apr 26 14:09:41 2007
New Revision: 532865

URL: http://svn.apache.org/viewvc?view=rev&rev=532865
Log:
Add heartbeatBackgroundEnabled to enable channel heartbeat call.
Don't forget to disable the GroupChannel heartbeat thread.
Default is false.

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/mbeans-descriptors.xml
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc6.0.x/trunk/webapps/docs/config/cluster.xml

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java?view=diff&rev=532865&r1=532864&r2=532865
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java 
Thu Apr 26 14:09:41 2007
@@ -126,6 +126,12 @@
 protected String clusterName ;
 
 /**
+ * call Channel.heartbeat() at container background thread
+ * @see org.apache.catalina.tribes.group.GroupChannel#heartbeat()
+ */
+protected boolean heartbeatBackgroundEnabled =false ;
+
+/**
  * The Container associated with this Cluster.
  */
 protected Container container = null;
@@ -188,6 +194,22 @@
 }
 
 /**
+ * Return heartbeat enable flag (default false)
+ * @return the heartbeatBackgroundEnabled
+ */
+public boolean isHeartbeatBackgroundEnabled() {
+return heartbeatBackgroundEnabled;
+}
+
+/**
+ * enabled that container backgroundThread call heartbeat at channel
+ * @param heartbeatBackgroundEnabled the heartbeatBackgroundEnabled to set
+ */
+public void setHeartbeatBackgroundEnabled(boolean 
heartbeatBackgroundEnabled) {
+this.heartbeatBackgroundEnabled = heartbeatBackgroundEnabled;
+}
+
+/**
  * Set the name of the cluster to join, if no cluster with this name is
  * present create one.
  * 
@@ -584,12 +606,15 @@
  * invoked inside the classloading context of this container. Unexpected
  * throwables will be caught and logged.
  * @see org.apache.catalina.ha.deploy.FarmWarDeployer#backgroundProcess()
- * @see ReplicationTransmitter#backgroundProcess()
+ * @see org.apache.catalina.tribes.group.GroupChannel#heartbeat()
+ * @see org.apache.catalina.tribes.group.GroupChannel.HeartbeatThread#run()
+ * 
  */
 public void backgroundProcess() {
 if (clusterDeployer != null) clusterDeployer.backgroundProcess();
-//send a heartbeat through the channel
-if ( channel !=null ) channel.heartbeat();
+   
+//send a heartbeat through the channel
+if ( isHeartbeatBackgroundEnabled() && channel !=null ) 
channel.heartbeat();
 }
 
 /**

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/mbeans-descriptors.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/mbeans-descriptors.xml?view=diff&rev=532865&r1=532864&r2=532865
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/mbeans-descriptors.xml 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/mbeans-descriptors.xml 
Thu Apr 26 14:09:41 2007
@@ -16,8 +16,12 @@
  
-  
+  
+ 
 
 
 
-
-  
-  
-
-
 http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?view=diff&rev=532865&r1=532864&r2=532865
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Thu Apr 26 14:09:41 2007
@@ -14,6 +14,16 @@
   
 
 
+
+  
+
+  
+ Add heartbeatBackgroundEnabled flag to SimpleTcpCluster. 
+ Enable this flag don't forget to disable the channel heartbeat thread 
(pero)
+  
+
+  
+
 
   
 

Modified: tomcat/tc6.0.x/trunk/webapps/docs/config/cluster.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/config/cluster.xml?view=diff&rev=532865&r1=532864&r2=532865
==
--- tomcat/tc6.0.x/trunk/webapps/docs/config/cluster.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/config/cluster.xml Thu Apr 26 14:09:41 
2007
@@ -109,6 +109,11 @@
   
 
 
+
+  Enable this flag don't forget to disable the channel heartbeat thread.
+  
+
+ 
 
   Deprecated since 6.0.0
   Possible values are true or false



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

svn commit: r532877 - in /tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport: PooledSender.java bio/PooledMultiSender.java nio/PooledParallelSender.java

2007-04-26 Thread pero
Author: pero
Date: Thu Apr 26 14:41:47 2007
New Revision: 532877

URL: http://svn.apache.org/viewvc?view=rev&rev=532877
Log:
Remove senders as member disappeared..

Modified:

tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/PooledSender.java

tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/PooledMultiSender.java

tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/PooledParallelSender.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/PooledSender.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/PooledSender.java?view=diff&rev=532877&r1=532876&r2=532877
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/PooledSender.java
 (original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/PooledSender.java
 Thu Apr 26 14:41:47 2007
@@ -19,6 +19,8 @@
 import java.io.IOException;
 import java.util.List;
 
+import org.apache.catalina.tribes.Member;
+
 /**
  * Title: 
  *
@@ -83,7 +85,13 @@
 return (queue==null)?false:queue.checkIdleKeepAlive();
 }
 
+public void add(Member member) {
+// we don't need it senders are pooled...
+}
 
+public void remove(Member member) {
+queue.remove(member) ;
+} 
 
 //  - Inner Class
 
@@ -92,17 +100,17 @@
 
 PooledSender parent = null;
 
-private List notinuse = null;
+private List notinuse = null;
 
-private List inuse = null;
+private List inuse = null;
 
 private boolean isOpen = true;
 
 public SenderQueue(PooledSender parent, int limit) {
 this.limit = limit;
 this.parent = parent;
-notinuse = new java.util.LinkedList();
-inuse = new java.util.LinkedList();
+notinuse = new java.util.LinkedList();
+inuse = new java.util.LinkedList();
 }
 
 /**
@@ -141,6 +149,18 @@
 return result;
 }
 
+// FIXME: remove also inuse senders. but then we must synch with 
sendMessage!
+public synchronized void remove(Member member) {
+if (isOpen) {
+DataSender[] list = new DataSender[notinuse.size()];
+notinuse.toArray(list);
+for (int i=0; ihttp://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/PooledMultiSender.java?view=diff&rev=532877&r1=532876&r2=532877
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/PooledMultiSender.java
 (original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/PooledMultiSender.java
 Thu Apr 26 14:41:47 2007
@@ -69,13 +69,4 @@
 return sender;
 }
 
-
-public void add(Member member) {
-
-}
-
-public void remove(Member member) {
-//disconnect senders
-} 
-
 }

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/PooledParallelSender.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/PooledParallelSender.java?view=diff&rev=532877&r1=532876&r2=532877
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/PooledParallelSender.java
 (original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/PooledParallelSender.java
 Thu Apr 26 14:41:47 2007
@@ -72,12 +72,5 @@
 this.connected = true;
 super.connect();
 }
-
-public void add(Member member) {
-
-}
-
-public void remove(Member member) {
-//disconnect senders
-}
+   
 }



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



DO NOT REPLY [Bug 42269] New: - Content-Length header is removed on HEAD requests

2007-04-26 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=42269

   Summary: Content-Length header is removed on HEAD requests
   Product: Tomcat 5
   Version: Unknown
  Platform: HP
OS/Version: Linux
Status: NEW
  Severity: major
  Priority: P2
 Component: Native:JK
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


If we set 

JkOptions -FlushHeader
JkOptions +FlushPackets 

then Content-Length header is removed from HEAD requests.
The HEAD request is served by the tomcat in this case and it
sends the content-length header to mod-jk. The header is 
apparently removed because ws_flush() is not called from 
tomcat-connectors-1.2.21-src\native\common\jk_ajp_common.c
ajp_process_callback() due to following conditions.
(See code marked with ==> <==)

case JK_AJP13_SEND_HEADERS:
{
jk_res_data_t res;
if (!ajp_unmarshal_response(msg, &res, ae, l)) {
jk_log(l, JK_LOG_ERROR,
   "ajp_unmarshal_response failed");
JK_TRACE_EXIT(l);
return JK_AJP13_ERROR;
}
r->start_response(r, res.status, res.msg,
  (const char *const *)res.header_names,
  (const char *const *)res.header_values,
  res.num_headers);
if (r->flush && r->flush_header) /** ==> JkOptions -FlushHeader <== 
**/
r->flush(r);
r->http_response_status = res.status;
}
return JK_AJP13_SEND_HEADERS;

case JK_AJP13_END_RESPONSE:
ae->reuse = (int)jk_b_get_byte(msg);
if (!ae->reuse) {
/*
 * AJP13 protocol reuse flag set to false.
 * Tomcat will close its side of the connection.
 */
jk_log(l, JK_LOG_WARNING, "AJP13 protocol: Reuse is set to false");
}
else if (r->disable_reuse) {
if (JK_IS_DEBUG_LEVEL(l)) {
jk_log(l, JK_LOG_DEBUG, "AJP13 protocol: Reuse is disabled");
}
ae->reuse = JK_FALSE;
}
else {
/* Reuse in all cases */
if (JK_IS_DEBUG_LEVEL(l)) {
jk_log(l, JK_LOG_DEBUG, "AJP13 protocol: Reuse is OK");
}
ae->reuse = JK_TRUE;
}
/* Flush after the last write */
if (r->flush && !r->flush_packets) /** ==> JkOptions +FlushPackets <== 
**/
r->flush(r);

JK_TRACE_EXIT(l);
return JK_AJP13_END_RESPONSE;
break;

>From the source code, I can see that flush_packets is added since mod_jk 1.2.14
and flush_headers is added since 1.2.20. So prior to version 1.2.14,
content-length was missing in HEAD requests. After 1.2.14, it started working
because flush_packets parameter was false by default.

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



Improved available value

2007-04-26 Thread Remy Maucherat

Hi,

I think I would be able to improve the handling of the available method 
(on the input stream) using a new action code. The processors will then 
query the various filters and their own buffer to see if there are bytes 
available somewhere, and the purpose would be to clear up the 
uncertainty which may occur on the first read (if the beginning of the 
entity body was sent along with the request header in a single packet). 
To be refined a little of course.


Rémy

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



Re: Improved available value

2007-04-26 Thread Filip Hanik - Dev Lists

Remy Maucherat wrote:

Hi,

I think I would be able to improve the handling of the available 
method (on the input stream) using a new action code. The processors 
will then query the various filters and their own buffer to see if 
there are bytes available somewhere, and the purpose would be to clear 
up the uncertainty which may occur on the first read (if the beginning 
of the entity body was sent along with the request header in a single 
packet). To be refined a little of course.
definitely a good idea, I imagine the method has to be implemented all 
the way down the chain to eventually return a correct value at the top 
of the request.


Filip



Rémy

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






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



Re: svn commit: r532877 - in /tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport: PooledSender.java bio/PooledMultiSender.java nio/PooledParallelSender.java

2007-04-26 Thread Filip Hanik - Dev Lists

I would say this is a -1

this only removes the connections from the idle while it leaves the 
other ones hanging, hence leaves an inconsistent state.

if we are gonna implement this solution, lets do it correct or not at all.

Filip

[EMAIL PROTECTED] wrote:

Author: pero
Date: Thu Apr 26 14:41:47 2007
New Revision: 532877

URL: http://svn.apache.org/viewvc?view=rev&rev=532877
Log:
Remove senders as member disappeared..

Modified:

tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/PooledSender.java

tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/PooledMultiSender.java

tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/PooledParallelSender.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/PooledSender.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/PooledSender.java?view=diff&rev=532877&r1=532876&r2=532877
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/PooledSender.java
 (original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/PooledSender.java
 Thu Apr 26 14:41:47 2007
@@ -19,6 +19,8 @@
 import java.io.IOException;
 import java.util.List;
 
+import org.apache.catalina.tribes.Member;

+
 /**
  * Title: 
  *
@@ -83,7 +85,13 @@
 return (queue==null)?false:queue.checkIdleKeepAlive();
 }
 
+public void add(Member member) {

+// we don't need it senders are pooled...
+}
 
+public void remove(Member member) {

+queue.remove(member) ;
+} 
 
 //  - Inner Class
 
@@ -92,17 +100,17 @@
 
 PooledSender parent = null;
 
-private List notinuse = null;

+private List notinuse = null;
 
-private List inuse = null;

+private List inuse = null;
 
 private boolean isOpen = true;
 
 public SenderQueue(PooledSender parent, int limit) {

 this.limit = limit;
 this.parent = parent;
-notinuse = new java.util.LinkedList();
-inuse = new java.util.LinkedList();
+notinuse = new java.util.LinkedList();
+inuse = new java.util.LinkedList();
 }
 
 /**

@@ -141,6 +149,18 @@
 return result;
 }
 
+// FIXME: remove also inuse senders. but then we must synch with sendMessage!

+public synchronized void remove(Member member) {
+if (isOpen) {
+DataSender[] list = new DataSender[notinuse.size()];
+notinuse.toArray(list);
+for (int i=0; i+
 public synchronized DataSender getSender(long timeout) {

 long start = System.currentTimeMillis();
 while ( true ) {
@@ -193,9 +213,6 @@
 notinuse.clear();
 inuse.clear();
 notify();
-
-

-
 }
 
 public synchronized void open() {


Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/PooledMultiSender.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/PooledMultiSender.java?view=diff&rev=532877&r1=532876&r2=532877
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/PooledMultiSender.java
 (original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/PooledMultiSender.java
 Thu Apr 26 14:41:47 2007
@@ -69,13 +69,4 @@
 return sender;
 }
 
-

-public void add(Member member) {
-
-}
-
-public void remove(Member member) {
-//disconnect senders
-} 
-

 }

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/PooledParallelSender.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/PooledParallelSender.java?view=diff&rev=532877&r1=532876&r2=532877
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/PooledParallelSender.java
 (original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/PooledParallelSender.java
 Thu Apr 26 14:41:47 2007
@@ -72,12 +72,5 @@
 this.connected = true;
 super.connect();
 }
-
-public void add(Member member) {
-
-}
-
-public void remove(Member member) {

-//disconnect senders
-}
+   
 }




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



  



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

svn commit: r532943 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java

2007-04-26 Thread fhanik
Author: fhanik
Date: Thu Apr 26 20:14:58 2007
New Revision: 532943

URL: http://svn.apache.org/viewvc?view=rev&rev=532943
Log:
Remove call to remove clear connections upon a member disappeared event, this 
call is exposed higher in the API and should be controlled by the application

Modified:

tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java?view=diff&rev=532943&r1=532942&r2=532943
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java
 (original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java
 Thu Apr 26 20:14:58 2007
@@ -226,13 +226,11 @@
 
 public void memberAdded(Member member){
 SenderState.getSenderState(member);
-if ( clusterSender!=null ) clusterSender.add(member);
 super.memberAdded(member);
 }
 
 public void memberDisappeared(Member member){
 SenderState.removeSenderState(member);
-if ( clusterSender!=null ) clusterSender.remove(member);
 super.memberDisappeared(member);
 }
 



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



Re: svn commit: r532877 - in /tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport: PooledSender.java bio/PooledMultiSender.java nio/PooledParallelSender.java

2007-04-26 Thread Peter Rossbach

HI Filip,

this is the next step at weekend :-)

Peter



Am 27.04.2007 um 05:14 schrieb Filip Hanik - Dev Lists:


I would say this is a -1

this only removes the connections from the idle while it leaves the  
other ones hanging, hence leaves an inconsistent state.
if we are gonna implement this solution, lets do it correct or not  
at all.


Filip

[EMAIL PROTECTED] wrote:

Author: pero
Date: Thu Apr 26 14:41:47 2007
New Revision: 532877

URL: http://svn.apache.org/viewvc?view=rev&rev=532877
Log:
Remove senders as member disappeared..

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/ 
PooledSender.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/ 
bio/PooledMultiSender.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/ 
nio/PooledParallelSender.java


Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/ 
transport/PooledSender.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/ 
apache/catalina/tribes/transport/PooledSender.java? 
view=diff&rev=532877&r1=532876&r2=532877
= 
=
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/ 
PooledSender.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/ 
PooledSender.java Thu Apr 26 14:41:47 2007

@@ -19,6 +19,8 @@
 import java.io.IOException;
 import java.util.List;
 +import org.apache.catalina.tribes.Member;
+
 /**
  * Title: 
  *
@@ -83,7 +85,13 @@
 return (queue==null)?false:queue.checkIdleKeepAlive();
 }
 +public void add(Member member) {
+// we don't need it senders are pooled...
+}
 +public void remove(Member member) {
+queue.remove(member) ;
+}   //   
- Inner Class

 @@ -92,17 +100,17 @@
  PooledSender parent = null;
 -private List notinuse = null;
+private List notinuse = null;
 -private List inuse = null;
+private List inuse = null;
  private boolean isOpen = true;
  public SenderQueue(PooledSender parent, int limit) {
 this.limit = limit;
 this.parent = parent;
-notinuse = new java.util.LinkedList();
-inuse = new java.util.LinkedList();
+notinuse = new java.util.LinkedList();
+inuse = new java.util.LinkedList();
 }
  /**
@@ -141,6 +149,18 @@
 return result;
 }
 +// FIXME: remove also inuse senders. but then we must  
synch with sendMessage!

+public synchronized void remove(Member member) {
+if (isOpen) {
+DataSender[] list = new DataSender[notinuse.size()];
+notinuse.toArray(list);
+for (int i=0; i+ public synchronized DataSender getSender(long  
timeout) {

 long start = System.currentTimeMillis();
 while ( true ) {
@@ -193,9 +213,6 @@
 notinuse.clear();
 inuse.clear();
 notify();
--
-
 }
  public synchronized void open() {

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/ 
transport/bio/PooledMultiSender.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/ 
apache/catalina/tribes/transport/bio/PooledMultiSender.java? 
view=diff&rev=532877&r1=532876&r2=532877
= 
=
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/ 
bio/PooledMultiSender.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/ 
bio/PooledMultiSender.java Thu Apr 26 14:41:47 2007

@@ -69,13 +69,4 @@
 return sender;
 }
 -
-public void add(Member member) {
-
-}
-
-public void remove(Member member) {
-//disconnect senders
-} -
 }

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/ 
transport/nio/PooledParallelSender.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/ 
apache/catalina/tribes/transport/nio/PooledParallelSender.java? 
view=diff&rev=532877&r1=532876&r2=532877
= 
=
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/ 
nio/PooledParallelSender.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport/ 
nio/PooledParallelSender.java Thu Apr 26 14:41:47 2007

@@ -72,12 +72,5 @@
 this.connected = true;
 super.connect();
 }
-
-public void add(Member member) {
--}
--public void remove(Member member) {
-//disconnect senders
-}+}



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