DO NOT REPLY [Bug 39758] New: - missing error page after at throwable after out.flush()

2006-06-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=39758

   Summary: missing error page after at throwable after out.flush()
   Product: Tomcat 5
   Version: 5.0.28
  Platform: PC
OS/Version: Windows Server 2003
Status: NEW
  Severity: minor
  Priority: P3
 Component: Jasper
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


At some points in my JSP I use a out.flush() to write some information back to 
the client while processing is ongoing.

If I get a runtime exception after such a flush() call, the error page showing 
the exception and stack trace is not displayed. 

The little JSP

 



Tomcat test



<% 
out.flush();
String a = null;
a.toLowerCase();
%>



demonstrate the problem. The client did not get any exception information.

Best regards

-- 
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 39758] - missing error page after at throwable after out.flush()

2006-06-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=39758


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2006-06-08 10:21 ---
Once the buffer is flushed - the response is sent to the client. An error page
can't be sent since the response was already committed.

-- 
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 39759] New: - Session contents gets destroyed when page is refreshed several times

2006-06-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=39759

   Summary: Session contents gets destroyed when page is refreshed
several times
   Product: Tomcat 5
   Version: 5.0.30
  Platform: All
OS/Version: Linux
Status: NEW
  Severity: critical
  Priority: P2
 Component: Unknown
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


Hi, 
 
I have a Servelet, which writes some values into the session variable using 
Session.setParameter. But, when I am moving from one web page to another, the 
contents written in the session variable vanishes and null values are read. 
This happens when I refresh the same web page also.  
 
This error arises in an unpredictable manner. For example, when I am moving 
from Web Page 1 to Web Page 2, sometimes the contents are preserved and 
sometimes they get vanished. 
 
I checked this using several browsers such as IE, Mozilla, etc. and came to 
know that this is not a problem my code.

-- 
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 39758] - missing error page after at throwable after out.flush()

2006-06-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=39758





--- Additional Comments From [EMAIL PROTECTED]  2006-06-08 11:15 ---
(In reply to comment #1)
> Once the buffer is flushed - the response is sent to the client. An error page
> can't be sent since the response was already committed.

Ok, but in Websphere I got the error messages. They write only a HTML fragment 
consisting of H1 and p tags with the error message and stack trace. This seems 
to me a pragmatic way to definitely bring the error to the user of the JSP 
page. Independently of it uses out.flush() before or not. I feel it not 
sufficient to hide the occuring 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]



Re: svn commit: r412661 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/buf/C2BConverter.java

2006-06-08 Thread Remy Maucherat

[EMAIL PROTECTED] wrote:

Author: billbarker
Date: Wed Jun  7 22:06:37 2006
New Revision: 412661

URL: http://svn.apache.org/viewvc?rev=412661&view=rev
Log:
Add missing method to stop Gump from nagging


Sorry, I did forget one file.

Rémy

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



DO NOT REPLY [Bug 39758] - missing error page after at throwable after out.flush()

2006-06-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=39758





--- Additional Comments From [EMAIL PROTECTED]  2006-06-08 12:11 ---
The error pages for errors are written in a valve which is configurable. You can
replace that valve with another which would output stuff even if the response is
committed.

-- 
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 39663] - "JasperException: File [TLD Name] not found" with zero length context path

2006-06-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=39663





--- Additional Comments From [EMAIL PROTECTED]  2006-06-08 12:27 ---
By default, auto and live deployment are enabled, so the configuration works
around that. If a webapp folder is located inside the appBase folder of the
host, it will be picked up by the auto deployer, and so the choice is to either
ignore the docBase of the webapp or deploy it twice. In "newer" versions of
Tomcat (above 5.5.9, at least), docBase is thus ignored if inside appBase.
Similarly, path is infered from the webapp folder name (or war name). I
understand in some cases it doesn't work as before, but my goal was to get
something that was predictable with very few changes, even if it's not the most
convinient or most logical sometimes. As it's independent of Tomcat (it's the
host config class), it could be esily swapped with a better one.

-- 
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 39699] - simple deploy failed in cluster (distributable flag)

2006-06-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=39699





--- Additional Comments From [EMAIL PROTECTED]  2006-06-08 12:35 ---
The issue is fairly obvious: the class uses a static logger (initialized with a
random context class loader set) which is never reset, while it should be
logging to the log field inherited from ManagerBase.

-> the solution is to remove:
public static org.apache.commons.logging.Log log =
org.apache.commons.logging.LogFactory
.getLog(DeltaManager.class);


-- 
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: r412754 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes: group/interceptors/NonBlockingCoordinator.java membership/Membership.java

2006-06-08 Thread fhanik
Author: fhanik
Date: Thu Jun  8 06:58:04 2006
New Revision: 412754

URL: http://svn.apache.org/viewvc?rev=412754&view=rev
Log:
Added constructor that creates a membership that includes the local member

Modified:

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

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java?rev=412754&r1=412753&r2=412754&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java
 Thu Jun  8 06:58:04 2006
@@ -210,13 +210,12 @@
 protected void sendElectionMsg(MemberImpl local, MemberImpl leader, 
MemberImpl[] others) throws ChannelException {
 synchronized (electionMutex) {
 if ( suggestedviewId != null ) return;//election already running, 
I'm not allowed to have two of them
-Membership m = new Membership(local,AbsoluteOrder.comp);
-m.addMember(local);
+Membership m = new Membership(local,AbsoluteOrder.comp,true);
 Arrays.fill(m,others);
 MemberImpl[] mbrs = m.getMembers();
 CoordinationMessage msg = new CoordinationMessage(leader, local, 
mbrs,new UniqueId(UUIDGenerator.randomUUID(true)), this.COORD_REQUEST);
 suggestedviewId = msg.getId();
-suggestedView = new Membership(local);
+suggestedView = new Membership(local,AbsoluteOrder.comp,true);
 Arrays.fill(suggestedView,mbrs);
 m.reset(); 
 m = null;
@@ -249,8 +248,7 @@
 
 protected Membership mergeOnArrive(CoordinationMessage msg, Member sender) 
{
 MemberImpl local = (MemberImpl)getLocalMember(false);
-Membership merged = new Membership(local,AbsoluteOrder.comp);
-merged.addMember(local);
+Membership merged = new Membership(local,AbsoluteOrder.comp,true);
 Arrays.fill(merged,msg.getMembers());
 Arrays.fill(merged,getMembers());
 Member[] diff = Arrays.diff(merged,membership,local);
@@ -277,8 +275,7 @@
 
 protected void handleViewConf(CoordinationMessage msg, Member 
sender,Membership merged) throws ChannelException {
 //not yet complete
-this.view = new 
Membership((MemberImpl)getLocalMember(false),AbsoluteOrder.comp);
-this.view.addMember((MemberImpl)getLocalMember(false));
+this.view = new 
Membership((MemberImpl)getLocalMember(false),AbsoluteOrder.comp,true);
 this.viewId = msg.getId();
 
 if ( viewId.equals(this.suggestedviewId) ) {
@@ -458,8 +455,8 @@
 
 protected synchronized void setupMembership() {
 if ( view == null || membership == null ) {
-view = new 
Membership((MemberImpl)super.getLocalMember(true),AbsoluteOrder.comp);
-membership  = new 
Membership((MemberImpl)super.getLocalMember(true),AbsoluteOrder.comp);
+view = new 
Membership((MemberImpl)super.getLocalMember(true),AbsoluteOrder.comp,true);
+membership  = new 
Membership((MemberImpl)super.getLocalMember(true),AbsoluteOrder.comp,false);
 }
 }
 

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/Membership.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/Membership.java?rev=412754&r1=412753&r2=412754&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/Membership.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/Membership.java
 Thu Jun  8 06:58:04 2006
@@ -75,15 +75,23 @@
  * Constructs a new membership
  * @param name - has to be the name of the local member. Used to filter 
the local member from the cluster membership
  */
-public Membership(MemberImpl local) {
+public Membership(MemberImpl local, boolean includeLocal) {
 this.local = local;
+this.addMember(local);
+}
+
+public Membership(MemberImpl local) {
+this(local,false);
 }
 
 public Membership(MemberImpl local, Comparator comp) {
-this(local);
-this.memberComparator = comp;
+this(local,comp,false);
 }
 

DO NOT REPLY [Bug 38768] - URL encoded unicode characters in GET request parameters cause the parameter not to present in the request object

2006-06-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=38768


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WONTFIX |




--- Additional Comments From [EMAIL PROTECTED]  2006-06-08 14:04 ---
It is correct encoding ! See "ECMAScript language specification Edition 3
Final". It is unicode characters. Firefox 1.5 and IE 6 send make these
characters as result of "escape" function.

-- 
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 39699] - simple deploy failed in cluster (distributable flag)

2006-06-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=39699





--- Additional Comments From [EMAIL PROTECTED]  2006-06-08 14:14 ---
(In reply to comment #23)
> The issue is fairly obvious: the class uses a static logger (initialized with 
> a
> random context class loader set) which is never reset, while it should be
> logging to the log field inherited from ManagerBase.
> 
> -> the solution is to remove:
> public static org.apache.commons.logging.Log log =
> org.apache.commons.logging.LogFactory
> .getLog(DeltaManager.class);
> 

I tried that. The problem did not go away. Same as before:

log4j:ERROR Error occured while converting date.
java.lang.NullPointerException
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:488)
at java.lang.StringBuffer.append(StringBuffer.java:302)
at 
org.apache.log4j.helpers.ISO8601DateFormat.format(ISO8601DateFormat.java:132)
at java.text.DateFormat.format(DateFormat.java:314)
at
org.apache.log4j.helpers.PatternParser$DatePatternConverter.convert(PatternParser.java:444)
at 
org.apache.log4j.helpers.PatternConverter.format(PatternConverter.java:64)
at org.apache.log4j.PatternLayout.format(PatternLayout.java:503)
at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:301)
at org.apache.log4j.WriterAppender.append(WriterAppender.java:159)
at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)
at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:65)
at org.apache.log4j.Category.callAppenders(Category.java:203)
at org.apache.log4j.Category.forcedLog(Category.java:388)
at org.apache.log4j.Category.log(Category.java:853)
at org.apache.commons.logging.impl.Log4JLogger.info(Log4JLogger.java:133)
at 
org.apache.catalina.cluster.session.DeltaManager.start(DeltaManager.java:975)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4137)
at 
org.apache.catalina.core.StandardContext.reload(StandardContext.java:2990)
at 
org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:906)
at
org.apache.catalina.manager.HTMLManagerServlet.reload(HTMLManagerServlet.java:473)
at
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.java:346)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:833)
at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:639)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1285)
at java.lang.Thread.run(Thread.java:595)
Jun 8, 2006 9:55:08 AM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already. 
Could not load org.apache.log4j.spi.VectorWriter.  The eventual following stack
trace is caused by an error thrown for debugging purposes as well as to attempt
to terminate the thread which caused the illegal access, and has no functional
impact.
java.lang.IllegalStateException
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1238)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at org.apache.log4j.spi.LoggingEvent.(LoggingEvent.java:154)
at org.apache.log4j.Category.forcedLog(Category.java:388)
at org.apache.log4j.Category.log(Category.java:853)
at org.apache.commons.logging.impl.Log4JLogger.error(Log4JLogger.java:193)
at 
org.apache.catalina.cluster.session.DeltaManager.start(DeltaManager.java:989)

DO NOT REPLY [Bug 39699] - simple deploy failed in cluster (distributable flag)

2006-06-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=39699





--- Additional Comments From [EMAIL PROTECTED]  2006-06-08 14:16 ---
(In reply to comment #24)
> 
> I tried that. The problem did not go away. Same as before:
> 

Please also remember that the first error talks about Error occured while
converting date and my log4j.appender.stdout.layout.ConversionPattern does have
%d{ISO8601}. Is that date not available or null?

-- 
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 39699] - simple deploy failed in cluster (distributable flag)

2006-06-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=39699





--- Additional Comments From [EMAIL PROTECTED]  2006-06-08 14:38 ---
Ok, I just told that to help, and beyond that I don't care at all. My workaround
may not work for a simple reload, though.

-- 
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: r412764 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContext.java

2006-06-08 Thread remm
Author: remm
Date: Thu Jun  8 07:50:07 2006
New Revision: 412764

URL: http://svn.apache.org/viewvc?rev=412764&view=rev
Log:
- Create clustered managers with the Catalina CL set as the context CL (as 
classloading may occur).
- Should fix 39699.

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContext.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContext.java?rev=412764&r1=412763&r2=412764&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContext.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContext.java Thu 
Jun  8 07:50:07 2006
@@ -69,6 +69,7 @@
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.LifecycleListener;
 import org.apache.catalina.Loader;
+import org.apache.catalina.Manager;
 import org.apache.catalina.Wrapper;
 import org.apache.catalina.deploy.ApplicationParameter;
 import org.apache.catalina.deploy.ErrorPage;
@@ -4128,6 +4129,22 @@
 if (log.isDebugEnabled())
 log.debug("Processing standard container startup");
 
+// Acquire clustered manager
+Manager contextManager = null;
+if (manager == null) {
+   if ((getCluster() != null) && distributable) {
+   try {
+   contextManager = 
getCluster().createManager(getName());
+   } catch (Exception ex) {
+   log.error("standardContext.clusterFail", ex);
+   ok = false;
+   }
+   } else {
+   contextManager = new StandardManager();
+   }
+}
+
+
 // Binding thread
 ClassLoader oldCCL = bindThread();
 
@@ -4184,17 +4201,8 @@
 lifecycle.fireLifecycleEvent(START_EVENT, null);
 
 // Configure default manager if none was specified
-if (manager == null) {
-if ((getCluster() != null) && distributable) {
-try {
-setManager(getCluster().createManager(getName()));
-} catch (Exception ex) {
-log.error("standardContext.clusterFail", ex);
-ok = false;
-}
-} else {
-setManager(new StandardManager());
-}
+if (contextManager != null) {
+   setManager(contextManager);
 }
 
 // Start manager



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



DO NOT REPLY [Bug 39627] - JULI ignores a ".level = XXX" directive in logging.properties

2006-06-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=39627


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]
   ||au




--- Additional Comments From [EMAIL PROTECTED]  2006-06-08 14:57 ---
Hey Richard,

I've been bitten by this defect too. AFAICT it is caused by juli's LogManager
adding the root logger directly to the classloaders map of loggers, instead of
using the addLogger() method which performs some configuration.

Here's a patch to the juli source on the 6.0.x tree. It seems to work okay for
me, but I can see from reading the code that there are other defects with the
way logging configuration is inherited from classloader to classloader and the
way configuration is reset. This might solve your problem though.

Roger

-- 
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 39699] - simple deploy failed in cluster (distributable flag)

2006-06-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=39699





--- Additional Comments From [EMAIL PROTECTED]  2006-06-08 14:59 ---
I'll look into it today

-- 
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: r412766 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SimpleThreadPoolExecutor.java

2006-06-08 Thread remm
Author: remm
Date: Thu Jun  8 08:00:12 2006
New Revision: 412766

URL: http://svn.apache.org/viewvc?rev=412766&view=rev
Log:
- While it wouldn't be a completely bad idea to switch to an executor, the 
black box behavior of an
  executor makes it a bit bad to be used with a default lame implementation, 
while the fancy
  implementations are more "big server" ready with far more overhead and 
complexity.

Removed:

tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SimpleThreadPoolExecutor.java


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



DO NOT REPLY [Bug 39627] - JULI ignores a ".level = XXX" directive in logging.properties

2006-06-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=39627





--- Additional Comments From [EMAIL PROTECTED]  2006-06-08 14:59 ---
Created an attachment (id=18430)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18430&action=view)
proposed fix for defect 39627

patch added

-- 
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 39699] - simple deploy failed in cluster (distributable flag)

2006-06-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=39699





--- Additional Comments From [EMAIL PROTECTED]  2006-06-08 15:00 ---
Ok, so my most likely better but still very similar workaround is to instantiate
the manager earlier.

-- 
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: r412767 - in /tomcat/site/trunk: docs/ xdocs/stylesheets/

2006-06-08 Thread yoavs
Author: yoavs
Date: Thu Jun  8 08:01:21 2006
New Revision: 412767

URL: http://svn.apache.org/viewvc?rev=412767&view=rev
Log:
Support our friends at ApacheCon EU for a couple of weeks.
(I'll remove the logo/link and re-generate the site once the conference ends).

Modified:
tomcat/site/trunk/docs/bugreport.html
tomcat/site/trunk/docs/contact.html
tomcat/site/trunk/docs/download-33.html
tomcat/site/trunk/docs/download-41.html
tomcat/site/trunk/docs/download-55.html
tomcat/site/trunk/docs/download-connectors.html
tomcat/site/trunk/docs/findhelp.html
tomcat/site/trunk/docs/getinvolved.html
tomcat/site/trunk/docs/heritage.html
tomcat/site/trunk/docs/index.html
tomcat/site/trunk/docs/irc.html
tomcat/site/trunk/docs/legal.html
tomcat/site/trunk/docs/lists.html
tomcat/site/trunk/docs/resources.html
tomcat/site/trunk/docs/svn.html
tomcat/site/trunk/docs/whichversion.html
tomcat/site/trunk/docs/whoweare.html
tomcat/site/trunk/xdocs/stylesheets/tomcat-site.xsl

Modified: tomcat/site/trunk/docs/bugreport.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/bugreport.html?rev=412767&r1=412766&r2=412767&view=diff
==
--- tomcat/site/trunk/docs/bugreport.html (original)
+++ tomcat/site/trunk/docs/bugreport.html Thu Jun  8 08:01:21 2006
@@ -21,6 +21,10 @@
 
 Apache Tomcat
 
+
+http://www.eu.apachecon.com";>
+http://people.apache.org/~lars/apachecon/ac2006eu_250x92trans.gif"; />
+
 
 
 

Modified: tomcat/site/trunk/docs/contact.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/contact.html?rev=412767&r1=412766&r2=412767&view=diff
==
--- tomcat/site/trunk/docs/contact.html (original)
+++ tomcat/site/trunk/docs/contact.html Thu Jun  8 08:01:21 2006
@@ -19,6 +19,10 @@
 
 Apache Tomcat
 
+
+http://www.eu.apachecon.com";>
+http://people.apache.org/~lars/apachecon/ac2006eu_250x92trans.gif"; />
+
 
 
 

Modified: tomcat/site/trunk/docs/download-33.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-33.html?rev=412767&r1=412766&r2=412767&view=diff
==
--- tomcat/site/trunk/docs/download-33.html (original)
+++ tomcat/site/trunk/docs/download-33.html Thu Jun  8 08:01:21 2006
@@ -19,6 +19,10 @@
 
 Apache Tomcat
 
+
+http://www.eu.apachecon.com";>
+http://people.apache.org/~lars/apachecon/ac2006eu_250x92trans.gif"; />
+
 
 
 

Modified: tomcat/site/trunk/docs/download-41.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-41.html?rev=412767&r1=412766&r2=412767&view=diff
==
--- tomcat/site/trunk/docs/download-41.html (original)
+++ tomcat/site/trunk/docs/download-41.html Thu Jun  8 08:01:21 2006
@@ -19,6 +19,10 @@
 
 Apache Tomcat
 
+
+http://www.eu.apachecon.com";>
+http://people.apache.org/~lars/apachecon/ac2006eu_250x92trans.gif"; />
+
 
 
 

Modified: tomcat/site/trunk/docs/download-55.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-55.html?rev=412767&r1=412766&r2=412767&view=diff
==
--- tomcat/site/trunk/docs/download-55.html (original)
+++ tomcat/site/trunk/docs/download-55.html Thu Jun  8 08:01:21 2006
@@ -19,6 +19,10 @@
 
 Apache Tomcat
 
+
+http://www.eu.apachecon.com";>
+http://people.apache.org/~lars/apachecon/ac2006eu_250x92trans.gif"; />
+
 
 
 

Modified: tomcat/site/trunk/docs/download-connectors.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-connectors.html?rev=412767&r1=412766&r2=412767&view=diff
==
--- tomcat/site/trunk/docs/download-connectors.html (original)
+++ tomcat/site/trunk/docs/download-connectors.html Thu Jun  8 08:01:21 2006
@@ -19,6 +19,10 @@
 
 Apache Tomcat
 
+
+http://www.eu.apachecon.com";>
+http://people.apache.org/~lars/apachecon/ac2006eu_250x92trans.gif"; />
+
 
 
 

Modified: tomcat/site/trunk/docs/findhelp.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/findhelp.html?rev=412767&r1=412766&r2=412767&view=diff
==
--- tomcat/site/trunk/docs/findhelp.html (original)
+++ tomcat/site/trunk/docs/findhelp.html Thu Jun  8 08:01:21 2006
@@ -19,6 +19,10 @@
 
 Apache Tomcat
 
+
+http://www.eu.apachecon.com";>
+http://people.apache.org/~lars/apachecon/ac2006eu_250x92trans.gif"; />
+
 
 
 

Modified: tomcat/site/trunk/docs/getinvolved.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/getinvolved.html?rev=412767&r1=412766&r2=412767&view=diff
==
--- tomcat/site/trunk/docs/getinvolved.html (original)
+++ tomcat/

svn commit: r412780 [5/5] - in /tomcat/tc6.0.x/trunk/java/org/apache: catalina/manager/ catalina/manager/host/ tomcat/util/http/fileupload/

2006-06-08 Thread remm
Added: 
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/fileupload/MultipartStream.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/fileupload/MultipartStream.java?rev=412780&view=auto
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/fileupload/MultipartStream.java
 (added)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/fileupload/MultipartStream.java
 Thu Jun  8 08:35:56 2006
@@ -0,0 +1,891 @@
+/*
+ * Copyright 2001-2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.tomcat.util.http.fileupload;
+
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+
+
+/**
+ *  Low level API for processing file uploads.
+ *
+ *  This class can be used to process data streams conforming to MIME
+ * 'multipart' format as defined in
+ * http://www.ietf.org/rfc/rfc1867.txt";>RFC 1867. Arbitrarily
+ * large amounts of data in the stream can be processed under constant
+ * memory usage.
+ *
+ *  The format of the stream is defined in the following way:
+ *
+ * 
+ *   multipart-body := preamble 1*encapsulation close-delimiter epilogue
+ *   encapsulation := delimiter body CRLF
+ *   delimiter := "--" boundary CRLF
+ *   close-delimiter := "--" boudary "--"
+ *   preamble := 
+ *   epilogue := 
+ *   body := header-part CRLF body-part
+ *   header-part := 1*header CRLF
+ *   header := header-name ":" header-value
+ *   header-name := 
+ *   header-value := 
+ *   body-data := 
+ * 
+ *
+ * Note that body-data can contain another mulipart entity.  There
+ * is limited support for single pass processing of such nested
+ * streams.  The nested stream is required to have a
+ * boundary token of the same length as the parent stream (see [EMAIL 
PROTECTED]
+ * #setBoundary(byte[])}).
+ *
+ * Here is an exaple of usage of this class.
+ *
+ * 
+ *try {
+ *MultipartStream multipartStream = new MultipartStream(input,
+ *  boundary);
+ *boolean nextPart = malitPartStream.skipPreamble();
+ *OutputStream output;
+ *while(nextPart) {
+ *header = chunks.readHeader();
+ *// process headers
+ *// create some output stream
+ *multipartStream.readBodyPart(output);
+ *nextPart = multipartStream.readBoundary();
+ *}
+ *} catch(MultipartStream.MalformedStreamException e) {
+ *  // the stream failed to follow required syntax
+ *} catch(IOException) {
+ *  // a read or write error occurred
+ *}
+ *
+ * 
+ *
+ * @author mailto:[EMAIL PROTECTED]">Rafal Krzewski
+ * @author mailto:[EMAIL PROTECTED]">Martin Cooper
+ * @author Sean C. Sullivan
+ *
+ * @version $Id: MultipartStream.java,v 1.12 2003/06/01 00:18:13 martinc Exp $
+ */
+public class MultipartStream
+{
+
+// - Manifest constants
+
+
+/**
+ * The maximum length of header-part that will be
+ * processed (10 kilobytes = 10240 bytes.).
+ */
+public static final int HEADER_PART_SIZE_MAX = 10240;
+
+
+/**
+ * The default length of the buffer used for processing a request.
+ */
+protected static final int DEFAULT_BUFSIZE = 4096;
+
+
+/**
+ * A byte sequence that marks the end of header-part
+ * (CRLFCRLF).
+ */
+protected static final byte[] HEADER_SEPARATOR = {0x0D, 0x0A, 0x0D, 0x0A};
+
+
+/**
+ * A byte sequence that that follows a delimiter that will be
+ * followed by an encapsulation (CRLF).
+ */
+protected static final byte[] FIELD_SEPARATOR = { 0x0D, 0x0A };
+
+
+/**
+ * A byte sequence that that follows a delimiter of the last
+ * encapsulation in the stream (--).
+ */
+protected static final byte[] STREAM_TERMINATOR = { 0x2D, 0x2D };
+
+
+// --- Data members
+
+
+/**
+ * The input stream from which data is read.
+ */
+private InputStream input;
+
+
+/**
+ * The length of the boundary token plus the leading CRLF--.
+ */

Conflicts and JDT

2006-06-08 Thread Remy Maucherat

Hi,

To avoid any possible conflicts, I see no choice but to package rename 
the JDT subset that is used by Jasper.


Any other ideas ?

Rémy

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



Re: Conflicts and JDT

2006-06-08 Thread Costin Manolache

Could you summarise what conflicts and why do we have to use JDT ?

My understanding was that the main reason is that it's better / faster /
less leaky than
javac - is this correct ? Is it still true for JDK1.5 ? Could we just use
javac as default - and
in case of 'conflicts' ?

Package rename kind of implies additional maintainance of a non-trivial
piece of code, merging, etc.

Of course - having it as a separate module ( and download ) might be the
best solution IMO.

Costin

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


Hi,

To avoid any possible conflicts, I see no choice but to package rename
the JDT subset that is used by Jasper.

Any other ideas ?

Rémy

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




Re: Conflicts and JDT

2006-06-08 Thread Remy Maucherat

Costin Manolache wrote:

Could you summarise what conflicts and why do we have to use JDT ?


As usual: version conflicts with people who would use JDT in their webapps.


My understanding was that the main reason is that it's better / faster /
less leaky than
javac - is this correct ? Is it still true for JDK1.5 ? Could we just use
javac as default - and
in case of 'conflicts' ?


More importantly, dependencies are read using a classloader, which is 
much faster.



Package rename kind of implies additional maintainance of a non-trivial
piece of code, merging, etc.

Of course - having it as a separate module ( and download ) might be the
best solution IMO.


No, using it as a default is the best option by far (otherwise, people 
need the JDK, etc), as was done with 5.5. javac remains usable at any time.


Rémy

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



Re: Conflicts and JDT

2006-06-08 Thread Yoav Shapira

Hi,



My understanding was that the main reason is that it's better / faster /
less leaky than
javac - is this correct ? Is it still true for JDK1.5 ? Could we just use
javac as default - and
in case of 'conflicts' ?


There's also another reason: if we use JDT then we don't require users
to have the complete JDK, only a JRE.  This is a big deal (perhaps
even more important than the technical / performance benefits) from a
licensing perspective, especially for people who repackage /
redistribute Tomcat as part of their products.

Yoav

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



Re: Conflicts and JDT

2006-06-08 Thread Costin Manolache

I got it, so we have to use jdt.

What about using a separate classloader to load JDT ( child or sibling of
server classloader for example ),
so any jdt in webapps won't be visible ?

Well - if you are comfortable maintaining JDT changes, I don't have a
problem, it just doesn't feel
right. For small things that we also change ( like modeler and maybe logger
), it is ok, but jdt seems like
a large thing.

Costin

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


Hi,


> My understanding was that the main reason is that it's better / faster /
> less leaky than
> javac - is this correct ? Is it still true for JDK1.5 ? Could we just
use
> javac as default - and
> in case of 'conflicts' ?

There's also another reason: if we use JDT then we don't require users
to have the complete JDK, only a JRE.  This is a big deal (perhaps
even more important than the technical / performance benefits) from a
licensing perspective, especially for people who repackage /
redistribute Tomcat as part of their products.

Yoav

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




DO NOT REPLY [Bug 39402] - enabling gzip negotiation overwrites existing "vary:" headers

2006-06-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=39402


[EMAIL PROTECTED] changed:

   What|Removed |Added

  Component|Connector:HTTP  |Connector:Coyote




-- 
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 39699] - simple deploy failed in cluster (distributable flag)

2006-06-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=39699





--- Additional Comments From [EMAIL PROTECTED]  2006-06-08 16:54 ---
Created an attachment (id=18431)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18431&action=view)
Patched version of 5.5.17 catalina-cluster.jar


-- 
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 39699] - simple deploy failed in cluster (distributable flag)

2006-06-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=39699


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2006-06-08 16:55 ---
Thanks for the hint Remy, entirely the clusters fault as it was not setting the
context class loader when loading the manager instances.

I have attached a patched catalina-cluster.jar, can you please verify the fix.
It will also be included in the next release of Tomcat

Please let us know if this works for you.

-- 
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: r412798 - /tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java

2006-06-08 Thread fhanik
Author: fhanik
Date: Thu Jun  8 09:57:24 2006
New Revision: 412798

URL: http://svn.apache.org/viewvc?rev=412798&view=rev
Log:
Fixed defect 39699
http://issues.apache.org/bugzilla/show_bug.cgi?id=39699

Modified:

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

Modified: 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java?rev=412798&r1=412797&r2=412798&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java
 Thu Jun  8 09:57:24 2006
@@ -540,26 +540,30 @@
  * @see DeltaManager#start()
  */
 public synchronized Manager createManager(String name) {
-if (log.isDebugEnabled())
-log.debug("Creating ClusterManager for context " + name
-+ " using class " + getManagerClassName());
+ClassLoader oldCtxLoader = 
Thread.currentThread().getContextClassLoader();
 Manager manager = null;
 try {
-manager = (Manager) getClass().getClassLoader().loadClass(
-getManagerClassName()).newInstance();
-} catch (Exception x) {
-log.error("Unable to load class for replication manager", x);
-manager = new org.apache.catalina.cluster.session.DeltaManager();
-} finally {
-if(manager != null) {
-manager.setDistributable(true);
-if (manager instanceof ClusterManager) {
-ClusterManager cmanager = (ClusterManager) manager ;
-cmanager.setDefaultMode(true);
-cmanager.setName(getManagerName(name,manager));
-cmanager.setCluster(this);
+
Thread.currentThread().setContextClassLoader(SimpleTcpCluster.class.getClassLoader());
+if (log.isDebugEnabled())
+log.debug("Creating ClusterManager for context " + name + " 
using class " + getManagerClassName());
+try {
+manager = (Manager) 
getClass().getClassLoader().loadClass(getManagerClassName()).newInstance();
+} catch (Exception x) {
+log.error("Unable to load class for replication manager", x);
+manager = new 
org.apache.catalina.cluster.session.DeltaManager();
+} finally {
+if (manager != null) {
+manager.setDistributable(true);
+if (manager instanceof ClusterManager) {
+ClusterManager cmanager = (ClusterManager) manager;
+cmanager.setDefaultMode(true);
+cmanager.setName(getManagerName(name, manager));
+cmanager.setCluster(this);
+}
 }
 }
+}finally {
+Thread.currentThread().setContextClassLoader(oldCtxLoader);
 }
 return manager;
 }



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



svn commit: r412800 - /tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/tcp/SimpleTcpCluster.java

2006-06-08 Thread fhanik
Author: fhanik
Date: Thu Jun  8 10:01:41 2006
New Revision: 412800

URL: http://svn.apache.org/viewvc?rev=412800&view=rev
Log:
Fixed defect 39699
http://issues.apache.org/bugzilla/show_bug.cgi?id=39699

Modified:

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

Modified: 
tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/tcp/SimpleTcpCluster.java?rev=412800&r1=412799&r2=412800&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
 Thu Jun  8 10:01:41 2006
@@ -477,12 +477,15 @@
 public synchronized Manager createManager(String name) {
 if (log.isDebugEnabled()) log.debug("Creating ClusterManager for 
context " + name + " using class " + getManagerClassName());
 Manager manager = null;
+ClassLoader oldCtxLoader = 
Thread.currentThread().getContextClassLoader();
 try {
+
Thread.currentThread().setContextClassLoader(SimpleTcpCluster.class.getClassLoader());
 manager = (Manager) 
getClass().getClassLoader().loadClass(getManagerClassName()).newInstance();
 } catch (Exception x) {
 log.error("Unable to load class for replication manager", x);
 manager = new org.apache.catalina.ha.session.DeltaManager();
 } finally {
+Thread.currentThread().setContextClassLoader(oldCtxLoader);
 if(manager != null) {
 manager.setDistributable(true);
 if (manager instanceof ClusterManager) {



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



DO NOT REPLY [Bug 39699] - simple deploy failed in cluster (distributable flag)

2006-06-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=39699





--- Additional Comments From [EMAIL PROTECTED]  2006-06-08 17:01 ---
(In reply to comment #30)
> 
> Please let us know if this works for you.

Yes, it works for me with my sample testcase. Kudos to you guys for the quick
fix. I will try it with my regular webapp and hopefully it will not have any
problems.

Christophe, is your problem fixed?

-- 
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: r412808 - in /tomcat/container/tc5.5.x/modules/groupcom: doc/ src/share/org/apache/catalina/tribes/group/interceptors/ src/share/org/apache/catalina/tribes/util/

2006-06-08 Thread fhanik
Author: fhanik
Date: Thu Jun  8 10:36:19 2006
New Revision: 412808

URL: http://svn.apache.org/viewvc?rev=412808&view=rev
Log:
More updates, far from complete

Modified:

tomcat/container/tc5.5.x/modules/groupcom/doc/leader-election-initiate-election.dia

tomcat/container/tc5.5.x/modules/groupcom/doc/leader-election-initiate-election.jpg

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

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/doc/leader-election-initiate-election.dia
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/doc/leader-election-initiate-election.dia?rev=412808&r1=412807&r2=412808&view=diff
==
Binary files - no diff available.

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/doc/leader-election-initiate-election.jpg
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/doc/leader-election-initiate-election.jpg?rev=412808&r1=412807&r2=412808&view=diff
==
Binary files - no diff available.

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java?rev=412808&r1=412807&r2=412808&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java
 Thu Jun  8 10:36:19 2006
@@ -32,6 +32,7 @@
 import org.apache.catalina.tribes.util.UUIDGenerator;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
+import org.apache.catalina.tribes.membership.*;
 
 /**
  * Title: Auto merging leader election algorithm
@@ -191,7 +192,11 @@
 int prio = AbsoluteOrder.comp.compare(local,others[0]);
 MemberImpl leader = ( prio < 0 )?local:others[0];//am I the leader 
in my view?
 if ( local.equals(leader) || force ) {
-sendElectionMsg(local,leader,others);
+CoordinationMessage msg = createElectionMsg(local, others, 
leader);
+suggestedviewId = msg.getId();
+suggestedView = new Membership(local,AbsoluteOrder.comp,true);
+Arrays.fill(suggestedView,msg.getMembers());
+sendElectionMsg(local,others[0],msg);
 } else {
 try {
 coordMsgReceived.set(false);
@@ -207,23 +212,35 @@
 }
 }
 
-protected void sendElectionMsg(MemberImpl local, MemberImpl leader, 
MemberImpl[] others) throws ChannelException {
-synchronized (electionMutex) {
-if ( suggestedviewId != null ) return;//election already running, 
I'm not allowed to have two of them
-Membership m = new Membership(local,AbsoluteOrder.comp,true);
-Arrays.fill(m,others);
-MemberImpl[] mbrs = m.getMembers();
-CoordinationMessage msg = new CoordinationMessage(leader, local, 
mbrs,new UniqueId(UUIDGenerator.randomUUID(true)), this.COORD_REQUEST);
-suggestedviewId = msg.getId();
-suggestedView = new Membership(local,AbsoluteOrder.comp,true);
-Arrays.fill(suggestedView,mbrs);
-m.reset(); 
-m = null;
-super.sendMessage(new Member[] {others[0]}, createData(msg, 
local), null);
+private CoordinationMessage createElectionMsg(MemberImpl local, 
MemberImpl[] others, MemberImpl leader) {
+Membership m = new Membership(local,AbsoluteOrder.comp,true);
+Arrays.fill(m,others);
+MemberImpl[] mbrs = m.getMembers();
+m.reset(); 
+CoordinationMessage msg = new CoordinationMessage(leader, local, 
mbrs,new UniqueId(UUIDGenerator.randomUUID(true)), this.COORD_REQUEST);
+return msg;
+}
+
+protected void sendElectionMsg(MemberImpl local, MemberImpl next, 
CoordinationMessage msg) throws ChannelException {
+super.sendMessage(new Member[] {next}, createData(msg, local), null);
+}
+
+protected void sendElectionMsgToNextInline(MemberImpl local, 
CoordinationMessage msg) { 
+int next = Arrays.nextIndex(local,msg.getMembers());
+if ( AbsoluteOrder.comp.compare(local,msg.getLeader()) > 0 ) 
msg.leader = local;
+if ( next >= 0 ) 
sendElectionMsg(local,(MemberImpl)msg.getMembers()[next],msg);
+}
+
+pub

DO NOT REPLY [Bug 39699] - simple deploy failed in cluster (distributable flag)

2006-06-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=39699





--- Additional Comments From [EMAIL PROTECTED]  2006-06-08 17:40 ---
i will test tomorrow...



-- 
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 37356] - Tomcat does not invalidate sessions after session-timeout period has passed.

2006-06-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=37356





--- Additional Comments From [EMAIL PROTECTED]  2006-06-08 21:16 ---
(In reply to comment #38)
> Alright, since a workaround has been suggested and the original poster has not
> come up with a reproducible test case, I'm closing this item for now.  If the
> original poster or anyone else comes up with a way to reproduce this, please
> feel free to reopen this item, attach your new test case, and we will be glad 
> to
> look at it.

It sounds to me like the reproducible test case is the problem. It is pretty
near impossible to provide the application, hardware configuration AND load
necessary to reproduce this on a running instance of tomcat. In lieu of this, I
propose a simple test case which reproduces in separate test code which closely
mimics the behavior of tomcat. This behavior is essentially multiple requests in
multiple threads accessing the int accessCount field in a session object. Each
thread will increment the accessCount and then decrement it when the request
completes. Here is some sample code to which basically does that:

import java.util.concurrent.atomic.AtomicInteger;

public class SharedIntTest
{
  public AtomicInteger execCount = new AtomicInteger();
  public AtomicInteger countAtomic = new AtomicInteger();
  public int count;
  
  public static void main( String[] args )
  {
final SharedIntTest shared = new SharedIntTest();
int maxThreads = 1000;

while ( true )
{
  //Initialize counters
  shared.countAtomic.set( 0 );
  shared.execCount.set( 0 );
  shared.count = 0;
  
  for ( int i = 0; i < maxThreads; i++ )
  {
new Thread( new Runnable()
 {
  public void run()
  {  
//increment counters
shared.countAtomic.incrementAndGet();
shared.count++;

//decrement counters
shared.countAtomic.decrementAndGet();
--shared.count;

//increment execution counter
shared.execCount.incrementAndGet();
  }
}
).start();
  }
  
  while ( shared.execCount.get() < maxThreads )
  {
try
{
  Thread.sleep( 10 );
}
catch( InterruptedException e )
{
}
  }
  
  if ( shared.count != 0 ) 
System.out.println( "Count Error: " + shared.count + "/" +
shared.countAtomic.get() + " " + shared.execCount.get() );
}
  }

}

The variable count basically represents the accessCount field in the session. In
the body of the main method there is a while loop which repeatedly runs the test
code. The test code initalizes all of the variables, and then launches a number
of threads, which represent the requests in tomcat which are all incrementing
and decrementing accessCount on a given session. All that the threads do is to
increment the count variable and then immediately decrement it, basically what
the request threads are doing in tomcat. The threads also increment a variable
called execCount which is used to determine the number of completed threads. In
the main thread, there is a loop which monitors the execCount to determine when
all of the threads are completed. To make things interesting I have put an
AtomicInteger counter in, countAtomic, to determine whether or not the Atomic
solution mentioned in comment #21 would resolve the issue.

When run on a single processor, this could runs continuously and never prints
any errors, as we would hope. When I run this code on a dual processor, within a
couple of minutes a test will run where the final result of the count variable
is not zero. The countAtomic variable always has a final result of zero.

In conclusion, I believe that Matthias Ernst in comment #35 is exactly right,
either a sync must be done or Atomics must be used. Otherwise the session
management code as it exists now will be very broken on multiprocessor machines.

-- 
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 39699] - simple deploy failed in cluster (distributable flag)

2006-06-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=39699





--- Additional Comments From [EMAIL PROTECTED]  2006-06-08 21:25 ---
(In reply to comment #31)
> 
> Yes, it works for me with my sample testcase. Kudos to you guys for the quick
> fix. I will try it with my regular webapp and hopefully it will not have any
> problems.
> 

Pleased to report that my production webapp encountered no problems either with
the new jar.


-- 
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: r412871 - in /tomcat/container/tc5.5.x/modules/groupcom: doc/ src/share/org/apache/catalina/tribes/group/ src/share/org/apache/catalina/tribes/group/interceptors/ src/share/org/apache/cata

2006-06-08 Thread fhanik
Author: fhanik
Date: Thu Jun  8 15:36:22 2006
New Revision: 412871

URL: http://svn.apache.org/viewvc?rev=412871&view=rev
Log:
Almost there, debugging the code and the algorithm left

Added:

tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/test/interceptors/TestNonBlockingCoordinator.java
Modified:

tomcat/container/tc5.5.x/modules/groupcom/doc/leader-election-message-arrives.dia

tomcat/container/tc5.5.x/modules/groupcom/doc/leader-election-message-arrives.jpg

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

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

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

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

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

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

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/doc/leader-election-message-arrives.dia
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/doc/leader-election-message-arrives.dia?rev=412871&r1=412870&r2=412871&view=diff
==
Binary files - no diff available.

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/doc/leader-election-message-arrives.jpg
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/doc/leader-election-message-arrives.jpg?rev=412871&r1=412870&r2=412871&view=diff
==
Binary files - no diff available.

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/GroupChannel.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/GroupChannel.java?rev=412871&r1=412870&r2=412871&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/GroupChannel.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/GroupChannel.java
 Thu Jun  8 15:36:22 2006
@@ -59,7 +59,7 @@
  * If heartbeat == true then how often do we want this
  * heartbeat to run. default is one minute
  */
-protected long heartbeatSleeptime = 60*1000;//only run once a minute
+protected long heartbeatSleeptime = 5*1000;//every 5 seconds
 
 /**
  * Internal heartbeat thread

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java?rev=412871&r1=412870&r2=412871&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java
 Thu Jun  8 15:36:22 2006
@@ -185,10 +185,15 @@
 
 public void startElection(boolean force) throws ChannelException {
 synchronized (electionMutex) {
-if ( suggestedviewId != null ) return;//election already running, 
I'm not allowed to have two of them
 MemberImpl local = (MemberImpl)getLocalMember(false);
 MemberImpl[] others = (MemberImpl[])membership.getMembers();
-if ( others.length == 0 ) return; //the only member, no need for 
an election
+if ( others.length == 0 ) {
+this.viewId = new UniqueId(UUIDGenerator.randomUUID(false));
+this.view = new Membership(local,AbsoluteOrder.comp, true);
+
this.handleViewConf(this.createElectionMsg(local,others,local),local,view);
+return; //the only member, no need for an election
+}
+if ( suggestedviewId != null ) return;//election already running, 
I'm not allowed to have two of them
 int prio = AbsoluteOrder.comp.compare(local,others[0]);
 MemberImpl leader = ( prio < 0 )?local:others[0];//am I the leader 
in my view?
 if ( local.equals(leader) || force ) {
@@ -225,9 +230,9 @@
 super.sendMessage(new Member[] {next}, createData(msg, local)

svn commit: r412874 - /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioReplicationThread.java

2006-06-08 Thread fhanik
Author: fhanik
Date: Thu Jun  8 15:37:42 2006
New Revision: 412874

URL: http://svn.apache.org/viewvc?rev=412874&view=rev
Log:
One more fix

Modified:

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

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioReplicationThread.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioReplicationThread.java?rev=412874&r1=412873&r2=412874&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioReplicationThread.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioReplicationThread.java
 Thu Jun  8 15:37:42 2006
@@ -197,6 +197,7 @@
 int resumeOps = key.interestOps() | SelectionKey.OP_READ;
 key.interestOps(resumeOps);
 }catch ( Exception x ) {
+try {key.selector().close();}catch ( Exception ignore){}
 log.error("Unable to cycle the selector, connection 
disconnected?",x);
 }
 }



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



DO NOT REPLY [Bug 38768] - URL encoded unicode characters in GET request parameters cause the parameter not to present in the request object

2006-06-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=38768





--- Additional Comments From [EMAIL PROTECTED]  2006-06-08 23:06 ---
Maybe Jonathan can cite a ratified standards which backs up the usage of %u
over and above a de-facto approach.  The EMCA specification does not override
RFC1738 (and its updates) the encoding scheme may valid inside the EMCA domain
but this doesn't make it valid outside in the HTTP domain.

My understanding of UCS-2 is that is still relies on a character set being
pre-selected (as there are more than 64k entities hence UCS-4).  Since there is
no character set metadata passed along with the URL it would be an unsafe 
approach.

The last commenter in the following reference quotes extracts from
specifications explaining how UTF-8 would work in that situation:

http://weblogs.mozillazine.org/gerv/archives/005539.html


The spirit of RFC1738 leaves it upto the server implementation on how to
interpret a URL especially the meanings of values %80 thru %FF (which would open
up the possibility of UTF-8 handling), from the specs point of view a URL is
just an identifying token.


In testing Jonathans situation Tomcat allows the Servlet to run but sets the
parameter value to 'null' as-if it has not been specified.  This behaiour is
dubious, since there is no reporting mechanism between container and servlet to
indicate an uncorrectable error occured during parsing the request.

One obvious thing to do would be to send back a HTTP error "400 Bad Request".

It concerns me if TC runs the servlet with incorrect parameters.  A 'null' or
edited value approach might cause the servlet to perform a different action than
the request had intended.


-- 
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: r412903 - in /tomcat/container/tc5.5.x/modules/groupcom: src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java test/java/org/apache/catalina/tribes/test/intercept

2006-06-08 Thread fhanik
Author: fhanik
Date: Thu Jun  8 18:52:52 2006
New Revision: 412903

URL: http://svn.apache.org/viewvc?rev=412903&view=rev
Log:
played around with the test

Modified:

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

tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/test/interceptors/TestNonBlockingCoordinator.java

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=412903&r1=412902&r2=412903&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  8 18:52:52 2006
@@ -106,7 +106,7 @@
 
 //ignore the message, it doesnt have the flag set
 if ( process ) super.messageReceived(msg);
-else if ( log.isInfoEnabled() ) log.info("Received a failure detector 
packet:"+msg);
+else if ( log.isDebugEnabled() ) log.debug("Received a failure 
detector packet:"+msg);
 }//messageReceived
 
 

Modified: 
tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/test/interceptors/TestNonBlockingCoordinator.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/test/interceptors/TestNonBlockingCoordinator.java?rev=412903&r1=412902&r2=412903&view=diff
==
--- 
tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/test/interceptors/TestNonBlockingCoordinator.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/test/interceptors/TestNonBlockingCoordinator.java
 Thu Jun  8 18:52:52 2006
@@ -53,8 +53,8 @@
 }
 
 public void testCoord2() throws Exception {
+System.out.println("Shutting 
down:"+channels[0].getLocalMember(true).toString());
 channels[0].stop(Channel.DEFAULT);
-if ( channelCount > 3 ) 
channels[channelCount-1].start(Channel.DEFAULT);
 Thread.sleep(1000);
 System.out.println("Member count:"+channels[1].getMembers().length);
 Member member = coordinators[1].getCoordinator();



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



DO NOT REPLY [Bug 37356] - Tomcat does not invalidate sessions after session-timeout period has passed.

2006-06-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=37356





--- Additional Comments From [EMAIL PROTECTED]  2006-06-09 04:48 ---
Created an attachment (id=18432)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18432&action=view)
Stress Test Framework

Here is complete working WAR application with source included that might be
useful to build a real testcase from (or any test cases that only appear under
stress).

There is a web-app side, which you can either modify my DefaultServlet or add a
new servlet to provide additional code to help trigger the problem.  It would
be worth file you building a simple interface into your Session Management
classes



There is a HTTP traffic generator based around commons-httpclient,
multi-threaded.  You can theoretically extract the WAR onto a number of client
machines and/or use the same machine thats running Tomcat.

Invokation suggestion:

$ jar -xvf TCBug37356.war
$ cd WEB-INF 
$ java -cp
classes:lib/commons-httpclient-3.0.1.jar:lib/commons-codec-1.3.jar:lib/commons-logging-1.0.4.jar:lib/log4j-1.2.13.jar
testpackage/TestClientTomcat


Places to edit:

testpackage/TestClientTomcat: Edit the defaults at the top of the class, for
URL, requests, simultaneous thread count.

TestClientTomcat#startNextThread(): just before the call to #sweepOnce() you
might need to modify requests, like every 1000 inject a HTTP request to poll
your Session manager (through the servlet) to look for problems and report.

TestClientRunnable#run(): ~around line 177~ Modify this to suit your HTTP
request setup and response parsing.


Maybe someone else could attach a cut down version of their session management
code for analying the state of TC from within.

Feel free to email me privately for any assistance with it.

-- 
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 37356] - Tomcat does not invalidate sessions after session-timeout period has passed.

2006-06-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=37356





--- Additional Comments From [EMAIL PROTECTED]  2006-06-09 06:32 ---
(In reply to comment #42)
> In conclusion, I believe that Matthias Ernst in comment #35 is exactly right,
> either a sync must be done or Atomics must be used. Otherwise the session
> management code as it exists now will be very broken on multiprocessor 
> machines.

Very funny. Adding two syncs part of every request just to provide support for a
really stupid feature is not acceptable. The actual options are:
- remove the "no expire while requests are in progress" feature by default, with
an option to use the feature with full syncs for the two people that actually
need it
- force expire of abnormally long sessions regardless of the accessCount value
(many times over the session expiration time, with a minimum amount of time of a
few hours)


-- 
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 39699] - simple deploy failed in cluster (distributable flag)

2006-06-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=39699





--- Additional Comments From [EMAIL PROTECTED]  2006-06-09 06:52 ---
(In reply to comment #30)
> Thanks for the hint Remy, entirely the clusters fault as it was not setting 
> the
> context class loader when loading the manager instances.
> 
> I have attached a patched catalina-cluster.jar, can you please verify the fix.
> It will also be included in the next release of Tomcat
> 
> Please let us know if this works for you.

If it works, I think backporting the change I did in the dev branch of Tomcat
would be a good idea. I don't think it's really the job of the manager
implementation to deal with context class loaders.


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