[ANN] Apache Tomcat 8.0.9 (stable) available

2014-06-26 Thread Mark Thomas
The Apache Tomcat team announces the immediate availability of Apache
Tomcat 8.0.9, the first stable release of the 8.0.x series.

Apache Tomcat 8 is an open source software implementation of the Java
Servlet, JavaServer Pages, Java Unified Expression Language and Java
WebSocket technologies.

Apache Tomcat 8 is aligned with Java EE 7. In addition to supporting
updated versions of the Java EE specifications, Tomcat 8 includes a
number of improvements compared to Tomcat 7. The notable changes
include:

- Support for Java Servlet 3.1, JavaServer Pages 2.3, Java Unified
  Expression Language 3.0 and Java WebSocket 1.0.

- The default connector implementation is now the Java non-blocking
  implementation (NIO) for both HTTP and AJP.

- A new resources implementation that replaces Aliases, VirtualLoader,
  VirtualDirContext, JAR resources and external repositories with a
  single, consistent approach for configuring additional web
  application resources. The new resources implementation can also be
  used to implement overlays (using a master WAR as the basis for
  multiple web applications that each have their own
  customizations).


Apache Tomcat 8.0.9 includes numerous fixes for issues identified
in 8.0.8 as well as a number of other enhancements and changes. The
notable changes since 8.0.8 include:

- Start to move towards RFC6265 for cookie handling

- Better error handling when the error occurs after the response has
  been committed

- Various Jasper improvements to make it easier for other containers
  (e.g. Jetty) to consume


Please refer to the change log for the complete list of changes:
http://tomcat.apache.org/tomcat-8.0-doc/changelog.html

Note: This version has 4 zip binaries: a generic one and three
  bundled with Tomcat native binaries for Windows operating systems
  running on different CPU architectures.

Downloads:
http://tomcat.apache.org/download-80.cgi

Migration guides from Apache Tomcat 5.5.x, 6.0.x and 7.0.x:
http://tomcat.apache.org/migration.html

Enjoy!

- The Apache Tomcat team

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



Re: [ANN] Apache Tomcat 8.0.9 (stable) available

2014-06-26 Thread vaibhav kulkarni
cheers !!!


On Thu, Jun 26, 2014 at 12:30 PM, Mark Thomas  wrote:

> The Apache Tomcat team announces the immediate availability of Apache
> Tomcat 8.0.9, the first stable release of the 8.0.x series.
>
> Apache Tomcat 8 is an open source software implementation of the Java
> Servlet, JavaServer Pages, Java Unified Expression Language and Java
> WebSocket technologies.
>
> Apache Tomcat 8 is aligned with Java EE 7. In addition to supporting
> updated versions of the Java EE specifications, Tomcat 8 includes a
> number of improvements compared to Tomcat 7. The notable changes
> include:
>
> - Support for Java Servlet 3.1, JavaServer Pages 2.3, Java Unified
>   Expression Language 3.0 and Java WebSocket 1.0.
>
> - The default connector implementation is now the Java non-blocking
>   implementation (NIO) for both HTTP and AJP.
>
> - A new resources implementation that replaces Aliases, VirtualLoader,
>   VirtualDirContext, JAR resources and external repositories with a
>   single, consistent approach for configuring additional web
>   application resources. The new resources implementation can also be
>   used to implement overlays (using a master WAR as the basis for
>   multiple web applications that each have their own
>   customizations).
>
>
> Apache Tomcat 8.0.9 includes numerous fixes for issues identified
> in 8.0.8 as well as a number of other enhancements and changes. The
> notable changes since 8.0.8 include:
>
> - Start to move towards RFC6265 for cookie handling
>
> - Better error handling when the error occurs after the response has
>   been committed
>
> - Various Jasper improvements to make it easier for other containers
>   (e.g. Jetty) to consume
>
>
> Please refer to the change log for the complete list of changes:
> http://tomcat.apache.org/tomcat-8.0-doc/changelog.html
>
> Note: This version has 4 zip binaries: a generic one and three
>   bundled with Tomcat native binaries for Windows operating systems
>   running on different CPU architectures.
>
> Downloads:
> http://tomcat.apache.org/download-80.cgi
>
> Migration guides from Apache Tomcat 5.5.x, 6.0.x and 7.0.x:
> http://tomcat.apache.org/migration.html
>
> Enjoy!
>
> - The Apache Tomcat team
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


-- 
Vaibhav Khamgonkar
Software Engineer

Note: This e-mail message and attachments may contain confidential
information. If you have received this message in error, please immediately
notify the sender and delete this e-mail message.


svn commit: r1605723 - /tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java

2014-06-26 Thread remm
Author: remm
Date: Thu Jun 26 10:16:59 2014
New Revision: 1605723

URL: http://svn.apache.org/r1605723
Log:
Avoid NPE with storeconfig.

Modified:
tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java

Modified: tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java?rev=1605723&r1=1605722&r2=1605723&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java Thu 
Jun 26 10:16:59 2014
@@ -592,7 +592,7 @@ public class StandardRoot extends Lifecy
 // --- JMX 
Lifecycle
 @Override
 protected String getDomainInternal() {
-return context.getDomain();
+return (context != null) ? context.getDomain() : null;
 }
 
 @Override



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



svn commit: r1605724 - in /tomcat/trunk: java/org/apache/catalina/storeconfig/IStoreConfig.java java/org/apache/catalina/storeconfig/LocalStrings.properties java/org/apache/catalina/storeconfig/StoreC

2014-06-26 Thread remm
Author: remm
Date: Thu Jun 26 10:18:07 2014
New Revision: 1605724

URL: http://svn.apache.org/r1605724
Log:
Improve exception routing so that a thrown exception interrupts the store 
process (avoid server.xml overwrite with a broken one).

Modified:
tomcat/trunk/java/org/apache/catalina/storeconfig/IStoreConfig.java
tomcat/trunk/java/org/apache/catalina/storeconfig/LocalStrings.properties
tomcat/trunk/java/org/apache/catalina/storeconfig/StoreConfig.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/storeconfig/IStoreConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/storeconfig/IStoreConfig.java?rev=1605724&r1=1605723&r2=1605724&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/storeconfig/IStoreConfig.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/storeconfig/IStoreConfig.java Thu Jun 
26 10:18:07 2014
@@ -61,7 +61,7 @@ public interface IStoreConfig {
  * @exception Exception
  *if an exception occurs while storing
  */
-void storeConfig() throws Exception;
+void storeConfig();
 
 /**
  * Store the specified Server properties.
@@ -72,7 +72,7 @@ public interface IStoreConfig {
  * @exception Exception
  *if an exception occurs while storing
  */
-void store(Server aServer) throws Exception;
+boolean store(Server aServer);
 
 /**
  * Store the specified Server properties.
@@ -84,7 +84,7 @@ public interface IStoreConfig {
  * @param aServer
  *Object to be stored
  */
-void store(PrintWriter aWriter, int indent, Server aServer);
+void store(PrintWriter aWriter, int indent, Server aServer) throws 
Exception;
 
 /**
  * Store the specified Service properties.
@@ -96,7 +96,7 @@ public interface IStoreConfig {
  * @param aService
  *Object to be stored
  */
-void store(PrintWriter aWriter, int indent, Service aService);
+void store(PrintWriter aWriter, int indent, Service aService) throws 
Exception;
 
 /**
  * Store the specified Host properties.
@@ -108,7 +108,7 @@ public interface IStoreConfig {
  * @param aHost
  *Object to be stored
  */
-void store(PrintWriter aWriter, int indent, Host aHost);
+void store(PrintWriter aWriter, int indent, Host aHost) throws Exception;
 
 /**
  * Store the specified Context properties.
@@ -116,7 +116,7 @@ public interface IStoreConfig {
  * @param aContext
  *Object to be stored
  */
-void store(Context aContext);
+boolean store(Context aContext);
 
 /**
  * Store the specified Context properties.
@@ -128,5 +128,5 @@ public interface IStoreConfig {
  * @param aContext
  *Object to be stored
  */
-void store(PrintWriter aWriter, int indent, Context aContext);
+void store(PrintWriter aWriter, int indent, Context aContext) throws 
Exception;
 }
\ No newline at end of file

Modified: 
tomcat/trunk/java/org/apache/catalina/storeconfig/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/storeconfig/LocalStrings.properties?rev=1605724&r1=1605723&r2=1605724&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/storeconfig/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/catalina/storeconfig/LocalStrings.properties 
Thu Jun 26 10:18:07 2014
@@ -15,3 +15,5 @@
 
 factory.storeTag=store tag {0} ( Object: {1} )
 factory.storeNoDescriptor=Descriptor for element class {0} not configured!
+config.storeServerError=Error storing server
+config.storeContextError=Error storing context {0}

Modified: tomcat/trunk/java/org/apache/catalina/storeconfig/StoreConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/storeconfig/StoreConfig.java?rev=1605724&r1=1605723&r2=1605724&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/storeconfig/StoreConfig.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/storeconfig/StoreConfig.java Thu Jun 
26 10:18:07 2014
@@ -19,18 +19,13 @@ package org.apache.catalina.storeconfig;
 import java.io.PrintWriter;
 import java.net.URL;
 
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
 import org.apache.catalina.Context;
 import org.apache.catalina.Host;
 import org.apache.catalina.Server;
 import org.apache.catalina.Service;
-import org.apache.catalina.core.StandardContext;
-import org.apache.catalina.mbeans.MBeanUtils;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
+import org.apache.tomcat.util.res.StringManager;
 
 /**
  * Store Server/Servi

Re: svn commit: r1605723 - /tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java

2014-06-26 Thread Konstantin Kolinko
2014-06-26 14:16 GMT+04:00  :
> Author: remm
> Date: Thu Jun 26 10:16:59 2014
> New Revision: 1605723
>
> URL: http://svn.apache.org/r1605723
> Log:
> Avoid NPE with storeconfig.
>
> Modified:
> tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java
>
> Modified: tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java?rev=1605723&r1=1605722&r2=1605723&view=diff
> ==
> --- tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java 
> (original)
> +++ tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java Thu 
> Jun 26 10:16:59 2014
> @@ -592,7 +592,7 @@ public class StandardRoot extends Lifecy
>  // --- JMX 
> Lifecycle
>  @Override
>  protected String getDomainInternal() {
> -return context.getDomain();
> +return (context != null) ? context.getDomain() : null;
>  }


What are the circumstances when this NPE happens?

StandardRoot.initInternal() throws an IllegalStateException if the
context is null. How can it be without a context?

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: r1605747 - in /tomcat/site/trunk: docs/index.html xdocs/index.xml

2014-06-26 Thread kpreisser
Author: kpreisser
Date: Thu Jun 26 11:37:51 2014
New Revision: 1605747

URL: http://svn.apache.org/r1605747
Log:
Follow-Up to r1605427:
Move more recent news to the top and correct date.

Modified:
tomcat/site/trunk/docs/index.html
tomcat/site/trunk/xdocs/index.xml

Modified: tomcat/site/trunk/docs/index.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/index.html?rev=1605747&r1=1605746&r2=1605747&view=diff
==
--- tomcat/site/trunk/docs/index.html (original)
+++ tomcat/site/trunk/docs/index.html Thu Jun 26 11:37:51 2014
@@ -224,6 +224,64 @@ project logo are trademarks of the Apach
 
 
 
+
+2014-06-25 Tomcat 8.0.9 Released
+
+
+
+The Apache Tomcat Project is proud to announce the release of version 8.0.9
+of Apache Tomcat. This is the first stable release of the 8.0.x series. Tomcat 
8
+is aligned with Java EE 7. In addition to supporting updated versions of the
+Java EE specifications, Tomcat 8 includes a number of improvements compared to
+Tomcat 7. The notable changes include:
+
+
+  
+Support for Java Servlet 3.1, JavaServer Pages 2.3, Java Unified
+  Expression Language 3.0 and Java WebSocket 1.0.
+  
+The default connector implementation is now the Java non-blocking
+  implementation (NIO) for both HTTP and AJP.
+  
+A new resources implementation that replaces Aliases, VirtualLoader, 
+  VirtualDirContext, JAR resources and external repositories with a single,
+  consistent approach for configuring additional web application resources.
+  The new resources implementation can also be used to implement overlays
+  (using a master WAR as the basis for multiple web applications that each
+  have their own customizations).
+
+
+
+
+Apache Tomcat 8.0.9 includes numerous fixes for issues identified in 8.0.8
+(beta) as well as a number of other enhancements and changes. The notable
+changes since 8.0.8 include:
+
+
+  
+Start to move towards RFC6265 for cookie handling
+  
+Better error handling when the error occurs after the response has been
+  committed
+  
+Various Jasper improvements to make it easier for other containers (e.g.
+  Jetty) to consume
+
+
+
+
+Full details of these changes, and all the other changes, are available in the
+Tomcat 8 changelog.
+
+
+
+
+
+Download
+
+
+
+
 
 2014-05-23 Tomcat 6.0.41 Released
 
@@ -290,64 +348,6 @@ Full details of these changes, and all t
 
 
 
-
-2014-05-21 Tomcat 8.0.9 Released
-
-
-
-The Apache Tomcat Project is proud to announce the release of version 8.0.9
-of Apache Tomcat. This is the first stable release of the 8.0.x series. Tomcat 
8
-is aligned with Java EE 7. In addition to supporting updated versions of the
-Java EE specifications, Tomcat 8 includes a number of improvements compared to
-Tomcat 7. The notable changes include:
-
-
-  
-Support for Java Servlet 3.1, JavaServer Pages 2.3, Java Unified
-  Expression Language 3.0 and Java WebSocket 1.0.
-  
-The default connector implementation is now the Java non-blocking
-  implementation (NIO) for both HTTP and AJP.
-  
-A new resources implementation that replaces Aliases, VirtualLoader, 
-  VirtualDirContext, JAR resources and external repositories with a single,
-  consistent approach for configuring additional web application resources.
-  The new resources implementation can also be used to implement overlays
-  (using a master WAR as the basis for multiple web applications that each
-  have their own customizations).
-
-
-
-
-Apache Tomcat 8.0.9 includes numerous fixes for issues identified in 8.0.8
-(beta) as well as a number of other enhancements and changes. The notable
-changes since 8.0.8 include:
-
-
-  
-Start to move towards RFC6265 for cookie handling
-  
-Better error handling when the error occurs after the response has been
-  committed
-  
-Various Jasper improvements to make it easier for other containers (e.g.
-  Jetty) to consume
-
-
-
-
-Full details of these changes, and all the other changes, are available in the
-Tomcat 8 changelog.
-
-
-
-
-
-Download
-
-
-
-
 
 2014-04-15 Tomcat Connectors 1.2.40 
Released
 

Modified: tomcat/site/trunk/xdocs/index.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/index.xml?rev=1605747&r1=1605746&r2=1605747&view=diff
==
--- tomcat/site/trunk/xdocs/index.xml (original)
+++ tomcat/site/trunk/xdocs/index.xml Thu Jun 26 11:37:51 2014
@@ -37,6 +37,46 @@ project logo are trademarks of the Apach
 
 
 
+
+
+The Apache Tomcat Project is proud to announce the release of version 8.0.9
+of Apache Tomcat. This is the first stable release of the 8.0.x series. Tomcat 
8
+is aligned with Java EE 7. In addition to supporting updated versions of the
+Java EE specifications, Tomcat 8 includes a number of improvements compared to
+Tomcat 7. The notable changes include:
+
+  Support for Java Servlet 3.1, Ja

Re: svn commit: r1605723 - /tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java

2014-06-26 Thread Rémy Maucherat
2014-06-26 13:32 GMT+02:00 Konstantin Kolinko :

> What are the circumstances when this NPE happens?
>
> StandardRoot.initInternal() throws an IllegalStateException if the
> context is null. How can it be without a context?
>

"Avoid NPE with storeconfig": storeconfig creates instances to determine
default values for properties.

Rémy


[Bug 50604] Incorrect dependency in jasper.pom for eclipse ecj

2014-06-26 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50604

--- Comment #13 from Konstantin Kolinko  ---
Technical (bikeshed) question about e):
1. what version number are you going to use?

a. 4.4 from the file name
b. 3.something from the manifest
c. 8.0.9 from Tomcat

If it a. or b. I think that formally we need to do a vote to release that.

If it is b. then files downloaded from Maven will have some different filename.

If it is c. then there will be some versioning mess, with files such as
ecj-8.0.9.jar being downloaded and used somewhere.  I expect people to be able
to upgrade their ecj.jar at any time, if there are problems.

If we go c) as the easiest and established way then the file at Maven central
probably will have to be named "tomcat-ecj-8.0.9.jar".

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

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



Re: svn commit: r1605723 - /tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java

2014-06-26 Thread Konstantin Kolinko
2014-06-26 15:40 GMT+04:00 Rémy Maucherat :
> 2014-06-26 13:32 GMT+02:00 Konstantin Kolinko :
>
>> What are the circumstances when this NPE happens?
>>
>> StandardRoot.initInternal() throws an IllegalStateException if the
>> context is null. How can it be without a context?
>>
>
> "Avoid NPE with storeconfig": storeconfig creates instances to determine
> default values for properties.

(Just from description.
I do not know, maybe there is already some special processing for this
case in the storeconfig code).

I this case the logic is flawed

1. Even though there is a setter (LifecycleMBeanBase.setDomain()),
this value is not expected to be configured in a configuration file.

2. The default value in this case is not  Globals.DEFAULT_MBEAN_DOMAIN
 (as will be returned by LifecycleMBeanBase.getDomain()  with this
patch),
 but context.getDomain() (for StandardRoot),  parent.getDomain() (for
ContainerBase).

Ultimately it is StandardEngine.getDomainInternal() which returns getName().

So if the Engine has a non-default name,  will there be domain=""
properties written everywhere in the configuration files?

So my expectation is that the "domain" property has to be ignored by
storeconfig.

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: r1605765 - in /tomcat/trunk/java/org/apache/catalina: storeconfig/server-registry.xml webresources/StandardRoot.java

2014-06-26 Thread remm
Author: remm
Date: Thu Jun 26 12:40:25 2014
New Revision: 1605765

URL: http://svn.apache.org/r1605765
Log:
Skip domain property instead.

Modified:
tomcat/trunk/java/org/apache/catalina/storeconfig/server-registry.xml
tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java

Modified: tomcat/trunk/java/org/apache/catalina/storeconfig/server-registry.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/storeconfig/server-registry.xml?rev=1605765&r1=1605764&r2=1605765&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/storeconfig/server-registry.xml 
(original)
+++ tomcat/trunk/java/org/apache/catalina/storeconfig/server-registry.xml Thu 
Jun 26 12:40:25 2014
@@ -259,6 +259,7 @@
 cacheObjectMaxSize
 cached
 caseSensitive
+domain
  
 http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java?rev=1605765&r1=1605764&r2=1605765&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java Thu 
Jun 26 12:40:25 2014
@@ -592,7 +592,7 @@ public class StandardRoot extends Lifecy
 // --- JMX 
Lifecycle
 @Override
 protected String getDomainInternal() {
-return (context != null) ? context.getDomain() : null;
+return context.getDomain();
 }
 
 @Override



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



Re: svn commit: r1605724 - in /tomcat/trunk: java/org/apache/catalina/storeconfig/IStoreConfig.java java/org/apache/catalina/storeconfig/LocalStrings.properties java/org/apache/catalina/storeconfig/St

2014-06-26 Thread Konstantin Kolinko
2014-06-26 14:18 GMT+04:00  :
> Author: remm
> Date: Thu Jun 26 10:18:07 2014
> New Revision: 1605724
>
> URL: http://svn.apache.org/r1605724
> Log:
> Improve exception routing so that a thrown exception interrupts the store 
> process (avoid server.xml overwrite with a broken one).
>
> Modified:
> tomcat/trunk/java/org/apache/catalina/storeconfig/IStoreConfig.java
> tomcat/trunk/java/org/apache/catalina/storeconfig/LocalStrings.properties
> tomcat/trunk/java/org/apache/catalina/storeconfig/StoreConfig.java
> tomcat/trunk/webapps/docs/changelog.xml
>

1. This commit removed two methods from StoreConfig class:

public synchronized void storeServer(String aServerName, boolean backup,
 boolean externalAllowed) throws MalformedObjectNameException {

public synchronized void storeContext(String aContextName, boolean backup,
 boolean externalAllowed) throws MalformedObjectNameException {

Those methods are still listed in mbeans-descriptors.xml file.

2. Behaviour of StoreConfig.store(Context aContext)  in case if
Context.getConfigFile() is null

In general that is a possible configuration (there was no xml file
when Context started).  Does it need a "log.error()"?

My question does not make sense if in this case the call to store()
method is skipped somewhere at a higher level.   If the call is
normally skipped then the error() logging here is justified.


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: r1605774 - /tomcat/trunk/java/org/apache/catalina/storeconfig/StoreConfig.java

2014-06-26 Thread remm
Author: remm
Date: Thu Jun 26 13:03:04 2014
New Revision: 1605774

URL: http://svn.apache.org/r1605774
Log:
Add back dead code.

Modified:
tomcat/trunk/java/org/apache/catalina/storeconfig/StoreConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/storeconfig/StoreConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/storeconfig/StoreConfig.java?rev=1605774&r1=1605773&r2=1605774&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/storeconfig/StoreConfig.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/storeconfig/StoreConfig.java Thu Jun 
26 13:03:04 2014
@@ -19,10 +19,16 @@ package org.apache.catalina.storeconfig;
 import java.io.PrintWriter;
 import java.net.URL;
 
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+
 import org.apache.catalina.Context;
 import org.apache.catalina.Host;
 import org.apache.catalina.Server;
 import org.apache.catalina.Service;
+import org.apache.catalina.core.StandardContext;
+import org.apache.catalina.mbeans.MBeanUtils;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.res.StringManager;
@@ -100,6 +106,121 @@ public class StoreConfig implements ISto
 }
 
 /**
+ * Store Server from Object Name (Catalina:type=Server)
+ *
+ * @param aServerName
+ *Server ObjectName
+ * @param backup
+ * @param externalAllowed
+ *s *
+ * @throws MalformedObjectNameException
+ */
+public synchronized void storeServer(String aServerName, boolean backup,
+boolean externalAllowed) throws MalformedObjectNameException {
+if (aServerName == null || aServerName.length() == 0) {
+if (log.isErrorEnabled())
+log.error("Please, call with a correct server ObjectName!");
+return;
+}
+MBeanServer mserver = MBeanUtils.createServer();
+ObjectName objectName = new ObjectName(aServerName);
+if (mserver.isRegistered(objectName)) {
+try {
+Server aServer = (Server) mserver.getAttribute(objectName,
+"managedResource");
+StoreDescription desc = null;
+desc = getRegistry().findDescription(StandardContext.class);
+if (desc != null) {
+boolean oldSeparate = desc.isStoreSeparate();
+boolean oldBackup = desc.isBackup();
+boolean oldExternalAllowed = desc.isExternalAllowed();
+try {
+desc.setStoreSeparate(true);
+desc.setBackup(backup);
+desc.setExternalAllowed(externalAllowed);
+store(aServer);
+} finally {
+desc.setStoreSeparate(oldSeparate);
+desc.setBackup(oldBackup);
+desc.setExternalAllowed(oldExternalAllowed);
+}
+} else {
+store(aServer);
+}
+} catch (Exception e) {
+if (log.isInfoEnabled())
+log.info("Object " + aServerName
++ " is no a Server instance or store exception", 
e);
+}
+} else if (log.isInfoEnabled())
+log.info("Server " + aServerName + " not found!");
+}
+
+/**
+ * Store a Context from ObjectName
+ *
+ * @param aContextName
+ *MBean ObjectName
+ * @param backup
+ * @param externalAllowed
+ * @throws MalformedObjectNameException
+ */
+public synchronized void storeContext(String aContextName, boolean backup,
+boolean externalAllowed) throws MalformedObjectNameException {
+if (aContextName == null || aContextName.length() == 0) {
+if (log.isErrorEnabled())
+log.error("Please, call with a correct context ObjectName!");
+return;
+}
+MBeanServer mserver = MBeanUtils.createServer();
+ObjectName objectName = new ObjectName(aContextName);
+if (mserver.isRegistered(objectName)) {
+try {
+Context aContext = (Context) mserver.getAttribute(objectName,
+"managedResource");
+URL configFile = aContext.getConfigFile();
+if (configFile != null) {
+try {
+StoreDescription desc = null;
+desc = getRegistry().findDescription(
+aContext.getClass());
+if (desc != null) {
+boolean oldSeparate = desc.isStoreSeparate();
+boolean oldBackup = desc.isBackup(

buildbot success in ASF Buildbot on tomcat-trunk

2014-06-26 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/218

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1605724
Blamelist: remm

Build succeeded!

sincerely,
 -The Buildbot




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



Re: svn commit: r1605724 - in /tomcat/trunk: java/org/apache/catalina/storeconfig/IStoreConfig.java java/org/apache/catalina/storeconfig/LocalStrings.properties java/org/apache/catalina/storeconfig/St

2014-06-26 Thread Rémy Maucherat
2014-06-26 14:48 GMT+02:00 Konstantin Kolinko :

> 2. Behaviour of StoreConfig.store(Context aContext)  in case if
> Context.getConfigFile() is null
>
> In general that is a possible configuration (there was no xml file
> when Context started).  Does it need a "log.error()"?
>
> My question does not make sense if in this case the call to store()
> method is skipped somewhere at a higher level.   If the call is
> normally skipped then the error() logging here is justified.
>

I didn't make any change there and it is unused as well. I am not
interested in arguing for hours about details, so I'll leave everything as
is :)

Rémy


svn commit: r1605818 - /tomcat/trunk/build.xml

2014-06-26 Thread markt
Author: markt
Date: Thu Jun 26 15:28:18 2014
New Revision: 1605818

URL: http://svn.apache.org/r1605818
Log:
Add a property to skip code signing as suggested by kkolinko

Modified:
tomcat/trunk/build.xml

Modified: tomcat/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1605818&r1=1605817&r2=1605818&view=diff
==
--- tomcat/trunk/build.xml (original)
+++ tomcat/trunk/build.xml Thu Jun 26 15:28:18 2014
@@ -2088,7 +2088,7 @@ Apache Tomcat ${version} native binaries
 
   
 
-  
+  
 
 

svn commit: r1605821 - /tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java

2014-06-26 Thread markt
Author: markt
Date: Thu Jun 26 15:32:33 2014
New Revision: 1605821

URL: http://svn.apache.org/r1605821
Log:
Refactoring with a view to adding transformation (i.e. extension) support to 
outgoing messages.

Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java?rev=1605821&r1=1605820&r2=1605821&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java 
Thu Jun 26 15:32:33 2014
@@ -249,7 +249,8 @@ public abstract class WsRemoteEndpointIm
 
 wsSession.updateLastActive();
 
-MessagePart mp = new MessagePart(opCode, payload, last, handler, this);
+MessagePart mp = new MessagePart(opCode, payload, last,
+new EndMessageHandler(this, handler));
 
 boolean doWrite = false;
 synchronized (messagePartLock) {
@@ -415,11 +416,11 @@ public abstract class WsRemoteEndpointIm
 private final SendHandler handler;
 
 public MessagePart(byte opCode, ByteBuffer payload, boolean last,
-SendHandler handler, WsRemoteEndpointImplBase endpoint) {
+SendHandler handler) {
 this.opCode = opCode;
 this.payload = payload;
 this.last = last;
-this.handler = new EndMessageHandler(endpoint, handler);
+this.handler = handler;
 }
 
 



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



svn commit: r1605823 - in /tomcat/trunk/java/org/apache/tomcat/websocket: MessagePart.java WsRemoteEndpointImplBase.java

2014-06-26 Thread markt
Author: markt
Date: Thu Jun 26 15:35:00 2014
New Revision: 1605823

URL: http://svn.apache.org/r1605823
Log:
Refactoring with a view to adding transformation (i.e. extension) support to 
outgoing messages.
Extract MessagePart into standalone class

Added:
tomcat/trunk/java/org/apache/tomcat/websocket/MessagePart.java   (with 
props)
Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java

Added: tomcat/trunk/java/org/apache/tomcat/websocket/MessagePart.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/MessagePart.java?rev=1605823&view=auto
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/MessagePart.java (added)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/MessagePart.java Thu Jun 26 
15:35:00 2014
@@ -0,0 +1,58 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.tomcat.websocket;
+
+import java.nio.ByteBuffer;
+
+import javax.websocket.SendHandler;
+
+public class MessagePart {
+private final byte opCode;
+private final ByteBuffer payload;
+private final boolean last;
+private final SendHandler handler;
+
+public MessagePart(byte opCode, ByteBuffer payload, boolean last,
+SendHandler handler) {
+this.opCode = opCode;
+this.payload = payload;
+this.last = last;
+this.handler = handler;
+}
+
+
+public byte getOpCode() {
+return opCode;
+}
+
+
+public ByteBuffer getPayload() {
+return payload;
+}
+
+
+public boolean isLast() {
+return last;
+}
+
+
+public SendHandler getHandler() {
+return handler;
+}
+}
+
+

Propchange: tomcat/trunk/java/org/apache/tomcat/websocket/MessagePart.java
--
svn:eol-style = native

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java?rev=1605823&r1=1605822&r2=1605823&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java 
Thu Jun 26 15:35:00 2014
@@ -409,42 +409,6 @@ public abstract class WsRemoteEndpointIm
 }
 
 
-private static class MessagePart {
-private final byte opCode;
-private final ByteBuffer payload;
-private final boolean last;
-private final SendHandler handler;
-
-public MessagePart(byte opCode, ByteBuffer payload, boolean last,
-SendHandler handler) {
-this.opCode = opCode;
-this.payload = payload;
-this.last = last;
-this.handler = handler;
-}
-
-
-public byte getOpCode() {
-return opCode;
-}
-
-
-public ByteBuffer getPayload() {
-return payload;
-}
-
-
-public boolean isLast() {
-return last;
-}
-
-
-public SendHandler getHandler() {
-return handler;
-}
-}
-
-
 /**
  * Wraps the user provided handler so that the end point is notified when
  * the message is complete.



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



svn commit: r1605890 - in /tomcat/trunk/java/org/apache/tomcat/websocket: LocalStrings.properties TransformationFactory.java

2014-06-26 Thread markt
Author: markt
Date: Thu Jun 26 19:44:54 2014
New Revision: 1605890

URL: http://svn.apache.org/r1605890
Log:
Fix an i18n TODO

Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties
tomcat/trunk/java/org/apache/tomcat/websocket/TransformationFactory.java

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties?rev=1605890&r1=1605889&r2=1605890&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Thu 
Jun 26 19:44:54 2014
@@ -33,6 +33,8 @@ perMessageDeflate.duplicateParameter=Dup
 perMessageDeflate.invalidWindowSize=An invalid windows of [{1}] size was 
specified for [{0}]. Valid values are whole numbers from 8 to 15 inclusive.
 perMessageDeflate.unknownParameter=An unknown extension parameter [{0}] was 
defined
 
+transformerFactory.unsupportedExtension=The extension [{0}] is not supported
+
 util.notToken=An illegal extension parameter was specified with name [{0}] and 
value [{1}]
 util.invalidMessageHandler=The message handler provided does not have an 
onMessage(Object) method
 util.invalidType=Unable to coerce value [{0}] to type [{1}]. That type is not 
supported.

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/TransformationFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/TransformationFactory.java?rev=1605890&r1=1605889&r2=1605890&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/TransformationFactory.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/TransformationFactory.java 
Thu Jun 26 19:44:54 2014
@@ -20,8 +20,12 @@ import java.util.List;
 
 import javax.websocket.Extension;
 
+import org.apache.tomcat.util.res.StringManager;
+
 public class TransformationFactory {
 
+private static final StringManager sm = 
StringManager.getManager(Constants.PACKAGE_NAME);
+
 private static final TransformationFactory factory = new 
TransformationFactory();
 
 private TransformationFactory() {
@@ -36,7 +40,6 @@ public class TransformationFactory {
 if (PerMessageDeflate.NAME.equals(name)) {
 return PerMessageDeflate.negotiate(preferences);
 }
-// TODO i18n
-throw new IllegalArgumentException("Unsupported extension");
+throw new 
IllegalArgumentException(sm.getString("transformerFactory.unsupportedExtension"));
 }
 }



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



svn commit: r1605891 - /tomcat/trunk/java/org/apache/tomcat/websocket/TransformationFactory.java

2014-06-26 Thread markt
Author: markt
Date: Thu Jun 26 19:45:25 2014
New Revision: 1605891

URL: http://svn.apache.org/r1605891
Log:
This time with the unsupported extension name

Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/TransformationFactory.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/TransformationFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/TransformationFactory.java?rev=1605891&r1=1605890&r2=1605891&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/TransformationFactory.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/TransformationFactory.java 
Thu Jun 26 19:45:25 2014
@@ -40,6 +40,7 @@ public class TransformationFactory {
 if (PerMessageDeflate.NAME.equals(name)) {
 return PerMessageDeflate.negotiate(preferences);
 }
-throw new 
IllegalArgumentException(sm.getString("transformerFactory.unsupportedExtension"));
+throw new IllegalArgumentException(
+sm.getString("transformerFactory.unsupportedExtension", name));
 }
 }



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

2014-06-26 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/220

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1605823
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



[Bug 56676] New: Normalize access to native library

2014-06-26 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56676

Bug ID: 56676
   Summary: Normalize access to native library
   Product: Tomcat 8
   Version: trunk
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: gael.lal...@laposte.net

Docs seems to advice using $CATALINA_HOME/lib but you could also imagine
$CATALINA_HOME/native directory.

What I wish is to avoid having a JVM launching with special options
(java.library.path).
To achieve that you should use System.load and System.mapLibraryName instead of
System.loadLibrary.

A code sample if $CATALINA_HOME/lib is the normalized native directory:
{code}
File nativeLib = new File(System.getProperty("catalina.home"), "lib");
for (int i = 0; i < NAMES.length; i++) {
try {
System.load(new File(nativeLib,
System.mapLibraryName(NAMES[i])).getPath());
loaded = true;
}
{code}


It is useful if the tomcat instance is not running at JVM start but embedded
and launched later.

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



buildbot success in ASF Buildbot on tomcat-trunk

2014-06-26 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/221

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1605891
Blamelist: markt

Build succeeded!

sincerely,
 -The Buildbot




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



[Bug 56677] New: ApplicationHttpRequest does not override javax.servlet.ServletRequestWrapper#getServletContext()

2014-06-26 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56677

Bug ID: 56677
   Summary: ApplicationHttpRequest does not override
javax.servlet.ServletRequestWrapper#getServletContext(
)
   Product: Tomcat 7
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Servlet & JSP API
  Assignee: dev@tomcat.apache.org
  Reporter: bluewolf.ch...@gmail.com

org.apache.catalina.core.ApplicationHttpRequest does not override one of the
Servlet 3.0 APIs, javax.servlet.ServletRequestWrapper#getServletContext().

So ApplicationHttpRequest.getServletContext() does not return its mapped
ServletContext in the crossContext situation.

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