[Bug 52055] ChunkedInputFilter is not recycled for servlet 3.0 asynchronous request

2012-05-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52055

--- Comment #9 from Sudhan Moghe  ---
Yes, It is fixed.
I have tested in 7.0.x. It is working fine.
I was getting some NPE's in InternalNioInputBuffer with my fix. That's why did
not post patch.
Not getting any exception with latest code from 7.0.x.

Thanks,
Sudhan

-- 
You are receiving this mail because:
You are the assignee for the bug.


Re: [jira] [Created] (MTOMCAT-125) mvn tomcat7:run got "javax.naming.NameNotFoundException: Name jdbc is not bound in this Context"

2012-05-08 Thread Roberto Cisternino
It seems to me a problem  related to a naming bug in JDK 1.7.x
I had similar problems using Glassfish when I upgraded from 3.1.1 to 3.1.2
and on that time the JDK 1.7.x was recommended... I did it and my stable
enterprise application stopped working.

I would recommend to stay with JDK 1.6.x at least until there will be a fix
> JDK 1.7u3

--
View this message in context: 
http://tomcat.10.n6.nabble.com/jira-Created-MTOMCAT-125-mvn-tomcat7-run-got-javax-naming-NameNotFoundException-Name-jdbc-is-not-bou-tp4562031p4960028.html
Sent from the Tomcat - Dev mailing list archive at Nabble.com.

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



Re: Purpose of unlockAccept

2012-05-08 Thread Mark Thomas
On 08/05/2012 07:41, Mladen Turk wrote:
> On 05/08/2012 08:34 AM, Costin Manolache wrote:
>> On Mon, May 7, 2012 at 11:05 PM, Mladen Turk  wrote:
>>
>>>
>>> For real pause (stop accepting connections and wait till all sessions
>>> times out) this can be done safely by setting 10 second timeout
>>> on listening socket. It means that in worse case we would have
>>> session-timeout + 10s.
>>
>>
>> I see, you want a graceful shutdown, with a loadbalancer that uses the
>> fact
>> that the server rejects connections to indicate 'unhealthy' ( instead of
>> some error code ). What about the listen backlog, even if you don't call
>> accept it'll still ACK few connections that will timeout.
>>
> 
> The current patch I've send doesn't use timeout.
> If paused a single connection will get accepted but not
> processed thus behaving exactly like backlog.
> Later if continued (pause during deploy) it'll be processed or
> closed (exactly like backlog behaves).
> 
> 
>> Sorry, never used pause(), the lbs I know use status code from the health
>> check, and the server is supposed to keep accepting connections until the
>> LB figures things out ( and to be really 'graceful' the LB could keep
>> sending requests for established sessions for a while, but not new
>> sessions
>> ).
>>
>> Well - +1, as long as you're sure the close() not unblocking accept() bug
>> is no longer there ( may have been 10 years ago in 1.1, can't remember
>> :-)
>>
> 
> Well, the javadocs for ServerSocket.close() says:
> Closes this socket.
> Any thread currently blocked in accept() will throw a SocketException.

I did some svn / BZ archaeology.

The unlocking of the acceptor was introduced [1] in response to a bug
report [2]. It appears that this was indeed working around a long since
fixed JVM bug [3].

Given this, I have no objections to Mladen's propose changes. I would
ask that a note is added to the docs and the Javadoc that explains that
pausing a socket effectively adds one to the current value of the
backlog. The only downside I can see is if someone wants zero backlog on
pause. That is no longer going to be possible.

Mark


[1] http://svn.apache.org/viewvc?view=revision&revision=283457
[2] https://issues.apache.org/bugzilla/show_bug.cgi?id=1418
[3] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4344135

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



Re: Purpose of unlockAccept

2012-05-08 Thread Mladen Turk

On 05/08/2012 12:28 PM, Mark Thomas wrote:

The only downside I can see is if someone wants zero backlog on
pause. That is no longer going to be possible.


According to javadocs setting socket's backlog to zero means 'OS default'
so this is not reliable anyhow.


Regards
--
^TM

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



Re: [jira] [Created] (MTOMCAT-125) mvn tomcat7:run got "javax.naming.NameNotFoundException: Name jdbc is not bound in this Context"

2012-05-08 Thread Henri Gomez
Java 7 u4 is available for some time now. 

Did you try it ?

Le 8 mai 2012 à 12:03, Roberto Cisternino  a 
écrit :

> It seems to me a problem  related to a naming bug in JDK 1.7.x
> I had similar problems using Glassfish when I upgraded from 3.1.1 to 3.1.2
> and on that time the JDK 1.7.x was recommended... I did it and my stable
> enterprise application stopped working.
> 
> I would recommend to stay with JDK 1.6.x at least until there will be a fix
>> JDK 1.7u3
> 
> --
> View this message in context: 
> http://tomcat.10.n6.nabble.com/jira-Created-MTOMCAT-125-mvn-tomcat7-run-got-javax-naming-NameNotFoundException-Name-jdbc-is-not-bou-tp4562031p4960028.html
> Sent from the Tomcat - Dev mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 

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



svn commit: r1335546 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/ConnectionState.java

2012-05-08 Thread fhanik
Author: fhanik
Date: Tue May  8 14:17:43 2012
New Revision: 1335546

URL: http://svn.apache.org/viewvc?rev=1335546&view=rev
Log:
When a connection is disconnected, make sure we reset the cached values. This 
can happen during a failed validation when reconnect() is called.


Modified:

tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/ConnectionState.java

Modified: 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/ConnectionState.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/ConnectionState.java?rev=1335546&r1=1335545&r2=1335546&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/ConnectionState.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/ConnectionState.java
 Tue May  8 14:17:43 2012
@@ -110,6 +110,19 @@ public class ConnectionState extends Jdb
 
 }
 
+
+@Override
+public void disconnected(ConnectionPool parent, PooledConnection con, 
boolean finalizing) {
+//we are resetting, reset our defaults
+autoCommit = null;
+transactionIsolation = null;
+readOnly = null;
+catalog = null;
+super.disconnected(parent, con, finalizing);
+}
+
+
+
 @Override
 public Object invoke(Object proxy, Method method, Object[] args) throws 
Throwable {
 String name = method.getName();



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



svn commit: r1335547 - /tomcat/trunk/java/org/apache/catalina/Context.java

2012-05-08 Thread markt
Author: markt
Date: Tue May  8 14:19:32 2012
New Revision: 1335547

URL: http://svn.apache.org/viewvc?rev=1335547&view=rev
Log:
Fix typo

Modified:
tomcat/trunk/java/org/apache/catalina/Context.java

Modified: tomcat/trunk/java/org/apache/catalina/Context.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Context.java?rev=1335547&r1=1335546&r2=1335547&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/Context.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Context.java Tue May  8 14:19:32 2012
@@ -1389,7 +1389,7 @@ public interface Context extends Contain
 public void setSendRedirectBody(boolean enable);
 
 /**
- * Dtermines if the context is configured to included a response body as
+ * Determines if the context is configured to included a response body as
  * part of a redirect response.
  */
 public boolean getSendRedirectBody();



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



[Bug 53138] Not able to download a file size of 740KB using NIO connector in tomcat version 7.0.27. But with the same configuration I was able to download that in tomcat 7.0.26.

2012-05-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53138

--- Comment #11 from Filip Hanik  ---
(In reply to comment #10)
> Current suspect is:
> http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/
> util/net/NioEndpoint.java?r1=1300872&r2=1300950&diff_format=h

Confirmed that the above check in broke sendFile for NIO. Current workaround is
useSendfile="false" on the NIO connector

-- 
You are receiving this mail because:
You are the assignee for the bug.


Re: Purpose of unlockAccept

2012-05-08 Thread Costin Manolache
Thanks for looking it up :-)

+1 on removing it anyways - but it would be good to add some javadocs on
the pause() method, I never understood the use case.

IMHO neither 'graceful shutdown' nor 'deploy' are best served by not
accepting connections:
- for 'graceful' - a number of connections will get to backlog and timeout,
which is bad for the user. A better solution would be to support an option
to accept and return immediately ( maybe with a way to do this only for
requests not matching any existing session ). I never worked with a LB that
 detects status based only on not accepting connections and timeout.

- for deploy - I assume that means you pause when an app is updated ? That
doesn't make a lot of sense, you could still serve other apps, and either
queue or redirect requests for the app getting updated. If you are behind a
LB the updated app would still be served, without timeouts or slow requests.

Besides that - is there any other use for pause() ? Maybe that's what
should be removed/replaced :-). The behavior ( delay/timeout all TCP
connections until backlog is full, then reject ) doesn't seem ideal.


Costin


On Tue, May 8, 2012 at 3:28 AM, Mark Thomas  wrote:

> On 08/05/2012 07:41, Mladen Turk wrote:
> > On 05/08/2012 08:34 AM, Costin Manolache wrote:
> >> On Mon, May 7, 2012 at 11:05 PM, Mladen Turk  wrote:
> >>
> >>>
> >>> For real pause (stop accepting connections and wait till all sessions
> >>> times out) this can be done safely by setting 10 second timeout
> >>> on listening socket. It means that in worse case we would have
> >>> session-timeout + 10s.
> >>
> >>
> >> I see, you want a graceful shutdown, with a loadbalancer that uses the
> >> fact
> >> that the server rejects connections to indicate 'unhealthy' ( instead of
> >> some error code ). What about the listen backlog, even if you don't call
> >> accept it'll still ACK few connections that will timeout.
> >>
> >
> > The current patch I've send doesn't use timeout.
> > If paused a single connection will get accepted but not
> > processed thus behaving exactly like backlog.
> > Later if continued (pause during deploy) it'll be processed or
> > closed (exactly like backlog behaves).
> >
> >
> >> Sorry, never used pause(), the lbs I know use status code from the
> health
> >> check, and the server is supposed to keep accepting connections until
> the
> >> LB figures things out ( and to be really 'graceful' the LB could keep
> >> sending requests for established sessions for a while, but not new
> >> sessions
> >> ).
> >>
> >> Well - +1, as long as you're sure the close() not unblocking accept()
> bug
> >> is no longer there ( may have been 10 years ago in 1.1, can't remember
> >> :-)
> >>
> >
> > Well, the javadocs for ServerSocket.close() says:
> > Closes this socket.
> > Any thread currently blocked in accept() will throw a SocketException.
>
> I did some svn / BZ archaeology.
>
> The unlocking of the acceptor was introduced [1] in response to a bug
> report [2]. It appears that this was indeed working around a long since
> fixed JVM bug [3].
>
> Given this, I have no objections to Mladen's propose changes. I would
> ask that a note is added to the docs and the Javadoc that explains that
> pausing a socket effectively adds one to the current value of the
> backlog. The only downside I can see is if someone wants zero backlog on
> pause. That is no longer going to be possible.
>
> Mark
>
>
> [1] http://svn.apache.org/viewvc?view=revision&revision=283457
> [2] https://issues.apache.org/bugzilla/show_bug.cgi?id=1418
> [3] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4344135
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


Re: Purpose of unlockAccept

2012-05-08 Thread Mladen Turk

On 05/08/2012 07:09 PM, Costin Manolache wrote:

IMHO neither 'graceful shutdown' nor 'deploy' are best served by not
accepting connections:
- for 'graceful' - a number of connections will get to backlog and timeout,


Not sure if ServerSocket.close() would cause cascade close of all
accepted sockets that are still running. If not, even pause could
just close the socket and then init if needed.
In that case clients will not fill the backlog.


which is bad for the user. A better solution would be to support an option
to accept and return immediately ( maybe with a way to do this only for
requests not matching any existing session ). I never worked with a LB that
  detects status based only on not accepting connections and timeout.



Hmm, right, a valid option if LB won't get confused.



Besides that - is there any other use for pause() ? Maybe that's what
should be removed/replaced :-). The behavior ( delay/timeout all TCP
connections until backlog is full, then reject ) doesn't seem ideal.



Agreed. A 'pause' or invalidating backed node should be done in LB.
We are doing that in mod_jk, mod_proxy, mod_cluster, etc.
If LB wrongly instructs the clients to connect to a node that is going to
get shutdown we can't do much about it. Client will experience one
or other type of connection failures.



Regards
--
^TM

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



svn commit: r1335674 - /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java

2012-05-08 Thread olamy
Author: olamy
Date: Tue May  8 18:16:31 2012
New Revision: 1335674

URL: http://svn.apache.org/viewvc?rev=1335674&view=rev
Log:
fix link

Modified:

tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java

Modified: 
tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java
URL: 
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java?rev=1335674&r1=1335673&r2=1335674&view=diff
==
--- 
tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java
 (original)
+++ 
tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java
 Tue May  8 18:16:31 2012
@@ -83,7 +83,7 @@ public class RunMojo
  * Set the "follow standard delegation model" flag used to configure our 
ClassLoader.
  *
  * @parameter expression = "${tomcat.delegate}" default-value="true"
- * @see 
http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/loader/WebappLoader.html#setDelegate(boolean)
+ * @see 
http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/loader/WebappLoader.html#setDelegate(boolean)
  * @since 1.0
  */
 private boolean delegate = true;
@@ -92,7 +92,7 @@ public class RunMojo
  * represents the delay in seconds between each classPathScanning change 
invocation
  *
  * @parameter expression="${maven.tomcat.backgroundProcessorDelay}" 
default-value="-1"
- * @see http://tomcat.apache.org/tomcat-6.0-doc/config/context.html";>http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
+ * @see http://tomcat.apache.org/tomcat-7.0-doc/config/context.html";>http://tomcat.apache.org/tomcat-7.0-doc/config/context.html
  */
 protected int backgroundProcessorDelay = -1;
 



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



Re: Purpose of unlockAccept

2012-05-08 Thread Costin Manolache
On Tue, May 8, 2012 at 11:01 AM, Mladen Turk  wrote:

> On 05/08/2012 07:09 PM, Costin Manolache wrote:
>
>> IMHO neither 'graceful shutdown' nor 'deploy' are best served by not
>> accepting connections:
>> - for 'graceful' - a number of connections will get to backlog and
>> timeout,
>>
>
> Not sure if ServerSocket.close() would cause cascade close of all
> accepted sockets that are still running. If not, even pause could
> just close the socket and then init if needed.
> In that case clients will not fill the backlog.


You may still want to accept requests for existing sessions.

Both 'graceful shutdown' and app deploy are important cases - it's just
that current 'pause()' is not that good for either of them, if you really
want to cleanup...

Maybe an option to return 503 or custom status/headers - so people can
adjust to various LBs.

Costin


>
>
>  which is bad for the user. A better solution would be to support an option
>> to accept and return immediately ( maybe with a way to do this only for
>> requests not matching any existing session ). I never worked with a LB
>> that
>>  detects status based only on not accepting connections and timeout.
>>
>>
> Hmm, right, a valid option if LB won't get confused.
>
>
>
>> Besides that - is there any other use for pause() ? Maybe that's what
>> should be removed/replaced :-). The behavior ( delay/timeout all TCP
>> connections until backlog is full, then reject ) doesn't seem ideal.
>>
>>
> Agreed. A 'pause' or invalidating backed node should be done in LB.
> We are doing that in mod_jk, mod_proxy, mod_cluster, etc.
> If LB wrongly instructs the clients to connect to a node that is going to
> get shutdown we can't do much about it. Client will experience one
> or other type of connection failures.
>




>
>
>
> Regards
> --
> ^TM
>
>
> --**--**-
> To unsubscribe, e-mail: 
> dev-unsubscribe@tomcat.apache.**org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


Re: Purpose of unlockAccept

2012-05-08 Thread Mark Thomas
On 08/05/2012 19:47, Costin Manolache wrote:
> You may still want to accept requests for existing sessions.
> 
> Both 'graceful shutdown' and app deploy are important cases - it's just
> that current 'pause()' is not that good for either of them, if you really
> want to cleanup...
> 
> Maybe an option to return 503 or custom status/headers - so people can
> adjust to various LBs.

pause() on the connector means something very different to pause in the
reverse proxy. In the connector pause means:
- stop processing new connections
- close existing connections
- keep the socket bound

It is very similar to stop() if bindOnInit==true

I don't see a requirement for "process existing sessions but reject new
sessions" and if there were such a requirement I'd implement that in a
Valve (or maybe a Filter), not in the connector.

Mark

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



svn commit: r1335692 - in /tomcat/trunk/java/org/apache/catalina: connector/CoyoteAdapter.java connector/MapperListener.java core/StandardContext.java core/StandardContextValve.java startup/HostConfig

2012-05-08 Thread markt
Author: markt
Date: Tue May  8 18:54:44 2012
New Revision: 1335692

URL: http://svn.apache.org/viewvc?rev=1335692&view=rev
Log:
It appears that pausing requests for a Context during reload was relying on the 
mapper not being cleaned up correctly. The Lifecycle refactoring cleaned up the 
mapper registrations and broke the handling of paused requests. This commit 
restores that functionality and extends it. The key changes are:
- Contexts are no longer from the mapper if they are stopped while they are 
paused
- The CoyoteAdapter pauses for 1s if a request is mapped to a paused Context 
and then tries to re-map it. This replaces the reloading handling in the 
StandardContextValve
- The reload handling has been removed from the StandardContextValve
- Editing a watched resource now triggers a reload (that pauses requests 
received during the reload) rather than a stop/start which will return 404s for 
requests received while the context is stopping and starting

As with previous iterations of this feature it is impossible to completely 
eliminate the chances of a 404 without a fair amount of locking that would slow 
things down unnecessarily in production.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/trunk/java/org/apache/catalina/connector/MapperListener.java
tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java
tomcat/trunk/java/org/apache/catalina/startup/HostConfig.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?rev=1335692&r1=1335691&r2=1335692&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Tue May  
8 18:54:44 2012
@@ -719,7 +719,19 @@ public class CoyoteAdapter implements Ad
 }
 }
 }
-
+if (!mapRequired && request.getContext().getPaused()) {
+// Found a matching context but it is paused. Mapping data will
+// be wrong since some Wrappers may not be registered at this
+// point.
+try {
+Thread.sleep(1000);
+} catch (InterruptedException e) {
+// Should never happen
+}
+// Reset mapping
+request.getMappingData().recycle();
+mapRequired = true;
+}
 }
 
 // Possible redirect

Modified: tomcat/trunk/java/org/apache/catalina/connector/MapperListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/MapperListener.java?rev=1335692&r1=1335691&r2=1335692&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/MapperListener.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/MapperListener.java Tue May 
 8 18:54:44 2012
@@ -437,7 +437,12 @@ public class MapperListener extends Life
 if (obj instanceof Wrapper) {
 unregisterWrapper((Wrapper) obj);
 } else if (obj instanceof Context) {
-unregisterContext((Context) obj);
+Context c = (Context) obj;
+// Only unregister if not paused. If paused, need to keep
+// registration in place to prevent 404's during reload
+if (!c.getPaused()) {
+unregisterContext(c);
+}
 } else if (obj instanceof Host) {
 unregisterHost((Host) obj);
 }

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1335692&r1=1335691&r2=1335692&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Tue May  8 
18:54:44 2012
@@ -3767,9 +3767,12 @@ public class StandardContext extends Con
  * 
  * IMPLEMENTATION NOTE:  This method is designed to deal with
  * reloads required by changes to classes in the underlying repositories
- * of our class loader.  It does not handle changes to the web application
- * deployment descriptor.  If that has occurred, you should stop this
- * Context and create (and start) a new Context instance instead.
+ * of our class loader and changes to the web.xml file. It does not handle
+ * changes to any context.xml file. If the context.xml has changed, you
+ * should stop this Cont

svn commit: r1335700 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/connector/ java/org/apache/catalina/core/ java/org/apache/catalina/startup/ webapps/docs/

2012-05-08 Thread markt
Author: markt
Date: Tue May  8 19:07:09 2012
New Revision: 1335700

URL: http://svn.apache.org/viewvc?rev=1335700&view=rev
Log:
It appears that pausing requests for a Context during reload was relying on the 
mapper not being cleaned up correctly. The Lifecycle refactoring cleaned up the 
mapper registrations and broke the handling of paused requests. This commit 
restores that functionality and extends it. The key changes are:
- Contexts are no longer from the mapper if they are stopped while they are 
paused
- The CoyoteAdapter pauses for 1s if a request is mapped to a paused Context 
and then tries to re-map it. This replaces the reloading handling in the 
StandardContextValve
- The reload handling has been removed from the StandardContextValve
- Editing a watched resource now triggers a reload (that pauses requests 
received during the reload) rather than a stop/start which will return 404s for 
requests received while the context is stopping and starting

As with previous iterations of this feature it is impossible to completely 
eliminate the chances of a 404 without a fair amount of locking that would slow 
things down unnecessarily in production.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/MapperListener.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContextValve.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1335692

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1335700&r1=1335699&r2=1335700&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
Tue May  8 19:07:09 2012
@@ -719,7 +719,19 @@ public class CoyoteAdapter implements Ad
 }
 }
 }
-
+if (!mapRequired && request.getContext().getPaused()) {
+// Found a matching context but it is paused. Mapping data will
+// be wrong since some Wrappers may not be registered at this
+// point.
+try {
+Thread.sleep(1000);
+} catch (InterruptedException e) {
+// Should never happen
+}
+// Reset mapping
+request.getMappingData().recycle();
+mapRequired = true;
+}
 }
 
 // Possible redirect

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/MapperListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/MapperListener.java?rev=1335700&r1=1335699&r2=1335700&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/MapperListener.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/MapperListener.java 
Tue May  8 19:07:09 2012
@@ -445,7 +445,12 @@ public class MapperListener extends Life
 if (obj instanceof Wrapper) {
 unregisterWrapper((Wrapper) obj);
 } else if (obj instanceof Context) {
-unregisterContext((Context) obj);
+Context c = (Context) obj;
+// Only unregister if not paused. If paused, need to keep
+// registration in place to prevent 404's during reload
+if (!c.getPaused()) {
+unregisterContext(c);
+}
 } else if (obj instanceof Host) {
 unregisterHost((Host) obj);
 }

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1335700&r1=1335699&r2=1335700&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java Tue 
May  8 19:07:09 2012
@@ -3875,9 +3875,12 @@ public class StandardContext extends Con
  * 
  * IMPLEMENTATION NOTE:  This method is designed to deal with
  * reloads required by changes to classes in the underlying repositories
- * of our class loader.  

[Bug 53024] Accessing Servlet while Reloading context gives 404 error

2012-05-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53024

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #9 from Mark Thomas  ---
Thanks for the test case. This has been fixed in trunk and 7.0.x and will be
included in 7.0.28 onwards.

I also took the opportunity to improve the handling when a watched resource
(such as web.xml) changes. This is now handled with a reload (so no 404s)
rather than stop followed by a start.

-- 
You are receiving this mail because:
You are the assignee for the bug.


svn commit: r1335711 - /tomcat/trunk/res/maven/

2012-05-08 Thread markt
Author: markt
Date: Tue May  8 19:34:10 2012
New Revision: 1335711

URL: http://svn.apache.org/viewvc?rev=1335711&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53034
Add project.url and project.licenses setions to all the POMs

Modified:
tomcat/trunk/res/maven/tomcat-annotations-api.pom
tomcat/trunk/res/maven/tomcat-api.pom
tomcat/trunk/res/maven/tomcat-catalina-ant.pom
tomcat/trunk/res/maven/tomcat-catalina-ha.pom
tomcat/trunk/res/maven/tomcat-catalina-jmx-remote.pom
tomcat/trunk/res/maven/tomcat-catalina-ws.pom
tomcat/trunk/res/maven/tomcat-catalina.pom
tomcat/trunk/res/maven/tomcat-coyote.pom
tomcat/trunk/res/maven/tomcat-dbcp.pom
tomcat/trunk/res/maven/tomcat-el-api.pom
tomcat/trunk/res/maven/tomcat-embed-core.pom
tomcat/trunk/res/maven/tomcat-embed-jasper.pom
tomcat/trunk/res/maven/tomcat-embed-logging-juli.pom
tomcat/trunk/res/maven/tomcat-embed-logging-log4j.pom
tomcat/trunk/res/maven/tomcat-extras-juli-adapters.pom
tomcat/trunk/res/maven/tomcat-extras-juli.pom
tomcat/trunk/res/maven/tomcat-i18n-es.pom
tomcat/trunk/res/maven/tomcat-i18n-fr.pom
tomcat/trunk/res/maven/tomcat-i18n-ja.pom
tomcat/trunk/res/maven/tomcat-jasper-el.pom
tomcat/trunk/res/maven/tomcat-jasper.pom
tomcat/trunk/res/maven/tomcat-jdbc.pom
tomcat/trunk/res/maven/tomcat-jni.pom
tomcat/trunk/res/maven/tomcat-jsp-api.pom
tomcat/trunk/res/maven/tomcat-juli.pom
tomcat/trunk/res/maven/tomcat-servlet-api.pom
tomcat/trunk/res/maven/tomcat-spdy.pom
tomcat/trunk/res/maven/tomcat-tribes.pom
tomcat/trunk/res/maven/tomcat-util.pom

Modified: tomcat/trunk/res/maven/tomcat-annotations-api.pom
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/res/maven/tomcat-annotations-api.pom?rev=1335711&r1=1335710&r2=1335711&view=diff
==
--- tomcat/trunk/res/maven/tomcat-annotations-api.pom (original)
+++ tomcat/trunk/res/maven/tomcat-annotations-api.pom Tue May  8 19:34:10 2012
@@ -21,4 +21,12 @@
   tomcat-annotations-api
   @MAVEN.DEPLOY.VERSION@
   Annotations Package
+http://tomcat.apache.org
+  
+
+  Apache License, Version 2.0
+  http://www.apache.org/licenses/LICENSE-2.0.txt
+  repo
+
+  
 
\ No newline at end of file

Modified: tomcat/trunk/res/maven/tomcat-api.pom
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/res/maven/tomcat-api.pom?rev=1335711&r1=1335710&r2=1335711&view=diff
==
--- tomcat/trunk/res/maven/tomcat-api.pom (original)
+++ tomcat/trunk/res/maven/tomcat-api.pom Tue May  8 19:34:10 2012
@@ -21,6 +21,14 @@
   tomcat-api
   @MAVEN.DEPLOY.VERSION@
   Definition of interfaces shared by Catalina and 
Jasper
+  http://tomcat.apache.org
+  
+
+  Apache License, Version 2.0
+  http://www.apache.org/licenses/LICENSE-2.0.txt
+  repo
+
+  
   
 
   org.apache.tomcat

Modified: tomcat/trunk/res/maven/tomcat-catalina-ant.pom
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/res/maven/tomcat-catalina-ant.pom?rev=1335711&r1=1335710&r2=1335711&view=diff
==
--- tomcat/trunk/res/maven/tomcat-catalina-ant.pom (original)
+++ tomcat/trunk/res/maven/tomcat-catalina-ant.pom Tue May  8 19:34:10 2012
@@ -21,6 +21,14 @@
   tomcat-catalina-ant
   @MAVEN.DEPLOY.VERSION@
   Tomcat Ant tasks for remote management
+  http://tomcat.apache.org
+  
+
+  Apache License, Version 2.0
+  http://www.apache.org/licenses/LICENSE-2.0.txt
+  repo
+
+  
   
 
   org.apache.tomcat

Modified: tomcat/trunk/res/maven/tomcat-catalina-ha.pom
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/res/maven/tomcat-catalina-ha.pom?rev=1335711&r1=1335710&r2=1335711&view=diff
==
--- tomcat/trunk/res/maven/tomcat-catalina-ha.pom (original)
+++ tomcat/trunk/res/maven/tomcat-catalina-ha.pom Tue May  8 19:34:10 2012
@@ -21,6 +21,14 @@
   tomcat-catalina-ha
   @MAVEN.DEPLOY.VERSION@
   Tomcat High Availability Implementation
+  http://tomcat.apache.org
+  
+
+  Apache License, Version 2.0
+  http://www.apache.org/licenses/LICENSE-2.0.txt
+  repo
+
+  
   
 
   org.apache.tomcat

Modified: tomcat/trunk/res/maven/tomcat-catalina-jmx-remote.pom
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/res/maven/tomcat-catalina-jmx-remote.pom?rev=1335711&r1=1335710&r2=1335711&view=diff
==
--- tomcat/trunk/res/maven/tomcat-catalina-jmx-remote.pom (original)
+++ tomcat/trunk/res/maven/tomcat-catalina-jmx-remote.pom Tue May  8 19:34:10 
2012
@@ -21,6 +21,14 @@
   tomcat-catalina-jmx-remote
   @MAVEN.DEPLOY.VERSION@
   Tomcat Remote JMX listener
+  http://tomcat.apache.org
+  
+
+  Apache License, Versio

svn commit: r1335715 - in /tomcat/tc7.0.x/trunk: ./ res/maven/

2012-05-08 Thread markt
Author: markt
Date: Tue May  8 19:37:30 2012
New Revision: 1335715

URL: http://svn.apache.org/viewvc?rev=1335715&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53034
Add project.url and project.licenses sections to all the POMs

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/res/maven/tomcat-annotations-api.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-api.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-catalina-ant.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-catalina-ha.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-catalina-jmx-remote.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-catalina-ws.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-catalina.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-coyote.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-dbcp.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-el-api.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-embed-core.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-embed-jasper.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-embed-logging-juli.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-embed-logging-log4j.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-extras-juli-adapters.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-extras-juli.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-i18n-es.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-i18n-fr.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-i18n-ja.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-jasper-el.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-jasper.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-jdbc.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-jsp-api.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-juli.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-servlet-api.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-tribes.pom
tomcat/tc7.0.x/trunk/res/maven/tomcat-util.pom

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1335711

Modified: tomcat/tc7.0.x/trunk/res/maven/tomcat-annotations-api.pom
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/res/maven/tomcat-annotations-api.pom?rev=1335715&r1=1335714&r2=1335715&view=diff
==
--- tomcat/tc7.0.x/trunk/res/maven/tomcat-annotations-api.pom (original)
+++ tomcat/tc7.0.x/trunk/res/maven/tomcat-annotations-api.pom Tue May  8 
19:37:30 2012
@@ -21,4 +21,12 @@
   tomcat-annotations-api
   @MAVEN.DEPLOY.VERSION@
   Annotations Package
+http://tomcat.apache.org
+  
+
+  Apache License, Version 2.0
+  http://www.apache.org/licenses/LICENSE-2.0.txt
+  repo
+
+  
 
\ No newline at end of file

Modified: tomcat/tc7.0.x/trunk/res/maven/tomcat-api.pom
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/res/maven/tomcat-api.pom?rev=1335715&r1=1335714&r2=1335715&view=diff
==
--- tomcat/tc7.0.x/trunk/res/maven/tomcat-api.pom (original)
+++ tomcat/tc7.0.x/trunk/res/maven/tomcat-api.pom Tue May  8 19:37:30 2012
@@ -21,6 +21,14 @@
   tomcat-api
   @MAVEN.DEPLOY.VERSION@
   Definition of interfaces shared by Catalina and 
Jasper
+  http://tomcat.apache.org
+  
+
+  Apache License, Version 2.0
+  http://www.apache.org/licenses/LICENSE-2.0.txt
+  repo
+
+  
   
 
   org.apache.tomcat

Modified: tomcat/tc7.0.x/trunk/res/maven/tomcat-catalina-ant.pom
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/res/maven/tomcat-catalina-ant.pom?rev=1335715&r1=1335714&r2=1335715&view=diff
==
--- tomcat/tc7.0.x/trunk/res/maven/tomcat-catalina-ant.pom (original)
+++ tomcat/tc7.0.x/trunk/res/maven/tomcat-catalina-ant.pom Tue May  8 19:37:30 
2012
@@ -21,6 +21,14 @@
   tomcat-catalina-ant
   @MAVEN.DEPLOY.VERSION@
   Tomcat Ant tasks for remote management
+  http://tomcat.apache.org
+  
+
+  Apache License, Version 2.0
+  http://www.apache.org/licenses/LICENSE-2.0.txt
+  repo
+
+  
   
 
   org.apache.tomcat

Modified: tomcat/tc7.0.x/trunk/res/maven/tomcat-catalina-ha.pom
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/res/maven/tomcat-catalina-ha.pom?rev=1335715&r1=1335714&r2=1335715&view=diff
==
--- tomcat/tc7.0.x/trunk/res/maven/tomcat-catalina-ha.pom (original)
+++ tomcat/tc7.0.x/trunk/res/maven/tomcat-catalina-ha.pom Tue May  8 19:37:30 
2012
@@ -21,6 +21,14 @@
   tomcat-catalina-ha
   @MAVEN.DEPLOY.VERSION@
   Tomcat High Availability Implementation
+  http://tomcat.apache.org
+  
+
+  Apache License, Version 2.0
+  http://www.apache.org/licenses/LICENSE-2.0.txt
+  repo
+
+  
   
 
   org.apache.tomcat

Modified: tomcat/tc7.0.x/trunk/res/maven/tomcat-catalina-jmx-remote.pom
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/res/maven/tomcat-cat

[Bug 53034] apache tomcat deployed pom does not contain url or license

2012-05-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53034

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Mark Thomas  ---
Fixed (I hope) in trunk (r1335711) and 7.0.x (r1335715) and will be included in
7.0.28 onwards. I recommend checking the updates before the release since it
looks right to me based on the Maven docs but I am no Maven expert.

-- 
You are receiving this mail because:
You are the assignee for the bug.


svn commit: r1335716 - /tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

2012-05-08 Thread markt
Author: markt
Date: Tue May  8 19:40:24 2012
New Revision: 1335716

URL: http://svn.apache.org/viewvc?rev=1335716&view=rev
Log:
Changelog update

Modified:
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1335716&r1=1335715&r2=1335716&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue May  8 19:40:24 2012
@@ -161,6 +161,11 @@
   
 Add missing dependencies in pom files. (markt)
   
+  
+53034Add project.url and
+project.licenses sections to the POMs for the Maven
+artifacts. (markt)
+  
 
   
 



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



svn commit: r1335731 - /tomcat/trunk/java/org/apache/catalina/connector/Request.java

2012-05-08 Thread markt
Author: markt
Date: Tue May  8 20:05:00 2012
New Revision: 1335731

URL: http://svn.apache.org/viewvc?rev=1335731&view=rev
Log:
Ensure maxParameterCount applies to multi-part requests handled via Servlet 3.0 
upload

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

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?rev=1335731&r1=1335730&r2=1335731&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Tue May  8 
20:05:00 2012
@@ -2468,6 +2468,7 @@ public class Request
 }
 
 Parameters parameters = coyoteRequest.getParameters();
+parameters.setLimit(getConnector().getMaxParameterCount());
 
 boolean success = false;
 try {



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



[Bug 53034] apache tomcat deployed pom does not contain url or license

2012-05-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53034

--- Comment #2 from jie...@gmail.com ---
It looks correct, thank you Mark!

-- 
You are receiving this mail because:
You are the assignee for the bug.


svn commit: r1335733 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/connector/Request.java webapps/docs/changelog.xml

2012-05-08 Thread markt
Author: markt
Date: Tue May  8 20:07:23 2012
New Revision: 1335733

URL: http://svn.apache.org/viewvc?rev=1335733&view=rev
Log:
Ensure maxParameterCount applies to multi-part requests handled via Servlet 3.0 
file upload

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1335731

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java?rev=1335733&r1=1335732&r2=1335733&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java Tue 
May  8 20:07:23 2012
@@ -2665,6 +2665,7 @@ public class Request
 }
 
 Parameters parameters = coyoteRequest.getParameters();
+parameters.setLimit(getConnector().getMaxParameterCount());
 
 boolean success = false;
 try {

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1335733&r1=1335732&r2=1335733&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue May  8 20:07:23 2012
@@ -100,6 +100,10 @@
 Make sure ContextMBean#findFilterDefs returns correct filter
 definitions. (kfujino)
   
+  
+Ensure that maxParameterCount applies to multi-part
+requests handled via the Servlet 3 file upload API. (markt)
+  
 
   
   



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



Re: Purpose of unlockAccept

2012-05-08 Thread Costin Manolache
On Tue, May 8, 2012 at 11:54 AM, Mark Thomas  wrote:

> On 08/05/2012 19:47, Costin Manolache wrote:
> > You may still want to accept requests for existing sessions.
> >
> > Both 'graceful shutdown' and app deploy are important cases - it's just
> > that current 'pause()' is not that good for either of them, if you really
> > want to cleanup...
> >
> > Maybe an option to return 503 or custom status/headers - so people can
> > adjust to various LBs.
>
> pause() on the connector means something very different to pause in the
> reverse proxy. In the connector pause means:
> - stop processing new connections
> - close existing connections
> - keep the socket bound
>

I know what it does - I don't know why. If you know the use case for
pause(), it would be great to add it to the javadoc, I haven't found any (
I hope it wasn't me to add it :-)

Anyways - I was mostly curious.

Costin


>
> It is very similar to stop() if bindOnInit==true
>
> I don't see a requirement for "process existing sessions but reject new
> sessions" and if there were such a requirement I'd implement that in a
> Valve (or maybe a Filter), not in the connector.



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


Re: Purpose of unlockAccept

2012-05-08 Thread Mark Thomas
On 08/05/2012 21:09, Costin Manolache wrote:
> On Tue, May 8, 2012 at 11:54 AM, Mark Thomas  wrote:

>> pause() on the connector means something very different to pause in the
>> reverse proxy. In the connector pause means:
>> - stop processing new connections
>> - close existing connections
>> - keep the socket bound
>>
> 
> I know what it does - I don't know why. If you know the use case for
> pause(), it would be great to add it to the javadoc, I haven't found any (
> I hope it wasn't me to add it :-)
> 
> Anyways - I was mostly curious.

I know some folks do use it. I'm not entirely sure of the use case
myself. Very much before my time. If we can drop it entirely I'd be
happy to do that in 8 onwards.

Mark

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



buildbot success in ASF Buildbot on tomcat-7-trunk

2012-05-08 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-7-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-7-trunk/builds/553

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1335716
Blamelist: markt

Build succeeded!

sincerely,
 -The Buildbot





Re: Purpose of unlockAccept

2012-05-08 Thread Mladen Turk

On 05/08/2012 08:54 PM, Mark Thomas wrote:

On 08/05/2012 19:47, Costin Manolache wrote:

You may still want to accept requests for existing sessions.

Both 'graceful shutdown' and app deploy are important cases - it's just
that current 'pause()' is not that good for either of them, if you really
want to cleanup...

Maybe an option to return 503 or custom status/headers - so people can
adjust to various LBs.


pause() on the connector means something very different to pause in the
reverse proxy. In the connector pause means:
- stop processing new connections
- close existing connections


So it closes existing connections or waits for response finish
and closes the sockets?
I always thought it's similar to graceful shutdown which
would imply that it waits till all current req/resp
cycles are finished (probably forcing keepAlive = false)


- keep the socket bound

It is very similar to stop() if bindOnInit==true







Regards
--
^TM

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



Re: Purpose of unlockAccept

2012-05-08 Thread Mark Thomas
On 08/05/2012 21:33, Mladen Turk wrote:
> On 05/08/2012 08:54 PM, Mark Thomas wrote:
>> On 08/05/2012 19:47, Costin Manolache wrote:
>>> You may still want to accept requests for existing sessions.
>>>
>>> Both 'graceful shutdown' and app deploy are important cases - it's just
>>> that current 'pause()' is not that good for either of them, if you
>>> really
>>> want to cleanup...
>>>
>>> Maybe an option to return 503 or custom status/headers - so people can
>>> adjust to various LBs.
>>
>> pause() on the connector means something very different to pause in the
>> reverse proxy. In the connector pause means:
>> - stop processing new connections
>> - close existing connections
> 
> So it closes existing connections or waits for response finish
> and closes the sockets?

If the request line has been processed, a request is allowed to complete
and then the connection is closed. If a connection is in keep-alive, the
connection is closed immediately.

Mark

> I always thought it's similar to graceful shutdown which
> would imply that it waits till all current req/resp
> cycles are finished (probably forcing keepAlive = false)
> 
>> - keep the socket bound
>>
>> It is very similar to stop() if bindOnInit==true
>>
> 
> 
> 
> 
> 
> Regards


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



buildbot failure in ASF Buildbot on tomcat-7-trunk

2012-05-08 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-7-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-7-trunk/builds/554

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1335733
Blamelist: markt

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot




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



Re: [jira] [Created] (MTOMCAT-125) mvn tomcat7:run got "javax.naming.NameNotFoundException: Name jdbc is not bound in this Context"

2012-05-08 Thread Roberto Cisternino
Unfortunately do not seems to contain any fix related to that issue.

I hope to find the time to get my logs and extract full details to open an
issue asap.

Thanks

On Tue, May 8, 2012 at 2:28 PM, Henri Gomez [via Tomcat] <
ml-node+s10n4960281...@n6.nabble.com> wrote:

> Java 7 u4 is available for some time now.
>
> Did you try it ?
>
> Le 8 mai 2012 à 12:03, Roberto Cisternino <[hidden 
> email]>
> a écrit :
>
> > It seems to me a problem  related to a naming bug in JDK 1.7.x
> > I had similar problems using Glassfish when I upgraded from 3.1.1 to
> 3.1.2
> > and on that time the JDK 1.7.x was recommended... I did it and my stable
> > enterprise application stopped working.
> >
> > I would recommend to stay with JDK 1.6.x at least until there will be a
> fix
> >> JDK 1.7u3
> >
> > --
> > View this message in context:
> http://tomcat.10.n6.nabble.com/jira-Created-MTOMCAT-125-mvn-tomcat7-run-got-javax-naming-NameNotFoundException-Name-jdbc-is-not-bou-tp4562031p4960028.html
> > Sent from the Tomcat - Dev mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: [hidden 
> > email]
> > For additional commands, e-mail: [hidden 
> > email]
> >
>
> -
> To unsubscribe, e-mail: [hidden 
> email]
> For additional commands, e-mail: [hidden 
> email]
>
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://tomcat.10.n6.nabble.com/jira-Created-MTOMCAT-125-mvn-tomcat7-run-got-javax-naming-NameNotFoundException-Name-jdbc-is-not-bou-tp4562031p4960281.html
>  To unsubscribe from [jira] [Created] (MTOMCAT-125) mvn tomcat7:run got
> "javax.naming.NameNotFoundException: Name jdbc is not bound in this
> Context", click 
> here
> .
> NAML
>



-- 
Roberto Cisternino


--
View this message in context: 
http://tomcat.10.n6.nabble.com/jira-Created-MTOMCAT-125-mvn-tomcat7-run-got-javax-naming-NameNotFoundException-Name-jdbc-is-not-bou-tp4562031p4961488.html
Sent from the Tomcat - Dev mailing list archive at Nabble.com.

[GUMP@vmgump]: Project tomcat-tc7.0.x-test (in module tomcat-7.0.x) failed

2012-05-08 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-tc7.0.x-test has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 5 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-tc7.0.x-test :  Tomcat 7.x, a web server implementing Java Servlet 
3.0,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-test/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp-src.jar.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
commons-daemon.native.src.tgz.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
tomcat-native.tar.gz.
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp.home.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-7.0.x/output/build/logs



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-test/gump_work/build_tomcat-7.0.x_tomcat-tc7.0.x-test.html
Work Name: build_tomcat-7.0.x_tomcat-tc7.0.x-test (Type: Build)
Work ended in a state of : Failed
Elapsed: 22 mins 54 secs
Command Line: /usr/lib/jvm/java-6-openjdk/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only org.apache.tools.ant.Main 
-Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Djunit.jar=/srv/gump/public/workspace/junit/dist/junit-09052012.jar 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-09052012-native-src.tar.gz
 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-09052012-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar
 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-09052012.jar
 
-Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-src.jar
 -Dtest.accesslog=true 
-Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x 
-Dcommons-dbcp.home=/
 srv/gump/public/workspace/commons-dbcp-1.x 
-Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-09052012.jar
 test 
[Working Directory: /srv/gump/public/workspace/tomcat-7.0.x]
CLASSPATH: 
/usr/lib/jvm/java-6-openjdk/lib/tools.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-7.0.x/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/servlet-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/outp
 
ut/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-util.jar:/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar:/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-09052012.jar:/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-09052012.jar:/srv/gump/
 public/workspace/junit/dist/junit-09052012.jar
-
[junit] May 9, 2012 5:02:43

[GUMP@vmgump]: Project tomcat-trunk-test (in module tomcat-trunk) failed

2012-05-08 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-trunk-test has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 5 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-trunk-test :  Tomcat 8.x, a web server implementing Java Servlet 
3.1,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on tomcat-trunk-dbcp exists, no need to add for property 
tomcat-dbcp-src.jar.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
commons-daemon.native.src.tgz.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
tomcat-native.tar.gz.
 -DEBUG- Dependency on tomcat-trunk-dbcp exists, no need to add for property 
tomcat-dbcp.home.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/build/logs



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/gump_work/build_tomcat-trunk_tomcat-trunk-test.html
Work Name: build_tomcat-trunk_tomcat-trunk-test (Type: Build)
Work ended in a state of : Failed
Elapsed: 22 mins 49 secs
Command Line: /usr/lib/jvm/java-6-openjdk/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only org.apache.tools.ant.Main 
-Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Djunit.jar=/srv/gump/public/workspace/junit/dist/junit-09052012.jar 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-09052012-native-src.tar.gz
 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-09052012-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar
 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-09052012.jar
 
-Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/tomcat-dbcp-src.jar
 -Dtest.accesslog=true 
-Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x 
-Dcommons-dbcp.home=/
 srv/gump/public/workspace/commons-dbcp-1.x 
-Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/tomcat-dbcp-09052012.jar
 test 
[Working Directory: /srv/gump/public/workspace/tomcat-trunk]
CLASSPATH: 
/usr/lib/jvm/java-6-openjdk/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servlet-api.jar:/srv/gump/public/workspace/tomcat-trunk/outp
 
ut/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-jni.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-util.jar:/srv/gump/packages/javamail-1.4/mail.jar:/srv/gump/packages/javamail-1.4/lib/mailapi.jar:/srv/gump/packages/jaf-1.1ea/activation.jar:/srv/gump/packages/eclipse/plugins/org
 
.eclipse.jdt.core_3.4.2/jdtcore.jar:/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/tomcat-dbcp-09052012.jar:/srv/gump/public/workspace