Startup exception in Tomcat

2006-05-08 Thread Krish B

hi,

I get an exception sometimes during tomcat startup. I saw a few posts
related to this
but am not able to resolve the same.

java.util.ConcurrentModificationException
at java.util.HashMap.onEntry(HashMap.java:205)
at java.util.HashMap.transfer(HashMap.java:510)
at java.util.HashMap.resize(HashMap.java:500)
at java.util.HashMap.addEntry(HashMap.java:800)
at java.util.HashMap.put(HashMap.java:441)
at org.apache.commons.modeler.Registry.addManagedBean(Registry.j ava:457)
at org.apache.commons.modeler.Registry.loadDescriptors(Registry. java:938)
at org.apache.commons.modeler.Registry.findManagedBean(Registry. java:719)
at org.apache.commons.modeler.Registry.findManagedBean(Registry. java:1047)
at org.apache.commons.modeler.Registry.registerComponent(Registr y.java:859)

at org.apache.coyote.http11.Http11Protocol$JmxHttp11ConnectionHa ndler.init(
Http11Protocol.java:175)

The Registry class is being called in Http11protocol.java class

Registry.getRegistry(null, null).registerComponent( rp, rpName, null); and
these are not synchronized.

Any suggestions on how to solve this issue?

Regards
Krishn


svn commit: r405053 - in /tomcat/container/tc5.5.x/modules/groupcom: VERSION src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java

2006-05-08 Thread fhanik
Author: fhanik
Date: Mon May  8 06:39:21 2006
New Revision: 405053

URL: http://svn.apache.org/viewcvs?rev=405053&view=rev
Log:
async starts and stops with the sender

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

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

Modified: tomcat/container/tc5.5.x/modules/groupcom/VERSION
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/VERSION?rev=405053&r1=405052&r2=405053&view=diff
==
--- tomcat/container/tc5.5.x/modules/groupcom/VERSION (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/VERSION Mon May  8 06:39:21 2006
@@ -1,3 +1,6 @@
+0.9.2.1
+ - remove domain from membership
+ - documentation updates
 0.9.2.0
  - message dispatch interceptor is included if no other interceptors are added 
so that
async messaging is enabled in the default stack

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java?rev=405053&r1=405052&r2=405053&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
 Mon May  8 06:39:21 2006
@@ -104,7 +104,7 @@
 //start the thread
 if (!run ) {
 synchronized (this) {
-if ( !run ) {
+if ( !run && ((svc & Channel.SND_TX_SEQ)==svc) ) {//only start 
with the sender
 msgDispatchThread = new Thread(this);
 msgDispatchThread.setName("MessageDispatchThread");
 msgDispatchThread.setDaemon(true);
@@ -123,7 +123,7 @@
 //stop the thread
 if ( run ) {
 synchronized (this) {
-if ( run ) {
+if ( run && ((svc & Channel.SND_TX_SEQ)==svc)) {
 run = false;
 msgDispatchThread.interrupt();
 queue.setEnabled(false);



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



Re: DO NOT REPLY [Bug 39503] - getContextPath() returns a decoded string contrary to the servlet spec

2006-05-08 Thread Darryl Miles


Would it be possible to have an Implementation Erratum section on the TC 
website to track this sort of thing.  Its fine to take such a decision 
on the basis that "The Spec is silly", but it does need to be broadcast 
for the attention of the userbase.  At the very least it will curb 
future buzilla noise from this direction and kill any user angst about 
the subject of "Exactly which spec does TC support".



Maybe each case can have its own page detailing:


* Summary of the situation.

* What the specification says should happen.  The TC developers 
interpretation of what the spec means to TC and realworld apps.


* The technical argument why the specification is not practical or not 
useful in the realworld.


* Affected versions of TC.

* Any details on the specification committee being notified to allow the 
subject to at least be brought before other interested parties of the 
respective JSR.


* Workaround ideas that might help someone trying to get back to the 
specified behaviour to make their app work again.


* Related Bugzilla Entries.  Although negative publicity about the point 
maybe undesirable.



No one can then complain in the future about any deviation from the spec 
is formally documented.  Otherwise what does TC become if you can't cite 
some level of interoperability with any confidence.




Of course blame the system and of course recommend a more constructive 
approach when doing so.


Finalizing the design of any computer system in the specification stage 
does not seem like sensible practice.  Getting an agreed written 
specification is a good start, but there should be a further process 
before a final revision is closed and that should only happen after at 
least 2 or 3 parties involved have implementation it and reported back 
to the group on their concerns when doing so.  Which then allow further 
revisions and corrections to take place.


Darryl



[EMAIL PROTECTED] wrote:

http://issues.apache.org/bugzilla/show_bug.cgi?id=39503


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX




--- Additional Comments From [EMAIL PROTECTED]  2006-05-07 00:08 ---
I am totally opposed to fixing this, which has to be an obvious specification 
issue.

The last part is invalid (getRequestUri will return what you gave to the
dispatcher).




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



Re: DO NOT REPLY [Bug 39503] - getContextPath() returns a decoded string contrary to the servlet spec

2006-05-08 Thread Yoav Shapira

I don't mind documenting it -- write up the web page you want (in the
xdocs format used by the rest of the docs: see
http://svn.apache.org/viewcvs.cgi/tomcat/container/tc5.5.x/webapps/docs/
for examples), submit it here or on bugzilla, and we can add it to the
docs.

Yoav

On 5/8/06, Darryl Miles <[EMAIL PROTECTED]> wrote:


Would it be possible to have an Implementation Erratum section on the TC
website to track this sort of thing.  Its fine to take such a decision
on the basis that "The Spec is silly", but it does need to be broadcast
for the attention of the userbase.  At the very least it will curb
future buzilla noise from this direction and kill any user angst about
the subject of "Exactly which spec does TC support".


Maybe each case can have its own page detailing:


* Summary of the situation.

* What the specification says should happen.  The TC developers
interpretation of what the spec means to TC and realworld apps.

* The technical argument why the specification is not practical or not
useful in the realworld.

* Affected versions of TC.

* Any details on the specification committee being notified to allow the
subject to at least be brought before other interested parties of the
respective JSR.

* Workaround ideas that might help someone trying to get back to the
specified behaviour to make their app work again.

* Related Bugzilla Entries.  Although negative publicity about the point
maybe undesirable.


No one can then complain in the future about any deviation from the spec
is formally documented.  Otherwise what does TC become if you can't cite
some level of interoperability with any confidence.



Of course blame the system and of course recommend a more constructive
approach when doing so.

Finalizing the design of any computer system in the specification stage
does not seem like sensible practice.  Getting an agreed written
specification is a good start, but there should be a further process
before a final revision is closed and that should only happen after at
least 2 or 3 parties involved have implementation it and reported back
to the group on their concerns when doing so.  Which then allow further
revisions and corrections to take place.

Darryl



[EMAIL PROTECTED] wrote:
> http://issues.apache.org/bugzilla/show_bug.cgi?id=39503
>
>
> [EMAIL PROTECTED] changed:
>
>What|Removed |Added
> 
>  Status|NEW |RESOLVED
>  Resolution||WONTFIX
>
>
>
>
> --- Additional Comments From [EMAIL PROTECTED]  2006-05-07 00:08 ---
> I am totally opposed to fixing this, which has to be an obvious specification 
issue.
>
> The last part is invalid (getRequestUri will return what you gave to the
> dispatcher).
>


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



Re: DO NOT REPLY [Bug 39503] - getContextPath() returns a decoded string contrary to the servlet spec

2006-05-08 Thread Remy Maucherat

Yoav Shapira wrote:

I don't mind documenting it -- write up the web page you want (in the
xdocs format used by the rest of the docs: see
http://svn.apache.org/viewcvs.cgi/tomcat/container/tc5.5.x/webapps/docs/
for examples), submit it here or on bugzilla, and we can add it to the
docs.


Obviously, this post was written in bad faith, and was not attempting to 
be constructive in any way. You know, Darryl is one of these Bugzilla 
users that I've had bad interactions with, so I think he merely wants to 
create problems :)


Rémy

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



Re: DO NOT REPLY [Bug 39503] - getContextPath() returns a decoded string contrary to the servlet spec

2006-05-08 Thread Yoav Shapira

Hola,

On 5/8/06, Remy Maucherat <[EMAIL PROTECTED]> wrote:

Obviously, this post was written in bad faith, and was not attempting to
be constructive in any way. You know, Darryl is one of these Bugzilla
users that I've had bad interactions with, so I think he merely wants to
create problems :)


Yeah, I noted that and mostly agree with you (Remy) observations.  I
also agree with not changing Tomcat's code on this point.  But
generally speaking, I don't mind documenting a difference between our
implementation and the relevant specification, if only to be able to
RTFM people who bring up this issue.

Yoav

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



Re: DO NOT REPLY [Bug 39503] - getContextPath() returns a decoded string contrary to the servlet spec

2006-05-08 Thread Remy Maucherat

Yoav Shapira wrote:

Hola,

On 5/8/06, Remy Maucherat <[EMAIL PROTECTED]> wrote:

Obviously, this post was written in bad faith, and was not attempting to
be constructive in any way. You know, Darryl is one of these Bugzilla
users that I've had bad interactions with, so I think he merely wants to
create problems :)


Yeah, I noted that and mostly agree with you (Remy) observations.  I
also agree with not changing Tomcat's code on this point.  But
generally speaking, I don't mind documenting a difference between our
implementation and the relevant specification, if only to be able to
RTFM people who bring up this issue.


I agree with that, but there is no need to get on a big administrative 
hoopla making it sound like it's critical (it's very similar to the 
getId problem - which got resolved, but only in 2.5 -, the welcome file 
problem - which did not get officially resolved -, etc). This AFAIK has 
been implemented like that since at least 4.0, most likely because it is 
very similar to the servlet path and path info fields. The specification 
handles these encoding issues a bit randomly (especially when looking at 
the same methods in the request dispatcher) while it is fairly important.


Rémy

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



Re: DO NOT REPLY [Bug 39503] - getContextPath() returns a decoded string contrary to the servlet spec

2006-05-08 Thread Yoav Shapira

Hi,


I agree with that, but there is no need to get on a big administrative
hoopla making it sound like it's critical (it's very similar to the


Yeah, agreed.  I wasn't planning to go through big hoops for this, so
if I conveyed that intention  then I was just unclear ;)

Yoav

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



svn commit: r405097 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java

2006-05-08 Thread fhanik
Author: fhanik
Date: Mon May  8 10:22:55 2006
New Revision: 405097

URL: http://svn.apache.org/viewcvs?rev=405097&view=rev
Log:
Make the StandardSession extensible by allowing control whether the listeners 
should be notified 
by a setAttribute command. 

Modified:

tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java?rev=405097&r1=405096&r2=405097&view=diff
==
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java
 Mon May  8 10:22:55 2006
@@ -1230,6 +1230,10 @@
  *  invalidated session
  */
 public void setAttribute(String name, Object value) {
+setAttribute(name,value,true);
+}
+
+public void setAttribute(String name, Object value, boolean notify) {
 
 // Name cannot be null
 if (name == null)
@@ -1255,7 +1259,7 @@
 HttpSessionBindingEvent event = null;
 
 // Call the valueBound() method if necessary
-if (value instanceof HttpSessionBindingListener) {
+if (value instanceof HttpSessionBindingListener && notify) {
 // Don't call any notification if replacing with the same value
 Object oldValue = attributes.get(name);
 if (value != oldValue) {
@@ -1274,7 +1278,7 @@
 
 // Call the valueUnbound() method if necessary
 if ((unbound != null) && (unbound != value) &&
-(unbound instanceof HttpSessionBindingListener)) {
+(unbound instanceof HttpSessionBindingListener)  && notify) {
 try {
 ((HttpSessionBindingListener) unbound).valueUnbound
 (new HttpSessionBindingEvent(getSession(), name));
@@ -1283,6 +1287,8 @@
 (sm.getString("standardSession.bindingEvent"), t);
 }
 }
+
+if ( !notify ) return;
 
 // Notify interested application event listeners
 Context context = (Context) manager.getContainer();



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



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

2006-05-08 Thread fhanik
Author: fhanik
Date: Mon May  8 10:42:26 2006
New Revision: 405101

URL: http://svn.apache.org/viewcvs?rev=405101&view=rev
Log:
Fix classcast exception

Modified:

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelException.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelException.java?rev=405101&r1=405100&r2=405101&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelException.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelException.java
 Mon May  8 10:42:26 2006
@@ -82,8 +82,8 @@
 } else {
 buf.append("; Faulty members:");
 for ( int i=0; i

svn commit: r405103 - in /tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session: DeltaSession.java DeltaSessionFacade.java

2006-05-08 Thread fhanik
Author: fhanik
Date: Mon May  8 10:44:40 2006
New Revision: 405103

URL: http://svn.apache.org/viewcvs?rev=405103&view=rev
Log:
Refactored DeltaSession to extend StandardSession

Removed:

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

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

Modified: 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java?rev=405103&r1=405102&r2=405103&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java
 Mon May  8 10:44:40 2006
@@ -16,75 +16,45 @@
 
 package org.apache.catalina.ha.session;
 
-import java.beans.PropertyChangeSupport;
+import java.io.Externalizable;
 import java.io.IOException;
 import java.io.NotSerializableException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 import java.io.Serializable;
-import java.lang.reflect.Method;
-import java.security.AccessController;
 import java.security.Principal;
-import java.security.PrivilegedAction;
 import java.util.ArrayList;
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Map;
-import javax.servlet.ServletContext;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
 import javax.servlet.http.HttpSession;
-import javax.servlet.http.HttpSessionAttributeListener;
-import javax.servlet.http.HttpSessionBindingEvent;
-import javax.servlet.http.HttpSessionBindingListener;
 import javax.servlet.http.HttpSessionContext;
-import javax.servlet.http.HttpSessionEvent;
-import javax.servlet.http.HttpSessionListener;
 
-import org.apache.catalina.Context;
 import org.apache.catalina.Manager;
 import org.apache.catalina.Session;
-import org.apache.catalina.SessionEvent;
-import org.apache.catalina.SessionListener;
+import org.apache.catalina.ha.ClusterManager;
 import org.apache.catalina.ha.ClusterSession;
 import org.apache.catalina.realm.GenericPrincipal;
+import org.apache.catalina.session.StandardSession;
+import org.apache.catalina.tribes.io.ReplicationStream;
+import org.apache.catalina.tribes.tipis.ReplicatedMapEntry;
 import org.apache.catalina.util.Enumerator;
 import org.apache.catalina.util.StringManager;
-import org.apache.catalina.tribes.tipis.ReplicatedMapEntry;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-import java.util.concurrent.locks.Lock;
-import org.apache.catalina.ha.ClusterManager;
-import org.apache.catalina.tribes.io.ReplicationStream;
-import java.io.Externalizable;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
 
 /**
  *
- * Similar to the StandardSession, this code is identical, but for update and
- * some small issues, simply copied in the first release. This session will 
keep
+ * Similar to the StandardSession except that this session will keep
  * track of deltas during a request.
- * 
- * IMPLEMENTATION NOTE : An instance of this class represents both the
- * internal (Session) and application level (HttpSession) view of the session.
- * However, because the class itself is not declared public, Java logic outside
- * of the org.apache.catalina.session package cannot cast an
- * HttpSession view of this instance back to a Session view.
- * 
- * IMPLEMENTATION NOTE : If you add fields to this class, you must make
- * sure that you carry them over in the read/writeObject methods so that this
- * class is properly serialized.
  *
  * @author Filip Hanik
- * @author Craig R. McClanahan
- * @author Sean Legassick
- * @author mailto:[EMAIL PROTECTED]">Jon S. Stevens 
  * @version $Revision: 372887 $ $Date: 2006-01-27 09:58:58 -0600 (Fri, 27 Jan 
2006) $
  */
 
-public class DeltaSession implements HttpSession, Session, 
Externalizable,ClusterSession,ReplicatedMapEntry {
+public class DeltaSession extends StandardSession implements HttpSession, 
Session, Externalizable,ClusterSession,ReplicatedMapEntry {
 
-public static org.apache.commons.logging.Log log = 
org.apache.commons.logging.LogFactory.getLog(DeltaManager.class);
+public static org.apache.commons.logging.Log log = 
org.apache.commons.logging.LogFactory.getLog(DeltaSession.class);
 
 /**
  * The string manager for this package.
@@ -94,139 +64,6 @@
 // - Instance Variables
 
 /**
- * Type array.
- */
-protected static final String EMPTY_ARRAY[] = new String[0];
-
-/**
- * The dummy attribute

svn commit: r405105 - /tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java

2006-05-08 Thread fhanik
Author: fhanik
Date: Mon May  8 10:49:58 2006
New Revision: 405105

URL: http://svn.apache.org/viewcvs?rev=405105&view=rev
Log:
lock the session when setting the principal
locks are used so that replicated diffs can't be modified on the fly

Modified:

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

Modified: 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java?rev=405105&r1=405104&r2=405105&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java
 Mon May  8 10:49:58 2006
@@ -272,9 +272,14 @@
 }
 
 public void setPrincipal(Principal principal, boolean addDeltaRequest) {
-super.setPrincipal(principal);
-if (addDeltaRequest && (deltaRequest != null))
-deltaRequest.setPrincipal(principal);
+try { 
+lock();
+super.setPrincipal(principal);
+if (addDeltaRequest && (deltaRequest != null))
+deltaRequest.setPrincipal(principal);
+} finally {
+unlock();
+}
 }
 
 /**



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



svn commit: r405108 - /tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java

2006-05-08 Thread fhanik
Author: fhanik
Date: Mon May  8 10:57:48 2006
New Revision: 405108

URL: http://svn.apache.org/viewcvs?rev=405108&view=rev
Log:
Remove interfaces that are implemented by the super class

Modified:

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

Modified: 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java?rev=405108&r1=405107&r2=405108&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java
 Mon May  8 10:57:48 2006
@@ -52,7 +52,7 @@
  * @version $Revision: 372887 $ $Date: 2006-01-27 09:58:58 -0600 (Fri, 27 Jan 
2006) $
  */
 
-public class DeltaSession extends StandardSession implements HttpSession, 
Session, Externalizable,ClusterSession,ReplicatedMapEntry {
+public class DeltaSession extends StandardSession implements 
Externalizable,ClusterSession,ReplicatedMapEntry {
 
 public static org.apache.commons.logging.Log log = 
org.apache.commons.logging.LogFactory.getLog(DeltaSession.class);
 



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



valueUnbound does not get called

2006-05-08 Thread Jason Novotny


Hi,

   I'm writing a portlet that stuffs some data in the session. I put 
debug staements in the valueBound and valueUnbound methods of my object 
which implements the HttpSessionBindingListener. I see that the 
valueBound method is getting invoked, however valueUnbound does not get 
invoked when the session is invalidated.
   For fun, I tried doing the same thing in the portal webapp (the 
primary webapp which all requests must go thru) and it all works fine. 
It looks like the bug is caused when the portal dispatches to the other 
portlet web application via the cross context dispatch mechanism. I see 
the same session is being shared between the portal and the other 
portlet web apps, but I just can't see why the valueUnbound would not 
get invoked. Looks like a bug and was wondering if any of the tomcat 
developers had any idea what is going on.


   Thanks, Jason

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



Re: DO NOT REPLY [Bug 39503] - getContextPath() returns a decoded string contrary to the servlet spec

2006-05-08 Thread Darryl Miles

Yoav Shapira wrote:

I don't mind documenting it -- write up the web page you want (in the
xdocs format used by the rest of the docs: see
http://svn.apache.org/viewcvs.cgi/tomcat/container/tc5.5.x/webapps/docs/
for examples), submit it here or on bugzilla, and we can add it to the
docs.


Maybe I should write a template, which can then be copied and re-used as 
these things crop up.  An index page to list the cases and a unique page 
per case.


Obviously the developer would be the best person to fill in the full 
details of each issue as they have best understanding.  My suggestion 
comes from the thought that "Wouldn't is be neat if there was a page 
that told users about this sort of stuff".  This is a win-win situation 
where adopters of TC have disclosure of these issues and the developers 
get less hassle and avoid possible name calling because you've done your 
bit to communicate the situation to the user, so nothing more needs to 
be said.




As for Remy's comment on bad faith, if he can provide some evidence of 
what he calls bad faith on my part in any historical post it would be 
great to understand where his negative thoughts are coming from.  I 
think they only exist in his head.


From my side I'm pretty sure starting comments with a tone "You know, 
Darryl is one of these Bugzilla users" does not go down well with anyone 
reading the list.  No matter what flavor of smiley he wishes to stick on 
the end of the sentence.  Its very personal, very directed and not very 
technical.  I shall make public comment again: please leave your 
subjective personal comments out, and increase your output of factual 
technical reasons.



If anyone does want to check out my genuine historical interest in 
supporting the open source community, please feel free to put my name 
into a search engine.


Darryl L. Miles

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



svn commit: r405211 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis: AbstractReplicatedMap.java LazyReplicatedMap.java

2006-05-08 Thread fhanik
Author: fhanik
Date: Mon May  8 15:53:32 2006
New Revision: 405211

URL: http://svn.apache.org/viewcvs?rev=405211&view=rev
Log:
Fixed backup code to continue until the data has been successfully backed up, 
or we have run out of members to backup the data to

Modified:

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

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java?rev=405211&r1=405210&r2=405211&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
 Mon May  8 15:53:32 2006
@@ -111,7 +111,8 @@
 }
 
 protected Member[] wrap(Member m) {
-return new Member[] {m};
+if ( m == null ) return new Member[0];
+else return new Member[] {m};
 }
 
 private void init(Object owner, Channel channel, String mapContextName, 
long timeout, int channelSendOptions,ClassLoader[] cls) {
@@ -536,15 +537,22 @@
 } //while
 }
 
-int currentNode = 0;
-public Member getNextBackupNode() {
-Member[] members = getMapMembers();
-if (members.length == 0)return null;
+protected int currentNode = 0;
+public int getNextBackupIndex() {
+int size = mapMembers.size();
+if (mapMembers.size() == 0)return -1;
 int node = currentNode++;
-if (node >= members.length) {
+if (node >= size) {
 node = 0;
 currentNode = 0;
 }
+return node;
+}
+public Member getNextBackupNode() {
+Member[] members = getMapMembers();
+int node = getNextBackupIndex();
+if ( members.length == 0 || node==-1) return null;
+if ( node >= members.length ) node = 0;
 return members[node];
 }
 

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java?rev=405211&r1=405210&r2=405211&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java
 Mon May  8 15:53:32 2006
@@ -125,24 +125,53 @@
  * @throws ChannelException
  */
 protected Member[] publishEntryInfo(Object key, Object value) throws 
ChannelException {
-//select a backup node
-Member next = getNextBackupNode();
+Member[] members = getMapMembers();
+int firstIdx = getNextBackupIndex();
+int nextIdx = firstIdx;
+Member[] backup = new Member[0];
 
-if ( next == null ) return null;
+//there are no backups
+if ( members.length == 0 || firstIdx == -1 ) return backup;
 
-Member[] backup = wrap(next);
-MapMessage msg = null;
-//publish the data out to all nodes
-Member[] proxies = excludeFromSet(backup,getMapMembers());
-if ( proxies.length > 0 ) {
-msg = new MapMessage(getMapContextName(), MapMessage.MSG_PROXY, 
false,
-(Serializable) key, null, null, 
backup);
-getChannel().send(proxies, msg, getChannelSendOptions());
-}
-//publish the backup data to one node
-msg = new MapMessage(getMapContextName(), MapMessage.MSG_BACKUP, false,
- (Serializable) key, (Serializable) value, null, 
backup);
-getChannel().send(backup, msg, getChannelSendOptions());
+boolean success = false;
+do {
+//select a backup node
+Member next = members[firstIdx];
+
+//increment for the next round of back up selection
+nextIdx = firstIdx + 1;
+if ( nextIdx >= members.length ) nextIdx = 0;
+
+if (next == null) {
+continue;
+}
+MapMessage msg = null;
+try {
+backup = wrap(next);
+//publish the backup data to one node
+msg = new MapMessage(getMapContextName(), 
MapMessage.MSG_BACKUP, false,
+ (Serializable) key,

Re: svn commit: r405103 - in /tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session: DeltaSession.java DeltaSessionFacade.java

2006-05-08 Thread Remy Maucherat

[EMAIL PROTECTED] wrote:

Author: fhanik
Date: Mon May  8 10:44:40 2006
New Revision: 405103

URL: http://svn.apache.org/viewcvs?rev=405103&view=rev
Log:
Refactored DeltaSession to extend StandardSession


Ok, so you get a beer, I guess.

Rémy

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



Re: svn commit: r405103 - in /tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session: DeltaSession.java DeltaSessionFacade.java

2006-05-08 Thread Filip Hanik - Dev Lists

Meet me at ApacheCon '06, I'll buy!

Filip


Remy Maucherat wrote:

[EMAIL PROTECTED] wrote:

Author: fhanik
Date: Mon May  8 10:44:40 2006
New Revision: 405103

URL: http://svn.apache.org/viewcvs?rev=405103&view=rev
Log:
Refactored DeltaSession to extend StandardSession


Ok, so you get a beer, I guess.

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]



svn commit: r405230 - in /tomcat/container/tc5.5.x/modules: groupcom/src/share/org/apache/catalina/tribes/tipis/ ha/src/share/org/apache/catalina/ha/session/ ha/src/share/org/apache/catalina/ha/tcp/

2006-05-08 Thread fhanik
Author: fhanik
Date: Mon May  8 16:48:28 2006
New Revision: 405230

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

Modified:

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

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

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java?rev=405230&r1=405229&r2=405230&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
 Mon May  8 16:48:28 2006
@@ -218,7 +218,7 @@
  */
 public void replicate(Object key, boolean complete) {
 MapEntry entry = (MapEntry)super.get(key);
-if (entry != null && entry.isPrimary()) {
+if (entry != null && entry.isPrimary() && entry.getBackupNodes()!= 
null && entry.getBackupNodes().length > 0) {
 Object value = entry.getValue();
 //check to see if we need to replicate this object 
isDirty()||complete
 boolean repl = complete || ( (value instanceof ReplicatedMapEntry) 
&& ( (ReplicatedMapEntry) value).isDirty());

Modified: 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java?rev=405230&r1=405229&r2=405230&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java
 Mon May  8 16:48:28 2006
@@ -33,7 +33,6 @@
 import javax.servlet.http.HttpSessionContext;
 
 import org.apache.catalina.Manager;
-import org.apache.catalina.Session;
 import org.apache.catalina.ha.ClusterManager;
 import org.apache.catalina.ha.ClusterSession;
 import org.apache.catalina.realm.GenericPrincipal;

Modified: 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/tcp/SimpleTcpCluster.java?rev=405230&r1=405229&r2=405230&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
 Mon May  8 16:48:28 2006
@@ -340,8 +340,9 @@
 /**
  * has members
  */
+protected boolean hasMembers = false;
 public boolean hasMembers() {
-return channel.hasMembers();
+return hasMembers;
 }
 
 /**
@@ -795,6 +796,7 @@
  */
 public void memberAdded(Member member) {
 try {
+hasMembers = channel.hasMembers();
 if (log.isInfoEnabled()) log.info("Replication member added:" + 
member);
 // Notify our interested LifecycleListeners
 lifecycle.fireLifecycleEvent(BEFORE_MEMBERREGISTER_EVENT, member);
@@ -812,8 +814,9 @@
  * @see 
org.apache.catalina.ha.MembershipListener#memberDisappeared(org.apache.catalina.ha.Member)
  */
 public void memberDisappeared(Member member) {
-if (log.isInfoEnabled()) log.info("Received member disappeared:" + 
member);
 try {
+hasMembers = channel.hasMembers();
+if (log.isInfoEnabled()) log.info("Received member disappeared:" + 
member);
 // Notify our interested LifecycleListeners
 lifecycle.fireLifecycleEvent(BEFORE_MEMBERUNREGISTER_EVENT, 
member);
 // Notify our interested LifecycleListeners
@@ -821,7 +824,6 @@
 } catch (Exception x) {
 log.error("Unable remove cluster node from replication system.", 
x);
 }
-
 }
 
 // - receiver



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



DO NOT REPLY [Bug 10335] - [RFE,patch] Make JAASRealm more flexible

2006-05-08 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=10335


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Additional Comments From [EMAIL PROTECTED]  2006-05-09 05:25 ---
*** Bug 39524 has been marked as a duplicate of this bug. ***

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

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



Tomcat Logo

2006-05-08 Thread Javier Iglesias

Hi there,

sorry to disturb with such a silly question:

where can I find the Apache Tomcat logo in vector
format (svg, eps, pdf, ai, ...)?

I could only trace the existence of such a file
in this mailing list a few years ago, and I would
need it to design a new icon.

Thank you in advance for your help!

  --j

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