DO NOT REPLY [Bug 48685] Spnego Support in Tomcat

2011-03-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48685

--- Comment #28 from Michael Osipov 1983-01...@gmx.net 2011-03-30 04:12:28 
EDT ---
Created an attachment (id=26814)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=26814)
krb5.conf

This is a sample Kerberos 5 conf file with multi realm config. This one works
in our environment with cross-realm validation and sign on. As well as
obtaining cross-realm service tickets from delegated credential.

-- 
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 48685] Spnego Support in Tomcat

2011-03-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48685

--- Comment #29 from Michael Osipov 1983-01...@gmx.net 2011-03-30 04:14:09 
EDT ---
Created an attachment (id=26815)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=26815)
jaas.conf

this jaas.conf contains two login modules. The 'accept' module validates client
tickets against the keytab of the host. The 'initiate' module enables the
server to authenticate an active directory DC with Kerberos.

-- 
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 48685] Spnego Support in Tomcat

2011-03-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48685

--- Comment #30 from Michael Osipov 1983-01...@gmx.net 2011-03-30 04:15:38 
EDT ---
Mark,

I have attached some sample config files to make it run. This solution
uses a keytab to validate tickets.

I am aware of the Spring way, we use that Sec Extension also but I don't
like that because of the following drawbacks:

1. You have ugly inline code which has to be maintained.
2. You have to provide a module for every JVM implementation (Oracle, IBM,
etc) which the user would have again to configure
3. You cannot use your custom Krb5 modules which could happen. You have
to alter and recompile tomcat then = ugly
4. You lose the entire configuration flexiblity of the modules unless you
pass all config params of the modules through the authenticator = even
more code.

I'd rather stick with the login modules because they are proven to work
well and are documented thoroughly by Oracle.

I have tried to keep the implementation as simple as possible. Going the 
above way would require way more code.

Mike

-- 
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 48685] Spnego Support in Tomcat

2011-03-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48685

--- Comment #31 from Mark Thomas ma...@apache.org 2011-03-30 07:01:50 EDT ---
(In reply to comment #30)
 I have attached some sample config files to make it run. This solution
 uses a keytab to validate tickets.

Thanks. It was the jaas.conf that I hadn't been able to figure out.

 I am aware of the Spring way, we use that Sec Extension also but I don't
 like that because of the following drawbacks:
 
 1. You have ugly inline code which has to be maintained.
 2. You have to provide a module for every JVM implementation (Oracle, IBM,
 etc) which the user would have again to configure
 3. You cannot use your custom Krb5 modules which could happen. You have
 to alter and recompile tomcat then = ugly
 4. You lose the entire configuration flexiblity of the modules unless you
 pass all config params of the modules through the authenticator = even
 more code.
 
 I'd rather stick with the login modules because they are proven to work
 well and are documented thoroughly by Oracle.
 
 I have tried to keep the implementation as simple as possible. Going the 
 above way would require way more code.

My primary aim was getting something to work. As a result of that experience, I
wanted to keep the configuration as simple as possible - i.e. use sensible
defaults and provide a mechanism for the user to override them. However, I
hadn't considered custom login modules or noticed the one currently used is an
Oracle internal one. I'm leaning towards restoring using the jaas.conf file as
it is the elegant solution to all of those problems and, as you point out, it
means less code.

My one concern is that it requires users to do slightly more to get SPNEGO to
work. I think that can be overcome by good documentation. On that note, what
Oracle documentation were you referring to? If there is a good explanation of
this stuff I'd like to include a reference to it in the Tomcat docs.

-- 
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 50995] bug of log

2011-03-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50995

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID

--- Comment #1 from Mark Thomas ma...@apache.org 2011-03-30 07:10:18 EDT ---
Bugzilla is not a support forum. Please use the users mailing list.

-- 
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 50885] JspServletWrapper can call destroy() on a JSP page that is still in service()

2011-03-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50885

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX

--- Comment #2 from Mark Thomas ma...@apache.org 2011-03-30 07:10:57 EDT ---
AS per my previous 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



svn commit: r1086918 - in /tomcat/trunk: java/org/apache/catalina/connector/ResponseFacade.java java/org/apache/catalina/servlets/DefaultServlet.java webapps/docs/changelog.xml

2011-03-30 Thread markt
Author: markt
Date: Wed Mar 30 12:04:48 2011
New Revision: 1086918

URL: http://svn.apache.org/viewvc?rev=1086918view=rev
Log:
Protect the DefaultServlet against Filters etc writing to the response which 
will a) break partial get support and b) mean setting on content length will 
result in a truncated response.
This also fixers some TCK failures since the TCK sometimes writes to the 
response with a filter.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/ResponseFacade.java
tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/connector/ResponseFacade.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/ResponseFacade.java?rev=1086918r1=1086917r2=1086918view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/ResponseFacade.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/ResponseFacade.java Wed Mar 
30 12:04:48 2011
@@ -163,6 +163,16 @@ public class ResponseFacade 
 }
 
 
+public long getContentWritten() {
+
+if (response == null) {
+throw new IllegalStateException(
+sm.getString(responseFacade.nullResponse));
+}
+
+return response.getContentWritten();
+}
+
 //  ServletResponse Methods
 
 

Modified: tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java?rev=1086918r1=1086917r2=1086918view=diff
==
--- tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java Wed Mar 
30 12:04:48 2011
@@ -47,6 +47,8 @@ import javax.servlet.RequestDispatcher;
 import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
 import javax.servlet.ServletOutputStream;
+import javax.servlet.ServletResponse;
+import javax.servlet.ServletResponseWrapper;
 import javax.servlet.UnavailableException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
@@ -60,6 +62,7 @@ import javax.xml.transform.stream.Stream
 
 import org.apache.catalina.Globals;
 import org.apache.catalina.connector.RequestFacade;
+import org.apache.catalina.connector.ResponseFacade;
 import org.apache.catalina.util.RequestUtil;
 import org.apache.catalina.util.ServerInfo;
 import org.apache.catalina.util.URLEncoder;
@@ -885,6 +888,21 @@ public class DefaultServlet
 
 }
 
+// Check to see if a Filter, Valve of wrapper has written some content.
+// If it has, disable range requests and setting of a content length
+// since neither can be done reliably.
+ServletResponse r = response;
+long contentWritten = 0;
+while (r instanceof ServletResponseWrapper) {
+r = ((ServletResponseWrapper) r).getResponse();
+}
+if (r instanceof ResponseFacade) {
+contentWritten = ((ResponseFacade) r).getContentWritten();
+}
+if (contentWritten  0) {
+ranges = FULL;
+}
+
 if ( (cacheEntry.context != null)
 || isError
 || ( ((ranges == null) || (ranges.isEmpty()))
@@ -903,11 +921,17 @@ public class DefaultServlet
 if (debug  0)
 log(DefaultServlet.serveFile:  contentLength= +
 contentLength);
-if (contentLength  Integer.MAX_VALUE) {
-response.setContentLength((int) contentLength);
-} else {
-// Set the content-length as String to be able to use a 
long
-response.setHeader(content-length,  + contentLength);
+// Don't set a content length if something else has already
+// written to the response.
+if (contentWritten  0) {
+if (contentLength  Integer.MAX_VALUE) {
+response.setContentLength((int) contentLength);
+} else {
+// Set the content-length as String to be able to use a
+// long
+response.setHeader(content-length,
+ + contentLength);
+}
 }
 }
 

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1086918r1=1086917r2=1086918view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed 

svn commit: r1086928 - in /tomcat/trunk: java/org/apache/catalina/core/StandardContext.java webapps/docs/changelog.xml

2011-03-30 Thread markt
Author: markt
Date: Wed Mar 30 12:26:39 2011
New Revision: 1086928

URL: http://svn.apache.org/viewvc?rev=1086928view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50991
Stop the resources after they have been unbound rather than before

Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/trunk/webapps/docs/changelog.xml

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=1086928r1=1086927r2=1086928view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Wed Mar 30 
12:26:39 2011
@@ -5393,10 +5393,6 @@ public class StandardContext extends Con
 // Binding thread
 ClassLoader oldCCL = bindThread();
 
-if (namingResources != null) {
-namingResources.stop();
-}
-
 try {
 
 // Stop our child containers, if any
@@ -5443,6 +5439,13 @@ public class StandardContext extends Con
 
 fireLifecycleEvent(Lifecycle.CONFIGURE_STOP_EVENT, null);
 
+// JNDI resources are unbound in CONFIGURE_STOP_EVENT so it is now
+// safe to stop the resources which will trigger the close method 
if
+// present
+if (namingResources != null) {
+namingResources.stop();
+}
+
 // Stop the Valves in our pipeline (including the basic), if any
 if (pipeline instanceof Lifecycle) {
 ((Lifecycle) pipeline).stop();

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1086928r1=1086927r2=1086928view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Mar 30 12:26:39 2011
@@ -110,6 +110,11 @@
 Also prevent the DefaultServlet from setting a content length header
 since this too cannot be reliably determined. (markt)
   /fix
+  fix
+bug50991/bug: Fix regression in fix for bug25060/bug that 
called
+close on a JNDI resource while it was still available to the
+application. (markt)
+  /fix
 /changelog
   /subsection
   subsection name=Coyote



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



DO NOT REPLY [Bug 50991] Data source is closed before contextDestroyed is executed. tomcat 7.0.11

2011-03-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50991

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #2 from Mark Thomas ma...@apache.org 2011-03-30 08:27:22 EDT ---
Thanks for the report. This has been fixed in 7.0.x and will be included in
7.0.12 onwards. I'll be looking at Filip's suggestion next.

-- 
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: r1086935 - /tomcat/trunk/java/org/apache/catalina/core/StandardContext.java

2011-03-30 Thread markt
Author: markt
Date: Wed Mar 30 12:48:13 2011
New Revision: 1086935

URL: http://svn.apache.org/viewvc?rev=1086935view=rev
Log:
Correct fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50991
Stop resource after app has finished with them but before they are unbound

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

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=1086935r1=1086934r2=1086935view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Wed Mar 30 
12:48:13 2011
@@ -5437,15 +5437,16 @@ public class StandardContext extends Con
 if (log.isDebugEnabled())
 log.debug(Processing standard container shutdown);
 
-fireLifecycleEvent(Lifecycle.CONFIGURE_STOP_EVENT, null);
-
-// JNDI resources are unbound in CONFIGURE_STOP_EVENT so it is now
-// safe to stop the resources which will trigger the close method 
if
-// present
+// JNDI resources are unbound in CONFIGURE_STOP_EVENT so stop
+// naming resoucres before they are unbound since NamingResoucres
+// does a JNDI lookup to retrieve the resource. This needs to be
+// after the application has finished with the resource 
 if (namingResources != null) {
 namingResources.stop();
 }
 
+fireLifecycleEvent(Lifecycle.CONFIGURE_STOP_EVENT, null);
+
 // Stop the Valves in our pipeline (including the basic), if any
 if (pipeline instanceof Lifecycle) {
 ((Lifecycle) pipeline).stop();



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



svn commit: r1086950 - in /tomcat/trunk: java/org/apache/catalina/deploy/ webapps/docs/ webapps/docs/config/

2011-03-30 Thread markt
Author: markt
Date: Wed Mar 30 13:35:12 2011
New Revision: 1086950

URL: http://svn.apache.org/viewvc?rev=1086950view=rev
Log:
Implment Filip's idea for a configurable close method

Modified:
tomcat/trunk/java/org/apache/catalina/deploy/ContextResource.java
tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties
tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/config/context.xml

Modified: tomcat/trunk/java/org/apache/catalina/deploy/ContextResource.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/ContextResource.java?rev=1086950r1=1086949r2=1086950view=diff
==
--- tomcat/trunk/java/org/apache/catalina/deploy/ContextResource.java (original)
+++ tomcat/trunk/java/org/apache/catalina/deploy/ContextResource.java Wed Mar 
30 13:35:12 2011
@@ -80,6 +80,24 @@ public class ContextResource extends Res
 this.singleton = singleton;
 }
 
+
+/**
+ * The name of the zero argument method to be called when the resource is
+ * no longer required to clean-up resources. This method must only speed up
+ * the clean-up of resources that would otherwise happen via garbage
+ * collection.
+ */
+private String closeMethod = close;
+
+public String getCloseMethod() {
+return closeMethod;
+}
+
+public void setCloseMethod(String closeMethod) {
+this.closeMethod = closeMethod;
+}
+
+
 // - Public Methods
 
 

Modified: tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties?rev=1086950r1=1086949r2=1086950view=diff
==
--- tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties Wed 
Mar 30 13:35:12 2011
@@ -43,9 +43,9 @@ webxml.unrecognisedPublicId=The public I
 webXml.version.nfe=Unable to parse [{0}] from the version string [{1}]. This 
component of the version string will be ignored. 
 webXml.wrongFragmentName=Used a wrong fragment name {0} at web.xml 
absolute-ordering tag!
 
-namingResources.cleanupCloseFailed=Failed to invoke close method for resource 
[{0}] in container [{1}] so no cleanup was performed for that resource
-namingResources.cleanupCloseSecurity=Unable to retrieve close method for 
resource [{0}] in container [{1}] so no cleanup was performed for that resource
-namingResources.cleanupNoClose=Resource [{0}] in container [{1}] does not have 
a close method so no cleanup was performed for that resource
+namingResources.cleanupCloseFailed=Failed to invoke method [{0}] for resource 
[{1}] in container [{2}] so no cleanup was performed for that resource
+namingResources.cleanupCloseSecurity=Unable to retrieve method [{0}] for 
resource [{1}] in container [{2}] so no cleanup was performed for that resource
+namingResources.cleanupNoClose=Resource [{0}] in container [{1}] does not have 
a [{2}] method so no cleanup was performed for that resource
 namingResources.cleanupNoContext=Failed to retrieve JNDI naming context for 
container [{0}] so no cleanup was performed for that container
 namingResources.cleanupNoResource=Failed to retrieve JNDI resource [{0}] for 
container [{1}] so no cleanup was performed for that resource
 namingResources.mbeanCreateFail=Failed to create MBean for naming resource 
[{0}]

Modified: tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java?rev=1086950r1=1086949r2=1086950view=diff
==
--- tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java (original)
+++ tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java Wed Mar 
30 13:35:12 2011
@@ -28,7 +28,6 @@ import java.util.HashMap;
 import java.util.Hashtable;
 
 import javax.naming.NamingException;
-import javax.sql.DataSource;
 
 import org.apache.catalina.Container;
 import org.apache.catalina.Context;
@@ -981,54 +980,57 @@ public class NamingResources extends Lif
 return;
 }
 for (ContextResource cr: resources.values()) {
-if (DataSource.class.getName().equals(cr.getType())) {
+String closeMethod = cr.getCloseMethod(); 
+if (closeMethod != null  closeMethod.length()  0) {
 String name = cr.getName();
-DataSource ds;
+Object resource;
 try {
- ds = (DataSource) ctxt.lookup(name);
+ resource = ctxt.lookup(name);
 } 

DO NOT REPLY [Bug 50991] Data source is closed before contextDestroyed is executed. tomcat 7.0.11

2011-03-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50991

--- Comment #3 from Mark Thomas ma...@apache.org 2011-03-30 09:35:36 EDT ---
Filip's suggested enhancement will also be in 7.0.12

-- 
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: r1086969 - in /tomcat/trunk: java/org/apache/catalina/startup/HostConfig.java webapps/docs/changelog.xml

2011-03-30 Thread markt
Author: markt
Date: Wed Mar 30 14:33:30 2011
New Revision: 1086969

URL: http://svn.apache.org/viewvc?rev=1086969view=rev
Log:
Correctly track changes to context.xml files and trigger redeployment when 
copyXML is set to false

Modified:
tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java?rev=1086969r1=1086968r2=1086969view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java Wed Mar 30 
14:33:30 2011
@@ -777,8 +777,15 @@ public class HostConfig
 JarEntry entry = null;
 InputStream istream = null;
 BufferedOutputStream ostream = null;
-File xml = new File
-(configBase(), file.substring(0, file.lastIndexOf(.)) + .xml);
+File xml;
+if (copyXML) {
+xml = new File(configBase(),
+file.substring(0, file.lastIndexOf(.)) + .xml);
+} else {
+xml = new File(appBase(),
+file.substring(0, file.lastIndexOf(.)) +
+/META-INF/context.xml);
+}
 boolean xmlInWar = false;
 
 if (deployXML  !xml.exists()) {
@@ -931,6 +938,10 @@ public class HostConfig
 Long.valueOf(docBase.lastModified()));
 addWatchedResources(deployedApp, docBase.getAbsolutePath(),
 context);
+if (deployXML  !copyXML  xmlInWar) {
+deployedApp.redeployResources.put(xml.getAbsolutePath(),
+Long.valueOf(xml.lastModified()));
+}
 } else {
 addWatchedResources(deployedApp, null, context);
 }

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1086969r1=1086968r2=1086969view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Mar 30 14:33:30 2011
@@ -119,6 +119,10 @@
 Provide a configuration option that lets the close method to be used 
for
 a JNDI Resource to be defined by the user. (markt)
   /add
+  fix
+Correctly track changes to context.xml files and trigger redeployment
+when copyXML is set to false. (markt) 
+  /fix
 /changelog
   /subsection
   subsection name=Coyote



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



svn commit: r1086970 - /tomcat/trunk/webapps/docs/config/context.xml

2011-03-30 Thread kkolinko
Author: kkolinko
Date: Wed Mar 30 14:35:03 2011
New Revision: 1086970

URL: http://svn.apache.org/viewvc?rev=1086970view=rev
Log:
Correct a typo

Modified:
tomcat/trunk/webapps/docs/config/context.xml

Modified: tomcat/trunk/webapps/docs/config/context.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/context.xml?rev=1086970r1=1086969r2=1086970view=diff
==
--- tomcat/trunk/webapps/docs/config/context.xml (original)
+++ tomcat/trunk/webapps/docs/config/context.xml Wed Mar 30 14:35:03 2011
@@ -1015,7 +1015,7 @@
 
   attribute name=closeMethod required=false
 pName of zero-argument method to call on the resource when it is no
-longer required to spped up clean-up of resources that would otherwise
+longer required to speed up clean-up of resources that would otherwise
 happen as part of garbage collection. If not specificed, the default
 value of codeclose/code is used./p
   /attribute



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



svn commit: r1086975 - /tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java

2011-03-30 Thread kkolinko
Author: kkolinko
Date: Wed Mar 30 14:56:09 2011
New Revision: 1086975

URL: http://svn.apache.org/viewvc?rev=1086975view=rev
Log:
Followup to r1086950: Simplify code

Modified:
tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java

Modified: tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java?rev=1086975r1=1086974r2=1086975view=diff
==
--- tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java (original)
+++ tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java Wed Mar 
30 14:56:09 2011
@@ -991,7 +991,7 @@ public class NamingResources extends Lif
 cr.getName(), container), e);
 continue;
 }
-cleanUp(resource, name, cr.getCloseMethod());
+cleanUp(resource, name, closeMethod);
 }
 }
 }



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



trunk: TestDefaultServlet fails

2011-03-30 Thread Konstantin Kolinko
TEST-org.apache.catalina.servlets.TestDefaultServlet.BIO.txt

Testcase: testCustomErrorPage took 1,359 sec
FAILED
expected:[It is 404.html] but was:[eIt is 404.html0]
junit.framework.ComparisonFailure: expected:[It is 404.html] but
was:[eIt is 404.html0]
at 
org.apache.catalina.servlets.TestDefaultServlet.testCustomErrorPage(TestDefaultServlet.java:218)


I have not investigated what the cause is yet. (I'll be busy several
next hours).
The output folder was cleaned before running the build, so this must
be a clean one.

Best regards,
Konstantin Kolinko

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



svn commit: r1086992 - in /tomcat/trunk: java/org/apache/catalina/manager/ java/org/apache/catalina/manager/host/ java/org/apache/catalina/manager/util/ res/findbugs/

2011-03-30 Thread markt
Author: markt
Date: Wed Mar 30 15:41:02 2011
New Revision: 1086992

URL: http://svn.apache.org/viewvc?rev=1086992view=rev
Log:
Fix Eclipse/FindBugs warnings apart from those that trigger bug 50984

Modified:
tomcat/trunk/java/org/apache/catalina/manager/Constants.java
tomcat/trunk/java/org/apache/catalina/manager/LocalStrings.properties
tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java
tomcat/trunk/java/org/apache/catalina/manager/StatusManagerServlet.java
tomcat/trunk/java/org/apache/catalina/manager/host/Constants.java

tomcat/trunk/java/org/apache/catalina/manager/host/HTMLHostManagerServlet.java

tomcat/trunk/java/org/apache/catalina/manager/util/BaseSessionComparator.java
tomcat/trunk/java/org/apache/catalina/manager/util/ReverseComparator.java
tomcat/trunk/res/findbugs/filter-false-positives.xml

Modified: tomcat/trunk/java/org/apache/catalina/manager/Constants.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/manager/Constants.java?rev=1086992r1=1086991r2=1086992view=diff
==
--- tomcat/trunk/java/org/apache/catalina/manager/Constants.java (original)
+++ tomcat/trunk/java/org/apache/catalina/manager/Constants.java Wed Mar 30 
15:41:02 2011
@@ -23,176 +23,187 @@ public class Constants {
 
 public static final String Package = org.apache.catalina.manager;
 
-public static final String HTML_HEADER_SECTION =
-html\n +
-head\n +
-style\n +
-org.apache.catalina.util.TomcatCSS.TOMCAT_CSS + \n +
-  table {\n +
-width: 100%;\n +
-  }\n +
-  td.page-title {\n +
-text-align: center;\n +
-vertical-align: top;\n +
-font-family:sans-serif,Tahoma,Arial;\n +
-font-weight: bold;\n +
-background: white;\n +
-color: black;\n +
-  }\n +
-  td.title {\n +
-text-align: left;\n +
-vertical-align: top;\n +
-font-family:sans-serif,Tahoma,Arial;\n +
-font-style:italic;\n +
-font-weight: bold;\n +
-background: #D2A41C;\n +
-  }\n +
-  td.header-left {\n +
-text-align: left;\n +
-vertical-align: top;\n +
-font-family:sans-serif,Tahoma,Arial;\n +
-font-weight: bold;\n +
-background: #FFDC75;\n +
-  }\n +
-  td.header-center {\n +
-text-align: center;\n +
-vertical-align: top;\n +
-font-family:sans-serif,Tahoma,Arial;\n +
-font-weight: bold;\n +
-background: #FFDC75;\n +
-  }\n +
-  td.row-left {\n +
-text-align: left;\n +
-vertical-align: middle;\n +
-font-family:sans-serif,Tahoma,Arial;\n +
-color: black;\n +
-  }\n +
-  td.row-center {\n +
-text-align: center;\n +
-vertical-align: middle;\n +
-font-family:sans-serif,Tahoma,Arial;\n +
-color: black;\n +
-  }\n +
-  td.row-right {\n +
-text-align: right;\n +
-vertical-align: middle;\n +
-font-family:sans-serif,Tahoma,Arial;\n +
-color: black;\n +
-  }\n +
-  TH {\n +
-text-align: center;\n +
-vertical-align: top;\n +
-font-family:sans-serif,Tahoma,Arial;\n +
-font-weight: bold;\n +
-background: #FFDC75;\n +
-  }\n +
-  TD {\n +
-text-align: center;\n +
-vertical-align: middle;\n +
-font-family:sans-serif,Tahoma,Arial;\n +
-color: black;\n +
-  }\n +
-  form {\n +
-margin: 1;\n +
-  }\n +
-  form.inline {\n +
-display: inline;\n +
-  }\n +
-/style\n;
-
-public static final String BODY_HEADER_SECTION =
-title{0}/title\n +
-/head\n +
-\n +
-body bgcolor=\#FF\\n +
-\n +
-table cellspacing=\4\ border=\0\\n +
- tr\n +
-  td colspan=\2\\n +
-   a href=\http://www.apache.org/\;\n +
-img border=\0\ alt=\The Apache Software Foundation\ 
align=\left\\n +
- src=\{0}/images/asf-logo.gif\\n +
-   /a\n +
-   a href=\http://tomcat.apache.org/\;\n +
-img border=\0\ alt=\The Tomcat Servlet/JSP Container\\n +
- align=\right\ src=\{0}/images/tomcat.gif\\n +
-   /a\n +
-  /td\n +
- /tr\n +
-/table\n +
-hr size=\1\ noshade=\noshade\\n +
-table cellspacing=\4\ border=\0\\n +
- tr\n +
-  td class=\page-title\ bordercolor=\#00\  +
-align=\left\ nowrap\n +
-   font size=\+2\{1}/font\n +
-  /td\n +
- /tr\n +
-/table\n +

svn commit: r1086995 - /tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java

2011-03-30 Thread markt
Author: markt
Date: Wed Mar 30 15:50:28 2011
New Revision: 1086995

URL: http://svn.apache.org/viewvc?rev=1086995view=rev
Log:
Fix reversed condition in r1086918

Modified:
tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java

Modified: tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java?rev=1086995r1=1086994r2=1086995view=diff
==
--- tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java Wed Mar 
30 15:50:28 2011
@@ -923,7 +923,7 @@ public class DefaultServlet
 contentLength);
 // Don't set a content length if something else has already
 // written to the response.
-if (contentWritten  0) {
+if (contentWritten == 0) {
 if (contentLength  Integer.MAX_VALUE) {
 response.setContentLength((int) contentLength);
 } else {



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



Re: trunk: TestDefaultServlet fails

2011-03-30 Thread Mark Thomas
On 30/03/2011 16:28, Konstantin Kolinko wrote:
 TEST-org.apache.catalina.servlets.TestDefaultServlet.BIO.txt
 
 Testcase: testCustomErrorPage took 1,359 sec
   FAILED
 expected:[It is 404.html] but was:[eIt is 404.html0]
 junit.framework.ComparisonFailure: expected:[It is 404.html] but
 was:[eIt is 404.html0]
   at 
 org.apache.catalina.servlets.TestDefaultServlet.testCustomErrorPage(TestDefaultServlet.java:218)
 
 
 I have not investigated what the cause is yet. (I'll be busy several
 next hours).
 The output folder was cleaned before running the build, so this must
 be a clean one.

Fixed. The extra characters where the result of chunked encoding.

Mark

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



DO NOT REPLY [Bug 50997] New: StandardJarScanner ignores web-fragment.xml files in unpacked jars if they are not ending with .jar

2011-03-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50997

   Summary: StandardJarScanner ignores web-fragment.xml files in
unpacked jars if they are not ending with .jar
   Product: Tomcat 7
   Version: 7.0.11
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: minor
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: rodion.zhitomir...@generation-p.com


Created an attachment (id=26816)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=26816)
Fix for directories in classpath not ending with .jar

We use eclipse sysdeo tomcat plugin for eclipse. It allows us to add target
build directories of eclipse into tomcat classpath. All works fine until we
decided to use web-fragment functionality. It failed to work despite the
config:

JarScanner scanAllDirectories=true/

I fixed the problem. Please, see attached proposed patch.

-- 
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: r1087026 - in /tomcat/trunk: java/org/apache/catalina/manager/LocalStrings.properties java/org/apache/catalina/manager/ManagerServlet.java webapps/docs/changelog.xml

2011-03-30 Thread markt
Author: markt
Date: Wed Mar 30 17:39:54 2011
New Revision: 1087026

URL: http://svn.apache.org/viewvc?rev=1087026view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50984
When using the Manager application ensure that undeployment is reported as 
failed if a file cannot be deleted.

Modified:
tomcat/trunk/java/org/apache/catalina/manager/LocalStrings.properties
tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/manager/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/manager/LocalStrings.properties?rev=1087026r1=1087025r2=1087026view=diff
==
--- tomcat/trunk/java/org/apache/catalina/manager/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/catalina/manager/LocalStrings.properties Wed 
Mar 30 17:39:54 2011
@@ -69,6 +69,7 @@ htmlManagerServlet.title=Tomcat Web Appl
 managerServlet.alreadyContext=FAIL - Application already exists at path {0}
 managerServlet.alreadyDocBase=FAIL - Directory {0} is already in use
 managerServlet.configured=OK - Deployed application from context file {0}
+managerServlet.deleteFail=FAIL - Unable to delete [{0}]. The continued 
presence of this file may cause problems.
 managerServlet.deployed=OK - Deployed application at context path {0}
 managerServlet.deployFailed=FAIL - Failed to deploy application at context 
path {0}
 managerServlet.deployedButNotStarted=FAIL - Deployed application at context 
path {0} but context failed to start
@@ -78,6 +79,7 @@ managerServlet.invalidPath=FAIL - Invali
 managerServlet.invalidWar=FAIL - Invalid application URL {0} was specified
 managerServlet.listed=OK - Listed applications for virtual host {0}
 managerServlet.listitem={0}:{1}:{2}:{3}
+managerServlet.mkdirFail=FAIL - Unable to create directory [{0}]
 managerServlet.noAppBase=FAIL - Cannot identify application base for context 
path {0}
 managerServlet.noCommand=FAIL - No command was specified
 managerServlet.noContext=FAIL - No context exists for path {0}

Modified: tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java?rev=1087026r1=1087025r2=1087026view=diff
==
--- tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java (original)
+++ tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java Wed Mar 
30 17:39:54 2011
@@ -627,7 +627,11 @@ public class ManagerServlet extends Http
 File deployedPath = deployed;
 if (tag != null) {
 deployedPath = new File(versioned, tag);
-deployedPath.mkdirs();
+if (!deployedPath.isDirectory()  !deployedPath.mkdirs()) {
+writer.println(smClient.getString(managerServlet.mkdirFail,
+deployedPath));
+return;
+}
 }
 
 // Upload the web application archive to a local WAR file
@@ -642,7 +646,7 @@ public class ManagerServlet extends Http
 addServiced(name);
 try {
 // Upload WAR
-uploadWar(request, localWar);
+uploadWar(writer, request, localWar, smClient);
 // Copy WAR and XML to the host app base if needed
 if (tag != null) {
 deployedPath = deployed;
@@ -817,7 +821,11 @@ public class ManagerServlet extends Http
 addServiced(name);
 try {
 if (config != null) {
-configBase.mkdirs();
+if (!configBase.isDirectory()  !configBase.mkdirs()) 
{
+writer.println(smClient.getString(
+managerServlet.mkdirFail,configBase));
+return;
+}
 copy(new File(config), 
 new File(configBase, baseName + .xml));
 }
@@ -1333,12 +1341,18 @@ public class ManagerServlet extends Http
 File war = new File(getAppBase(), baseName + .war);
 File dir = new File(getAppBase(), baseName);
 File xml = new File(configBase, baseName + .xml);
-if (war.exists()) {
-war.delete();
-} else if (dir.exists()) {
-undeployDir(dir);
-} else {
-xml.delete();
+if (war.exists()  !war.delete()) {
+writer.println(smClient.getString(
+managerServlet.deleteFail, war));
+return;
+  

DO NOT REPLY [Bug 50984] Manager application fails to report stranded artifacts when undeploying

2011-03-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50984

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #2 from Mark Thomas ma...@apache.org 2011-03-30 13:40:09 EDT ---
Fixed in 7.0.x and will be included in 7.0.12 onwards.

-- 
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 48685] Spnego Support in Tomcat

2011-03-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48685

--- Comment #32 from Michael Osipov 1983-01...@gmx.net 2011-03-30 14:08:52 
EDT ---
(In reply to comment #31)
 (In reply to comment #30)
  I am aware of the Spring way, we use that Sec Extension also but I don't
  like that because of the following drawbacks:
  
  1. You have ugly inline code which has to be maintained.
  2. You have to provide a module for every JVM implementation (Oracle, IBM,
  etc) which the user would have again to configure
  3. You cannot use your custom Krb5 modules which could happen. You have
  to alter and recompile tomcat then = ugly
  4. You lose the entire configuration flexibility of the modules unless you
  pass all config params of the modules through the authenticator = even
  more code.
  
  I'd rather stick with the login modules because they are proven to work
  well and are documented thoroughly by Oracle.
  
  I have tried to keep the implementation as simple as possible. Going the 
  above way would require way more code.
 
 My primary aim was getting something to work. As a result of that experience, 
 I
 wanted to keep the configuration as simple as possible - i.e. use sensible
 defaults and provide a mechanism for the user to override them. However, I
 hadn't considered custom login modules or noticed the one currently used is an
 Oracle internal one. I'm leaning towards restoring using the jaas.conf file as
 it is the elegant solution to all of those problems and, as you point out, it
 means less code.

Mark, you can cut down the config of the authenticator by providing a default
login module name: tomcat-accept. That's it. Your are ready to go.

I checked your commit in svn and the code/config options are bloated in my
opinion due to eh points mentioned above.

There at least two krb5 modules known to me:
http://www.ibm.com/developerworks/java/jdk/security/50/secguides/jgssDocs/api/com/ibm/security/auth/module/Krb5LoginModule.html
http://download.oracle.com/javase/1.4.2/docs/guide/security/jaas/spec/com/sun/security/auth/module/Krb5LoginModule.html

I am happily using this code on Oracle JVM and HP JVM.

Moreover, I'd consider the delegated credential extraction for crucial, this is
one of best features of kerberos. We use them all the time. I wouldn't strip
that.

The realm can be reduced by the login module with tomcat-initiate too. Most
options are optional anyway.

I can provide a sample context.xml which I use in our environment.

 My one concern is that it requires users to do slightly more to get SPNEGO to
 work. I think that can be overcome by good documentation. On that note, what
 Oracle documentation were you referring to? If there is a good explanation of
 this stuff I'd like to include a reference to it in the Tomcat docs.

There is no need to have a concern, those who require SPNEGO auth need to know
about Kerberos and how it works anyway (to some degree).

The documentation needs to be split in 2 parts.
1. Network preparation.
2. Tomcat config.

according 1.: This is more off-topic because this is not a tomcat issue but a
general server admin one. For the sake of completeness, this can be outlined.
We have documented that part. I can upload that too.
according 2.: All you need is pass both properties krb5 and login conf to the
JVM and configure the login module. You're done. Both are already provided as
sample by me.

The oracle documentation refers the the properties, server and client code and
the login module configuration. Everything is well-documented here:
http://download.oracle.com/javase/1.5.0/docs/guide/security/jgss/tutorials/index.html

Just drop a few lines if you need further assistance.

-- 
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 48685] Spnego Support in Tomcat

2011-03-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48685

--- Comment #33 from Michael Osipov 1983-01...@gmx.net 2011-03-30 14:11:08 
EDT ---
Sorry for the spelling, I was to hasty with the 'commit' button.

-- 
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 48685] Spnego Support in Tomcat

2011-03-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48685

--- Comment #34 from Michael Osipov 1983-01...@gmx.net 2011-03-30 14:19:55 
EDT ---
These docs are fine:

http://wiki.alfresco.com/wiki/Configuring_the_CIFS_and_web_servers_for_Kerberos/AD_integration
http://www-01.ibm.com/support/docview.wss?uid=swg21448203

Another issue I'd like to add.

We created a computer account for the server with the UPN host/fqdn and mapped
all SPN to that, so your login module contains as spn the host/fqdn and all
other SPN are automatically validated because they all map to one account. With
this you are able to provide several configs HTTP/, NFS/, and so forth for that
machine.

A simple use case would be that beside the HTTP/ part the webapp hosts a samba
share server. The windows explorer will then create a service ticket cifs/fqdn
for that server which can be verified with the host/ UPN.

-- 
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 48685] Spnego Support in Tomcat

2011-03-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48685

--- Comment #35 from Michael Osipov 1983-01...@gmx.net 2011-03-30 14:29:33 
EDT ---
Sorry for spamming again.

We run mixed environments with Windows Server 2003 and 2008, both serve as KDC.
Server code works on Windows XP and HP-UX flawlessly running JVMs from Oracle
and HP.

Clients which work perfectly are: IE6+, Firefox (complete coverage), JDK URL
Connection (transparently) and the Async HTTP Client
(https://github.com/sonatype/async-http-client) which I have patched also. I
guess CURL works too but did not test.

-- 
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: r1087062 - in /tomcat/trunk: java/org/apache/catalina/startup/ContextConfig.java java/org/apache/tomcat/util/scan/StandardJarScanner.java webapps/docs/changelog.xml

2011-03-30 Thread markt
Author: markt
Date: Wed Mar 30 20:06:25 2011
New Revision: 1087062

URL: http://svn.apache.org/viewvc?rev=1087062view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50997
Relax the requirement that directories must have a name ending in .jar to be 
treated as an expanded JAR file by the default JarScanner.
Based on patch by Rodion Zhitomirsky.

Modified:
tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1087062r1=1087061r2=1087062view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Wed Mar 30 
20:06:25 2011
@@ -2347,7 +2347,7 @@ public class ContextConfig
 public void scan(File file) throws IOException {
 
 InputStream stream = null;
-WebXml fragment = null;
+WebXml fragment = new WebXml();
 
 try {
 File fragmentFile = new File(file, FRAGMENT_LOCATION);
@@ -2356,7 +2356,6 @@ public class ContextConfig
 InputSource source =
 new 
InputSource(fragmentFile.toURI().toURL().toString());
 source.setByteStream(stream);
-fragment = new WebXml();
 parseWebXml(source, fragment, true);
 }
 } finally {
@@ -2367,15 +2366,11 @@ public class ContextConfig
 ExceptionUtils.handleThrowable(t);
 }
 }
-if (fragment == null) {
-fragments.put(file.toURI().toURL().toString(), fragment);
-} else {
-fragment.setURL(file.toURI().toURL());
-if (fragment.getName() == null) {
-fragment.setName(fragment.getURL().toString());
-}
-fragments.put(fragment.getName(), fragment);
+fragment.setURL(file.toURI().toURL());
+if (fragment.getName() == null) {
+fragment.setName(fragment.getURL().toString());
 }
+fragments.put(fragment.getName(), fragment);
 }
 }
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java?rev=1087062r1=1087061r2=1087062view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java Wed 
Mar 30 20:06:25 2011
@@ -271,6 +271,9 @@ public class StandardJarScanner implemen
 if (end != -1) {
 int start = path.lastIndexOf('/', end);
 name = path.substring(start + 1, end + 4);
+} else if (isScanAllDirectories()){
+int start = path.lastIndexOf('/');
+name = path.substring(start + 1);
 }
 
 return name;

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1087062r1=1087061r2=1087062view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Mar 30 20:06:25 2011
@@ -123,6 +123,11 @@
 Correctly track changes to context.xml files and trigger redeployment
 when copyXML is set to false. (markt) 
   /fix
+  fix
+bug50997/bug: Relax the requirement that directories must have a
+name ending in code.jar/code to be treated as an expanded JAR file
+by the default JarScanner. Based on patch by Rodion Zhitomirsky. 
(markt)
+  /fix
 /changelog
   /subsection
   subsection name=Coyote



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



DO NOT REPLY [Bug 50997] StandardJarScanner ignores web-fragment.xml files in unpacked jars if they are not ending with .jar

2011-03-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50997

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #1 from Mark Thomas ma...@apache.org 2011-03-30 16:07:12 EDT ---
Thanks for the report and for the patch. I applied a slightly modified version
to 7.0.x (I fixed the root cause of the NPE) and it will be included in 7.0.12
onwards.

-- 
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: r1087064 - /tomcat/trunk/test/org/apache/catalina/connector/TestConnector.java

2011-03-30 Thread markt
Author: markt
Date: Wed Mar 30 20:26:36 2011
New Revision: 1087064

URL: http://svn.apache.org/viewvc?rev=1087064view=rev
Log:
Requests after the connector has been stopped may time out or return 503s - 
varies by connector. Make sure the test passes with either.

Modified:
tomcat/trunk/test/org/apache/catalina/connector/TestConnector.java

Modified: tomcat/trunk/test/org/apache/catalina/connector/TestConnector.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/connector/TestConnector.java?rev=1087064r1=1087063r2=1087064view=diff
==
--- tomcat/trunk/test/org/apache/catalina/connector/TestConnector.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/connector/TestConnector.java Wed Mar 
30 20:26:36 2011
@@ -16,6 +16,8 @@
  */
 package org.apache.catalina.connector;
 
+import java.net.SocketTimeoutException;
+
 import org.apache.catalina.Context;
 import org.apache.catalina.Wrapper;
 import org.apache.catalina.startup.TesterServlet;
@@ -52,8 +54,14 @@ public class TestConnector extends Tomca
 
 connector.stop();
 
-rc = getUrl(http://localhost:; + getPort() + /, bc, 1000,
-null, null);
+try {
+rc = getUrl(http://localhost:; + getPort() + /, bc, 1000,
+null, null);
+} catch (SocketTimeoutException ste) {
+// May also see this with NIO
+// Make sure the test passes if we do
+rc = 503;
+}
 assertEquals(503, rc);
 }
 }



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



svn commit: r1087090 - in /tomcat/trunk/modules/jdbc-pool: .classpath build.xml java/ pom.xml src/ src/main/ src/main/java/ src/test/ src/test/java/ test/

2011-03-30 Thread fhanik
Author: fhanik
Date: Wed Mar 30 21:40:59 2011
New Revision: 1087090

URL: http://svn.apache.org/viewvc?rev=1087090view=rev
Log:
Add in ability to build with Maven

Added:
tomcat/trunk/modules/jdbc-pool/pom.xml
tomcat/trunk/modules/jdbc-pool/src/
tomcat/trunk/modules/jdbc-pool/src/main/
tomcat/trunk/modules/jdbc-pool/src/main/java/
  - copied from r1086702, tomcat/trunk/modules/jdbc-pool/java/
tomcat/trunk/modules/jdbc-pool/src/test/
tomcat/trunk/modules/jdbc-pool/src/test/java/
  - copied from r1086702, tomcat/trunk/modules/jdbc-pool/test/
Removed:
tomcat/trunk/modules/jdbc-pool/java/
tomcat/trunk/modules/jdbc-pool/test/
Modified:
tomcat/trunk/modules/jdbc-pool/.classpath
tomcat/trunk/modules/jdbc-pool/build.xml

Modified: tomcat/trunk/modules/jdbc-pool/.classpath
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/.classpath?rev=1087090r1=1087089r2=1087090view=diff
==
--- tomcat/trunk/modules/jdbc-pool/.classpath (original)
+++ tomcat/trunk/modules/jdbc-pool/.classpath Wed Mar 30 21:40:59 2011
@@ -6,6 +6,6 @@
classpathentry kind=var 
path=TOMCAT_LIBS_BASE/tomcat7-deps/dbcp/tomcat-dbcp.jar 
sourcepath=/TOMCAT_LIBS_BASE/tomcat6-deps/dbcp/src/java/
classpathentry kind=con 
path=org.eclipse.jdt.launching.JRE_CONTAINER/
classpathentry kind=lib path=includes/h2/bin/h2-1.2.129.jar/
-   classpathentry combineaccessrules=false kind=src 
path=/tomcat-trunk/
+   classpathentry combineaccessrules=false kind=src 
path=/tomcat-7.0.x/
classpathentry kind=output path=bin/
 /classpath

Modified: tomcat/trunk/modules/jdbc-pool/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/build.xml?rev=1087090r1=1087089r2=1087090view=diff
==
--- tomcat/trunk/modules/jdbc-pool/build.xml (original)
+++ tomcat/trunk/modules/jdbc-pool/build.xml Wed Mar 30 21:40:59 2011
@@ -114,7 +114,7 @@
   target name=javadoc depends=prepare
   
  xslt basedir=${tomcat.pool}/doc
-  destdir=${basedir}/java/org/apache/tomcat/jdbc/pool
+  destdir=${basedir}/src/main/java/org/apache/tomcat/jdbc/pool
   extension=.html
   style=${basedir}/doc/package.xsl
   excludes=build.xml
@@ -122,9 +122,9 @@
   param name=relative-path 
expression=http://tomcat.apache.org/tomcat-6.0-doc/
   param name=apache-logo expression=/images/asf-logo.gif/
 /xslt
-move tofile=${basedir}/java/org/apache/tomcat/jdbc/pool/package.html
-  file=${basedir}/java/org/apache/tomcat/jdbc/pool/jdbc-pool.html/
-javadoc sourcepath=${basedir}/java destdir=${tomcat.api} 
verbose=false
+move 
tofile=${basedir}/src/main/java/org/apache/tomcat/jdbc/pool/package.html
+  
file=${basedir}/src/main/java/org/apache/tomcat/jdbc/pool/jdbc-pool.html/
+javadoc sourcepath=${basedir}/src/main/java destdir=${tomcat.api} 
verbose=false
  link=http://java.sun.com/javase/6/docs/api/;
   classpath refid=tomcat.jdbc.classpath/
 /javadoc
@@ -133,13 +133,13 @@
   fileset dir=${tomcat.api}/
   fileset refid=license.notice/
 /jar
-delete file=${basedir}/java/org/apache/tomcat/jdbc/pool/package.html/
+delete 
file=${basedir}/src/main/java/org/apache/tomcat/jdbc/pool/package.html/
   /target
   
   target name=build depends=prepare,download
 mkdir dir=${tomcat.pool}/
 !-- compile org.apache.tomcat.jdbc--
-javac srcdir=${basedir}/java destdir=${tomcat.classes}
+javac srcdir=${basedir}/src/main/java destdir=${tomcat.classes}
debug=${compile.debug}
deprecation=${compile.deprecation}
source=${compile.source}
@@ -155,7 +155,7 @@
   fileset dir=${tomcat.classes}
 include name=org/apache/tomcat/jdbc/** /
   /fileset
-  fileset dir=${basedir}/java
+  fileset dir=${basedir}/src/main/java
 include name=org/apache/tomcat/jdbc/**/*.xml /
   /fileset
   fileset refid=license.notice/
@@ -163,7 +163,7 @@
 
 !-- connection pool source file--
 jar jarfile=${tomcat-jdbc-src.jar} update=true
-  fileset dir=${basedir}/java
+  fileset dir=${basedir}/src/main/java
 include name=org/apache/tomcat/jdbc/** /
   /fileset
   fileset refid=license.notice/
@@ -173,7 +173,7 @@
   target name=build-test depends=prepare, build, download-test
 mkdir dir=${tomcat.pool}/
 !-- compile org.apache.tomcat.jdbc--
-javac srcdir=${basedir}/test destdir=${tomcat.testclasses}
+javac srcdir=${basedir}/src/test/java destdir=${tomcat.testclasses}
debug=${compile.debug}
deprecation=${compile.deprecation}
source=${compile.source}
@@ -189,13 +189,13 @@
   fileset dir=${tomcat.testclasses}
 include name=org/apache/tomcat/jdbc/** /
   /fileset
-  fileset dir=${basedir}/test
+  

svn commit: r1087095 - in /tomcat/trunk/modules/jdbc-pool: .classpath .project pom.xml

2011-03-30 Thread fhanik
Author: fhanik
Date: Wed Mar 30 21:49:35 2011
New Revision: 1087095

URL: http://svn.apache.org/viewvc?rev=1087095view=rev
Log:
delete eclipse files, these can be generated

Removed:
tomcat/trunk/modules/jdbc-pool/.classpath
tomcat/trunk/modules/jdbc-pool/.project
Modified:
tomcat/trunk/modules/jdbc-pool/pom.xml

Modified: tomcat/trunk/modules/jdbc-pool/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/pom.xml?rev=1087095r1=1087094r2=1087095view=diff
==
--- tomcat/trunk/modules/jdbc-pool/pom.xml (original)
+++ tomcat/trunk/modules/jdbc-pool/pom.xml Wed Mar 30 21:49:35 2011
@@ -102,7 +102,7 @@
 version2.5.1/version
 configuration
   downloadSourcestrue/downloadSources
-  downloadJavadocsfalse/downloadJavadocs
+  downloadJavadocstrue/downloadJavadocs
 /configuration
   /plugin
 /plugins



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



[RESULT] Re: [VOTE] Release jdbc-pool 1.1.0.1

2011-03-30 Thread Filip Hanik - Dev Lists

Canceled. Not enough votes.

Filip

On 3/3/2011 12:24 PM, Filip Hanik - Dev Lists wrote:

Source and Binary Packages
http://people.apache.org/~fhanik/jdbc-pool/v1.1.0.1/

Tag
http://svn.apache.org/repos/asf/tomcat/tags/JDBC_POOL_1_1_0_1/

Documentation
http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html

The proposed 1.1.0.1 release is:

[ ] Broken - do not release
[ ] Alpha  - go ahead and release as 1.1.0.1 Alpha
[ ] Beta   - go ahead and release as 1.1.0.1 Beta
[ ] Stable - go ahead and release as 1.1.0.1 Stable

best
Filip

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



-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1204 / Virus Database: 1435/3479 - Release Date: 03/03/11





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



Re: svn commit: r1087090 - in /tomcat/trunk/modules/jdbc-pool: .classpath build.xml java/ pom.xml src/ src/main/ src/main/java/ src/test/ src/test/java/ test/

2011-03-30 Thread sebb
On 30 March 2011 22:41,  fha...@apache.org wrote:
 Author: fhanik
 Date: Wed Mar 30 21:40:59 2011
 New Revision: 1087090

 URL: http://svn.apache.org/viewvc?rev=1087090view=rev
 Log:
 Add in ability to build with Maven

 Added:
    tomcat/trunk/modules/jdbc-pool/pom.xml


 URL: 
 http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/pom.xml?rev=1087090view=auto
 ==
 --- tomcat/trunk/modules/jdbc-pool/pom.xml (added)
 +++ tomcat/trunk/modules/jdbc-pool/pom.xml Wed Mar 30 21:40:59 2011
 @@ -0,0 +1,110 @@
 +project xmlns=http://maven.apache.org/POM/4.0.0; 
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 +  xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
 http://maven.apache.org/xsd/maven-4.0.0.xsd;
 +  modelVersion4.0.0/modelVersion

Needs to reference the Apache Parent Pom in order to get the correct repos.

i.e. add the following:

  parent
groupIdorg.apache/groupId
artifactIdapache/artifactId
version9/version
  /parent

 +  groupIdorg.apache.tomcat/groupId
 +  artifactIdjdbc-pool/artifactId
 +  version1.2-SNAPSHOT/version
 +  packagingjar/packaging
 +

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



svn commit: r1087110 - /tomcat/trunk/modules/jdbc-pool/pom.xml

2011-03-30 Thread fhanik
Author: fhanik
Date: Wed Mar 30 22:26:29 2011
New Revision: 1087110

URL: http://svn.apache.org/viewvc?rev=1087110view=rev
Log:
add in plugin to package

Modified:
tomcat/trunk/modules/jdbc-pool/pom.xml

Modified: tomcat/trunk/modules/jdbc-pool/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/pom.xml?rev=1087110r1=1087109r2=1087110view=diff
==
--- tomcat/trunk/modules/jdbc-pool/pom.xml (original)
+++ tomcat/trunk/modules/jdbc-pool/pom.xml Wed Mar 30 22:26:29 2011
@@ -84,6 +84,14 @@
   /plugin
   plugin
 groupIdorg.apache.maven.plugins/groupId
+artifactIdmaven-jar-plugin/artifactId
+configuration
+/configuration
+  /plugin
+  
+  
+  plugin
+groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-gpg-plugin/artifactId
 version1.2/version
 executions
@@ -105,6 +113,30 @@
   downloadJavadocstrue/downloadJavadocs
 /configuration
   /plugin
+  plugin
+groupIdorg.apache.maven.plugins/groupId
+artifactIdmaven-source-plugin/artifactId
+executions
+  execution
+idattach-sources/id
+goals
+  goaljar/goal
+/goals
+  /execution
+/executions
+  /plugin  
+  plugin
+groupIdorg.apache.maven.plugins/groupId
+artifactIdmaven-javadoc-plugin/artifactId
+executions
+  execution
+idattach-javadocs/id
+goals
+  goaljar/goal
+/goals
+  /execution
+/executions
+  /plugin  
 /plugins
   /build  
 /project



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



svn commit: r1087114 - /tomcat/trunk/modules/jdbc-pool/pom.xml

2011-03-30 Thread fhanik
Author: fhanik
Date: Wed Mar 30 22:32:29 2011
New Revision: 1087114

URL: http://svn.apache.org/viewvc?rev=1087114view=rev
Log:
Add in parent reference
Thanks to Sebb http://markmail.org/message/nb652iryypigjfso


Modified:
tomcat/trunk/modules/jdbc-pool/pom.xml

Modified: tomcat/trunk/modules/jdbc-pool/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/pom.xml?rev=1087114r1=1087113r2=1087114view=diff
==
--- tomcat/trunk/modules/jdbc-pool/pom.xml (original)
+++ tomcat/trunk/modules/jdbc-pool/pom.xml Wed Mar 30 22:32:29 2011
@@ -1,6 +1,13 @@
 project xmlns=http://maven.apache.org/POM/4.0.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;
   modelVersion4.0.0/modelVersion
+
+  parent
+groupIdorg.apache/groupId
+artifactIdapache/artifactId
+version9/version
+  /parent
+  
   groupIdorg.apache.tomcat/groupId
   artifactIdjdbc-pool/artifactId
   version1.2-SNAPSHOT/version



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



Re: svn commit: r1087114 - /tomcat/trunk/modules/jdbc-pool/pom.xml

2011-03-30 Thread sebb
On 30 March 2011 23:32,  fha...@apache.org wrote:
 Author: fhanik
 Date: Wed Mar 30 22:32:29 2011
 New Revision: 1087114

 URL: http://svn.apache.org/viewvc?rev=1087114view=rev
 Log:
 Add in parent reference
 Thanks to Sebb http://markmail.org/message/nb652iryypigjfso


Just noticed that there is a

distributionManagement
  snapshotRepository

section in the POM.

This should be removed, as it is provided by the Apache Parent POM.

The only distributionManagement entry that POMs should normally
provide is for the website, but probably you are not going to need
that.

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



svn commit: r1087128 - in /tomcat/trunk: java/org/apache/catalina/util/SessionIdGenerator.java webapps/docs/changelog.xml

2011-03-30 Thread markt
Author: markt
Date: Wed Mar 30 23:09:10 2011
New Revision: 1087128

URL: http://svn.apache.org/viewvc?rev=1087128view=rev
Log:
Don't append the jvmRoute to a session ID if the jvmRoute is a zero length 
string.

Modified:
tomcat/trunk/java/org/apache/catalina/util/SessionIdGenerator.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/util/SessionIdGenerator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/util/SessionIdGenerator.java?rev=1087128r1=1087127r2=1087128view=diff
==
--- tomcat/trunk/java/org/apache/catalina/util/SessionIdGenerator.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/util/SessionIdGenerator.java Wed Mar 
30 23:09:10 2011
@@ -168,7 +168,7 @@ public class SessionIdGenerator {
 }
 }
 
-if (jvmRoute != null) {
+if (jvmRoute != null  jvmRoute.length()  0) {
 buffer.append('.').append(jvmRoute);
 }
 

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1087128r1=1087127r2=1087128view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Mar 30 23:09:10 2011
@@ -128,6 +128,10 @@
 name ending in code.jar/code to be treated as an expanded JAR file
 by the default JarScanner. Based on patch by Rodion Zhitomirsky. 
(markt)
   /fix
+  fix
+Donapos;t append the jvmRoute to a session ID if the jvmRoute is a 
zero
+length string. (markt) 
+  /fix
 /changelog
   /subsection
   subsection name=Coyote



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



DO NOT REPLY [Bug 50991] Data source is closed before contextDestroyed is executed. tomcat 7.0.11

2011-03-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50991

Konstantin Kolinko knst.koli...@gmail.com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |

--- Comment #4 from Konstantin Kolinko knst.koli...@gmail.com 2011-03-30 
19:21:20 EDT ---
Regarding r1086950 two comments:

1. The following is printed in the logs now:

31.03.2011 0:01:57 org.apache.catalina.users.MemoryUserDatabase save
SEVERE: User database has been configured to be read only. Changes cannot be
saved

That is because MemoryUserDatabase#close() method does exist and calls save()
unconditionally.

2. In NamingResources#cleanUp():
 resource = ctxt.lookup(name);

If it is the first lookup for a ContextResource, or this resource is not a
singleton, this will create an instance of it. - see (1) below

For javax.sql.DataSource resources it does not happen, because a lookup() is
called elsewhere just after binding them, to register them with JMX - see (2)
but for any others this might be a slight concern.

Unrelated note, looking at (2): registering DataSource with JMX makes sense
only if it is a singleton. Otherwise we would not be managing the actual
object. It is good that it is singleton by default.


It would be nice to perform cleanup only for the resources that have been
already created (entry.type == NamingEntry.ENTRY), but I do not see how that
can be implemented.   The NamingEntry class is something internal to
org.apache.naming.


My proposal is the following:
1. Assume the default value of close only for the resources of type
javax.sql.DataSource.

That is, for any other resource types assume that the value is unset by default
and do not perform lookup of the resource.

2. Regarding (2): add a comment to the singleton attribute that singleton=true
is necessary for JMX management of connection pools.

3. Do not call save() in MemoryUserDatabase.close() if it is readonly.


(1): In the sources:
ContextResource is represented by ResourceRef object (in
NamingContextListener#addResource(ContextResource))

ResourceRef is represented by NamingEntry.REFERENCE (in
NamingContext#bind(Name, Object, boolean)
NamingContext.bind() creates

Lookup is implemented in NamingContext.lookup(Name, boolean) and
(entry.type == NamingEntry.REFERENCE) branch is called.

(2):  In the sources:
In NamingContextListener#addResource(ContextResource):
if (javax.sql.DataSource.equals(ref.getClassName())) {
 - lookup


-- 
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 50991] Data source is closed before contextDestroyed is executed. tomcat 7.0.11

2011-03-30 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50991

--- Comment #5 from Filip Hanik fha...@apache.org 2011-03-30 19:29:49 EDT ---
(In reply to comment #4)

 
 My proposal is the following:
 1. Assume the default value of close only for the resources of type
 javax.sql.DataSource.

Simplest would be that if closeMethod is not set, don't call close.
That way you're backwards compatible, and provide the functionality a user
needs.
close is not a method on the javax.sql.DataSource interface

Filip

-- 
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: r1087141 - /tomcat/trunk/modules/jdbc-pool/pom.xml

2011-03-30 Thread fhanik
Author: fhanik
Date: Wed Mar 30 23:45:27 2011
New Revision: 1087141

URL: http://svn.apache.org/viewvc?rev=1087141view=rev
Log:
remove repo inherited from parent

Modified:
tomcat/trunk/modules/jdbc-pool/pom.xml

Modified: tomcat/trunk/modules/jdbc-pool/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/pom.xml?rev=1087141r1=1087140r2=1087141view=diff
==
--- tomcat/trunk/modules/jdbc-pool/pom.xml (original)
+++ tomcat/trunk/modules/jdbc-pool/pom.xml Wed Mar 30 23:45:27 2011
@@ -35,15 +35,6 @@
 /mailingList
   /mailingLists
   
-  distributionManagement
-snapshotRepository
-  idapache.snapshots.https/id
-  nameApache Development Snapshot Repository/name
-  urlhttps://repository.apache.org/content/repositories/snapshots/url
-  uniqueVersionfalse/uniqueVersion
-/snapshotRepository
-  /distributionManagement  
-
   scm
 
connectionscm:svn:https://svn.apache.org/repos/asf/tomcat/trunk/modules/jdbc-pool/connection
 
developerConnectionscm:svn:https://svn.apache.org/repos/asf/tomcat/trunk/modules/jdbc-pool/developerConnection



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