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

2006-06-29 Thread fhanik
Author: fhanik
Date: Thu Jun 29 01:33:29 2006
New Revision: 417959

URL: http://svn.apache.org/viewvc?rev=417959&view=rev
Log:
Added Member.getCommand, so that we don't have to piggyback on application 
payload to transfer internal tribes commands

Modified:
tomcat/container/tc5.5.x/modules/groupcom/VERSION

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

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

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

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

Modified: tomcat/container/tc5.5.x/modules/groupcom/VERSION
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/VERSION?rev=417959&r1=417958&r2=417959&view=diff
==
--- tomcat/container/tc5.5.x/modules/groupcom/VERSION (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/VERSION Thu Jun 29 01:33:29 2006
@@ -1,3 +1,5 @@
+0.9.3.3
+  - Added Member.getCommand, to separate out internal tribes logic from 
application payload
 0.9.3.2
   - MemberImpl.toString has a limit on the size it prints out
 0.9.3.1

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java?rev=417959&r1=417958&r2=417959&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java
 Thu Jun 29 01:33:29 2006
@@ -95,4 +95,9 @@
  */
 public byte[] getPayload();
 
+/**
+ * returns the command associated with this member
+ * @return byte[]
+ */
+public byte[] getCommand();
 }

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java?rev=417959&r1=417958&r2=417959&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
 Thu Jun 29 01:33:29 2006
@@ -135,7 +135,7 @@
 public void memberDisappeared(Member member) {
 if ( membership == null ) setupMembership();
 boolean notify = false;
-boolean shutdown = 
Arrays.equals(member.getPayload(),Member.SHUTDOWN_PAYLOAD);
+boolean shutdown = 
Arrays.equals(member.getCommand(),Member.SHUTDOWN_PAYLOAD);
 if ( !shutdown ) log.info("Received memberDisappeared["+member+"] 
message. Will verify.");
 synchronized (membership) {
 //check to see if the member really is gone
@@ -245,7 +245,7 @@
  long readTimeout, long conTimeout,
  int optionFlag) {
 //could be a shutdown notification
-if ( Arrays.equals(mbr.getPayload(),Member.SHUTDOWN_PAYLOAD) ) return 
false;
+if ( Arrays.equals(mbr.getCommand(),Member.SHUTDOWN_PAYLOAD) ) return 
false;
 
 Socket socket = new Socket();
 try {

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java?rev=417959&r1=417958&r2=417959&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java
 Thu Jun 29 01:33:29 2006
@@ -255,12 +255,10 @@
 //we're shutting down, send a shutdown message and close the socket
 if ( startLevel == 0 ) {
 //send a stop message
-byte[] payload = member.getPayload();
-member.setPayload(Member.SHUTDOWN_PAYLOAD);
+member.setCommand(Member.SHUTDOWN_PAYLOAD);
 member.getData(true, true);
 send(false);
 //restore payload
-member.setPayload(payload);
 member.getData(tr

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

2006-06-29 Thread fhanik
Author: fhanik
Date: Thu Jun 29 01:50:29 2006
New Revision: 417962

URL: http://svn.apache.org/viewvc?rev=417962&view=rev
Log:
Send payload directly

Modified:
tomcat/container/tc5.5.x/modules/groupcom/VERSION

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

Modified: tomcat/container/tc5.5.x/modules/groupcom/VERSION
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/VERSION?rev=417962&r1=417961&r2=417962&view=diff
==
--- tomcat/container/tc5.5.x/modules/groupcom/VERSION (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/VERSION Thu Jun 29 01:50:29 2006
@@ -1,5 +1,6 @@
 0.9.3.3
   - Added Member.getCommand, to separate out internal tribes logic from 
application payload
+  - when setting payload, the update should get sent immediately
 0.9.3.2
   - MemberImpl.toString has a limit on the size it prints out
 0.9.3.1

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastService.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastService.java?rev=417962&r1=417961&r2=417962&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastService.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastService.java
 Thu Jun 29 01:50:29 2006
@@ -393,6 +393,11 @@
 if ( localMember != null ) {
 localMember.setPayload(payload);
 localMember.getData(true,true);
+try {
+if (impl != null) impl.send(false);
+}catch ( Exception x ) {
+log.error("Unable to send payload update.",x);
+}
 }
 }
 



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



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

2006-06-29 Thread fhanik
Author: fhanik
Date: Thu Jun 29 01:54:48 2006
New Revision: 417966

URL: http://svn.apache.org/viewvc?rev=417966&view=rev
Log:
Fixed, should not check here

Modified:

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java?rev=417966&r1=417965&r2=417966&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java
 Thu Jun 29 01:54:48 2006
@@ -332,6 +332,8 @@
  * @throws Exception
  */ 
 public void send(boolean checkexpired) throws IOException{
+//ignore if we haven't started the sender
+//if ( (startLevel&Channel.MBR_TX_SEQ) != Channel.MBR_TX_SEQ ) return;
 member.inc();
 if(log.isDebugEnabled())
 log.debug("Mcast send ping from member " + member);



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



Re: Renaming jakarta-tomcat-connectors to tomcat-connectors?

2006-06-29 Thread Rainer Jung
I understand, but for mod_jk the situation is different. It's neither 
tightly coupled to a tomcat release, nor is it simply maintenance.

I think the situation is very similar to the renaming of tomcat 5.5.

I committed the necessary changes yesterday, so everyone can have a look 
at it:


http://svn.apache.org/viewvc?rev=417906&view=rev

Rainer

Costin Manolache schrieb:

"Jakarta Tomcat" was used in many contexts, and I don't see why a user
would be confused - or care or know what a TLP is. That's internal
apache organization.

My point is - it would be better to stop using jakarta for future, and not
change the
past. Tomcat5 was released as 'jakarta tomcat', and it's more or less
history - we
make sort of maintainance releases.

For tomcat6 and other future releases - we can stop using jakarta.

Costin

On 6/28/06, Yoav Shapira <[EMAIL PROTECTED]> wrote:


Hi,

On 6/28/06, Costin Manolache <[EMAIL PROTECTED]> wrote:
> And why are you doing this ?

Why are we doing the renaming?  Because the relevant project is no
longer part of Jakarta, so to avoid confusion among users, be
consistent with other Tomcat code, discharge the Jakarta PMC from
responsibility, etc.  Ideally we would have done this right after we
became a TLP, but better late then never.

Or did you mean something else other than the renaming by "this" in
the above question?

Yoav

>
> For tomcat5 - I don't see how much it helps. For tomcat6+ - I think the
> main issue is figuring where to put the native code so the duplicated
> java source trees don't confuse people. Given how much unused native
> we have, it may be good to just move mod_jk and whatever else is still
> used to tomcat6/ repo.
>
> Costin
>
> On 6/28/06, Rainer Jung <[EMAIL PROTECTED]> wrote:
> >
> > I think it's time to rename jakarta-tomcat-connectors to
> > tomcat-connectors. I'll try to handle the remaining jakarta-tomcat
> > artefacts inside the connectors module and concerning the download.
> >
> > Does anyone know about external references we might break?


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



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

2006-06-29 Thread Jean-frederic Clere

Hi,

Try to prevent CR/LF conversion when you commit... Hard to find what was 
changed in MemberImpl.java :-(


Cheers

Jean-Frederic

[EMAIL PROTECTED] wrote:


Author: fhanik
Date: Thu Jun 29 01:33:29 2006
New Revision: 417959

URL: http://svn.apache.org/viewvc?rev=417959&view=rev
Log:
Added Member.getCommand, so that we don't have to piggyback on application 
payload to transfer internal tribes commands

Modified:
   tomcat/container/tc5.5.x/modules/groupcom/VERSION
   
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java
   
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
   
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java
   
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/MemberImpl.java

Modified: tomcat/container/tc5.5.x/modules/groupcom/VERSION
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/VERSION?rev=417959&r1=417958&r2=417959&view=diff
==
--- tomcat/container/tc5.5.x/modules/groupcom/VERSION (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/VERSION Thu Jun 29 01:33:29 2006
@@ -1,3 +1,5 @@
+0.9.3.3
+  - Added Member.getCommand, to separate out internal tribes logic from 
application payload
0.9.3.2
  - MemberImpl.toString has a limit on the size it prints out
0.9.3.1

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java?rev=417959&r1=417958&r2=417959&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java
 Thu Jun 29 01:33:29 2006
@@ -95,4 +95,9 @@
 */
public byte[] getPayload();

+/**

+ * returns the command associated with this member
+ * @return byte[]
+ */
+public byte[] getCommand();
}

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java?rev=417959&r1=417958&r2=417959&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
 Thu Jun 29 01:33:29 2006
@@ -135,7 +135,7 @@
public void memberDisappeared(Member member) {
if ( membership == null ) setupMembership();
boolean notify = false;
-boolean shutdown = 
Arrays.equals(member.getPayload(),Member.SHUTDOWN_PAYLOAD);
+boolean shutdown = 
Arrays.equals(member.getCommand(),Member.SHUTDOWN_PAYLOAD);
if ( !shutdown ) log.info("Received memberDisappeared["+member+"] message. 
Will verify.");
synchronized (membership) {
//check to see if the member really is gone
@@ -245,7 +245,7 @@
 long readTimeout, long conTimeout,
 int optionFlag) {
//could be a shutdown notification
-if ( Arrays.equals(mbr.getPayload(),Member.SHUTDOWN_PAYLOAD) ) return 
false;
+if ( Arrays.equals(mbr.getCommand(),Member.SHUTDOWN_PAYLOAD) ) return 
false;

Socket socket = new Socket();
try {


Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java?rev=417959&r1=417958&r2=417959&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java
 Thu Jun 29 01:33:29 2006
@@ -255,12 +255,10 @@
//we're shutting down, send a shutdown message and close the socket
if ( startLevel == 0 ) {
//send a stop message
-byte[] payload = member.getPayload();
-member.setPayload(Member.SHUTDOWN_PAYLOAD);
+member.setCommand(Member.SHUTDOWN_PAYLOAD);
member.getData(true

Copied 2.5 servlet API for geronimo.

2006-06-29 Thread Greg Wilkins

Just a notice that I have taken a copy of the 2.5 servlet API for the
geronimo-specs project.

This was done as an SVN copy from

  https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/java/javax/servlet

to

  
https://svn.apache.org/repos/asf/geronimo/specs/trunk/geronimo-spec-servlet-2.5/src/main/java/javax/servlet

Note that I don't think this forking of this source is a good thing and it has 
only been done
as a pragmatic short term solution (maven2 repos and consistency with the other 
forked specs).
I also think there are now at least 3 copies of the xsd's checked into the 
apache repo as
well.

Eventually I would like to see all such specs moved to a top level apache 
project and there
is a proposal for this being developed: 
http://wiki.apache.org/incubator/GrandCentralProposal


cheers


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



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

2006-06-29 Thread Filip Hanik - Dev Lists

gee, this is the second time this happened to me.
my IDE is set to preserve line endings, do I need to setup some 
subversion property?


Filip


Jean-frederic Clere wrote:

Hi,

Try to prevent CR/LF conversion when you commit... Hard to find what 
was changed in MemberImpl.java :-(


Cheers

Jean-Frederic

[EMAIL PROTECTED] wrote:


Author: fhanik
Date: Thu Jun 29 01:33:29 2006
New Revision: 417959

URL: http://svn.apache.org/viewvc?rev=417959&view=rev
Log:
Added Member.getCommand, so that we don't have to piggyback on 
application payload to transfer internal tribes commands


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

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

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

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



Modified: tomcat/container/tc5.5.x/modules/groupcom/VERSION
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/VERSION?rev=417959&r1=417958&r2=417959&view=diff 

== 


--- tomcat/container/tc5.5.x/modules/groupcom/VERSION (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/VERSION Thu Jun 29 
01:33:29 2006

@@ -1,3 +1,5 @@
+0.9.3.3
+  - Added Member.getCommand, to separate out internal tribes logic 
from application payload

0.9.3.2
  - MemberImpl.toString has a limit on the size it prints out
0.9.3.1

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

URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java?rev=417959&r1=417958&r2=417959&view=diff 

== 

--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java 
(original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java 
Thu Jun 29 01:33:29 2006

@@ -95,4 +95,9 @@
 */
public byte[] getPayload();
+/**
+ * returns the command associated with this member
+ * @return byte[]
+ */
+public byte[] getCommand();
}

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

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

== 

--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java 
(original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java 
Thu Jun 29 01:33:29 2006

@@ -135,7 +135,7 @@
public void memberDisappeared(Member member) {
if ( membership == null ) setupMembership();
boolean notify = false;
-boolean shutdown = 
Arrays.equals(member.getPayload(),Member.SHUTDOWN_PAYLOAD);
+boolean shutdown = 
Arrays.equals(member.getCommand(),Member.SHUTDOWN_PAYLOAD);
if ( !shutdown ) log.info("Received 
memberDisappeared["+member+"] message. Will verify.");

synchronized (membership) {
//check to see if the member really is gone
@@ -245,7 +245,7 @@
 long readTimeout, long 
conTimeout,

 int optionFlag) {
//could be a shutdown notification
-if ( Arrays.equals(mbr.getPayload(),Member.SHUTDOWN_PAYLOAD) 
) return false;
+if ( Arrays.equals(mbr.getCommand(),Member.SHUTDOWN_PAYLOAD) 
) return false;

Socket socket = new Socket();try {

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

URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java?rev=417959&r1=417958&r2=417959&view=diff 

== 

--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java 
(original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java 
Thu Jun 29 01:33:29 2006

@@ -255,12 +255,10 @@
//we're shutting down, send a shutdown message and close the 
socket

if ( startLevel == 0 ) {
//se

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

2006-06-29 Thread fhanik
Author: fhanik
Date: Thu Jun 29 03:08:57 2006
New Revision: 417983

URL: http://svn.apache.org/viewvc?rev=417983&view=rev
Log:
Peter was right all along, domain name filtering becomes really useful, since 
trying to guess an available available multicast address is not that safe

Added:

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

tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/test/membership/TestDomainFilter.java
Modified:
tomcat/container/tc5.5.x/modules/groupcom/VERSION

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

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

Modified: tomcat/container/tc5.5.x/modules/groupcom/VERSION
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/VERSION?rev=417983&r1=417982&r2=417983&view=diff
==
--- tomcat/container/tc5.5.x/modules/groupcom/VERSION (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/VERSION Thu Jun 29 03:08:57 2006
@@ -1,6 +1,7 @@
 0.9.3.3
   - Added Member.getCommand, to separate out internal tribes logic from 
application payload
   - when setting payload, the update should get sent immediately
+  - domain name filter, using an interceptor if we wish
 0.9.3.2
   - MemberImpl.toString has a limit on the size it prints out
 0.9.3.1

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java?rev=417983&r1=417982&r2=417983&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java
 Thu Jun 29 03:08:57 2006
@@ -100,4 +100,10 @@
  * @return byte[]
  */
 public byte[] getCommand();
+
+/**
+ * Domain for this cluster
+ * @return byte[]
+ */
+public byte[] getDomain();
 }

Added: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/DomainFilterInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/DomainFilterInterceptor.java?rev=417983&view=auto
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/DomainFilterInterceptor.java
 (added)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/DomainFilterInterceptor.java
 Thu Jun 29 03:08:57 2006
@@ -0,0 +1,101 @@
+/*
+ * Copyright 1999,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ */
+package org.apache.catalina.tribes.group.interceptors;
+
+import org.apache.catalina.tribes.ChannelMessage;
+import org.apache.catalina.tribes.Member;
+import org.apache.catalina.tribes.group.ChannelInterceptorBase;
+import org.apache.catalina.tribes.membership.MemberImpl;
+import org.apache.catalina.tribes.membership.Membership;
+import java.util.Arrays;
+
+/**
+ * Title: Member domain filter interceptor 
+ *
+ * Description: Filters membership based on domain.
+ * 
+ *
+ * @author Filip Hanik
+ * @version 1.0
+ */
+public class DomainFilterInterceptor extends ChannelInterceptorBase {
+
+private static org.apache.commons.logging.Log log = 
org.apache.commons.logging.LogFactory.getLog( DomainFilterInterceptor.class );
+
+protected Membership membership = null;
+
+protected byte[] domain = new byte[0];
+
+public void messageReceived(ChannelMessage msg) {
+//should we filter incoming based on domain?
+super.messageReceived(msg);
+}//messageReceived
+
+
+public void memberAdded(Member member) {
+if ( membership == null ) setupMembership();
+boolean notify = false;
+synchronized (membership) {
+notify = Arrays.equals(domain,member.getDomain());
+if ( notify ) notify = membership.memberAlive((MemberImpl)member);
+}
+if ( notify ) s

Re: Copied 2.5 servlet API for geronimo.

2006-06-29 Thread Filip Hanik - Dev Lists
quick question, isn't there a way to do "symbolic links" in svn, ala, no 
copy needed, but checkout/checkins would work from the new repo url as well


Filip


Greg Wilkins wrote:

Just a notice that I have taken a copy of the 2.5 servlet API for the
geronimo-specs project.

This was done as an SVN copy from

  https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/java/javax/servlet

to

  
https://svn.apache.org/repos/asf/geronimo/specs/trunk/geronimo-spec-servlet-2.5/src/main/java/javax/servlet

Note that I don't think this forking of this source is a good thing and it has 
only been done
as a pragmatic short term solution (maven2 repos and consistency with the other 
forked specs).
I also think there are now at least 3 copies of the xsd's checked into the 
apache repo as
well.

Eventually I would like to see all such specs moved to a top level apache 
project and there
is a proposal for this being developed: 
http://wiki.apache.org/incubator/GrandCentralProposal


cheers


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


  



--


Filip Hanik

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



svn commit: r417985 - in /tomcat/container/tc5.5.x/modules/groupcom: src/share/org/apache/catalina/tribes/membership/MemberImpl.java test/java/org/apache/catalina/tribes/test/membership/MemberSerializ

2006-06-29 Thread fhanik
Author: fhanik
Date: Thu Jun 29 03:21:25 2006
New Revision: 417985

URL: http://svn.apache.org/viewvc?rev=417985&view=rev
Log:
Fixed domain serialization

Modified:

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

tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/test/membership/MemberSerialization.java

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/MemberImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/MemberImpl.java?rev=417985&r1=417984&r2=417985&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/MemberImpl.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/MemberImpl.java
 Thu Jun 29 03:21:25 2006
@@ -280,7 +280,7 @@
int dl = XByteBuffer.toInt(data,pos);
pos+=4;
 
-   byte[] domain = new byte[cl];
+   byte[] domain = new byte[dl];
System.arraycopy(data, pos, domain, 0, domain.length);
pos+=domain.length;
 

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/test/membership/MemberSerialization.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/test/membership/MemberSerialization.java?rev=417985&r1=417984&r2=417985&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/test/membership/MemberSerialization.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/test/membership/MemberSerialization.java
 Thu Jun 29 03:21:25 2006
@@ -43,6 +43,10 @@
 Arrays.fill(payload,(byte)2);
 p1 = new MemberImpl("127.0.0.1",,1,payload);
 p2 = new MemberImpl("localhost",3331,1,payload);
+m1.setDomain(new byte[] {1,2,3,4,5,6,7,8,9});
+m2.setDomain(new byte[] {1,2,3,4,5,6,7,8,9});
+m1.setCommand(new byte[] {1,2,4,5,6,7,8,9});
+m2.setCommand(new byte[] {1,2,4,5,6,7,8,9});
 }
 
 public void testCompare() throws Exception {



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



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

2006-06-29 Thread Rainer Jung

Maybe this

http://www.apache.org/dev/svn-eol-style.txt

will help?

Filip Hanik - Dev Lists schrieb:

gee, this is the second time this happened to me.
my IDE is set to preserve line endings, do I need to setup some 
subversion property?


Filip


Jean-frederic Clere wrote:

Hi,

Try to prevent CR/LF conversion when you commit... Hard to find what 
was changed in MemberImpl.java :-(


Cheers

Jean-Frederic

[EMAIL PROTECTED] wrote:


Author: fhanik
Date: Thu Jun 29 01:33:29 2006
New Revision: 417959

URL: http://svn.apache.org/viewvc?rev=417959&view=rev
Log:
Added Member.getCommand, so that we don't have to piggyback on 
application payload to transfer internal tribes commands


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

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

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

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



Modified: tomcat/container/tc5.5.x/modules/groupcom/VERSION
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/VERSION?rev=417959&r1=417958&r2=417959&view=diff 

== 


--- tomcat/container/tc5.5.x/modules/groupcom/VERSION (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/VERSION Thu Jun 29 
01:33:29 2006

@@ -1,3 +1,5 @@
+0.9.3.3
+  - Added Member.getCommand, to separate out internal tribes logic 
from application payload

0.9.3.2
  - MemberImpl.toString has a limit on the size it prints out
0.9.3.1

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

URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java?rev=417959&r1=417958&r2=417959&view=diff 

== 

--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java 
(original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/Member.java 
Thu Jun 29 01:33:29 2006

@@ -95,4 +95,9 @@
 */
public byte[] getPayload();
+/**
+ * returns the command associated with this member
+ * @return byte[]
+ */
+public byte[] getCommand();
}

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

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

== 

--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java 
(original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java 
Thu Jun 29 01:33:29 2006

@@ -135,7 +135,7 @@
public void memberDisappeared(Member member) {
if ( membership == null ) setupMembership();
boolean notify = false;
-boolean shutdown = 
Arrays.equals(member.getPayload(),Member.SHUTDOWN_PAYLOAD);
+boolean shutdown = 
Arrays.equals(member.getCommand(),Member.SHUTDOWN_PAYLOAD);
if ( !shutdown ) log.info("Received 
memberDisappeared["+member+"] message. Will verify.");

synchronized (membership) {
//check to see if the member really is gone
@@ -245,7 +245,7 @@
 long readTimeout, long 
conTimeout,

 int optionFlag) {
//could be a shutdown notification
-if ( Arrays.equals(mbr.getPayload(),Member.SHUTDOWN_PAYLOAD) 
) return false;
+if ( Arrays.equals(mbr.getCommand(),Member.SHUTDOWN_PAYLOAD) 
) return false;

Socket socket = new Socket();try {

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

URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java?rev=417959&r1=417958&r2=417959&view=diff 

== 

--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java 
(original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java 
Thu Jun 29 01:33:29 2006

@@ -255,12 +255,10 @@
//we're shutting

svn commit: r417998 - in /tomcat/container/tc5.5.x/modules/groupcom: VERSION src/share/org/apache/catalina/tribes/MembershipService.java src/share/org/apache/catalina/tribes/membership/McastService.ja

2006-06-29 Thread fhanik
Author: fhanik
Date: Thu Jun 29 03:46:56 2006
New Revision: 417998

URL: http://svn.apache.org/viewvc?rev=417998&view=rev
Log:
Added in the ability to set the domain both runtime and startup time

Modified:
tomcat/container/tc5.5.x/modules/groupcom/VERSION

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/membership/McastService.java

Modified: tomcat/container/tc5.5.x/modules/groupcom/VERSION
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/VERSION?rev=417998&r1=417997&r2=417998&view=diff
==
--- tomcat/container/tc5.5.x/modules/groupcom/VERSION (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/VERSION Thu Jun 29 03:46:56 2006
@@ -1,7 +1,8 @@
-0.9.3.3
+0.9.4.0
   - Added Member.getCommand, to separate out internal tribes logic from 
application payload
   - when setting payload, the update should get sent immediately
   - domain name filter, using an interceptor if we wish
+  - major version bump since we are changing the protocol for member
 0.9.3.2
   - MemberImpl.toString has a limit on the size it prints out
 0.9.3.1

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MembershipService.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/MembershipService.java?rev=417998&r1=417997&r2=417998&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
 Thu Jun 29 03:46:56 2006
@@ -128,5 +128,7 @@
  * @param payload byte[]
  */
 public void setPayload(byte[] payload);
+
+public void setDomain(byte[] domain);
 
 }

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastService.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastService.java?rev=417998&r1=417997&r2=417998&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastService.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastService.java
 Thu Jun 29 03:46:56 2006
@@ -71,6 +71,8 @@
 private int mcastTTL;
 
 protected byte[] payload;
+
+protected byte[] domain;
 
 /**
  * Create a membership service.
@@ -243,6 +245,7 @@
 localMember.setMemberAliveTime(100);
 }
 if ( this.payload != null ) localMember.setPayload(payload);
+if ( this.domain != null ) localMember.setDomain(domain);
 localMember.setServiceStartTime(System.currentTimeMillis());
 java.net.InetAddress bind = null;
 if ( properties.getProperty("mcastBindAddress")!= null ) {
@@ -382,6 +385,10 @@
 public byte[] getPayload() {
 return payload;
 }
+
+public byte[] getDomain() {
+return domain;
+}
 
 public void setMcastTTL(int mcastTTL) {
 this.mcastTTL = mcastTTL;
@@ -397,6 +404,19 @@
 if (impl != null) impl.send(false);
 }catch ( Exception x ) {
 log.error("Unable to send payload update.",x);
+}
+}
+}
+
+public void setDomain(byte[] domain) {
+this.domain = domain;
+if ( localMember != null ) {
+localMember.setDomain(domain);
+localMember.getData(true,true);
+try {
+if (impl != null) impl.send(false);
+}catch ( Exception x ) {
+log.error("Unable to send domain update.",x);
 }
 }
 }



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



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

2006-06-29 Thread fhanik
Author: fhanik
Date: Thu Jun 29 04:02:43 2006
New Revision: 418003

URL: http://svn.apache.org/viewvc?rev=418003&view=rev
Log:
Add in the ability to ignore incorrect packages

Modified:

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

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java?rev=418003&r1=418002&r2=418003&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastServiceImpl.java
 Thu Jun 29 04:02:43 2006
@@ -359,6 +359,11 @@
 while ( doRunReceiver ) {
 try {
 receive();
+} catch ( ArrayIndexOutOfBoundsException ax ) {
+//we can ignore this, as it means we have an invalid 
package
+//but we will log it to debug
+if ( log.isDebugEnabled() )
+log.debug("Invalid member mcast package.",ax);
 } catch ( Exception x ) {
 log.warn("Error receiving mcast package. Sleeping 
500ms",x);
 try { Thread.sleep(500); } catch ( Exception ignore ){}

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/MemberImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/MemberImpl.java?rev=418003&r1=418002&r2=418003&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/MemberImpl.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/MemberImpl.java
 Thu Jun 29 04:02:43 2006
@@ -394,7 +394,9 @@
 buf.append(port).append(", alive=");
 buf.append(memberAliveTime).append(",");
 buf.append("id=").append(bToS(this.uniqueId)).append(", ");
-buf.append("payload=").append(bToS(this.payload,5)).append(", ");
+buf.append("payload=").append(bToS(this.payload,8)).append(", ");
+buf.append("command=").append(bToS(this.command,8)).append(", ");
+buf.append("domain=").append(bToS(this.domain,8)).append(", ");
 buf.append("]");
 return buf.toString();
 }



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



Re: Copied 2.5 servlet API for geronimo.

2006-06-29 Thread Yoav Shapira

Hi,
Are SVN externals (http://svnbook.red-bean.com/en/1.0/ch07s03.html)
what you mean?

Personally speaking, a notice before forking rather than after would
be appreciated ;)

Yoav

On 6/29/06, Filip Hanik - Dev Lists <[EMAIL PROTECTED]> wrote:

quick question, isn't there a way to do "symbolic links" in svn, ala, no
copy needed, but checkout/checkins would work from the new repo url as well

Filip


Greg Wilkins wrote:
> Just a notice that I have taken a copy of the 2.5 servlet API for the
> geronimo-specs project.
>
> This was done as an SVN copy from
>
>   https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/java/javax/servlet
>
> to
>
>   
https://svn.apache.org/repos/asf/geronimo/specs/trunk/geronimo-spec-servlet-2.5/src/main/java/javax/servlet
>
> Note that I don't think this forking of this source is a good thing and it 
has only been done
> as a pragmatic short term solution (maven2 repos and consistency with the 
other forked specs).
> I also think there are now at least 3 copies of the xsd's checked into the 
apache repo as
> well.
>
> Eventually I would like to see all such specs moved to a top level apache 
project and there
> is a proposal for this being developed: 
http://wiki.apache.org/incubator/GrandCentralProposal
>
>
> cheers
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


--


Filip Hanik

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





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

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



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

2006-06-29 Thread fhanik
Author: fhanik
Date: Thu Jun 29 04:22:12 2006
New Revision: 418013

URL: http://svn.apache.org/viewvc?rev=418013&view=rev
Log:
Fixed bug, these byte arrays should never be null

Modified:

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

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastService.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastService.java?rev=418013&r1=418012&r2=418013&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastService.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/McastService.java
 Thu Jun 29 04:22:12 2006
@@ -153,6 +153,8 @@
 } else {
 localMember = new MemberImpl(listenHost, listenPort, 0);
 localMember.setUniqueId(UUIDGenerator.randomUUID(true));
+localMember.setPayload(getPayload());
+localMember.setDomain(getDomain());
 }
 localMember.getData(true, true);
 }catch ( IOException x ) {

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/MemberImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/MemberImpl.java?rev=418013&r1=418012&r2=418013&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/MemberImpl.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/MemberImpl.java
 Thu Jun 29 04:22:12 2006
@@ -466,7 +466,7 @@
 }
 
 public void setPayload(byte[] payload) {
-this.payload = payload;
+this.payload = payload!=null?payload:new byte[0];
 getData(true,true);
 }
 



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



Re: Copied 2.5 servlet API for geronimo.

2006-06-29 Thread Remy Maucherat

Yoav Shapira wrote:

Hi,
Are SVN externals (http://svnbook.red-bean.com/en/1.0/ch07s03.html)
what you mean?


Since this is really our core APIs, we need to have some control on 
them, and I think we should keep our own sources.


Rémy

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



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

2006-06-29 Thread fhanik
Author: fhanik
Date: Thu Jun 29 04:34:32 2006
New Revision: 418015

URL: http://svn.apache.org/viewvc?rev=418015&view=rev
Log:
final touches

Modified:

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/MemberImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/MemberImpl.java?rev=418015&r1=418014&r2=418015&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/MemberImpl.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/MemberImpl.java
 Thu Jun 29 04:34:32 2006
@@ -462,7 +462,8 @@
 }
 
 public void setUniqueId(byte[] uniqueId) {
-this.uniqueId = uniqueId;
+this.uniqueId = uniqueId!=null?uniqueId:new byte[16];
+getData(true,true);
 }
 
 public void setPayload(byte[] payload) {
@@ -472,10 +473,12 @@
 
 public void setCommand(byte[] command) {
 this.command = command!=null?command:new byte[0];
+getData(true,true);
 }
 
 public void setDomain(byte[] domain) {
 this.domain = domain!=null?domain:new byte[0];
+getData(true,true);
 }
 
 public void readExternal(ObjectInput in) throws IOException, 
ClassNotFoundException {



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



svn commit: r418016 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/StandardSession.java

2006-06-29 Thread remm
Author: remm
Date: Thu Jun 29 04:37:30 2006
New Revision: 418016

URL: http://svn.apache.org/viewvc?rev=418016&view=rev
Log:
- Redo the session activity check (which prevents expiring a session if there 
is an extremely
  long request and a short timeout) as optional, and using an atomic integer.

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/StandardSession.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/StandardSession.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/StandardSession.java?rev=418016&r1=418015&r2=418016&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/StandardSession.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/StandardSession.java 
Thu Jun 29 04:37:30 2006
@@ -34,6 +34,7 @@
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
 
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpSession;
@@ -81,6 +82,10 @@
 implements HttpSession, Session, Serializable {
 
 
+protected static final boolean ACTIVITY_CHECK = 
+
Boolean.valueOf(System.getProperty("org.apache.catalina.session.StandardSession.ACTIVITY_CHECK",
 "false")).booleanValue();
+
+
 // --- Constructors
 
 
@@ -272,9 +277,9 @@
 /**
  * The access count for this session.
  */
-protected transient int accessCount = 0;
-
+protected transient AtomicInteger accessCount = null;
 
+
 // - Session Properties
 
 
@@ -568,7 +573,7 @@
 return false;
 }
 
-if (accessCount > 0) {
+if (ACTIVITY_CHECK && accessCount.get() > 0) {
 return true;
 }
 
@@ -606,7 +611,10 @@
 
 this.lastAccessedTime = this.thisAccessedTime;
 this.thisAccessedTime = System.currentTimeMillis();
-accessCount++;
+
+if (ACTIVITY_CHECK) {
+accessCount.incrementAndGet();
+}
 
 }
 
@@ -617,7 +625,10 @@
 public void endAccess() {
 
 isNew = false;
-accessCount--;
+
+if (ACTIVITY_CHECK) {
+accessCount.decrementAndGet();
+}
 
 }
 
@@ -697,7 +708,7 @@
 }
 }
 }
-accessCount = 0;
+accessCount = null;
 setValid(false);
 
 /*
@@ -775,6 +786,11 @@
  */
 public void activate() {
 
+// Initialize access count
+if (ACTIVITY_CHECK) {
+accessCount = new AtomicInteger();
+}
+
 // Notify interested session event listeners
 fireSessionEvent(Session.SESSION_ACTIVATED_EVENT, null);
 
@@ -837,7 +853,7 @@
 id = null;
 lastAccessedTime = 0L;
 maxInactiveInterval = -1;
-accessCount = 0;
+accessCount = null;
 notes.clear();
 setPrincipal(null);
 isNew = false;



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



Re: Copied 2.5 servlet API for geronimo.

2006-06-29 Thread Yoav Shapira

Hola,

On 6/29/06, Remy Maucherat <[EMAIL PROTECTED]> wrote:

Since this is really our core APIs, we need to have some control on
them, and I think we should keep our own sources.


Yes, agreed 100%.  I wasn't clear, but I meant that we'd keep the
source, and others e.g. Geronimo, could use an SVN external link if
they wanted a copy, rather than forking it.

Yoav

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



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

2006-06-29 Thread fhanik
Author: fhanik
Date: Thu Jun 29 05:50:22 2006
New Revision: 418028

URL: http://svn.apache.org/viewvc?rev=418028&view=rev
Log:
Always add in the domain name filter

Modified:

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/ChannelCreator.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/ChannelCreator.java?rev=418028&r1=418027&r2=418028&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/ChannelCreator.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/ChannelCreator.java
 Thu Jun 29 05:50:22 2006
@@ -32,6 +32,7 @@
 import org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor;
 import 
org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor;
 import org.apache.catalina.tribes.group.interceptors.TcpFailureDetector;
+import org.apache.catalina.tribes.group.interceptors.DomainFilterInterceptor;
 
 /**
  * Title: 
@@ -220,9 +221,12 @@
 TcpFailureDetector tcpfi = new TcpFailureDetector();
 channel.addInterceptor(tcpfi);
 }
-
+byte[] domain = new byte[] {1,2,3,4,5,6,7,8,9,0};
+((McastService)channel.getMembershipService()).setDomain(domain);
+DomainFilterInterceptor filter = new DomainFilterInterceptor();
+filter.setDomain(domain);
+channel.addInterceptor(filter);
 return channel;
-
 }
 
 }



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



Re: Copied 2.5 servlet API for geronimo.

2006-06-29 Thread Jeanfrancois Arcand



Greg Wilkins wrote:

Just a notice that I have taken a copy of the 2.5 servlet API for the
geronimo-specs project.

This was done as an SVN copy from

  https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/java/javax/servlet

to

  
https://svn.apache.org/repos/asf/geronimo/specs/trunk/geronimo-spec-servlet-2.5/src/main/java/javax/servlet

Note that I don't think this forking of this source is a good thing and it has 
only been done
as a pragmatic short term solution (maven2 repos and consistency with the other 
forked specs).
I also think there are now at least 3 copies of the xsd's checked into the 
apache repo as
well.

Eventually I would like to see all such specs moved to a top level apache 
project and there
is a proposal for this being developed: 
http://wiki.apache.org/incubator/GrandCentralProposal


Until the GrandCentralProposal is accepted/ready, you can also get the 
servlet/jsp API inside the java.net repository:


https://maven-repository.dev.java.net/nonav/repository/

Of cource the licence might not be appropriate for Apache project.

-- Jeanfrancois






cheers


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



DO NOT REPLY [Bug 39931] New: - Using mcastBindAddress for Tomcat Clustering fails to receive multicast packets

2006-06-29 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=39931

   Summary: Using mcastBindAddress for Tomcat Clustering fails to
receive multicast packets
   Product: Tomcat 5
   Version: 5.5.12
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina:Cluster
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


With two systems, I tried to enable clustering so that sessions would replicate
in case of a failure on one of the systems.  The two systems have 3 network
cards in them.  eth2 goes to the NAS while eth1 and eth0 are on the main network
of other apache and tomcat servers.  eth0 is a backup for eth1 and is normally 
down.

The problem seems to be when I specify which interface to bind to in the
Membership node of server.xml.  If I specify
mcastBindAddress="", I can tell that Tomcat is listening and
sending on this address.  However, it seems that packets never get delivered to
the receive method in the McastServiceImpl class.  I've confirmed that the
multicast traffic reaches the machine but with debug logging on, I never get the
'mcast receive' log message.

If I remove the mcastBindAddress attribute from the Membership node in
server.xml, the multicast traffic gets delivered and session replication works.

On single-homed systems, it does not seem to matter if mcastBindAddress is set
or not - the multicast packets get delivered.

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

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



DO NOT REPLY [Bug 39933] New: - Divide by zero exception when viewing ClusterReceiver with JMX

2006-06-29 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=39933

   Summary: Divide by zero exception when viewing ClusterReceiver
with JMX
   Product: Tomcat 5
   Version: 5.5.12
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina:Cluster
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


While troubleshooting a clustering issue, I installed JMX (for JDK 1.4) as per
the instructions at http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html
to be able to monitor the activity.  When clicking on the link for
Catalina:type=ClusterReceiver,host=localhost I was getting a Divide by Zero
exception in the catalina.out log.  The message was:

catalina.out:javax.management.RuntimeOperationsException: Exception invoking
method avgTotalReceivedBytes nested runtime exception is
java.lang.ArithmeticException: / by zero

Presumably this was because no traffic had been received yet.  Once I got
clustering working, and traffic was being sent/received, I no longer received
this error.

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

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



DO NOT REPLY [Bug 39933] - Divide by zero exception when viewing ClusterReceiver with JMX

2006-06-29 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=39933





--- Additional Comments From [EMAIL PROTECTED]  2006-06-29 16:02 ---
Do you have a stack?

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

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



DO NOT REPLY [Bug 39933] - Divide by zero exception when viewing ClusterReceiver with JMX

2006-06-29 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=39933





--- Additional Comments From [EMAIL PROTECTED]  2006-06-29 16:04 ---
javax.management.RuntimeOperationsException: Exception invoking method
avgTotalReceivedBytes nested runtime exception is java.lang.ArithmeticException:
/ by zero
java.lang.ArithmeticException: / by zero
at
org.apache.catalina.cluster.tcp.ClusterReceiverBase.getAvgTotalReceivedBytes(ClusterReceiverBase.java:271)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.commons.modeler.BaseModelMBean.getAttribute(BaseModelMBean.java:346)
at
mx4j.server.interceptor.InvokerMBeanServerInterceptor.getAttribute(InvokerMBeanServerInterceptor.java:248)
at
mx4j.server.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:135)
at
mx4j.server.interceptor.SecurityMBeanServerInterceptor.getAttribute(SecurityMBeanServerInterceptor.java:106)
at
mx4j.server.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:135)
at
mx4j.server.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:135)
at
mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.getAttribute(ContextClassLoaderMBeanServerInterceptor.java:269)
at mx4j.server.MX4JMBeanServer.getAttribute(MX4JMBeanServer.java:965)
at
mx4j.tools.adaptor.http.MBeanCommandProcessor.createMBeanElement(MBeanCommandProcessor.java:119)
at
mx4j.tools.adaptor.http.MBeanCommandProcessor.executeRequest(MBeanCommandProcessor.java:56)
at 
mx4j.tools.adaptor.http.HttpAdaptor$HttpClient.run(HttpAdaptor.java:980)


-- 
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: r418077 - in /tomcat/container/tc5.5.x/modules/groupcom: src/share/org/apache/catalina/tribes/transport/nio/ParallelNioSender.java test/java/org/apache/catalina/tribes/demos/LoadTest.java

2006-06-29 Thread fhanik
Author: fhanik
Date: Thu Jun 29 09:17:06 2006
New Revision: 418077

URL: http://svn.apache.org/viewvc?rev=418077&view=rev
Log:
Changed default, showed how serialization is 30 percent of tribes overhead.

Modified:

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

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/ParallelNioSender.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/ParallelNioSender.java?rev=418077&r1=418076&r2=418077&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/ParallelNioSender.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/ParallelNioSender.java
 Thu Jun 29 09:17:06 2006
@@ -50,8 +50,7 @@
 public class ParallelNioSender extends AbstractSender implements 
MultiPointSender {
 
 protected static org.apache.commons.logging.Log log = 
org.apache.commons.logging.LogFactory.getLog(ParallelNioSender.class);
-
-protected long selectTimeout = 1000; //default 1 second
+protected long selectTimeout = 5000; //default 5 seconds, same as send 
timeout
 protected Selector selector;
 protected HashMap nioSenders = new HashMap();
 

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/LoadTest.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/LoadTest.java?rev=418077&r1=418076&r2=418077&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/LoadTest.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/LoadTest.java
 Thu Jun 29 09:17:06 2006
@@ -249,8 +249,8 @@
 
 
 
-public static class LoadMessage implements Serializable  {
-//public static class LoadMessage extends ByteMessage  implements 
Serializable {
+//public static class LoadMessage implements Serializable  {
+public static class LoadMessage extends ByteMessage  implements 
Serializable {
 
 public static byte[] outdata = new byte[size];
 public static Random r = new Random(System.currentTimeMillis());



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



DO NOT REPLY [Bug 39931] - Using mcastBindAddress for Tomcat Clustering fails to receive multicast packets

2006-06-29 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=39931


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |NEEDINFO




--- Additional Comments From [EMAIL PROTECTED]  2006-06-29 16:54 ---
multicasting on a multihomed computer will require your routes to be setup
correctly on the box. I suggest using a tool like ethereal to debug where the
packets go, and report back to us, and we can address it then

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

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



DO NOT REPLY [Bug 39931] - Using mcastBindAddress for Tomcat Clustering fails to receive multicast packets

2006-06-29 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=39931





--- Additional Comments From [EMAIL PROTECTED]  2006-06-29 18:32 ---
I captured packets using tcpdump and opened the captured file using Ethereal. 
It shows that both machines do in fact receive the traffic.  The following is a
capture from 192.168.179.82:

No. TimeSourceDestination   Protocol Len   
Cum.Len  Info
  1 0.00192.168.179.82228.0.0.4 UDP  99
99   Source port: 45564  Destination port: 45564
  2 0.353582192.168.179.83228.0.0.4 UDP  99
198  Source port: 45564  Destination port: 45564
  3 0.509843192.168.179.82228.0.0.4 UDP  99
297  Source port: 45564  Destination port: 45564
  4 0.863437192.168.179.83228.0.0.4 UDP  99
396  Source port: 45564  Destination port: 45564
  5 1.019700192.168.179.82228.0.0.4 UDP  99
495  Source port: 45564  Destination port: 45564
  6 1.373288192.168.179.83228.0.0.4 UDP  99
594  Source port: 45564  Destination port: 45564
  7 1.529552192.168.179.82228.0.0.4 UDP  99
693  Source port: 45564  Destination port: 45564
  8 1.883166192.168.179.83228.0.0.4 UDP  99
792  Source port: 45564  Destination port: 45564
  9 2.039411192.168.179.82228.0.0.4 UDP  99
891  Source port: 45564  Destination port: 45564
 10 2.392998192.168.179.83228.0.0.4 UDP  99
990  Source port: 45564  Destination port: 45564


It appears to be a very similar, if not the same, issue as what is discussed at
the following thread:

http://marc.theaimsgroup.com/?l=tomcat-user&m=114020671804619&w=2

The network config:

eth0  Link encap:Ethernet  HWaddr 00:0A:5E:62:8A:7C
  BROADCAST MULTICAST  MTU:1500  Metric:1
  RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
  Interrupt:72 Base address:0x5000

eth1  Link encap:Ethernet  HWaddr 00:16:35:3C:7C:8C
  inet addr:192.168.179.82  Bcast:192.168.179.127  Mask:255.255.255.192
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:19735681 errors:0 dropped:0 overruns:0 frame:0
  TX packets:19618826 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:3766136075 (3591.6 Mb)  TX bytes:2509851526 (2393.5 Mb)
  Interrupt:25

eth2  Link encap:Ethernet  HWaddr 00:16:35:3C:7C:8B
  inet addr:172.20.183.82  Bcast:172.20.183.127  Mask:255.255.255.128
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:1095636 errors:0 dropped:0 overruns:0 frame:0
  TX packets:158700 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:90195462 (86.0 Mb)  TX bytes:32106664 (30.6 Mb)
  Interrupt:26

loLink encap:Local Loopback
  inet addr:127.0.0.1  Mask:255.0.0.0
  UP LOOPBACK RUNNING  MTU:16436  Metric:1
  RX packets:59811340 errors:0 dropped:0 overruns:0 frame:0
  TX packets:59811340 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:0
  RX bytes:225325405 (214.8 Mb)  TX bytes:225325405 (214.8 Mb)


-- 
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: r418134 - in /tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster: session/SimpleTcpReplicationManager.java tcp/ClusterReceiverBase.java tcp/DataSender.java tcp/

2006-06-29 Thread rjung
Author: rjung
Date: Thu Jun 29 13:54:33 2006
New Revision: 418134

URL: http://svn.apache.org/viewvc?rev=418134&view=rev
Log:
BZ 39933: Fixed division by zero when statistics are calculated,
but no messages have been transmitted.

Modified:

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

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

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

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

tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/util/FastQueue.java

Modified: 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/SimpleTcpReplicationManager.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/SimpleTcpReplicationManager.java?rev=418134&r1=418133&r2=418134&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/SimpleTcpReplicationManager.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/SimpleTcpReplicationManager.java
 Thu Jun 29 13:54:33 2006
@@ -294,7 +294,7 @@
 long interval = session.getMaxInactiveInterval();
 long lastaccdist = System.currentTimeMillis() -
 session.getLastAccessWasDistributed();
-if ( ((interval*1000) / lastaccdist)< 3 ) {
+if ( interval*1000 < 3 * lastaccdist ) {
 SessionMessage accmsg = new 
SessionMessageImpl(name,
 SessionMessage.EVT_SESSION_ACCESSED,
 null,

Modified: 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java?rev=418134&r1=418133&r2=418134&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java
 Thu Jun 29 13:54:33 2006
@@ -261,14 +261,22 @@
  * @return Returns the avg receivedProcessingTime/nrOfMsgsReceived.
  */
 public double getAvgReceivedProcessingTime() {
-return ((double)receivedProcessingTime) / nrOfMsgsReceived;
+if ( nrOfMsgsReceived > 0 ) {
+return ((double)receivedProcessingTime) / nrOfMsgsReceived;
+} else {
+return 0;
+}
 }
 
 /**
  * @return Returns the avg totalReceivedBytes/nrOfMsgsReceived.
  */
 public long getAvgTotalReceivedBytes() {
-return ((long)totalReceivedBytes) / nrOfMsgsReceived;
+if ( nrOfMsgsReceived > 0 ) {
+return ((long)totalReceivedBytes) / nrOfMsgsReceived;
+} else {
+return 0;
+}
 }
 
 /**

Modified: 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java?rev=418134&r1=418133&r2=418134&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java
 Thu Jun 29 13:54:33 2006
@@ -259,14 +259,22 @@
  * @return Returns the avg totalBytes/nrOfRequests.
  */
 public long getAvgMessageSize() {
-return totalBytes / nrOfRequests;
+if ( nrOfRequests > 0 ) {
+return totalBytes / nrOfRequests;
+} else {
+return 0;
+}
 }
 
 /**
  * @return Returns the avg processingTime/nrOfRequests.
  */
 public double getAvgProcessingTime() {
-return ((double)processingTime) / nrOfRequests;
+if ( nrOfRequests > 0 ) {
+return ((double)processingTime) / nrOfRequests;
+} else {
+return 0;
+}
 }
  
 /**
@@ -323,7 +331,11 @@
  * @return Returns the avg waitAckTime/nrOfRequests.
  */
 public double getAvgWaitAckTime() {
-return ((double)waitAckTime) / nrOfRequests;
+if ( nrOfRequests > 0 ) {
+return ((double)wai

DO NOT REPLY [Bug 39933] - Divide by zero exception when viewing ClusterReceiver with JMX

2006-06-29 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=39933


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2006-06-29 20:55 ---
Fixed in subversion HEAD of tc5.5.x.
I searched the whole cluster module and fixed all similar places.
Your analysis was correct, thanks for reporting this!

-- 
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: r418142 - in /tomcat/connectors/trunk/jk/xdocs: config/workers.xml index.xml news/20060101.xml news/20060505.xml

2006-06-29 Thread rjung
Author: rjung
Date: Thu Jun 29 14:41:18 2006
New Revision: 418142

URL: http://svn.apache.org/viewvc?rev=418142&view=rev
Log:
Fix typos, preparing for 1.2.16.

Added:
tomcat/connectors/trunk/jk/xdocs/news/20060101.xml   (with props)
Removed:
tomcat/connectors/trunk/jk/xdocs/news/20060505.xml
Modified:
tomcat/connectors/trunk/jk/xdocs/config/workers.xml
tomcat/connectors/trunk/jk/xdocs/index.xml

Modified: tomcat/connectors/trunk/jk/xdocs/config/workers.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/config/workers.xml?rev=418142&r1=418141&r2=418142&view=diff
==
--- tomcat/connectors/trunk/jk/xdocs/config/workers.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/config/workers.xml Thu Jun 29 14:41:18 2006
@@ -141,7 +141,7 @@
 
 
 
-This directive has been deprecated since 1.2.16. See Connection 
Poll directives instead
+This directive has been deprecated since 1.2.16. See Connection 
Pool directives instead
 
 
 
@@ -394,7 +394,7 @@
 
 
 
-Express Preferences between the balanced workers of an lb worker.
+Express preferences between the balanced workers of an lb worker.
 A load balancer will never choose some balanced worker 
 in case there is another usable worker with lower distance.
 

Modified: tomcat/connectors/trunk/jk/xdocs/index.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/index.xml?rev=418142&r1=418141&r2=418142&view=diff
==
--- tomcat/connectors/trunk/jk/xdocs/index.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/index.xml Thu Jun 29 14:41:18 2006
@@ -28,6 +28,17 @@
 
 
 
+JK-1.2.16 released
+The Apache Tomcat team is proud to announce the immediate availability
+of Jakarta Tomcat Connectors 1.2.16 Stable.
+
+Download the http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.16/tomcat-connectors-1.2.16-src.tar.gz";>JK
 1.2.16 release sources
+ | http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.16/tomcat-connectors-1.2.16-src.tar.gz.asc";>PGP
 signature
+
+Download the http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/";>binaries
 for selected platforms.
+
+
+
 8 November 2005 - JK-1.2.15 
released
 The Apache Tomcat team is proud to announce the immediate availability
 of Jakarta Tomcat Connectors 1.2.15 Stable.

Added: tomcat/connectors/trunk/jk/xdocs/news/20060101.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/news/20060101.xml?rev=418142&view=auto
==
--- tomcat/connectors/trunk/jk/xdocs/news/20060101.xml (added)
+++ tomcat/connectors/trunk/jk/xdocs/news/20060101.xml Thu Jun 29 14:41:18 2006
@@ -0,0 +1,37 @@
+
+
+]>
+
+ 
+  &project;
+ 
+  
+Apache Tomcat 
Connectors Project
+2006 News and Status
+  
+
+
+
+
+
+ 
+JK-1.2.16 released
+The Apache Tomcat team is proud to announce the immediate availability
+of Tomcat Connectors 1.2.16. This is a stable release adding some features 
+and a few bug fixes to the 1.2.15 version. Furthermore some worker attributes
+have been deprecated.
+
+
+ Please see the ChangeLog for a full list of 
changes.
+
+If you find any bugs while using this release, please fill in the
+http://issues.apache.org/bugzilla/enter_bug.cgi?product=Tomcat%205";>Bugzilla
+Bug Report. When entering bug select Native:JK Component.
+
+
+
+
+
+
+  

Propchange: tomcat/connectors/trunk/jk/xdocs/news/20060101.xml
--
svn:eol-style = native



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



svn commit: r418143 - /tomcat/connectors/trunk/jk/xdocs/news/project.xml

2006-06-29 Thread rjung
Author: rjung
Date: Thu Jun 29 14:44:24 2006
New Revision: 418143

URL: http://svn.apache.org/viewvc?rev=418143&view=rev
Log:
Need this to get the news menu right.

Modified:
tomcat/connectors/trunk/jk/xdocs/news/project.xml

Modified: tomcat/connectors/trunk/jk/xdocs/news/project.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/news/project.xml?rev=418143&r1=418142&r2=418143&view=diff
==
--- tomcat/connectors/trunk/jk/xdocs/news/project.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/news/project.xml Thu Jun 29 14:44:24 2006
@@ -11,7 +11,7 @@
 
 
 
-
+
 
 
 



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



svn commit: r418147 - /tomcat/connectors/trunk/jk/native/STATUS.txt

2006-06-29 Thread rjung
Author: rjung
Date: Thu Jun 29 15:03:52 2006
New Revision: 418147

URL: http://svn.apache.org/viewvc?rev=418147&view=rev
Log:
Update Status file. We always ship it, but everything
after 1.2.11 only went into the documentation.

Modified:
tomcat/connectors/trunk/jk/native/STATUS.txt

Modified: tomcat/connectors/trunk/jk/native/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/STATUS.txt?rev=418147&r1=418146&r2=418147&view=diff
==
--- tomcat/connectors/trunk/jk/native/STATUS.txt (original)
+++ tomcat/connectors/trunk/jk/native/STATUS.txt Thu Jun 29 15:03:52 2006
@@ -3,7 +3,13 @@
 
 Release:
 
-1.2.11  : in development
+1.2.17  : in development
+1.2.16  : released July, 2006
+1.2.15  : released November 8, 2005
+1.2.14  : released July 13, 2005
+1.2.13  : released May 16, 2005
+1.2.12  : released May 7, 2005
+1.2.11  : released April 29, 2005
 1.2.10  : released March 30, 2005
 1.2.9   : not released
 1.2.8   : released December 24, 2004



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



svn commit: r418150 - /tomcat/connectors/trunk/KEYS

2006-06-29 Thread rjung
Author: rjung
Date: Thu Jun 29 15:28:25 2006
New Revision: 418150

URL: http://svn.apache.org/viewvc?rev=418150&view=rev
Log:
Adding my key to prepare signing.

Modified:
tomcat/connectors/trunk/KEYS

Modified: tomcat/connectors/trunk/KEYS
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/KEYS?rev=418150&r1=418149&r2=418150&view=diff
==
--- tomcat/connectors/trunk/KEYS (original)
+++ tomcat/connectors/trunk/KEYS Thu Jun 29 15:28:25 2006
@@ -438,3 +438,25 @@
 vpsTbAGW
 =r1gT
 -END PGP PUBLIC KEY BLOCK-
+
+pub   1024D/35C7E942 2006-06-28
+  Key fingerprint = 4DBE BB77 94DD A20A 01F4  482A 9038 4D9A 35C7 E942
+uid  Rainer Jung (CODE SIGNING KEY) <[EMAIL PROTECTED]>
+
+-BEGIN PGP PUBLIC KEY BLOCK-
+Version: GnuPG v1.4.4 (FreeBSD)
+
+mQGiBESizvgRBACA8YC9nvnfrnaZ4UlGAxsr3MyZbV9yqW8gzVvCRZrZbwoXFoYk
+yWAj7ZOB1t2aCTBUI/l8mZiwlQ7uMz0jv4AKW7I9wViHu4yy60lH2TDspWy/g1fC
+AJiPsCCE6WcP7aQR1iciUgsmWsX0W0y8ykhfSocOjw+JTd2m0PRa/o53JwCg+6hb
+UGX/hOX+OIXh8xhT1jR65JcD/2ly45aNAI8Tik5Aqon29CvJ74ZlpQ/LiwMq+1FT
+8n+dfROkcRTpZsN6m0v2Vn9IMT1UaDr5jui2wR4YqegslGxN9q3r5wZyGi1Bg/dU
++npdD9D3PH5kAnIvn0uOleexfU3OxbJ5qXy2SVeDr6cGDIJ7vySGx5nbeqyWvCpw
+h3LzA/9QM7jwWN+mk5mmbNOKOE82IlGwKqAXU9qjguxUQZxkq3KZJhdodRGNCfSW
+UUTyK7mMfMYXzg0yLp4iVLXiN9eW379R0Q/wDWEnIUrP+8fmWhyA37YukVCqO4n0
+7VgcaBxuTpgX8nut+MPSW0fMPe1/aro+k1uFRonpo7ikdgbKxrQxUmFpbmVyIEp1
+bmcgKENPREUgU0lHTklORyBLRVkpIDxyanVuZ0BhcGFjaGUub3JnPohgBBMRAgAg
+BQJEos74AhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQkDhNmjXH6UJy6ACe
+POKL9N3T3MkdexuGv1Fc41aWQRcAn3GUI1TJ4wJDGCPAJMb16IrnxUdt
+=C30m
+-END PGP PUBLIC KEY BLOCK-



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



DO NOT REPLY [Bug 38658] - RFE: AuthenticatorBase.doLogin(request, response, principal)

2006-06-29 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=38658


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEEDINFO|NEW




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