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

2011-01-25 Thread markt
Author: markt
Date: Tue Jan 25 12:05:14 2011
New Revision: 1063244

URL: http://svn.apache.org/viewvc?rev=1063244&view=rev
Log:
Remove old, commented out code

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?rev=1063244&r1=1063243&r2=1063244&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Tue Jan 25 
12:05:14 2011
@@ -1008,22 +1008,21 @@ public class NioEndpoint extends Abstrac
 
 public boolean events() {
 boolean result = false;
-//synchronized (events) {
-Runnable r = null;
-result = (events.size() > 0);
-while ( (r = events.poll()) != null ) {
-try {
-r.run();
-if ( r instanceof PollerEvent ) {
-((PollerEvent)r).reset();
-eventCache.offer((PollerEvent)r);
-}
-} catch ( Throwable x ) {
-log.error("",x);
+
+Runnable r = null;
+result = (events.size() > 0);
+while ( (r = events.poll()) != null ) {
+try {
+r.run();
+if ( r instanceof PollerEvent ) {
+((PollerEvent)r).reset();
+eventCache.offer((PollerEvent)r);
 }
+} catch ( Throwable x ) {
+log.error("",x);
 }
-//events.clear();
-//}
+}
+
 return result;
 }
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50646] New: Tribes ByteMessage will get corrupted if message size exceeds the underlying buffer size

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50646

   Summary: Tribes ByteMessage will get corrupted if message size
exceeds the underlying buffer size
   Product: Tomcat 7
   Version: 7.0.6
  Platform: PC
OS/Version: All
Status: NEW
  Keywords: PatchAvailable
  Severity: major
  Priority: P2
 Component: Cluster
AssignedTo: dev@tomcat.apache.org
ReportedBy: ocos...@zenprise.com


The Tribes ByteMessage class is used to transfer byte payloads in the context
of the tribes communication framework.

Due to how the message is deserialized, there will be data loss (and hence
corruption) if the message size exceeds the underlying buffer size.

The solution is to replace an ObjectInput#read(byte[]) call by
ObjectInput#readFully(byte[]).

Fix is attached.

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50646] Tribes ByteMessage will get corrupted if message size exceeds the underlying buffer size

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50646

--- Comment #1 from Olivier Costet  2011-01-25 07:09:27 
EST ---
Created an attachment (id=26544)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26544)
svn diff

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1063257 - in /tomcat: tc6.0.x/trunk/webapps/docs/config/manager.xml trunk/webapps/docs/config/manager.xml

2011-01-25 Thread kkolinko
Author: kkolinko
Date: Tue Jan 25 12:40:38 2011
New Revision: 1063257

URL: http://svn.apache.org/viewvc?rev=1063257&view=rev
Log:
Clarify what the units are when setting sessionIdLength property of a Manager. 
It was asked on users@
CTR: docs

Modified:
tomcat/tc6.0.x/trunk/webapps/docs/config/manager.xml
tomcat/trunk/webapps/docs/config/manager.xml

Modified: tomcat/tc6.0.x/trunk/webapps/docs/config/manager.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/config/manager.xml?rev=1063257&r1=1063256&r2=1063257&view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/config/manager.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/config/manager.xml Tue Jan 25 12:40:38 
2011
@@ -155,8 +155,9 @@
   
 
   
-   The length of session ids created by this Manager, excluding any
-JVM route information used for load balancing. 
+   The length of session ids created by this Manager, measured in bytes,
+excluding subsequent conversion to a hexadecimal string and
+excluding any JVM route information used for load balancing.
 The default is 16.
   
 
@@ -268,8 +269,9 @@
   
 
   
-The length of session ids created by this Manager, excluding any
-JVM route information used for load balancing. 
+   The length of session ids created by this Manager, measured in bytes,
+excluding subsequent conversion to a hexadecimal string and
+excluding any JVM route information used for load balancing.
 The default is 16.
   
 

Modified: tomcat/trunk/webapps/docs/config/manager.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/manager.xml?rev=1063257&r1=1063256&r2=1063257&view=diff
==
--- tomcat/trunk/webapps/docs/config/manager.xml (original)
+++ tomcat/trunk/webapps/docs/config/manager.xml Tue Jan 25 12:40:38 2011
@@ -161,8 +161,9 @@
   
 
   
-   The length of session ids created by this Manager, excluding any
-JVM route information used for load balancing. 
+   The length of session ids created by this Manager, measured in bytes,
+excluding subsequent conversion to a hexadecimal string and
+excluding any JVM route information used for load balancing.
 The default is 16.
   
 
@@ -256,8 +257,9 @@
   
 
   
-The length of session ids created by this Manager, excluding any
-JVM route information used for load balancing. 
+   The length of session ids created by this Manager, measured in bytes,
+excluding subsequent conversion to a hexadecimal string and
+excluding any JVM route information used for load balancing.
 The default is 16.
   
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Tomcat Wiki] Update of "SupportAndTraining" by Bhavik

2011-01-25 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "SupportAndTraining" page has been changed by Bhavik.
http://wiki.apache.org/tomcat/SupportAndTraining?action=diff&rev1=30&rev2=31

--

  
  !Intertech [[http://www.intertech.com|delivers training and consulting for 
Tomcat]] in our complete line-up of open source-related training and 
consulting.  For training, students can attend courses virtually, in-person at 
Intertech's facility, or we can come to your location.  
  
- 
+ [[http://www.jmatrix.in//|{{http://jmatrix.in/images/company.gif}}]]
+ Jmatrix provides technical support for tomcat customization and migration.
  === Example company name ===
  Use this example as a basis for your entry. New entries should be added just 
above this example.
  

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50648] New: RpcChannel improvements

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50648

   Summary: RpcChannel improvements
   Product: Tomcat 7
   Version: 7.0.6
  Platform: PC
OS/Version: Linux
Status: NEW
  Keywords: PatchAvailable
  Severity: enhancement
  Priority: P2
 Component: Cluster
AssignedTo: dev@tomcat.apache.org
ReportedBy: ocos...@zenprise.com


Created an attachment (id=26545)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26545)
svn diff

This enhancement proposal addresses three separate issues with the RpcChannel
tribes component.

1. There is a minor bug in a catch(InterruptedException) clause, in which a
call to Thread#interrupted() is made, as opposed to Thread#interrupt(), as it
should be.

2. The RpcChannel API user registers an RpcCallback to be notified of
communication events. However, there is no callback method for the case where
the sending of a response message fails. This proposal includes the addition of
a corresponding callback for such cases. To ensure backwards-compatibility, the
additional callback method has been declared in a sub-interface of RpcCallback,
named RpcCallback2 for the time being.

3. Since the tribes classes are loaded by the tomcat loader, if the messages
sent through tribes are instances of classes defined in the webapp, attemps to
deserialize them will fail. AbstractReplicatedMap includes a mechanism for the
API user to specify class loaders to be used when deserializing map entries.
This enhancement proposal includes a similar mechanism for the RpcChannel.

Please find the proposed modifications attached.

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50648] RpcChannel improvements

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50648

Olivier Costet  changed:

   What|Removed |Added

 CC||ocos...@zenprise.com

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50648] RpcChannel improvements

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50648

Olivier Costet  changed:

   What|Removed |Added

 OS/Version|Linux   |All

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50526] Clarify that JavaMail Session JNDI resource factory can accept any configuration attribute from JavaMail

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50526

Christopher Schultz  changed:

   What|Removed |Added

 Status|RESOLVED|VERIFIED

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50526] Clarify that JavaMail Session JNDI resource factory can accept any configuration attribute from JavaMail

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50526

Konstantin Kolinko  changed:

   What|Removed |Added

 Status|VERIFIED|CLOSED

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50650] New: Connector#setProperty(String, String) does not set explicit property values

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50650

   Summary: Connector#setProperty(String, String) does not set
explicit property values
   Product: Tomcat 6
   Version: 6.0.29
  Platform: All
Status: NEW
  Severity: critical
  Priority: P2
 Component: Connectors
AssignedTo: dev@tomcat.apache.org
ReportedBy: apa...@lonbinder.com


When calling the setProperty(String, String) method in Connector.java (line 316
in 6.0.29), the explicit property values are not set.

For instance, if I call connector.setProperty("proxyName", "my.host.com") then
check connector.getProxyName() it does not return "my.host.com".  I've also
tested "proxyPort" / getProxyPort -- same issue.

Looking at the code, setProperty sets replacements hashmap and the value in the
protocolhandler.  Individual explicit property setter methods, e.g.
setProxyName(String) set both the individual field value (this.proxyName) AND
invoke setProperty.

However, looking at the getters for the individual properties, shows they only
check the individual fields and not the replacements hashmap or the protocol
handler value.  Therefore the above series (call to setProperty("proxyName"...)
and then getProxyName()) fails.

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50650] Connector#setProperty(String, String) does not set explicit property values

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50650

Lon Binder  changed:

   What|Removed |Added

 CC||apa...@lonbinder.com
 OS/Version||All

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1063362 - in /tomcat/trunk: java/org/apache/catalina/connector/CoyoteAdapter.java webapps/docs/changelog.xml

2011-01-25 Thread markt
Author: markt
Date: Tue Jan 25 17:12:22 2011
New Revision: 1063362

URL: http://svn.apache.org/viewvc?rev=1063362&view=rev
Log:
Prevent multiple Comet END events

Modified:
tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/trunk/webapps/docs/changelog.xml

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?rev=1063362&r1=1063361&r2=1063362&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Tue Jan 
25 17:12:22 2011
@@ -28,6 +28,7 @@ import javax.servlet.SessionTrackingMode
 import org.apache.catalina.Context;
 import org.apache.catalina.Wrapper;
 import org.apache.catalina.comet.CometEvent;
+import org.apache.catalina.comet.CometEvent.EventType;
 import org.apache.catalina.core.ApplicationSessionCookieConfig;
 import org.apache.catalina.core.AsyncContextImpl;
 import org.apache.catalina.util.ServerInfo;
@@ -217,8 +218,9 @@ public class CoyoteAdapter implements Ad
 
connector.getService().getContainer().getPipeline().getFirst().event(request, 
response, request.getEvent());
 }
 if (response.isClosed() || !request.isComet()) {
-if (status==SocketStatus.OPEN) {
-//CometEvent.close was called during an event.
+if (status==SocketStatus.OPEN &&
+request.getEvent().getEventType() != EventType.END) {
+//CometEvent.close was called during an event other than 
END
 request.getEvent().setEventType(CometEvent.EventType.END);
 request.getEvent().setEventSubType(null);
 error = true;

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1063362&r1=1063361&r2=1063362&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Jan 25 17:12:22 2011
@@ -198,6 +198,10 @@
 for explicit additional arguments for the executable. Those were
 broken when implementing fix for bug 49657. (kkolinko)
   
+  
+Prvent multiple Comet END events if the CometServlet calls
+event.close() during an END event. (markt) 
+  
 
   
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1063364 - in /tomcat/trunk: java/org/apache/coyote/http11/InternalNioInputBuffer.java webapps/docs/changelog.xml

2011-01-25 Thread markt
Author: markt
Date: Tue Jan 25 17:15:33 2011
New Revision: 1063364

URL: http://svn.apache.org/viewvc?rev=1063364&view=rev
Log:
Ensure correct cycling if input filters

Modified:
tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java
tomcat/trunk/webapps/docs/changelog.xml

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?rev=1063364&r1=1063363&r2=1063364&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Tue 
Jan 25 17:15:33 2011
@@ -144,11 +144,12 @@ public class InternalNioInputBuffer exte
  */
 @Override
 public void recycle() {
-super.recycle();
 // Recycle filters
 for (int i = 0; i <= lastActiveFilter; i++) {
 activeFilters[i].recycle();
 }
+// This must be after filters since it resets the lastFilterIndex
+super.recycle();
 socket = null;
 headerParsePos = HeaderParsePosition.HEADER_START;
 parsingRequestLine = true;

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1063364&r1=1063363&r2=1063364&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Jan 25 17:15:33 2011
@@ -106,6 +106,14 @@
 Prevent possible thread exhaustion if a Comet timeout event takes a
 while to complete. (markt)
   
+  
+Prvent multiple Comet END events if the CometServlet calls
+event.close() during an END event. (markt) 
+  
+  
+Ensure correct recycling of NIO input filters when processing Comet
+events. (markt)
+  
 
   
   
@@ -198,10 +206,6 @@
 for explicit additional arguments for the executable. Those were
 broken when implementing fix for bug 49657. (kkolinko)
   
-  
-Prvent multiple Comet END events if the CometServlet calls
-event.close() during an END event. (markt) 
-  
 
   
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1063366 - in /tomcat/trunk: java/org/apache/coyote/http11/Http11NioProtocol.java java/org/apache/coyote/http11/LocalStrings.properties webapps/docs/changelog.xml

2011-01-25 Thread markt
Author: markt
Date: Tue Jan 25 17:20:20 2011
New Revision: 1063366

URL: http://svn.apache.org/viewvc?rev=1063366&view=rev
Log:
Fix various odd behaviours seen with a debugger. Observed both multiple and 
zero (rather than 1) selection events for a single data receive event

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties
tomcat/trunk/webapps/docs/changelog.xml

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?rev=1063366&r1=1063365&r2=1063366&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java Tue Jan 
25 17:20:20 2011
@@ -17,6 +17,8 @@
 
 package org.apache.coyote.http11;
 
+import java.io.IOException;
+import java.nio.channels.SelectionKey;
 import java.nio.channels.SocketChannel;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
@@ -317,8 +319,10 @@ public class Http11NioProtocol extends A
 } else {
 // Comet
 if (log.isDebugEnabled()) log.debug("Keeping 
processor["+processor);
-//add correct poller events here based on Comet 
stuff
-socket.getPoller().add(socket,att.getCometOps());
+// May receive more data from client
+SelectionKey key = 
socket.getIOChannel().keyFor(socket.getPoller().getSelector());
+key.interestOps(SelectionKey.OP_READ);
+att.interestOps(SelectionKey.OP_READ);
 }
 } else {
 // state == SocketState.ASYNC_END
@@ -358,8 +362,11 @@ public class Http11NioProtocol extends A
 connections.put(socket, processor);
 
 if (processor.comet) {
+// May receive more data from client
+SelectionKey key = 
socket.getIOChannel().keyFor(socket.getPoller().getSelector());
 NioEndpoint.KeyAttachment att = 
(NioEndpoint.KeyAttachment)socket.getAttachment(false);
-socket.getPoller().add(socket,att.getCometOps());
+key.interestOps(SelectionKey.OP_READ);
+att.interestOps(SelectionKey.OP_READ);
 } else if (processor.isAsync()) {
 NioEndpoint.KeyAttachment att = 
(NioEndpoint.KeyAttachment)socket.getAttachment(false);
 att.setAsync(true);
@@ -367,7 +374,10 @@ public class Http11NioProtocol extends A
 // complete or dispatch)
 state = processor.asyncPostProcess();
 } else {
-socket.getPoller().add(socket);
+// Error condition. A connection in this state should
+// by using one of async or comet
+throw new IOException(sm.getString(
+"http11protocol.state.long.error"));
 }
 }
 if (state == SocketState.LONG || state == 
SocketState.ASYNC_END) {

Modified: tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties?rev=1063366&r1=1063365&r2=1063366&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties Tue Jan 
25 17:20:20 2011
@@ -20,6 +20,7 @@ http11protocol.proto.ioexception.info=IO
 http11protocol.proto.socketexception.debug=SocketException reading request
 http11protocol.proto.socketexception.info=SocketException reading request, 
ignored
 http11protocol.start=Starting Coyote HTTP/1.1 on {0}
+http11protocol.state.long.error=Error processing request. Socket is in the 
long poll state but neither Servlet 3.0+ async or Comet is being used 
 
 http11processor.regexp.error=Error parsing regular expression {0}
 http11processor.filter.unknown=Unknown filter {0}

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1063366&r1=1063365&r2=1063366&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Jan 25 17:20:20 2011
@@ -114,6 +114,10 @@
 Ens

DO NOT REPLY [Bug 50650] Connector#setProperty(String, String) does not set explicit property values

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50650

Konstantin Kolinko  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX

--- Comment #1 from Konstantin Kolinko  2011-01-25 
12:21:43 EST ---
That is by design. setProperty(String, String) is the method that is called
when explicit property setter is not available.

See org.apache.tomcat.util.IntrospectionUtils.setProperty(Object, String,
String, boolean)

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1063372 - /tomcat/trunk/webapps/docs/changelog.xml

2011-01-25 Thread markt
Author: markt
Date: Tue Jan 25 17:33:45 2011
New Revision: 1063372

URL: http://svn.apache.org/viewvc?rev=1063372&view=rev
Log:
This change also fixed an open bug

Modified:
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1063372&r1=1063371&r2=1063372&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Jan 25 17:33:45 2011
@@ -115,8 +115,8 @@
 events. (markt)
   
   
-Correct interaction of NIO socket and Poller when processing Comet
-events. (markt)
+50627: Correct interaction of NIO socket and Poller when
+processing Comet events. (markt)
   
 
   



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50627] Bug in Tomcat Comet. Event CometEvent.EventType.END is not fired when connection closed.‏

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50627

Mark Thomas  changed:

   What|Removed |Added

   Severity|blocker |major

--- Comment #1 from Mark Thomas  2011-01-25 12:34:24 EST ---
This is fixed for the NIO connector and will be in 7.0.7 onwards. I'll check
the APR connector before closing this bug.

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50651] New: NPE in InternalNioOutputBuffer.recycle

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50651

   Summary: NPE in InternalNioOutputBuffer.recycle
   Product: Tomcat 6
   Version: 6.0.30
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: eric.estieven...@free.fr


Note: this is a regression of 6.0.30, the problem does not appear in 6.0.29

36.567 [http-8080-exec-1] ERROR o.apache.tomcat.util.net.NioEndpoint -
java.lang.NullPointerException: null
at
org.apache.coyote.http11.InternalNioOutputBuffer.recycle(InternalNioOutputBuffer.java:351)
~[tomcat-coyote.jar:6.0.30] 
   socket.getBufHandler().getWriteBuffer().clear(); 
at
org.apache.coyote.http11.Http11NioProcessor.recycle(Http11NioProcessor.java:1007)
~[tomcat-coyote.jar:6.0.30] 
at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.release(Http11NioProtocol.java:643)
~[tomcat-coyote.jar:6.0.30] 
at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.event(Http11NioProtocol.java:679)
~[tomcat-coyote.jar:6.0.30] 
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2262)
~[tomcat-coyote.jar:6.0.30] 
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[na:1.6.0_21]

Note sure yet whether it is the socket, its bufhandler or the buffer which is
null.

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50651] NPE in InternalNioOutputBuffer.recycle

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50651

--- Comment #1 from Konstantin Kolinko  2011-01-25 
13:07:00 EST ---
I suspect that it is socket: calling InternalNioOutputBuffer.recycle() twice
will fail with NPE, because socket is set to null on the first call.

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50651] NPE in InternalNioOutputBuffer.recycle

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50651

Konstantin Kolinko  changed:

   What|Removed |Added

   Severity|normal  |major

--- Comment #2 from Konstantin Kolinko  2011-01-25 
14:37:22 EST ---
To reproduce, with TC 6.0.31:
1. Configure Tomcat to use Nio connector.
2. Start Tomcat.
3. Connect to Tomcat HTTP port with a telnet client. Type "foo".
4. Server replies with "HTTP/1.1 400 Bad Request". At the same time in the logs
you can see two instances of NPE at
org.apache.coyote.http11.InternalNioOutputBuffer.recycle(InternalNioOutputBuffer.java:351)

7.0.x is not affected, thanks to r1022478

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50651] NPE in InternalNioOutputBuffer.recycle

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50651

--- Comment #3 from Konstantin Kolinko  2011-01-25 
14:47:39 EST ---
Created an attachment (id=26549)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26549)
2011-01-25_tc6_50651.patch

Patch for 6.0.x.

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1063426 - /tomcat/tc6.0.x/trunk/STATUS.txt

2011-01-25 Thread kkolinko
Author: kkolinko
Date: Tue Jan 25 19:50:50 2011
New Revision: 1063426

URL: http://svn.apache.org/viewvc?rev=1063426&view=rev
Log:
proposal

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1063426&r1=1063425&r2=1063426&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jan 25 19:50:50 2011
@@ -114,3 +114,9 @@ PATCHES PROPOSED TO BACKPORT:
   http://svn.apache.org/viewvc?rev=1062398&view=rev
   +1: kkolinko
   -1:
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50651
+  NPE in InternalNioOutputBuffer.recycle()
+  https://issues.apache.org/bugzilla/attachment.cgi?id=26549
+  +1: kkolinko
+  -1:



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50650] Connector#setProperty(String, String) does not set explicit property values

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50650

Lon Binder  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WONTFIX |

--- Comment #2 from Lon Binder  2011-01-25 15:42:12 EST 
---
Konstantin - I respectfully disagree, the design is fatally flawed.  It should
not be the case that setProperty("proxyName", String) behaves differently than
setProxyName(String).  

Most specifically, if the user calls setProperty("proxyName", String) it should
be expected that the getProxyName returns the same value.

If this is by design, the API docs need a lot of work, and I've already seen at
least one major application (ofbiz) that expects that to work.

If you won't change the code, please at least make this really clear in the API
and in the tomcat properties pages (non javadoc).

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50651] NPE in InternalNioOutputBuffer.recycle

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50651

--- Comment #4 from Filip Hanik  2011-01-25 16:25:36 EST ---
What I don't like about patches like this, is that they don't address the
regression, simply mitigate it.
If the problem has always existed, then fine, implement it.
But if this problem didn't exist in previous versions, then we're not fixing
the actual regression.

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50650] Connector#setProperty(String, String) does not set explicit property values

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50650

--- Comment #3 from Konstantin Kolinko  2011-01-25 
16:49:42 EST ---
> and I've already seen at least one major application (ofbiz) that expects 
> that to work

That never worked. Why are they expecting something?

> Most specifically, if the user calls setProperty("proxyName", String) it 
> should
be expected that the getProxyName returns the same value.

No, I would expect that getProperty("proxyName") would return the value, from
symmetry.  There is no need in a class to provide two sets of API to the same
underlying features. It is caller's responsibility to call the correct API.

Note, that besides Connector there are also a lot of other classes in Tomcat
that have setProperty(..)/getProperty(..) methods and behave in the same way.
If anybody would like to propose a patch we may talk further, but I see no bug
here.

I will leave this open for a while, if anyone else wants to comment.

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50651] NPE in InternalNioOutputBuffer.recycle

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50651

--- Comment #5 from p...@mfglobal.com 2011-01-25 17:02:59 EST ---
I was testing the sample code from
http://www.ibm.com/developerworks/web/library/wa-cometjava/. 
Each time when the connection was closed, two END Comet events were received.
The second one seems causing the NPE error. 

Jan 25, 2011 3:31:28 PM org.apache.catalina.core.ApplicationContext log
INFO: WeatherServlet: Begin for session: CF345C44A1C1040EC6C112B494A7E00C
Jan 25, 2011 3:31:28 PM org.apache.catalina.core.ApplicationContext log
INFO: WeatherServlet: Message added #messages=1
Jan 25, 2011 3:31:28 PM org.apache.catalina.core.ApplicationContext log
INFO: WeatherServlet: Closing connection
Jan 25, 2011 3:31:28 PM org.apache.catalina.core.ApplicationContext log
INFO: WeatherServlet: End for session: CF345C44A1C1040EC6C112B494A7E00C
Jan 25, 2011 3:31:28 PM org.apache.catalina.core.ApplicationContext log
INFO: WeatherServlet: End for session: CF345C44A1C1040EC6C112B494A7E00C
Jan 25, 2011 3:31:28 PM org.apache.tomcat.util.net.NioEndpoint$SocketProcessor
run
SEVERE:
java.lang.NullPointerException
at
org.apache.coyote.http11.InternalNioOutputBuffer.recycle(InternalNioOutputBuffer.java:351)
at
org.apache.coyote.http11.Http11NioProcessor.recycle(Http11NioProcessor.java:1007)
at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.release(Http11NioProtocol.java:643)
at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.event(Http11NioProtocol.java:679)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2262)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50651] NPE in InternalNioOutputBuffer.recycle

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50651

--- Comment #6 from Konstantin Kolinko  2011-01-25 
17:12:53 EST ---
(In reply to comment #4)
Repeated calls to recycle() should succeed. Shouldn't they? Implementation of
InternalNioOutputBuffer.recycle() was already broken in this sense earlier,
since r428884.

What is different in 6.0.30 is that several new calls to recycle() appeared --
I remember of the one in [1], and thus this issue became apparent. The
reproduction recipe in comment 2 is based on [1].

[1]
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?r1=1030188&r2=1030187&pathrev=1030188

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50650] Connector#setProperty(String, String) does not set explicit property values

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50650

--- Comment #4 from Lon Binder  2011-01-25 17:50:30 EST 
---
In order to work around this for my situation (using OFBiz) I wrote a patch to
their code that essentially does the same as IntrospectionUtils: it uses
reflection to find the the appropriate setter by name and type and sets in the
value.  This (or IntrospectionUtils or something else available) could be set
in place.  I don't have a tomcat dev environment set up, but I could get it
going and put the patch together.

Btw, I don't think the existing of explicit getter/setters and a generalized
getProperty/setProperty is redundant.  The generalized method is useful for
setting from an XML file while the explicit comply with the stronger typing for
java.

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50405] Null Pointer Exception at Coyote Adapter

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50405

--- Comment #2 from Miguel Hernandez  2011-01-25 18:03:00 
EST ---
Created an attachment (id=26550)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26550)
A simple test application that presents the error reported.

A similar test case for 7.0.5

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50405] Null Pointer Exception at Coyote Adapter

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50405

Miguel Hernandez  changed:

   What|Removed |Added

 Status|NEEDINFO|NEW

--- Comment #3 from Miguel Hernandez  2011-01-25 18:08:01 
EST ---
I'm having the NPE on exactly the same line of the CoyoteAdapter on 7.0.5. The
conditions are slightly different, but its probably related. 

Please follow these instructions:

1. Configure the Http11NioProtocol connector.
2. deploy the attached WAR.
3. open http://localhost:8080/crazed_proxy/
4. click the submit button.

And the NPE will begin to appear.

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50405] Null Pointer Exception at Coyote Adapter

2011-01-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50405

Miguel Hernandez  changed:

   What|Removed |Added

 CC||migs...@gmail.com

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

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: RemoteIpValve advices

2011-01-25 Thread Henri Gomez
> I've got a very basic valve for now to handle this kind of X-Forwarded
> situation :
>
>
> public class ForwardedValve extends ValveBase {
>
>    public void invoke(Request paramRequest, Response paramResponse)
>            throws IOException, ServletException {
>
>        String header = paramRequest.getHeader("X-Forwarded-Host");
>
>        if (header != null)
>            paramRequest.setServerName(header);
>
>        int header1 = paramRequest.getIntHeader("X-Forwarded-Port");
>
>        if (header1 > 0)
>            paramRequest.setServerPort(header1);
>
>        getNext().invoke(paramRequest, paramResponse);
>    }
> }

Any comments about this valve ?

FYI, it's the kind of valve required by a Tomcat behind Amazon AWS
Load Balancer.
I'll detail more later but the current ForwardedValve only handle
remote (browser) information and not the local (server) address.

Cheers.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org