Re: svn commit: r542247 - /tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java

2007-05-29 Thread Filip Hanik - Dev Lists

Remy Maucherat wrote:

[EMAIL PROTECTED] wrote:

+/**
+ * Current set of configurations
+ */
+protected HashSet cometConfigurations = new 
HashSet(3);

+
 protected WorkerThreadCheck threadCheck = new WorkerThreadCheck();
 
 private static final Object threadCheckHolder = new Object();

@@ -139,31 +144,47 @@
 public void configure(CometEvent.CometConfiguration... options)
 throws IOException, IllegalStateException {
 checkWorkerThread();
-throw new UnsupportedOperationException();
+synchronized (cometConfigurations) {
+cometConfigurations.clear();
+for (CometEvent.CometConfiguration cc : options) {
+cometConfigurations.add(cc);
+}
+request.action(ActionCode.ACTION_COMET_CONFIGURE,options);
+}


As I said quite a few times already, I don't think this sort of design 
is a good idea. Since you're apparently not willing to discuss much 
and/or reconsider things at the moment (too busy coding, eh ? ;) ), I 
don't think I can properly participate in the development of this branch.
I'm happy to go back to talking about this. My email goes through an 
external spam filter, so I do have quite a delay before I get the 
mailings on the mailing list.

So don't take the delay as me ignoring you :)


I will work on a separate codebase in the sandbox for the time being 
to implement my own views of non blocking functionality, and maybe we 
will be able to merge at some point later on. I will use a new "comet" 
folder in the sandbox for this (so it will be 
http://svn.apache.org/repos/asf/tomcat/sandbox/comet).
ok, I leave that up to you, as I said, more than happy to discuss before 
I go any further.


Filip

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



Split up SocketStatus.OPEN

2007-05-29 Thread Filip Hanik - Dev Lists

Can we split up SocketStatus.OPEN into

SocketStatus.OPEN_READ - for read events
SocketStatus.OPEN_WRITE - for write events

currently SocketStatus.OPEN is for READ events,

or if you have another suggestion to process data, let me know

Filip

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



Re: Split up SocketStatus.OPEN

2007-05-29 Thread Remy Maucherat

Filip Hanik - Dev Lists wrote:

Can we split up SocketStatus.OPEN into

SocketStatus.OPEN_READ - for read events
SocketStatus.OPEN_WRITE - for write events

currently SocketStatus.OPEN is for READ events,

or if you have another suggestion to process data, let me know


It's possible some new status codes are needed, I don't know right now.

Rémy

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



Re: Split up SocketStatus.OPEN

2007-05-29 Thread Filip Hanik - Dev Lists

Remy Maucherat wrote:

Filip Hanik - Dev Lists wrote:

Can we split up SocketStatus.OPEN into

SocketStatus.OPEN_READ - for read events
SocketStatus.OPEN_WRITE - for write events

currently SocketStatus.OPEN is for READ events,

or if you have another suggestion to process data, let me know


It's possible some new status codes are needed, I don't know right now.
I'll go ahead and plow forward if that is OK, and then we can disregard 
it if it turns into crap.


Filip

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



svn commit: r542479 - in /tomcat/trunk/java/org/apache: catalina/connector/CometEventImpl.java coyote/http11/Http11NioProcessor.java tomcat/util/net/NioEndpoint.java tomcat/util/net/PollerInterest.jav

2007-05-29 Thread fhanik
Author: fhanik
Date: Tue May 29 03:29:25 2007
New Revision: 542479

URL: http://svn.apache.org/viewvc?view=rev&rev=542479
Log:
Added in the registration of comet interest operations
Added in PollerInterest enumeration to satisfy different socket implementations 
and to decouple org.apache.tomcat from org.apache.catalina

Added:
tomcat/trunk/java/org/apache/tomcat/util/net/PollerInterest.java
Modified:
tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java?view=diff&rev=542479&r1=542478&r2=542479
==
--- tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java Tue May 
29 03:29:25 2007
@@ -27,6 +27,7 @@
 import org.apache.catalina.CometEvent;
 import org.apache.catalina.util.StringManager;
 import org.apache.coyote.ActionCode;
+import org.apache.tomcat.util.net.PollerInterest;
 
 public class CometEventImpl implements CometEvent {
 
@@ -172,7 +173,7 @@
 for (CometEvent.CometOperation co : operations) {
 if (!cometOperations.contains(co)) {
 cometOperations.add(co);
-request.action(ActionCode.ACTION_COMET_REGISTER, co);
+request.action(ActionCode.ACTION_COMET_REGISTER, 
translate(co));
 }
 }
 }
@@ -185,7 +186,7 @@
 for (CometEvent.CometOperation co : operations) {
 if (cometOperations.contains(co)) {
 cometOperations.remove(co);
-request.action(ActionCode.ACTION_COMET_UNREGISTER, co);
+request.action(ActionCode.ACTION_COMET_UNREGISTER, 
translate(co));
 }
 }
 }
@@ -223,9 +224,22 @@
 throw new IllegalStateException("The operation can only be 
performed when invoked by a Tomcat worker thread.");
 }
 
+protected PollerInterest translate(CometOperation op) {
+if ( op == CometEvent.CometOperation.OP_READ )
+return PollerInterest.READ;
+else if ( op == CometEvent.CometOperation.OP_WRITE )
+return PollerInterest.WRITE;
+else if ( op == CometEvent.CometOperation.OP_CALLBACK )
+return PollerInterest.CALLBACK;
+else 
+throw new IllegalArgumentException(op!=null?op.toString():"null");
+}
+
 //inner class used to keep track if the current thread is a worker thread.
 private static class WorkerThreadCheck extends ThreadLocal {
 
 }
+
+
 
 }

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?view=diff&rev=542479&r1=542478&r2=542479
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Tue May 
29 03:29:25 2007
@@ -53,6 +53,7 @@
 import org.apache.tomcat.util.net.NioEndpoint.Handler.SocketState;
 import org.apache.tomcat.util.res.StringManager;
 import org.apache.tomcat.util.net.NioEndpoint.KeyAttachment;
+import org.apache.tomcat.util.net.PollerInterest;
 
 
 /**
@@ -1221,8 +1222,35 @@
 attach.setTimeout(to.longValue());
 } else if (actionCode == ActionCode.ACTION_COMET_END) {
 comet = false;
+} else if (actionCode == ActionCode.ACTION_COMET_REGISTER) {
+int interest = getPollerInterest(param);
+NioEndpoint.KeyAttachment attach = 
(NioEndpoint.KeyAttachment)socket.getAttachment(false);
+attach.setCometOps(attach.getCometOps()|interest);
+attach.getPoller().cometInterest(socket);
+} else if (actionCode == ActionCode.ACTION_COMET_UNREGISTER) {
+int interest = getPollerInterest(param);
+NioEndpoint.KeyAttachment attach = 
(NioEndpoint.KeyAttachment)socket.getAttachment(false);
+attach.setCometOps(attach.getCometOps()& (~interest));
+attach.getPoller().cometInterest(socket);
+} else if (actionCode == ActionCode.ACTION_COMET_CONFIGURE) {
 }
 
+}
+
+private int getPollerInterest(Object param) throws 
IllegalArgumentException {
+if ( param == null || (!(param instanceof PollerInterest)) )
+throw new IllegalArgumentException("Action parameter must be a 
PollerInterest object.");
+int interest = 0;
+PollerInterest pi = (PollerInterest)param;
+ 

svn commit: r542482 - in /tomcat/trunk/java/org/apache: catalina/connector/CoyoteAdapter.java tomcat/util/net/AprEndpoint.java tomcat/util/net/NioEndpoint.java tomcat/util/net/SocketStatus.java

2007-05-29 Thread fhanik
Author: fhanik
Date: Tue May 29 03:44:51 2007
New Revision: 542482

URL: http://svn.apache.org/viewvc?view=rev&rev=542482
Log:
Add the additional SocketStatus event types, its up to the connector 
implementation to send the correct one.
Currently the functionality is backwards compatible as OPEN changed to OPEN_READ



Modified:
tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/SocketStatus.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?view=diff&rev=542482&r1=542481&r2=542482
==
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Tue May 
29 03:44:51 2007
@@ -123,7 +123,27 @@
 try {
 if ( event!=null && (event instanceof CometEventImpl)) 
 ((CometEventImpl)event).setWorkerThread();
-if (status == SocketStatus.OPEN) {
+if (status == SocketStatus.OPEN_CALLBACK) {
+if (response.isClosed()) {
+// The event has been closed asynchronously, so call 
end instead of
+// read to cleanup the pipeline
+
request.getEvent().setEventType(CometEvent.EventType.END);
+request.getEvent().setEventSubType(null);
+} else {
+
request.getEvent().setEventType(CometEvent.EventType.CALLBACK);
+request.getEvent().setEventSubType(null);
+}
+} else if (status == SocketStatus.OPEN_WRITE) {
+if (response.isClosed()) {
+// The event has been closed asynchronously, so call 
end instead of
+// read to cleanup the pipeline
+
request.getEvent().setEventType(CometEvent.EventType.END);
+request.getEvent().setEventSubType(null);
+} else {
+
request.getEvent().setEventType(CometEvent.EventType.WRITE);
+request.getEvent().setEventSubType(null);
+}
+} else if (status == SocketStatus.OPEN_READ) {
 if (response.isClosed()) {
 // The event has been closed asynchronously, so call 
end instead of
 // read to cleanup the pipeline
@@ -274,7 +294,7 @@
 if (!response.isClosed() && !response.isError()) {
 if (request.getAvailable()) {
 // Invoke a read event right away if there are 
available bytes
-if (event(req, res, SocketStatus.OPEN)) {
+if (event(req, res, SocketStatus.OPEN_READ)) {
 comet = true;
 res.action(ActionCode.ACTION_COMET_BEGIN, 
null);
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?view=diff&rev=542482&r1=542481&r2=542482
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Tue May 29 
03:44:51 2007
@@ -1301,7 +1301,7 @@
 // Check for failed sockets and hand this socket 
off to a worker
 if (((desc[n*2] & Poll.APR_POLLHUP) == 
Poll.APR_POLLHUP)
 || ((desc[n*2] & Poll.APR_POLLERR) == 
Poll.APR_POLLERR)
-|| (comet && (!processSocket(desc[n*2+1], 
SocketStatus.OPEN))) 
+|| (comet && (!processSocket(desc[n*2+1], 
SocketStatus.OPEN_READ))) 
 || (!comet && 
(!processSocket(desc[n*2+1] {
 // Close socket and clear pool
 if (comet) {

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?view=diff&rev=542482&r1=542481&r2=542482
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Tue May 29 
03:44:51 2007
@@ -1501,7 +

Re: svn commit: r542247 - /tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java

2007-05-29 Thread Remy Maucherat

Filip Hanik - Dev Lists wrote:
As I said quite a few times already, I don't think this sort of design 
is a good idea. Since you're apparently not willing to discuss much 
and/or reconsider things at the moment (too busy coding, eh ? ;) ), I 
don't think I can properly participate in the development of this branch.
I'm happy to go back to talking about this. My email goes through an 
external spam filter, so I do have quite a delay before I get the 
mailings on the mailing list.

So don't take the delay as me ignoring you :)


It's going to be difficult to talk much if the lag is too big, and it's 
better to code, then.


While I agree with the general lifecycle of the comet connection as it 
seems to be implemented in trunk, I disagree with the implementation and 
API design.


Rémy

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



svn commit: r542491 - in /tomcat/sandbox/comet/java/org/apache: catalina/ catalina/connector/ coyote/ tomcat/util/net/

2007-05-29 Thread remm
Author: remm
Date: Tue May 29 04:24:13 2007
New Revision: 542491

URL: http://svn.apache.org/viewvc?view=rev&rev=542491
Log:
- My own view on the Comet API extensions. The main differences are:
  * remove robustness checks (I believe they are not useful, as they have a 
performance cost, only handle the most
evident "issues", and even for those evident "issues" are most likely 
arbitrary)
  * very simple calls and no additional data structures exposed to the end user
  * merge write notifications mode with non blocking; non blocking is never 
configured in an explicit way
  * pick up the SocketStatus additions
  * most likely backwards compatible with Comet from Tomcat 6.0
- No actual connector updates yet (for APR, the main change is to do timeout 
handling using Java, which is overdue).

Modified:
tomcat/sandbox/comet/java/org/apache/catalina/CometEvent.java
tomcat/sandbox/comet/java/org/apache/catalina/connector/CometEventImpl.java
tomcat/sandbox/comet/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/sandbox/comet/java/org/apache/catalina/connector/OutputBuffer.java
tomcat/sandbox/comet/java/org/apache/catalina/connector/Request.java
tomcat/sandbox/comet/java/org/apache/catalina/connector/Response.java
tomcat/sandbox/comet/java/org/apache/coyote/ActionCode.java
tomcat/sandbox/comet/java/org/apache/coyote/Response.java
tomcat/sandbox/comet/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/sandbox/comet/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/sandbox/comet/java/org/apache/tomcat/util/net/SocketStatus.java

Modified: tomcat/sandbox/comet/java/org/apache/catalina/CometEvent.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/comet/java/org/apache/catalina/CometEvent.java?view=diff&rev=542491&r1=542490&r2=542491
==
--- tomcat/sandbox/comet/java/org/apache/catalina/CometEvent.java (original)
+++ tomcat/sandbox/comet/java/org/apache/catalina/CometEvent.java Tue May 29 
04:24:13 2007
@@ -20,7 +20,6 @@
 
 import java.io.IOException;
 
-import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
@@ -145,99 +144,46 @@
  * @param timeout The timeout in milliseconds for this connection, must be 
a positive value, larger than 0
  * @throws IOException An IOException may be thrown to indicate an IO 
error, 
  * or that the EOF has been reached on the connection
- * @throws ServletException An exception has occurred, as specified by the 
root
- * cause
- * @throws UnsupportedOperationException if per connection timeout is not 
supported, either at all or at this phase
- * of the invocation.
  */
 public void setTimeout(int timeout)
-throws IOException, ServletException, UnsupportedOperationException;
-
-
+throws IOException;
 
 /**
- * COMET_NON_BLOCKING
- * Option bit set for allowing non blocking IO
- * when reading from the request or writing to the response
- * COMET_NO_IO
- * Option bit set to not register for any IO events
- * Connections can be reregistered for IO events using the 
- * @see #configure(int)
- */
-public enum CometConfiguration {COMET_NON_BLOCKING,COMET_NO_IO};
-
-/**
- * Configures the connection for desired IO options.
- * By default a Comet connection is configured for 
- * a) Blocking IO - standard servlet usage
- * b) Register for READ events when data arrives
- * Tomcat Comet allows you to configure for additional options:
- * the COMET_NON_BLOCKING bit signals whether writing and 
reading from the request 
- * or writing to the response will be non blocking.
- * the COMET_NO_IO bit signals the container that you are not 
interested in 
- * receiving any IO events from the container.
- * @param cometOptions int - the option bit set, see #COMET_NON_BLOCKING 
and #COMET_NO_IO
- * @throws IOException -
- * @throws IllegalStateException - if this method is invoked outside of 
the BEGIN event
- */
-public void configure(CometConfiguration... options)
-throws IOException, IllegalStateException;
-
-/**
- * Returns the configuration for this Comet connection
- * @return CometConfiguration[]
- * @see #configure(CometConfiguration...)
- */
-public CometConfiguration[] getConfiguration();
-
-/**
- * OP_CALLBACK - receive a CALLBACK event from the container
- * OP_READ - receive a READ event when the connection has data to be read
- * OP_WRITE - receive a WRITE event when the connection is able to receive 
data to be written
- * @see #register(CometOperations)
- */
-public enum CometOperation {OP_CALLBACK, OP_READ, OP_WRITE};
-
-/**
- * Registers the Comet connection with the container for IO notificatio

DO NOT REPLY [Bug 42536] New: - The procedure entry point getaddrinfo could not be located in WS2_32.dll

2007-05-29 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

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

   Summary: The procedure entry point getaddrinfo could not be
located in WS2_32.dll
   Product: Tomcat 5
   Version: 5.5.20
  Platform: PC
OS/Version: Windows 2000
Status: NEW
  Severity: normal
  Priority: P2
 Component: Native:Integration
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


When I copy tcnative-1.dll, version 1.1.9 into my Tomcat bin directory, set the
java.library.path to it and start tomcat, I get this error:

tomcat5.exe - Entry Point Not Found
The procedure entry point getaddrinfo could not be located in the dynamic link
library WS2_32.dll.

This error is shown four times. There is nothing in any logs. Tomcat does start
despite the error and it can process requests. Therefore, my major concern is
that this error blocks the automatic start of tomcat in production after a
server reboot.

-- 
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 42536] - The procedure entry point getaddrinfo could not be located in WS2_32.dll

2007-05-29 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

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


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2007-05-29 05:19 ---
This is fixed with 1.1.10 that ships with latest tomcats.
You can dwonload it separately from:
http://tomcat.heanet.ie/native/
Also you can fix that by installing IPV6 on windows 2000.


-- 
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 41509] - Jasper tries to add permissions to readonly PermissionCollection

2007-05-29 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

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





--- Additional Comments From [EMAIL PROTECTED]  2007-05-29 06:03 ---
(In reply to comment #0)
How can I reproduce this situation? Do you have any test cases?


-- 
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: r542512 - /tomcat/build/branches/tc5.0.x/build.xml

2007-05-29 Thread remm
Author: remm
Date: Tue May 29 06:37:57 2007
New Revision: 542512

URL: http://svn.apache.org/viewvc?view=rev&rev=542512
Log:
- Build updates for svn layout.
- JDK 1.5 build compatibility (JDK 1.4 should still be used to build real 
releases, though).

Modified:
tomcat/build/branches/tc5.0.x/build.xml

Modified: tomcat/build/branches/tc5.0.x/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/build/branches/tc5.0.x/build.xml?view=diff&rev=542512&r1=542511&r2=542512
==
--- tomcat/build/branches/tc5.0.x/build.xml (original)
+++ tomcat/build/branches/tc5.0.x/build.xml Tue May 29 06:37:57 2007
@@ -12,23 +12,19 @@
 
   
   
-  
+  
   
-  
+  
   
   
 
   
-  
-  
-  
-  
-  
+  
+  
+  
+  
   
   
-  
-  
 
   
   
   
-  
 
   
   
@@ -118,12 +112,6 @@
   
 
 
-
   
 
 
@@ -461,31 +449,6 @@
 
   
 
-
-
-
-
   
 
@@ -987,11 +950,12 @@
   

-
+
 
 
 
@@ -1680,14 +1644,6 @@
 
   
 
-  
-
-
-  
-
-  
-
   
 
 
@@ -1710,63 +1666,6 @@
 
 
   
-
-  
-
-
-
-
-
-
-  
-
-  
-
-  
-
-
-
-
-
-
-  
-
-
-
-  
-
-  
-
-  
-
-
-
-
-
-
-  
-
 
   



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



svn commit: r542513 - in /tomcat/container/branches/tc5.0.x: catalina/build.xml tester/build.xml webapps/manager/WEB-INF/classes/org/apache/catalina/manager/HTMLManagerServlet.java webapps/manager/bui

2007-05-29 Thread remm
Author: remm
Date: Tue May 29 06:38:39 2007
New Revision: 542513

URL: http://svn.apache.org/viewvc?view=rev&rev=542513
Log:
- Build updates for svn layout.
- JDK 1.5 build compatibility (JDK 1.4 should still be used to build real 
releases, though).

Modified:
tomcat/container/branches/tc5.0.x/catalina/build.xml
tomcat/container/branches/tc5.0.x/tester/build.xml

tomcat/container/branches/tc5.0.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/HTMLManagerServlet.java
tomcat/container/branches/tc5.0.x/webapps/manager/build.xml

Modified: tomcat/container/branches/tc5.0.x/catalina/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/branches/tc5.0.x/catalina/build.xml?view=diff&rev=542513&r1=542512&r2=542513
==
--- tomcat/container/branches/tc5.0.x/catalina/build.xml (original)
+++ tomcat/container/branches/tc5.0.x/catalina/build.xml Tue May 29 06:38:39 
2007
@@ -42,6 +42,8 @@
   
 
+  
+
   
   
 
@@ -591,6 +593,7 @@
 
   
 

Modified: tomcat/container/branches/tc5.0.x/tester/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/branches/tc5.0.x/tester/build.xml?view=diff&rev=542513&r1=542512&r2=542513
==
--- tomcat/container/branches/tc5.0.x/tester/build.xml (original)
+++ tomcat/container/branches/tc5.0.x/tester/build.xml Tue May 29 06:38:39 2007
@@ -16,6 +16,8 @@
   
   
 
+  
+
   
   
 
@@ -61,6 +63,7 @@
 
 
 

Modified: 
tomcat/container/branches/tc5.0.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/HTMLManagerServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/branches/tc5.0.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/HTMLManagerServlet.java?view=diff&rev=542513&r1=542512&r2=542513
==
--- 
tomcat/container/branches/tc5.0.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/HTMLManagerServlet.java
 (original)
+++ 
tomcat/container/branches/tc5.0.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/HTMLManagerServlet.java
 Tue May 29 06:38:39 2007
@@ -33,6 +33,7 @@
 import javax.servlet.http.HttpServletResponse;
 import org.apache.catalina.Context;
 import org.apache.catalina.Host;
+import org.apache.catalina.util.RequestUtil;
 import org.apache.catalina.util.ServerInfo;
 import org.apache.commons.fileupload.FileItem;
 import org.apache.commons.fileupload.DiskFileUpload;

Modified: tomcat/container/branches/tc5.0.x/webapps/manager/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/branches/tc5.0.x/webapps/manager/build.xml?view=diff&rev=542513&r1=542512&r2=542513
==
--- tomcat/container/branches/tc5.0.x/webapps/manager/build.xml (original)
+++ tomcat/container/branches/tc5.0.x/webapps/manager/build.xml Tue May 29 
06:38:39 2007
@@ -18,6 +18,8 @@
   
   
 
+  
+
   
   
 
@@ -75,6 +77,7 @@
  destdir="${webapps.build}/${webapp.name}/WEB-INF/classes"
  debug="${compile.debug}" deprecation="${compile.deprecation}"
  optimize="${compile.optimize}"
+ source="${compile.source}"
  excludes="**/CVS/**">
   
 



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



svn commit: r542514 - /tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/JspRuntimeContext.java

2007-05-29 Thread remm
Author: remm
Date: Tue May 29 06:39:02 2007
New Revision: 542514

URL: http://svn.apache.org/viewvc?view=rev&rev=542514
Log:
- Build updates for svn layout.
- JDK 1.5 build compatibility (JDK 1.4 should still be used to build real 
releases, though).

Modified:

tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/JspRuntimeContext.java

Modified: 
tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/JspRuntimeContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/JspRuntimeContext.java?view=diff&rev=542514&r1=542513&r2=542514
==
--- 
tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/JspRuntimeContext.java
 (original)
+++ 
tomcat/jasper/branches/tc5.0.x/jasper2/src/share/org/apache/jasper/compiler/JspRuntimeContext.java
 Tue May 29 06:39:02 2007
@@ -369,7 +369,7 @@
 }
 File contextDir = new File(codeBase);
 URL url = contextDir.getCanonicalFile().toURL();
-codeSource = new CodeSource(url,null);
+codeSource = new 
CodeSource(url,(java.security.cert.Certificate[])null);
 permissionCollection = policy.getPermissions(codeSource);
 
 // Create a file read permission for web app context directory



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



DO NOT REPLY [Bug 42536] - The procedure entry point getaddrinfo could not be located in WS2_32.dll

2007-05-29 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

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


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED




--- Additional Comments From [EMAIL PROTECTED]  2007-05-29 06:39 ---
Thanks, I missed 1.1.10 due to the alphabetic sorting.

-- 
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: Split up SocketStatus.OPEN

2007-05-29 Thread Remy Maucherat

Filip Hanik - Dev Lists wrote:
I'll go ahead and plow forward if that is OK, and then we can disregard 
it if it turns into crap.


I adopted this change, as it doesn't really seem possible to 
differentiate events otherwise, so it doesn't look like crap to me at 
the moment.


Rémy

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



svn commit: r542586 - in /tomcat/trunk/java/org/apache: catalina/connector/CoyoteAdapter.java catalina/connector/OutputBuffer.java catalina/connector/Request.java catalina/connector/Response.java coyo

2007-05-29 Thread fhanik
Author: fhanik
Date: Tue May 29 09:46:23 2007
New Revision: 542586

URL: http://svn.apache.org/viewvc?view=rev&rev=542586
Log:
adopted changes

Modified:
tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java
tomcat/trunk/java/org/apache/catalina/connector/Request.java
tomcat/trunk/java/org/apache/catalina/connector/Response.java
tomcat/trunk/java/org/apache/coyote/Response.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?view=diff&rev=542586&r1=542585&r2=542586
==
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Tue May 
29 09:46:23 2007
@@ -207,7 +207,7 @@
 }
 if (response.isClosed() || !request.isComet()) {
 res.action(ActionCode.ACTION_COMET_END, null);
-} else if (!error && read && request.getAvailable()) {
+} else if (!error && read && request.isReadable()) {
 // If this was a read and not all bytes have been read, or 
if no data
 // was read from the connector, then it is an error
 error = true;
@@ -292,7 +292,7 @@
 
 if (request.isComet()) {
 if (!response.isClosed() && !response.isError()) {
-if (request.getAvailable()) {
+if (request.isReadable()) {
 // Invoke a read event right away if there are 
available bytes
 if (event(req, res, SocketStatus.OPEN_READ)) {
 comet = true;

Modified: tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java?view=diff&rev=542586&r1=542585&r2=542586
==
--- tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java Tue May 
29 09:46:23 2007
@@ -323,6 +323,14 @@
 
 }
 
+
+/**
+ * Return the amount of bytes written by the lower layer.
+ */
+protected int lastWrite() {
+return coyoteResponse.getLastWrite();
+}
+
 
 // - Bytes Handling Methods
 

Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?view=diff&rev=542586&r1=542585&r2=542586
==
--- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Tue May 29 
09:46:23 2007
@@ -2252,7 +2252,7 @@
 /**
  * Return true if bytes are available.
  */
-public boolean getAvailable() {
+public boolean isReadable() {
 return (inputBuffer.available() > 0);
 }
 

Modified: tomcat/trunk/java/org/apache/catalina/connector/Response.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Response.java?view=diff&rev=542586&r1=542585&r2=542586
==
--- tomcat/trunk/java/org/apache/catalina/connector/Response.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Response.java Tue May 29 
09:46:23 2007
@@ -529,6 +529,14 @@
 }
 
 
+/**
+ * Return true if bytes are available.
+ */
+public boolean isWriteable() {
+return (outputBuffer.lastWrite() > 0);
+}
+
+
 //  ServletResponse Methods
 
 

Modified: tomcat/trunk/java/org/apache/coyote/Response.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/Response.java?view=diff&rev=542586&r1=542585&r2=542586
==
--- tomcat/trunk/java/org/apache/coyote/Response.java (original)
+++ tomcat/trunk/java/org/apache/coyote/Response.java Tue May 29 09:46:23 2007
@@ -124,6 +124,8 @@
 
 protected Request req;
 
+protected int lastWrite = 1;
+
 // - Properties
 
 public Request getRequest() {
@@ -188,6 +190,16 @@
 //  State 
 
 
+public int getLastWrite() {
+return lastWrite;
+}
+
+
+public void setLastWrite(int lastWrite) {
+this.lastWrite = lastWrite;
+}
+
+
 public int g

svn commit: r542589 - /tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java

2007-05-29 Thread fhanik
Author: fhanik
Date: Tue May 29 09:54:27 2007
New Revision: 542589

URL: http://svn.apache.org/viewvc?view=rev&rev=542589
Log:
simplify isreadable and iswriteable

Modified:
tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java?view=diff&rev=542589&r1=542588&r2=542589
==
--- tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java Tue May 
29 09:54:27 2007
@@ -84,9 +84,6 @@
 
 private static final Object threadCheckHolder = new Object();
 
-protected boolean readable = false;
-
-protected boolean writeable = false;
 // - Public Methods
 
 /**
@@ -139,19 +136,10 @@
 }
 
 public boolean isReadable() {
-return readable;
-}
-
-public void setReadable(boolean r) {
-this.readable = r;
-}
-
+return request.isReadable();
+}
 public boolean isWriteable() {
-return writeable;
-}
-
-public void setWriteable(boolean w) {
-this.writeable = w;
+return response.isWriteable();
 }
 
 public void configure(CometEvent.CometConfiguration... options)



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



DO NOT REPLY [Bug 42542] New: - The original request method is forwarded to the error page dispatcher

2007-05-29 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

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

   Summary: The original request method is forwarded to the error
page dispatcher
   Product: Tomcat 5
   Version: 5.5.20
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


When the servlet returns for example the status code 403 for the PROPFIND method
and when an error page is configured it, which is served up by another servlet,
then the request is dispatched to that other servlet with the PROPFIND method
instead of GET. If that servlet doesn't support PROPFIND, which is evident, then
a 501 status code is returned instead.

This happens at line 363 of org.apache.catalina.core.StandardHostValve.java.

-- 
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 42542] - The original request method is forwarded to the error page dispatcher

2007-05-29 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

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





--- Additional Comments From [EMAIL PROTECTED]  2007-05-29 10:38 ---
Another possibility is that the chosen dispatcher is wrong. The specification
says that the path in the deployment descriptor is a resource in the WAR file,
so an error page can never be handled by a servlet, even if there is one with a
matching mapping.

-- 
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: r542600 - in /tomcat/trunk/java/org/apache: catalina/CometEvent.java coyote/http11/Http11NioProcessor.java

2007-05-29 Thread fhanik
Author: fhanik
Date: Tue May 29 10:52:36 2007
New Revision: 542600

URL: http://svn.apache.org/viewvc?view=rev&rev=542600
Log:
Blocking and non blocking is the only configuration option right now,
no need for the NO_IO option, as it can be controlled using the 
register/unregister options

Modified:
tomcat/trunk/java/org/apache/catalina/CometEvent.java
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java

Modified: tomcat/trunk/java/org/apache/catalina/CometEvent.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/CometEvent.java?view=diff&rev=542600&r1=542599&r2=542600
==
--- tomcat/trunk/java/org/apache/catalina/CometEvent.java (original)
+++ tomcat/trunk/java/org/apache/catalina/CometEvent.java Tue May 29 10:52:36 
2007
@@ -156,15 +156,15 @@
 
 
 /**
- * COMET_NON_BLOCKING
+ * COMET_NON_BLOCKING
  * Option bit set for allowing non blocking IO
- * when reading from the request or writing to the response
- * COMET_NO_IO
- * Option bit set to not register for any IO events
- * Connections can be reregistered for IO events using the 
+ * when reading from the request or writing to the response
+ * COMET_BLOCKING
+ * Configure the comet connection for blocking IO, this is the default 
setting
+ * 
  * @see #configure(int)
  */
-public enum CometConfiguration {COMET_NON_BLOCKING,COMET_NO_IO};
+public enum CometConfiguration {COMET_BLOCKING, COMET_NON_BLOCKING};
 
 /**
  * Configures the connection for desired IO options.

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?view=diff&rev=542600&r1=542599&r2=542600
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Tue May 
29 10:52:36 2007
@@ -1226,12 +1226,12 @@
 int interest = getPollerInterest(param);
 NioEndpoint.KeyAttachment attach = 
(NioEndpoint.KeyAttachment)socket.getAttachment(false);
 attach.setCometOps(attach.getCometOps()|interest);
-attach.getPoller().cometInterest(socket);
+//notify poller if not on a tomcat thread
 } else if (actionCode == ActionCode.ACTION_COMET_UNREGISTER) {
 int interest = getPollerInterest(param);
 NioEndpoint.KeyAttachment attach = 
(NioEndpoint.KeyAttachment)socket.getAttachment(false);
 attach.setCometOps(attach.getCometOps()& (~interest));
-attach.getPoller().cometInterest(socket);
+//notify poller if not on a tomcat thread
 } else if (actionCode == ActionCode.ACTION_COMET_CONFIGURE) {
 }
 



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



svn commit: r542603 - /tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java

2007-05-29 Thread fhanik
Author: fhanik
Date: Tue May 29 11:04:51 2007
New Revision: 542603

URL: http://svn.apache.org/viewvc?view=rev&rev=542603
Log:
only notify the poller if it is done async, otherwise we don't need to, it will 
be done at the end of the request

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?view=diff&rev=542603&r1=542602&r2=542603
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Tue May 
29 11:04:51 2007
@@ -1227,11 +1227,17 @@
 NioEndpoint.KeyAttachment attach = 
(NioEndpoint.KeyAttachment)socket.getAttachment(false);
 attach.setCometOps(attach.getCometOps()|interest);
 //notify poller if not on a tomcat thread
+RequestInfo rp = request.getRequestProcessor();
+if ( rp.getStage() != org.apache.coyote.Constants.STAGE_SERVICE )
+socket.getPoller().cometInterest(socket);
 } else if (actionCode == ActionCode.ACTION_COMET_UNREGISTER) {
 int interest = getPollerInterest(param);
 NioEndpoint.KeyAttachment attach = 
(NioEndpoint.KeyAttachment)socket.getAttachment(false);
 attach.setCometOps(attach.getCometOps()& (~interest));
 //notify poller if not on a tomcat thread
+RequestInfo rp = request.getRequestProcessor();
+if ( rp.getStage() != org.apache.coyote.Constants.STAGE_SERVICE )
+socket.getPoller().cometInterest(socket);
 } else if (actionCode == ActionCode.ACTION_COMET_CONFIGURE) {
 }
 



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



svn commit: r542618 - /tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

2007-05-29 Thread fhanik
Author: fhanik
Date: Tue May 29 11:41:07 2007
New Revision: 542618

URL: http://svn.apache.org/viewvc?view=rev&rev=542618
Log:
implement comet operation notification

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?view=diff&rev=542618&r1=542617&r2=542618
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Tue May 29 
11:41:07 2007
@@ -1239,6 +1239,13 @@
 if (key != null) {
 final KeyAttachment att = (KeyAttachment) 
key.attachment();
 if ( att!=null ) {
+//handle callback flag
+if (att.getComet() && (interestOps & OP_CALLBACK) 
== OP_CALLBACK ) {
+att.setCometNotify(true);
+} else {
+att.setCometNotify(false);
+}
+interestOps = (interestOps & 
(~OP_CALLBACK));//remove the callback flag
 att.access();//to prevent timeout
 //we are registering the key to start with, reset 
the fairness counter.
 att.interestOps(interestOps);
@@ -1315,7 +1322,8 @@
 }
 
 public void cometInterest(NioChannel socket) {
-throw new UnsupportedOperationException();
+KeyAttachment att = (KeyAttachment)socket.getAttachment(false);
+add(socket,att.getCometOps());
 }
 
 public void wakeup() {
@@ -1644,6 +1652,9 @@
 readLatch = null;
 if ( writeLatch!=null ) try {for (int i=0; 
i<(int)writeLatch.getCount();i++) writeLatch.countDown();}catch (Exception 
ignore){}
 writeLatch = null;
+cometNotify = false;
+cometOps = 0;
+sendfileData = null;
 }
 
 public void reset() {
@@ -1657,11 +1668,12 @@
 public void access(long access) { lastAccess = access; }
 public void setComet(boolean comet) { this.comet = comet; }
 public boolean getComet() { return comet; }
+public void setCometNotify(boolean notify) { this.cometNotify = 
notify; }
+public boolean getCometNotify() { return cometNotify; }
 public void setCometOps(int ops) { this.cometOps = ops; }
 public int getCometOps() { return cometOps; }
 public boolean getCurrentAccess() { return currentAccess; }
 public void setCurrentAccess(boolean access) { currentAccess = access; 
}
-public Object getMutex() {return mutex;}
 public void setTimeout(long timeout) {this.timeout = timeout;}
 public long getTimeout() {return this.timeout;}
 public boolean getError() { return error; }
@@ -1704,11 +1716,11 @@
 public void setSendfileData(SendfileData sf) { this.sendfileData = sf;}
 public SendfileData getSendfileData() { return this.sendfileData;}
 
-protected Object mutex = new Object();
 protected long lastAccess = -1;
 protected boolean currentAccess = false;
 protected boolean comet = false;
 protected int cometOps = 0;
+protected boolean cometNotify = false;
 protected long timeout = -1;
 protected boolean error = false;
 protected NioChannel channel = null;



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



svn commit: r542644 - in /tomcat/trunk/java/org/apache: coyote/http11/Http11NioProcessor.java coyote/http11/Http11NioProtocol.java tomcat/util/net/NioBlockingSelector.java tomcat/util/net/NioEndpoint.

2007-05-29 Thread fhanik
Author: fhanik
Date: Tue May 29 13:26:49 2007
New Revision: 542644

URL: http://svn.apache.org/viewvc?view=rev&rev=542644
Log:
Make the new way of handling processors work with the ability to read headers 
in a non blocking way

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?view=diff&rev=542644&r1=542643&r2=542644
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Tue May 
29 13:26:49 2007
@@ -955,7 +955,8 @@
 }
 } else {
 if ( recycle ) recycle();
-return (openSocket) ? SocketState.OPEN : SocketState.CLOSED;
+//return (openSocket) ? (SocketState.OPEN) : SocketState.CLOSED;
+return (openSocket) ? (recycle?SocketState.OPEN:SocketState.LONG) 
: SocketState.CLOSED;
 }
 
 }

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java?view=diff&rev=542644&r1=542643&r2=542644
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java Tue May 
29 13:26:49 2007
@@ -622,6 +622,14 @@
 public void releaseCaches() {
 recycledProcessors.clear();
 }
+
+public void release(NioChannel socket) {
+Http11NioProcessor result = connections.remove(socket);
+if ( result != null ) {
+result.recycle();
+recycledProcessors.offer(result);
+}
+}
 
 public SocketState event(NioChannel socket, SocketStatus status) {
 Http11NioProcessor result = connections.get(socket);
@@ -672,6 +680,8 @@
 public SocketState process(NioChannel socket) {
 Http11NioProcessor processor = null;
 try {
+processor = connections.remove(socket);
+
 if (processor == null) {
 processor = recycledProcessors.poll();
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java?view=diff&rev=542644&r1=542643&r2=542644
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java Tue 
May 29 13:26:49 2007
@@ -99,7 +99,7 @@
 socket.getPoller().addEvent(
 new Runnable() {
 public void run() {
-key.cancel();
+socket.getPoller().cancelledKey(key,SocketStatus.ERROR,false);
 }
 });
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?view=diff&rev=542644&r1=542643&r2=542644
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Tue May 29 
13:26:49 2007
@@ -1393,6 +1393,7 @@
 processSocket(ka.getChannel(), status, false);//don't 
dispatch if the lines below are cancelling the key
 if (status == SocketStatus.TIMEOUT ) return; // don't 
close on comet timeout
 }
+handler.release(ka.getChannel());
 if (key.isValid()) key.cancel();
 if (key.channel().isOpen()) try {key.channel().close();}catch 
(Exception ignore){}
 try {ka.channel.close(true);}catch (Exception ignore){}
@@ -1922,6 +1923,7 @@
 public SocketState process(NioChannel socket);
 public SocketState event(NioChannel socket, SocketStatus status);
 public void releaseCaches();
+public void release(NioChannel socket);
 }
 
 



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



svn commit: r542645 - in /tomcat/tc6.0.x/trunk: java/org/apache/coyote/http11/ test/org/apache/catalina/tribes/test/channel/ test/org/apache/catalina/tribes/test/interceptors/ webapps/docs/config/

2007-05-29 Thread fhanik
Author: fhanik
Date: Tue May 29 13:41:53 2007
New Revision: 542645

URL: http://svn.apache.org/viewvc?view=rev&rev=542645
Log:
Remove the non blocking handling of the request, doesn't work well with the new 
non thread local processor handling

Modified:

tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java

tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/channel/ChannelStartStop.java

tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/interceptors/TestOrderInterceptor.java
tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java?view=diff&rev=542645&r1=542644&r2=542645
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java 
(original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java 
Tue May 29 13:41:53 2007
@@ -422,11 +422,11 @@
 return false;
 }
 if (readTimeout == -1) {
-if (!fill(false,false)) //request line parsing
+if (!fill(false,true)) //request line parsing
 return false;
 } else {
 // Do a simple read with a short timeout
-if ( !readSocket(true, false) ) return false;
+if ( !readSocket(true, true) ) return false;
 }
 }
 
@@ -441,7 +441,7 @@
 
 // Read new bytes if needed
 if (pos >= lastValid) {
-if (!fill(true,false)) //request line parsing
+if (!fill(true,true)) //request line parsing
 return false;
 }
 
@@ -470,7 +470,7 @@
 
 // Read new bytes if needed
 if (pos >= lastValid) {
-if (!fill(true,false)) //request line parsing
+if (!fill(true,true)) //request line parsing
 return false;
 }
 
@@ -514,7 +514,7 @@
 
 // Read new bytes if needed
 if (pos >= lastValid) {
-if (!fill(true,false)) //reques line parsing
+if (!fill(true,true)) //reques line parsing
 return false;
 }
 
@@ -626,7 +626,7 @@
 
 // Read new bytes if needed
 if (pos >= lastValid) {
-if (!fill(true,false)) {//parse header 
+if (!fill(true,true)) {//parse header 
 headerParsePos = HeaderParsePosition.HEADER_START;
 return HeaderParseStatus.NEED_MORE_DATA;
 }
@@ -664,7 +664,7 @@
 
 // Read new bytes if needed
 if (pos >= lastValid) {
-if (!fill(true,false)) { //parse header 
+if (!fill(true,true)) { //parse header 
 return HeaderParseStatus.NEED_MORE_DATA;
 }
 }
@@ -704,7 +704,7 @@
 
 // Read new bytes if needed
 if (pos >= lastValid) {
-if (!fill(true,false)) {//parse header 
+if (!fill(true,true)) {//parse header 
 //HEADER_VALUE, should already be set
 return HeaderParseStatus.NEED_MORE_DATA;
 }
@@ -725,7 +725,7 @@
 
 // Read new bytes if needed
 if (pos >= lastValid) {
-if (!fill(true,false)) {//parse header 
+if (!fill(true,true)) {//parse header 
 //HEADER_VALUE
 return HeaderParseStatus.NEED_MORE_DATA;
 }
@@ -756,7 +756,7 @@
 }
 // Read new bytes if needed
 if (pos >= lastValid) {
-if (!fill(true,false)) {//parse header
+if (!fill(true,true)) {//parse header
 
 //HEADER_MULTI_LINE
 return HeaderParseStatus.NEED_MORE_DATA;

Modified: 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/channel/ChannelStartStop.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/channel/ChannelStartStop.java?view=diff&rev=542645&r1=542644&r2=542645
==
--- 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/channel/ChannelStartStop.java
 (original)
+++ 
tomcat/tc6.0.x/trunk/test/org/apache/catalina/tribes/test/channel/ChannelStartStop.java
 Tue May 29 13:41:53 2007
@@ -17,6 +17,7 @@
 
 import org.apache.catalina.tribes.group.GroupChannel;
 import junit.framework.TestCase;
+import org.apache.catalina.tribes.transport.Receiver

DO NOT REPLY [Bug 42532] - HttpServlerResponse encodeURL handles some HTML Entities incorrectly

2007-05-29 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

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


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2007-05-29 13:49 ---
An unencoded # in a URL means the begining of the anchor tag.  
The ;jsessionid= must go before the anchor tag to be sent back to Tomcat.

-- 
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: r542649 - /tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java

2007-05-29 Thread fhanik
Author: fhanik
Date: Tue May 29 13:52:25 2007
New Revision: 542649

URL: http://svn.apache.org/viewvc?view=rev&rev=542649
Log:
The protocol class will register the socket with the poller for another read 
event

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?view=diff&rev=542649&r1=542648&r2=542649
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Tue May 
29 13:52:25 2007
@@ -841,7 +841,6 @@
 keptAlive = true;
 if ( !inputBuffer.parseHeaders() ) {
 openSocket = true;
-socket.getPoller().add(socket);
 recycle = false;
 break;
 }



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



DO NOT REPLY [Bug 42532] - HttpServlerResponse encodeURL handles some HTML Entities incorrectly

2007-05-29 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

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


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |




--- Additional Comments From [EMAIL PROTECTED]  2007-05-29 14:11 ---
The # in the example I gave is not an anchor tag but a HTML entity representing
an _ (underscore)

So instead of 
localhost/px/to/home_wml/go.wml?page_id=12

the link appears as 

localhost/px/to/home_wml/go.wml?page_id=12

and so the # should not be interpreted as an anchor tag but as part of the HTML
entity for _ and should be ignored for the purposes of ;jsessionid insertion.



-- 
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: r542666 - in /tomcat/trunk/java/org/apache: coyote/http11/Http11NioProcessor.java coyote/http11/InternalNioInputBuffer.java tomcat/util/net/NioEndpoint.java

2007-05-29 Thread fhanik
Author: fhanik
Date: Tue May 29 14:53:52 2007
New Revision: 542666

URL: http://svn.apache.org/viewvc?view=rev&rev=542666
Log:
implement non blocking reading of the request line

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?view=diff&rev=542666&r1=542665&r2=542666
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Tue May 
29 14:53:52 2007
@@ -792,14 +792,6 @@
 RequestInfo rp = request.getRequestProcessor();
 rp.setStage(org.apache.coyote.Constants.STAGE_PARSE);
 
-// Set the remote address
-remoteAddr = null;
-remoteHost = null;
-localAddr = null;
-localName = null;
-remotePort = -1;
-localPort = -1;
-
 // Setting up the socket
 this.socket = socket;
 inputBuffer.setSocket(socket);
@@ -829,17 +821,17 @@
 
socket.getIOChannel().socket().setSoTimeout((int)soTimeout);
 inputBuffer.readTimeout = soTimeout;
 }
-if (!inputBuffer.parseRequestLine(keptAlive && 
(endpoint.getCurrentThreadsBusy() >= limit))) {
-// This means that no data is available right now
-// (long keepalive), so that the processor should be 
recycled
-// and the method should return true
+if (!inputBuffer.parseRequestLine(keptAlive)) {
+//no data available yet, since we might have read part
+//of the request line, we can't recycle the processor
 openSocket = true;
-// Add the socket to the poller
-socket.getPoller().add(socket);
+recycle = false;
 break;
 }
 keptAlive = true;
 if ( !inputBuffer.parseHeaders() ) {
+//we've read part of the request, don't recycle it
+//instead associate it with the socket
 openSocket = true;
 recycle = false;
 break;
@@ -992,6 +984,12 @@
 this.socket = null;
 this.cometClose = false;
 this.comet = false;
+remoteAddr = null;
+remoteHost = null;
+localAddr = null;
+localName = null;
+remotePort = -1;
+localPort = -1;
 }
 
 

Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java?view=diff&rev=542666&r1=542665&r2=542666
==
--- tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Tue 
May 29 14:53:52 2007
@@ -72,6 +72,9 @@
 
 parsingHeader = true;
 parsingRequestLine = true;
+parsingRequestLinePhase = 0;
+parsingRequestLineEol = false;
+parsingRequestLineStart = 0;
 headerParsePos = HeaderParsePosition.HEADER_START;
 headerData.recycle();
 swallowInput = true;
@@ -115,6 +118,9 @@
  */
 protected boolean parsingHeader;
 protected boolean parsingRequestLine;
+protected int parsingRequestLinePhase = 0;
+protected boolean parsingRequestLineEol = false;
+protected int parsingRequestLineStart = 0;
 protected HeaderParsePosition headerParsePos;
 
 
@@ -305,6 +311,9 @@
 parsingHeader = true;
 headerParsePos = HeaderParsePosition.HEADER_START;
 parsingRequestLine = true;
+parsingRequestLinePhase = 0;
+parsingRequestLineEol = false;
+parsingRequestLineStart = 0;
 headerData.recycle();
 swallowInput = true;
 
@@ -346,6 +355,9 @@
 parsingHeader = true;
 headerParsePos = HeaderParsePosition.HEADER_START;
 parsingRequestLine = true;
+parsingRequestLinePhase = 0;
+parsingRequestLineEol = false;
+parsingRequestLineStart = 0;
 headerData.recycle();
 swallowInput = true;
 
@@ -384,160 +396,148 @@
 
 //check state
 if ( !parsingRequestLine ) return true;
-
-int start = 0;
-
 //
 // Skipping blank lines
 //
-
-byte chr = 0;
-do {
-
-// Read new bytes if needed
+if ( parsingRequestLinePhase == 0 ) 

svn commit: r542671 - /tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java

2007-05-29 Thread fhanik
Author: fhanik
Date: Tue May 29 15:04:24 2007
New Revision: 542671

URL: http://svn.apache.org/viewvc?view=rev&rev=542671
Log:
question mark has to be a global variable

Modified:
tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java?view=diff&rev=542671&r1=542670&r2=542671
==
--- tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Tue 
May 29 15:04:24 2007
@@ -75,6 +75,7 @@
 parsingRequestLinePhase = 0;
 parsingRequestLineEol = false;
 parsingRequestLineStart = 0;
+parsingRequestLineQPos = -1;
 headerParsePos = HeaderParsePosition.HEADER_START;
 headerData.recycle();
 swallowInput = true;
@@ -121,6 +122,7 @@
 protected int parsingRequestLinePhase = 0;
 protected boolean parsingRequestLineEol = false;
 protected int parsingRequestLineStart = 0;
+protected int parsingRequestLineQPos = -1;
 protected HeaderParsePosition headerParsePos;
 
 
@@ -314,6 +316,7 @@
 parsingRequestLinePhase = 0;
 parsingRequestLineEol = false;
 parsingRequestLineStart = 0;
+parsingRequestLineQPos = -1;
 headerData.recycle();
 swallowInput = true;
 
@@ -358,6 +361,7 @@
 parsingRequestLinePhase = 0;
 parsingRequestLineEol = false;
 parsingRequestLineStart = 0;
+parsingRequestLineQPos = -1;
 headerData.recycle();
 swallowInput = true;
 
@@ -464,7 +468,6 @@
 // Mark the current buffer position
 
 int end = 0;
-int questionPos = -1;
 //
 // Reading the URI
 //
@@ -485,16 +488,16 @@
 space = true;
 end = pos;
 } else if ((buf[pos] == Constants.QUESTION) 
-   && (questionPos == -1)) {
-questionPos = pos;
+   && (parsingRequestLineQPos == -1)) {
+parsingRequestLineQPos = pos;
 }
 pos++;
 }
 request.unparsedURI().setBytes(buf, parsingRequestLineStart, end - 
parsingRequestLineStart);
-if (questionPos >= 0) {
-request.queryString().setBytes(buf, questionPos + 1, 
-   end - questionPos - 1);
-request.requestURI().setBytes(buf, parsingRequestLineStart, 
questionPos - parsingRequestLineStart);
+if (parsingRequestLineQPos >= 0) {
+request.queryString().setBytes(buf, parsingRequestLineQPos + 
1, 
+   end - parsingRequestLineQPos - 
1);
+request.requestURI().setBytes(buf, parsingRequestLineStart, 
parsingRequestLineQPos - parsingRequestLineStart);
 } else {
 request.requestURI().setBytes(buf, parsingRequestLineStart, 
end - parsingRequestLineStart);
 }



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



svn commit: r542673 - /tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java

2007-05-29 Thread fhanik
Author: fhanik
Date: Tue May 29 15:08:19 2007
New Revision: 542673

URL: http://svn.apache.org/viewvc?view=rev&rev=542673
Log:
added in some comments

Modified:
tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java?view=diff&rev=542673&r1=542672&r2=542673
==
--- tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Tue 
May 29 15:08:19 2007
@@ -115,7 +115,8 @@
 
 
 /**
- * State.
+ * Parsing state - used for non blocking parsing so that
+ * when more data arrives, we can pick up where we left off.
  */
 protected boolean parsingHeader;
 protected boolean parsingRequestLine;



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



svn commit: r542674 - /tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java

2007-05-29 Thread fhanik
Author: fhanik
Date: Tue May 29 15:13:26 2007
New Revision: 542674

URL: http://svn.apache.org/viewvc?view=rev&rev=542674
Log:
When using a comet connection, register the requested operations instead of the 
default read

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java?view=diff&rev=542674&r1=542673&r2=542674
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java Tue May 
29 15:13:26 2007
@@ -670,7 +670,8 @@
 } else {
 if (log.isDebugEnabled()) log.debug("Keeping 
processor["+result);
 //add correct poller events here based on Comet stuff
-socket.getPoller().add(socket);
+NioEndpoint.KeyAttachment att = 
(NioEndpoint.KeyAttachment)socket.getAttachment(false);
+socket.getPoller().add(socket,att.getCometOps());
 }
 }
 }
@@ -711,7 +712,12 @@
 // processor.
 if (log.isDebugEnabled()) log.debug("Not recycling 
["+processor+"] 
Comet="+((NioEndpoint.KeyAttachment)socket.getAttachment(false)).getComet());
 connections.put(socket, processor);
-socket.getPoller().add(socket);
+if (processor.comet) {
+NioEndpoint.KeyAttachment att = 
(NioEndpoint.KeyAttachment)socket.getAttachment(false);
+socket.getPoller().add(socket,att.getCometOps());
+} else {
+socket.getPoller().add(socket);
+}
 } else {
 recycledProcessors.offer(processor);
 }



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



svn commit: r542678 - /tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java

2007-05-29 Thread fhanik
Author: fhanik
Date: Tue May 29 15:23:36 2007
New Revision: 542678

URL: http://svn.apache.org/viewvc?view=rev&rev=542678
Log:
setup default operation

Modified:
tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java?view=diff&rev=542678&r1=542677&r2=542678
==
--- tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java Tue May 
29 15:23:36 2007
@@ -41,6 +41,11 @@
 public CometEventImpl(Request request, Response response) {
 this.request = request;
 this.response = response;
+try {
+this.register(CometOperation.OP_READ);
+}catch ( IOException x ) {
+throw new IllegalStateException(x.getMessage(),x);
+}
 }
 
 



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



Re: svn commit: r542678 - /tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java

2007-05-29 Thread Remy Maucherat

[EMAIL PROTECTED] wrote:

Author: fhanik
Date: Tue May 29 15:23:36 2007
New Revision: 542678

URL: http://svn.apache.org/viewvc?view=rev&rev=542678
Log:
setup default operation

Modified:
tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java?view=diff&rev=542678&r1=542677&r2=542678
==
--- tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CometEventImpl.java Tue May 
29 15:23:36 2007
@@ -41,6 +41,11 @@
 public CometEventImpl(Request request, Response response) {
 this.request = request;
 this.response = response;
+try {
+this.register(CometOperation.OP_READ);
+}catch ( IOException x ) {
+throw new IllegalStateException(x.getMessage(),x);
+}
 }


To keep with the proper commit handling procedures of the ASF, I think I 
have to veto all these changes, so that they are not considered as 
having been accepted inside an official branch. They have to be 
considered a proposal (even though the branch they live in sounds 
official), but of course, no need to revert them.


Rémy

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



svn commit: r542701 - in /tomcat/sandbox/comet/java/org/apache: catalina/connector/CometEventImpl.java coyote/http11/Http11AprProcessor.java coyote/http11/Http11AprProtocol.java tomcat/util/net/AprEnd

2007-05-29 Thread remm
Author: remm
Date: Tue May 29 17:17:11 2007
New Revision: 542701

URL: http://svn.apache.org/viewvc?view=rev&rev=542701
Log:
- More plumbing code. So far, the API looks fine to expose the needed 
functionality.

Modified:
tomcat/sandbox/comet/java/org/apache/catalina/connector/CometEventImpl.java
tomcat/sandbox/comet/java/org/apache/coyote/http11/Http11AprProcessor.java
tomcat/sandbox/comet/java/org/apache/coyote/http11/Http11AprProtocol.java
tomcat/sandbox/comet/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: 
tomcat/sandbox/comet/java/org/apache/catalina/connector/CometEventImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/comet/java/org/apache/catalina/connector/CometEventImpl.java?view=diff&rev=542701&r1=542700&r2=542701
==
--- tomcat/sandbox/comet/java/org/apache/catalina/connector/CometEventImpl.java 
(original)
+++ tomcat/sandbox/comet/java/org/apache/catalina/connector/CometEventImpl.java 
Tue May 29 17:17:11 2007
@@ -19,14 +19,12 @@
 package org.apache.catalina.connector;
 
 import java.io.IOException;
-import java.util.HashSet;
-import javax.servlet.ServletException;
+
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.catalina.CometEvent;
 import org.apache.catalina.util.StringManager;
-import org.apache.coyote.ActionCode;
 
 public class CometEventImpl implements CometEvent {
 
@@ -132,7 +130,7 @@
  *may be requested by using the sendNotify method
  */
 public void configure(boolean read, boolean write) {
-
+request.configure(read, write);
 }
 
 /**
@@ -143,7 +141,7 @@
  *will be sent to the servlet
  */
 public void callback(boolean write) {
-
+request.callback(write);
 }
 
 public String toString() {

Modified: 
tomcat/sandbox/comet/java/org/apache/coyote/http11/Http11AprProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/comet/java/org/apache/coyote/http11/Http11AprProcessor.java?view=diff&rev=542701&r1=542700&r2=542701
==
--- tomcat/sandbox/comet/java/org/apache/coyote/http11/Http11AprProcessor.java 
(original)
+++ tomcat/sandbox/comet/java/org/apache/coyote/http11/Http11AprProcessor.java 
Tue May 29 17:17:11 2007
@@ -317,9 +317,29 @@
  */
 protected String server = null;
 
+
+protected int cometTimeout = -1;
+protected boolean readNotifications = true;
+protected boolean writeNotifications = false;
+
 
 // - Properties
 
+
+public boolean getReadNotifications() {
+return readNotifications;
+}
+
+
+public boolean getWriteNotifications() {
+return readNotifications;
+}
+
+
+public int getCometTimeout() {
+return cometTimeout;
+}
+
 
 /**
  * Return compression level.
@@ -686,8 +706,8 @@
 /**
  * Set the upload timeout.
  */
-public void setTimeout( int timeouts ) {
-timeout = timeouts ;
+public void setTimeout(int timeout) {
+this.timeout = timeout;
 }
 
 /**
@@ -1199,6 +1219,15 @@
 comet = true;
 } else if (actionCode == ActionCode.ACTION_COMET_END) {
 comet = false;
+} else if (actionCode == ActionCode.ACTION_COMET_READ_NOTIFICATIONS) {
+readNotifications = ((Boolean) param).booleanValue();
+} else if (actionCode == ActionCode.ACTION_COMET_WRITE_NOTIFICATIONS) {
+writeNotifications = ((Boolean) param).booleanValue();
+// FIXME: If true, should switch to non blocking mode for the 
socket
+} else if (actionCode == ActionCode.ACTION_COMET_CALLBACK) {
+endpoint.getCometPoller().add(socket, timeout, false, ((Boolean) 
param).booleanValue());
+} else if (actionCode == ActionCode.ACTION_COMET_TIMEOUT) {
+cometTimeout = ((Integer) param).intValue();
 }
 
 }

Modified: 
tomcat/sandbox/comet/java/org/apache/coyote/http11/Http11AprProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/comet/java/org/apache/coyote/http11/Http11AprProtocol.java?view=diff&rev=542701&r1=542700&r2=542701
==
--- tomcat/sandbox/comet/java/org/apache/coyote/http11/Http11AprProtocol.java 
(original)
+++ tomcat/sandbox/comet/java/org/apache/coyote/http11/Http11AprProtocol.java 
Tue May 29 17:17:11 2007
@@ -563,7 +563,8 @@
 proto.endpoint.getPoller().add(socket);
 }
 } else {
-proto.endpoint.getCometPoller().add(socket);
+proto.endpoint.getCometPoller().add(socket, 
result.getCometTimeout(), 
+result.getReadN

DO NOT REPLY [Bug 42532] - HttpServlerResponse encodeURL handles some HTML Entities incorrectly

2007-05-29 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

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


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2007-05-29 17:18 ---
HTML entity encoding is not a valid encoding for a url.

-- 
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 42542] - The original request method is forwarded to the error page dispatcher

2007-05-29 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

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


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2007-05-29 20:15 ---
Please see SRV.9.9.1

-- 
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 42254] - ANT script to precompile jsp file fails

2007-05-29 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

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


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2007-05-29 20:30 ---
Please do not submit multiple bugs in the same report.

1. As expected. Read up on the Ant taskdef element to find out why your
classpath element doesn't do what you think it does.

2. Duplicate of 35114.

Closing this as INVALID, based on issue 1.

-- 
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 42343] - Posted parameters are not available

2007-05-29 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

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





--- Additional Comments From [EMAIL PROTECTED]  2007-05-29 20:56 ---
Interesting approach... What if the URL I am trying to filter doesn't correspond
to a file, directory, or even a servlet mapping?

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



How to get the hostname from servlet context

2007-05-29 Thread ooper01

Wondering how to programatically get the hostname that is in server.xml. I
suspect it is loaded into some object when Tomcat starts up, but I'm not
sure how to access it. What I want is the defaultHost attribute of the
Engine element.

I have the ServletContext object and in the debugger (Eclipse) it says that
servletContext is an ApplicationContextFacade object, but if I cast it as
that type of object, I get the error mentioned above.

I can see the hostname in the debugger variables by opening the
servletContext object, opening its context variable which is a
StandardContext object, then inside that is the hostname variable, but not
sure how to access it.

Ideas?

Thanks,
Brian Barnett
-- 
View this message in context: 
http://www.nabble.com/How-to-get-the-hostname-from-servlet-context-tf3838345.html#a10867804
Sent from the Tomcat - Dev mailing list archive at Nabble.com.


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