[GUMP@vmgump]: Project tomcat-taglibs-standard (in module tomcat-taglibs) failed

2012-11-27 Thread Gump
To whom it may engage...

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

Project tomcat-taglibs-standard has an issue affecting its community 
integration.
This issue affects 2 projects,
 and has been outstanding for 210 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-taglibs-standard :  Standard Taglib
- tomcat-taglibs-standard-install :  JSP Taglibs


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-taglibs/tomcat-taglibs-standard/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -INFO- Optional dependency httpunit failed with reason build failed
 -DEBUG- (Apache Gump generated) Apache Maven Settings in: 
/srv/gump/public/workspace/tomcat-taglibs/standard/gump_mvn_settings.xml
 -INFO- Failed with reason build failed
 -DEBUG- Maven POM in: 
/srv/gump/public/workspace/tomcat-taglibs/standard/pom.xml
 -INFO- Failed to extract fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-taglibs/tomcat-taglibs-standard/gump_work/build_tomcat-taglibs_tomcat-taglibs-standard.html
Work Name: build_tomcat-taglibs_tomcat-taglibs-standard (Type: Build)
Work ended in a state of : Failed
Elapsed: 22 secs
Command Line: /opt/maven2/bin/mvn --batch-mode -DskipTests=true --settings 
/srv/gump/public/workspace/tomcat-taglibs/standard/gump_mvn_settings.xml 
install 
[Working Directory: /srv/gump/public/workspace/tomcat-taglibs/standard]
M2_HOME: /opt/maven2
-
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[debug] execute contextualize
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
/srv/gump/public/workspace/tomcat-taglibs/standard/spec/src/test/resources
[INFO] Copying 3 resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] No sources to compile
[INFO] [surefire:test {execution: default-test}]
[INFO] Tests are skipped.
[INFO] [bundle:bundle {execution: default-bundle}]
[INFO] [install:install {execution: default-install}]
[INFO] Installing 
/srv/gump/public/workspace/tomcat-taglibs/standard/spec/target/taglibs-standard-spec-1.2-SNAPSHOT.jar
 to 
/srv/gump/public/workspace/mvnlocalrepo/shared/org/apache/taglibs/taglibs-standard-spec/1.2-SNAPSHOT/taglibs-standard-spec-1.2-SNAPSHOT.jar
[INFO] [bundle:install {execution: default-install}]
[INFO] Parsing 
file:/srv/gump/public/workspace/mvnlocalrepo/shared/repository.xml
[INFO] Installing 
org/apache/taglibs/taglibs-standard-spec/1.2-SNAPSHOT/taglibs-standard-spec-1.2-SNAPSHOT.jar
[INFO] Writing OBR metadata
[INFO] 
[INFO] Building JSTL Implementation
[INFO]task-segment: [install]
[INFO] 
[INFO] [remote-resources:process {execution: default}]
[INFO] snapshot org.apache.taglibs:taglibs-standard-spec:1.2-SNAPSHOT: checking 
for updates from apache.snapshots
[debug] execute contextualize
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 14 resources
[INFO] Copying 3 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 96 source files to 
/srv/gump/public/workspace/tomcat-taglibs/standard/impl/target/classes
[INFO] -
[ERROR] COMPILATION ERROR : 
[INFO] -
[ERROR] 
/srv/gump/public/workspace/tomcat-taglibs/standard/impl/src/main/java/org/apache/taglibs/standard/tag/common/sql/DataSourceWrapper.java:[38,7]
 error: DataSourceWrapper is not abstract and does not override abstract method 
getParentLogger() in CommonDataSource
[INFO] 1 error
[INFO] -
[INFO] 
[ERROR] BUILD FAILURE
[INFO] 
[INFO] Compilation failure
/srv/gump/public/workspace/tomcat-taglibs/standard/impl/src/main/java/org/apache/taglibs/standard/tag/common/sql/DataSourceWrapper.java:[38,7]
 error: DataSourceWrapper is not abstract and does not override abstract method 
getParentLogger() in CommonDataSource

[INFO] 
[INFO] For more information, run Maven with the -e switch
[INFO] --

Re: What is the destiny of the Apache Tomcat project in view of java is getting more and more proprietary with Oracle?

2012-11-27 Thread Alex Yursha
Mark and Henry,
Thank you very much. Your responses were of great help.


On Fri, Nov 23, 2012 at 2:10 PM, Henri Gomez  wrote:

> Java is not more proprietary with Oracle as it was with Sun.
>
> OpenJDK is a proof you could get, build and use your own Java 7, 8 and more
> at home.
>
> I built OpenJDK for OSX for almost 2 years and I was happy to be able to
> have "home made" JVMs, for the first time.
>
> If you take a look at OBuildFactory
> (https://github.com/hgomez/obuildfactory), you'll
> see its not so hard to build and package OpenJDK (stock from source repos)
> for OSX and Linux
>
> So if you're unconfortable with proprietary APIs, OpenJDK is your best
> chance to get a 100% free and open JVM  :-)
>
>
>
>
> 2012/11/23 Mark Thomas 
>
> > On 22/11/2012 15:20, Alex Yursha wrote:
> > > Dear All,
> > > Could anybody please provide me with some info on the status of Apache
> > > Tomcat development? I can't clear up, what is the attitude of ASF to
> > > java-based projects after all this mess with leaving the JCP EC. Is it
> > > going to continue java language-based projects forever or is there any
> > > formal decision by ASF in this regard? My question arises from the fact
> > > that Apache Tomcat is java-based and therefore have to rely on Oracle
> > java
> > > proprietary APIs. Please say, what I'm missing here?
> > > Thank you very much in advance.
> >
> > Short version: no change. The Tomcat community continues to implement
> > the Servlet, JSP and EL specifications and is working on the
> > implementation of the next version of all of those specifications as
> > well as the addition of the new WebSocket implementation.
> >
> > Mark
> >
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: dev-h...@tomcat.apache.org
> >
> >
>



-- 
Regards,
Alex Yursha


svn commit: r1414562 - /tomcat/native/branches/1.1.x/native/src/poll.c

2012-11-27 Thread mturk
Author: mturk
Date: Wed Nov 28 07:28:20 2012
New Revision: 1414562

URL: http://svn.apache.org/viewvc?rev=1414562&view=rev
Log:
Fix typo in --enable-maintainer-mode

Modified:
tomcat/native/branches/1.1.x/native/src/poll.c

Modified: tomcat/native/branches/1.1.x/native/src/poll.c
URL: 
http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/src/poll.c?rev=1414562&r1=1414561&r2=1414562&view=diff
==
--- tomcat/native/branches/1.1.x/native/src/poll.c (original)
+++ tomcat/native/branches/1.1.x/native/src/poll.c Wed Nov 28 07:28:20 2012
@@ -168,7 +168,6 @@ static apr_status_t do_add(tcn_pollset_t
apr_interval_time_t socket_timeout)
 {
 
-apr_int32_t  i;
 apr_status_t rv;
 apr_interval_time_t timeout = socket_timeout;
 tcn_pfde_t *elem = NULL;
@@ -183,7 +182,7 @@ static apr_status_t do_add(tcn_pollset_t
 /* Socket is already added to the pollset.
  */
 #ifdef TCN_DO_STATISTICS
-sp_equals++;
+p->sp_equals++;
 #endif
 return APR_EEXIST;
 }



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



svn commit: r1414560 - in /tomcat/native/branches/1.1.x/native: include/tcn.h src/poll.c

2012-11-27 Thread mturk
Author: mturk
Date: Wed Nov 28 07:19:46 2012
New Revision: 1414560

URL: http://svn.apache.org/viewvc?rev=1414560&view=rev
Log:
Limit socket to a single instance in the pollset. This allows to optimize 
remove loop - actually remove it.

Modified:
tomcat/native/branches/1.1.x/native/include/tcn.h
tomcat/native/branches/1.1.x/native/src/poll.c

Modified: tomcat/native/branches/1.1.x/native/include/tcn.h
URL: 
http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/include/tcn.h?rev=1414560&r1=1414559&r2=1414560&view=diff
==
--- tomcat/native/branches/1.1.x/native/include/tcn.h (original)
+++ tomcat/native/branches/1.1.x/native/include/tcn.h Wed Nov 28 07:19:46 2012
@@ -162,6 +162,7 @@ struct tcn_socket_t {
 char *jsbbuff;
 char *jrbbuff;
 tcn_nlayer_t *net;
+tcn_pfde_t   *pe;
 apr_time_t  last_active;
 apr_interval_time_t timeout;
 };

Modified: tomcat/native/branches/1.1.x/native/src/poll.c
URL: 
http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/src/poll.c?rev=1414560&r1=1414559&r2=1414560&view=diff
==
--- tomcat/native/branches/1.1.x/native/src/poll.c (original)
+++ tomcat/native/branches/1.1.x/native/src/poll.c Wed Nov 28 07:19:46 2012
@@ -179,6 +179,14 @@ static apr_status_t do_add(tcn_pollset_t
 #endif
 return APR_ENOMEM;
 }
+if (s->pe != NULL) {
+/* Socket is already added to the pollset.
+ */
+#ifdef TCN_DO_STATISTICS
+sp_equals++;
+#endif
+return APR_EEXIST;
+}
 if (timeout == TCN_NO_SOCKET_TIMEOUT) {
 timeout = p->default_timeout;
 }
@@ -209,6 +217,7 @@ static apr_status_t do_add(tcn_pollset_t
 }
 else {
 APR_RING_INSERT_TAIL(&p->poll_ring, elem, tcn_pfde_t, link);
+s->pe = elem;
 }
 return rv;
 }
@@ -238,45 +247,21 @@ TCN_IMPLEMENT_CALL(jint, Poll, addWithTi
 return (jint) do_add(p, s, (apr_int16_t)reqevents, J2T(socket_timeout));
 }
 
-static apr_status_t do_remove(tcn_pollset_t *p, const apr_pollfd_t *fd)
-{
-apr_status_t rv;
-tcn_pfde_t  *ep;
-
-rv = apr_pollset_remove(p->pollset, fd);
-APR_RING_FOREACH(ep, &p->poll_ring, tcn_pfde_t, link)
-{
-if (fd->desc.s == ep->fd.desc.s) {
-APR_RING_REMOVE(ep, link);
-APR_RING_INSERT_TAIL(&p->dead_ring, ep, tcn_pfde_t, link);
-p->nelts--;
-#ifdef TCN_DO_STATISTICS
-p->sp_removed++;
-#endif
-break;
-}
-}
-return rv;
-}
-
-static void update_last_active(tcn_pollset_t *p, const apr_pollfd_t *fd, 
apr_time_t t)
-{
-tcn_socket_t *s = (tcn_socket_t *)fd->client_data;
-TCN_ASSERT(s != 0);
-s->last_active = t;
-}
-
-
 TCN_IMPLEMENT_CALL(jint, Poll, remove)(TCN_STDARGS, jlong pollset,
jlong socket)
 {
 apr_pollfd_t fd;
+apr_status_t rv;
 tcn_pollset_t *p = J2P(pollset,  tcn_pollset_t *);
-tcn_socket_t *s  = J2P(socket, tcn_socket_t *);
+tcn_socket_t  *s = J2P(socket, tcn_socket_t *);
 
 UNREFERENCED_STDARGS;
 TCN_ASSERT(socket != 0);
 
+if (s->pe == NULL) {
+/* Already removed */
+return APR_SUCCESS;
+}
 fd.desc_type   = APR_POLL_SOCKET;
 fd.desc.s  = s->sock;
 fd.client_data = s;
@@ -285,7 +270,15 @@ TCN_IMPLEMENT_CALL(jint, Poll, remove)(T
 p->sp_remove++;
 #endif
 
-return (jint)do_remove(p, &fd);
+rv = apr_pollset_remove(p->pollset, &fd);
+APR_RING_REMOVE(s->pe, link);
+APR_RING_INSERT_TAIL(&p->dead_ring, s->pe, tcn_pfde_t, link);
+s->pe = NULL;
+p->nelts--;
+#ifdef TCN_DO_STATISTICS
+p->sp_removed++;
+#endif
+return rv;
 }
 
 
@@ -314,8 +307,7 @@ TCN_IMPLEMENT_CALL(jint, Poll, poll)(TCN
 APR_RING_FOREACH(ep, &p->poll_ring, tcn_pfde_t, link)
 {
 apr_interval_time_t socket_timeout = 0;
-tcn_socket_t *s;
-s = (tcn_socket_t *)ep->fd.client_data;
+tcn_socket_t *s = (tcn_socket_t *)ep->fd.client_data;
 if (s->timeout == TCN_NO_SOCKET_TIMEOUT) {
 socket_timeout = p->default_timeout;
 }
@@ -366,12 +358,25 @@ TCN_IMPLEMENT_CALL(jint, Poll, poll)(TCN
 if (!remove)
 now = apr_time_now();
 for (i = 0; i < num; i++) {
+tcn_socket_t *s = (tcn_socket_t *)fd->client_data;
 p->set[i*2+0] = (jlong)(fd->rtnevents);
-p->set[i*2+1] = P2J(fd->client_data);
-if (remove)
-do_remove(p, fd);
-else
-update_last_active(p, fd, now);
+p->set[i*2+1] = P2J(s);
+if (remove) {
+apr_pollset_remove(p->pollset, fd);
+APR_RING_REMOVE(s->pe, link);
+APR_RING_INSERT_TAIL(&p->dead_ring, s->pe, tcn_pfde_t, link);
+

[Tomcat Wiki] Update of "tools/check_jmxproxy.pl" by ChristopherSchultz

2012-11-27 Thread Apache Wiki
Dear Wiki user,

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

The "tools/check_jmxproxy.pl" page has been changed by ChristopherSchultz:
http://wiki.apache.org/tomcat/tools/check_jmxproxy.pl

New page:
{{{
#!/usr/bin/perl
#
# check_jmxproxy
#
# Contacts a JMX proxy (like that which Apache Tomcat provides)
# and compares the return value to the warning and critical values
# provided as parameters to this script.
#
# Copyright (c) 2012 Christopher Schultz
#
# Christopher Schultz 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.
#

use strict;

# For getopt:
use Getopt::Long qw(:config no_ignore_case bundling);;

# For HTTP stuff:
use LWP::UserAgent; 
use HTTP::Request; 
use HTTP::Response; 
use URI::Heuristic;

my $help = '';
my $url  = '';
my $warn = '';
my $critical = '';
my $verbose = '';
my $authorization = '';
my $useragent = 'Nagios check_jmxproxy/0.1';
my $timeout = 180;
my $fetchingRegexp = '^OK.*=\s*([0-9]+)$';
# $fetchingRegexp = 'OK.*used=([0-9]+).*';
my $outputFilterRegexp;

GetOptions(
'U=s' => \$url,
'url=s'   => \$url,
'w=s' => \$warn,
'warn=s'  => \$warn,
'c=s' => \$critical,
'critical=s'  => \$critical,
'h'   => \$help,
'help'=> \$help,
'v'   => \$verbose,
'verbose' => \$verbose,
'a=s' => \$authorization,
'authorization=s' => \$authorization,
'A'   => \$useragent,
'useragent'   => \$useragent,
't=i' => \$timeout,
'timeout=i'   => \$timeout,
'r=s' => \$fetchingRegexp,
'regexp=s'=> \$fetchingRegexp,
'R=s' => \$outputFilterRegexp,
'filtering-regexp=s' => \$outputFilterRegexp,
) or $help = '-h';

$help = 1 if ( $url eq '' || $warn eq '' || $critical eq '' );

if( $help ) {
print < -w  -c 

  -A, --useragent
Specify the User-Agent that will be sent when contacting the server.

  -a, --authorization
Specify the BASIC authorization string that will be used to satisfy
a WWW-Authenticate challenge. Should be in the form 'user:password'.

  -c, --critical
Specifies the 'critical' level against which the number returned
from the JMX proxy will be compared. Append a ':' to the end of
the critical value in order to perform a less-than comparison.

  -h, --help
Shows this help message.

  -r, --regexp
Specifies the regular expression that will be used to capture the
numeric portion of the JMX proxy's response. The first capture group
in the regular expression will be used as the numeric response.
Default: '^OK.*=\\s*([0-9]+)\$'

  -R, --filtering-regexp
Specifies the regular expresison that will be used to filter the
response from the JMX proxy before echoing it to the output stream
after a "JMX OK", "JMX WARN", or "JMX CRITICAL" message. If the
response from the JMX proxy is malformed, the response will not be
filtered.

  -t, --timeout
Specifies the timeout, in seconds, to wait for a response before
the request to the server is considered a failure. Default is 180
(3 minutes).

  -U, --url
Specifies the URL that check_jmxproxy will contact.

  -v, --verbose
Enabled verbose logging of what check_jmxproxy is doing.

  -w, --warn
Specifies the 'warning' level against which a number returned
from the JMX proxy will be compared. Append a ':' to the end of
the warning value in order to perform a less-than comparison.

Example:
   ${0} -u 
'http://host/manager/jmxproxy?get=java.lang:type=Memory&att=HeapMemoryUsage&key=used'
 -w 33554432 -c 50331648

  This example will report CRITICAL if the current JVM heap size exceeds
  48MiB or WARN if the heap size exceeds 32MiB.
USAGE
exit();
}

if ($verbose) {
  print "url = $url\n" if ($url);
  print "cricital = $critical\n" if ($critical);
  print "warn = $warn\n" if ($warn);
}

my $full_url = URI::Heuristic::uf_urlstr($url);
my $ua = LWP::UserAgent->new(); 
$ua->agent($useragent);
my $req = HTTP::Request->new(GET => $url); 

# Set the authentication information if necessary
if (!($authorization eq '')) {
  $req->authorization_basic(split /:/, $authorization, 2);
}

$ua->timeout($timeout);

my $response = $ua->request($req);

if ($response->is_error()) {
  printf "JMX CRITICAL: Response: %s\n", $response->status_line;
  exit 2;
} else {
  my $c

[Tomcat Wiki] Trivial Update of "FAQ/Monitoring" by ChristopherSchultz

2012-11-27 Thread Apache Wiki
Dear Wiki user,

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

The "FAQ/Monitoring" page has been changed by ChristopherSchultz:
http://wiki.apache.org/tomcat/FAQ/Monitoring?action=diff&rev1=6&rev2=7

  
  = External Monitoring Tools =
  
- Plug-in-based monitoring software like Nagios and Icinga may need some help 
interacting with Tomcat's JMXProxyServlet. [[tools/check_jmx]] is a Perl script 
that can be used with these tools to monitor Tomcat via the JMXProxyServlet.
+ Plug-in-based monitoring software like Nagios and Icinga may need some help 
interacting with Tomcat's JMXProxyServlet. [[tools/check_jmxproxy.pl]] is a 
Perl script that can be used with these tools to monitor Tomcat via the 
JMXProxyServlet.
  

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



[Tomcat Wiki] Update of "FAQ/Monitoring" by ChristopherSchultz

2012-11-27 Thread Apache Wiki
Dear Wiki user,

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

The "FAQ/Monitoring" page has been changed by ChristopherSchultz:
http://wiki.apache.org/tomcat/FAQ/Monitoring?action=diff&rev1=5&rev2=6

  
  = External Monitoring Tools =
  
- Plug-in-based monitoring software like Nagios and Icinga may need some help 
interacting with Tomcat's JMXProxyServlet. [[check_jmx]] is a Perl script that 
can be used with these tools to monitor Tomcat via the JMXProxyServlet.
+ Plug-in-based monitoring software like Nagios and Icinga may need some help 
interacting with Tomcat's JMXProxyServlet. [[tools/check_jmx]] is a Perl script 
that can be used with these tools to monitor Tomcat via the JMXProxyServlet.
  

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



[Tomcat Wiki] Update of "FAQ/Monitoring" by ChristopherSchultz

2012-11-27 Thread Apache Wiki
Dear Wiki user,

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

The "FAQ/Monitoring" page has been changed by ChristopherSchultz:
http://wiki.apache.org/tomcat/FAQ/Monitoring?action=diff&rev1=4&rev2=5

  
  = External Monitoring Tools =
  
- Plug-in-based monitoring software like Nagios and Icinga may need some help 
interacting with Tomcat's JMXProxyServlet. [[attachment:check_jmx|check_jmx]] 
is a Perl script that can be used with these tools to monitor Tomcat via the 
JMXProxyServlet.
+ Plug-in-based monitoring software like Nagios and Icinga may need some help 
interacting with Tomcat's JMXProxyServlet. [[check_jmx]] is a Perl script that 
can be used with these tools to monitor Tomcat via the JMXProxyServlet.
  

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



[Tomcat Wiki] Update of "FAQ/Monitoring" by ChristopherSchultz

2012-11-27 Thread Apache Wiki
Dear Wiki user,

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

The "FAQ/Monitoring" page has been changed by ChristopherSchultz:
http://wiki.apache.org/tomcat/FAQ/Monitoring?action=diff&rev1=3&rev2=4

+ <>
+ 
  = Monitoring Tomcat =
  
  Monitoring of a running Tomcat instance can be done in several ways, but 
observing a Tomcat instance via JMX beans will give you the best information 
available through standard interfaces (i.e. JMX). You can find information 
about [[http://tomcat.apache.org/tomcat-7.0-doc/monitoring.html|connecting to 
Tomcat via JMX]] in the Tomcat Users' Guide. Rather than repeating that 
information here (which is mostly about configuration, connection, etc.), 
please go read the official documentation.
@@ -48, +50 @@

   * JMX Bean: `Catalina:type=Manager,context=[context name],host=[hostname]`
   * Attributes: `activeSessions`
  
+ = External Monitoring Tools =
+ 
+ Plug-in-based monitoring software like Nagios and Icinga may need some help 
interacting with Tomcat's JMXProxyServlet. [[attachment:check_jmx|check_jmx]] 
is a Perl script that can be used with these tools to monitor Tomcat via the 
JMXProxyServlet.
+ 

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



svn commit: r1414427 - in /tomcat/trunk: java/org/apache/tomcat/websocket/ webapps/examples/WEB-INF/classes/websocket/echo/ webapps/examples/websocket/

2012-11-27 Thread markt
Author: markt
Date: Tue Nov 27 22:04:53 2012
New Revision: 1414427

URL: http://svn.apache.org/viewvc?rev=1414427&view=rev
Log:
WebSocket 1.0 implementation part 3 of many
Complete the WsServlet implementation
Now gets as far as Endpoint.onOpen() and then immediately closes
Add the new programmatic echo endpoint to the examples web app for testing

Added:
tomcat/trunk/java/org/apache/tomcat/websocket/WsEndpointPojo.java   (with 
props)
tomcat/trunk/java/org/apache/tomcat/websocket/WsProtocolHandler.java   
(with props)
tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java   (with props)
Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties
tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java
tomcat/trunk/java/org/apache/tomcat/websocket/WsServlet.java

tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoEndpoint.java
tomcat/trunk/webapps/examples/websocket/echo.html

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=1414427&r1=1414426&r2=1414427&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Tue 
Nov 27 22:04:53 2012
@@ -14,6 +14,7 @@
 # limitations under the License.
 sci.newInstance.fail=Failed to create an Endpoint instance of type [{0}]
 serverContainer.endpointDeploy=Endpoint class [{0}] deploying to path [{1}] in 
ServletContext [{2}]
+serverContainer.missingEndpoint=An Endpoint instance has been request for path 
[{0}] but no matching Endpoint class was found
 serverContainer.pojoDeploy=POJO class [{0}] deploying to path [{1}] in 
ServletContext [{2}]
 serverContainer.servletContextMismatch=Attempted to register a POJO annotated 
for WebSocket at path [{0}] in the ServletContext with context path [{1}] when 
the WebSocket ServerContainer is allocated to the ServletContext with context 
path [{2}]
 serverContainer.servletContextMissing=No ServletContext was specified
\ No newline at end of file

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java?rev=1414427&r1=1414426&r2=1414427&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java Tue 
Nov 27 22:04:53 2012
@@ -160,4 +160,23 @@ public class ServerContainerImpl extends
 
 sr.addMapping(mapping);
 }
+
+
+public Endpoint getEndpoint(String servletPath)
+throws InstantiationException, IllegalAccessException {
+Class clazzEndpoint = endpointMap.get(servletPath);
+if (clazzEndpoint != null) {
+Endpoint ep = clazzEndpoint.newInstance();
+return ep;
+}
+
+Class clazzPojo = pojoMap.get(servletPath);
+if (clazzPojo != null) {
+Endpoint ep = new WsEndpointPojo(clazzPojo, servletPath);
+return ep;
+}
+
+throw new IllegalStateException(
+sm.getString("serverContainer.missingEndpoint", servletPath));
+}
 }

Added: tomcat/trunk/java/org/apache/tomcat/websocket/WsEndpointPojo.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsEndpointPojo.java?rev=1414427&view=auto
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsEndpointPojo.java (added)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsEndpointPojo.java Tue Nov 
27 22:04:53 2012
@@ -0,0 +1,90 @@
+/*
+ *  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.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import javax.websocket.CloseReason;
+import javax.webso

[Tomcat Wiki] Update of "HowTo" by ChristopherSchultz

2012-11-27 Thread Apache Wiki
Dear Wiki user,

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

The "HowTo" page has been changed by ChristopherSchultz:
http://wiki.apache.org/tomcat/HowTo?action=diff&rev1=117&rev2=118

  
  This will produce a thread dump on standard output, but may not be possible 
to capture to a file.
  
+ == How do I read a Java thread dump ? ==
+ 
+ Java thread dumps are just text files, so you can read them with any text 
editor. There are some tools that can make your life easier, especially if you 
need to look at more than one thread dump at once.
+ 
+ One such tool is the Thread Dump Viewer (TDV), which you can find here: 
http://tdv.sourceforge.net/. It is a bit old (last release: 2007) but it can be 
somewhat helpful.
  
  == How do I obtain a heap dump? ==
  

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



svn commit: r1414359 - /tomcat/trunk/res/findbugs/filter-false-positives.xml

2012-11-27 Thread markt
Author: markt
Date: Tue Nov 27 19:53:37 2012
New Revision: 1414359

URL: http://svn.apache.org/viewvc?rev=1414359&view=rev
Log:
Another false positive

Modified:
tomcat/trunk/res/findbugs/filter-false-positives.xml

Modified: tomcat/trunk/res/findbugs/filter-false-positives.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/res/findbugs/filter-false-positives.xml?rev=1414359&r1=1414358&r2=1414359&view=diff
==
--- tomcat/trunk/res/findbugs/filter-false-positives.xml (original)
+++ tomcat/trunk/res/findbugs/filter-false-positives.xml Tue Nov 27 19:53:37 
2012
@@ -224,6 +224,11 @@
 
   
   
+
+
+
+  
+  
 
 
 



-
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

2012-11-27 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/3607

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

Buildslave for this Build: bb-vm_ubuntu

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

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





[Tomcat Wiki] Update of "PoweredBy" by Tony Ikye

2012-11-27 Thread Apache Wiki
Dear Wiki user,

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

The "PoweredBy" page has been changed by Tony Ikye:
http://wiki.apache.org/tomcat/PoweredBy?action=diff&rev1=447&rev2=448

  
  === Bodhost.com ===
  [[http://www.bodhost.com/|BODHost]] - Proud to be Apache Tomcat Hosting 
Provider
+ 
+ === DailyRazor ===
+ {{http://www.dailyrazor.com/mb/images/logo_sample.gif}}
+ [[http://www.dailyrazor.com/java-jsp-hosting/|DailyRazor]] is the leading 
provider of Tomcat and Java hosting solutions with fantastic support for MySQL 
and PostgreSQL database. Tomcat 5, 6, and 7 all supported. All plans feature 
Private JDK on a Private JVM.
  
  === DreamShared ===
  {{http://www.dreamshared.com/site/images/v2/logo_no_bg.png}} 
[[http://www.dreamshared.com/|DreamShared]] uses Tomcat to help people design 
and host unique, stylish, custom business websites and wedding websites.

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



svn commit: r1414218 - in /tomcat/tc7.0.x/trunk: ./ java/javax/servlet/ServletContext.java

2012-11-27 Thread markt
Author: markt
Date: Tue Nov 27 14:49:41 2012
New Revision: 1414218

URL: http://svn.apache.org/viewvc?rev=1414218&view=rev
Log:
A little more Javadoc

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/javax/servlet/ServletContext.java

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

Modified: tomcat/tc7.0.x/trunk/java/javax/servlet/ServletContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/javax/servlet/ServletContext.java?rev=1414218&r1=1414217&r2=1414218&view=diff
==
--- tomcat/tc7.0.x/trunk/java/javax/servlet/ServletContext.java (original)
+++ tomcat/tc7.0.x/trunk/java/javax/servlet/ServletContext.java Tue Nov 27 
14:49:41 2012
@@ -555,10 +555,17 @@ public interface ServletContext {
 throws ServletException;
 
 /**
- * @param servletName
- * @return TODO
- * @throws UnsupportedOperationException
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * Obtain the details of the named servlet.
+ *
+ * @param servletName   The name of the Servlet of interest
+ *
+ * @return  The registration details for the named Servlet or
+ *  null if no Servlet has been registered with the
+ *  given name
+ *
+ * @throws UnsupportedOperationException TODO SERVLET3 - Add comments
+ *
+ * @since Servlet 3.0
  */
 public ServletRegistration getServletRegistration(String servletName);
 



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



svn commit: r1414217 - in /tomcat/trunk/java/org/apache/tomcat/websocket: Constants.java LocalStrings.properties ServerContainerImpl.java WsSci.java WsServlet.java

2012-11-27 Thread markt
Author: markt
Date: Tue Nov 27 14:49:15 2012
New Revision: 1414217

URL: http://svn.apache.org/viewvc?rev=1414217&view=rev
Log:
WebSocket 1.0 implementation part 2 of many
Create the WebSocket servlet and ensure it responds to requests to WebSocket 
endpoints

Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/Constants.java
tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties
tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java
tomcat/trunk/java/org/apache/tomcat/websocket/WsSci.java
tomcat/trunk/java/org/apache/tomcat/websocket/WsServlet.java

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/Constants.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/Constants.java?rev=1414217&r1=1414216&r2=1414217&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/Constants.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/Constants.java Tue Nov 27 
14:49:15 2012
@@ -18,7 +18,9 @@ package org.apache.tomcat.websocket;
 
 public class Constants {
 
-public static final String PACKAGE_NAME = "org.apache.tomcat.websocket";
+protected static final String PACKAGE_NAME = "org.apache.tomcat.websocket";
+
+protected static final String SERVLET_NAME = WsServlet.class.getName();
 
 private Constants() {
 // Hide default constructor

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=1414217&r1=1414216&r2=1414217&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Tue 
Nov 27 14:49:15 2012
@@ -12,4 +12,8 @@
 # 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.
-sci.newInstance.fail=Failed to create an Endpoint instance of type [{0}]
\ No newline at end of file
+sci.newInstance.fail=Failed to create an Endpoint instance of type [{0}]
+serverContainer.endpointDeploy=Endpoint class [{0}] deploying to path [{1}] in 
ServletContext [{2}]
+serverContainer.pojoDeploy=POJO class [{0}] deploying to path [{1}] in 
ServletContext [{2}]
+serverContainer.servletContextMismatch=Attempted to register a POJO annotated 
for WebSocket at path [{0}] in the ServletContext with context path [{1}] when 
the WebSocket ServerContainer is allocated to the ServletContext with context 
path [{2}]
+serverContainer.servletContextMissing=No ServletContext was specified
\ No newline at end of file

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java?rev=1414217&r1=1414216&r2=1414217&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java Tue 
Nov 27 14:49:15 2012
@@ -18,12 +18,17 @@ package org.apache.tomcat.websocket;
 
 import java.util.Map;
 import java.util.WeakHashMap;
+import java.util.concurrent.ConcurrentHashMap;
 
+import javax.servlet.ServletContext;
+import javax.servlet.ServletRegistration;
 import javax.websocket.DeploymentException;
 import javax.websocket.Endpoint;
 import javax.websocket.ServerContainer;
 import javax.websocket.ServerEndpointConfiguration;
 
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.res.StringManager;
 
 /**
@@ -42,6 +47,8 @@ public class ServerContainerImpl extends
 private static StringManager sm = StringManager.getManager(
 Constants.PACKAGE_NAME);
 
+protected Log log = LogFactory.getLog(ServerContainerImpl.class);
+
 
 /**
  * Intended to be used by implementations of {@link
@@ -64,28 +71,47 @@ public class ServerContainerImpl extends
 }
 
 
+private volatile ServletContext servletContext = null;
+
+private Map> endpointMap =
+new ConcurrentHashMap<>();
+
+private Map> pojoMap = new ConcurrentHashMap<>();
+
+
 private ServerContainerImpl() {
 // Hide default constructor
 }
 
 
+public void setServletContext(ServletContext servletContext) {
+this.servletContext = servletContext;
+}
+
+
 @Override
 public void publishServer(Class clazz)
 throws DeploymentException {
 
+Endpoint ep = null;
 try {
-Endpoint ep = clazz.newInstance();
-ServerEndpointConfiguration config =
-(ServerEndpointConfig

svn commit: r1414215 - /tomcat/trunk/java/javax/servlet/ServletContext.java

2012-11-27 Thread markt
Author: markt
Date: Tue Nov 27 14:46:30 2012
New Revision: 1414215

URL: http://svn.apache.org/viewvc?rev=1414215&view=rev
Log:
A little more Javadoc

Modified:
tomcat/trunk/java/javax/servlet/ServletContext.java

Modified: tomcat/trunk/java/javax/servlet/ServletContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/ServletContext.java?rev=1414215&r1=1414214&r2=1414215&view=diff
==
--- tomcat/trunk/java/javax/servlet/ServletContext.java (original)
+++ tomcat/trunk/java/javax/servlet/ServletContext.java Tue Nov 27 14:46:30 2012
@@ -555,10 +555,17 @@ public interface ServletContext {
 throws ServletException;
 
 /**
- * @param servletName
- * @return TODO
- * @throws UnsupportedOperationException
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * Obtain the details of the named servlet.
+ *
+ * @param servletName   The name of the Servlet of interest
+ *
+ * @return  The registration details for the named Servlet or
+ *  null if no Servlet has been registered with the
+ *  given name
+ *
+ * @throws UnsupportedOperationException TODO SERVLET3 - Add comments
+ *
+ * @since Servlet 3.0
  */
 public ServletRegistration getServletRegistration(String servletName);
 



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



[GUMP@vmgump]: Project tomcat-taglibs-standard (in module tomcat-taglibs) failed

2012-11-27 Thread Gump
To whom it may engage...

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

Project tomcat-taglibs-standard has an issue affecting its community 
integration.
This issue affects 2 projects,
 and has been outstanding for 209 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-taglibs-standard :  Standard Taglib
- tomcat-taglibs-standard-install :  JSP Taglibs


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-taglibs/tomcat-taglibs-standard/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -INFO- Optional dependency httpunit failed with reason build failed
 -DEBUG- (Apache Gump generated) Apache Maven Settings in: 
/srv/gump/public/workspace/tomcat-taglibs/standard/gump_mvn_settings.xml
 -INFO- Failed with reason build failed
 -DEBUG- Maven POM in: 
/srv/gump/public/workspace/tomcat-taglibs/standard/pom.xml
 -INFO- Failed to extract fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-taglibs/tomcat-taglibs-standard/gump_work/build_tomcat-taglibs_tomcat-taglibs-standard.html
Work Name: build_tomcat-taglibs_tomcat-taglibs-standard (Type: Build)
Work ended in a state of : Failed
Elapsed: 31 secs
Command Line: /opt/maven2/bin/mvn --batch-mode -DskipTests=true --settings 
/srv/gump/public/workspace/tomcat-taglibs/standard/gump_mvn_settings.xml 
install 
[Working Directory: /srv/gump/public/workspace/tomcat-taglibs/standard]
M2_HOME: /opt/maven2
-
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[debug] execute contextualize
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
/srv/gump/public/workspace/tomcat-taglibs/standard/spec/src/test/resources
[INFO] Copying 3 resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] No sources to compile
[INFO] [surefire:test {execution: default-test}]
[INFO] Tests are skipped.
[INFO] [bundle:bundle {execution: default-bundle}]
[INFO] [install:install {execution: default-install}]
[INFO] Installing 
/srv/gump/public/workspace/tomcat-taglibs/standard/spec/target/taglibs-standard-spec-1.2-SNAPSHOT.jar
 to 
/srv/gump/public/workspace/mvnlocalrepo/shared/org/apache/taglibs/taglibs-standard-spec/1.2-SNAPSHOT/taglibs-standard-spec-1.2-SNAPSHOT.jar
[INFO] [bundle:install {execution: default-install}]
[INFO] Parsing 
file:/srv/gump/public/workspace/mvnlocalrepo/shared/repository.xml
[INFO] Installing 
org/apache/taglibs/taglibs-standard-spec/1.2-SNAPSHOT/taglibs-standard-spec-1.2-SNAPSHOT.jar
[INFO] Writing OBR metadata
[INFO] 
[INFO] Building JSTL Implementation
[INFO]task-segment: [install]
[INFO] 
[INFO] [remote-resources:process {execution: default}]
[INFO] snapshot org.apache.taglibs:taglibs-standard-spec:1.2-SNAPSHOT: checking 
for updates from apache.snapshots
[debug] execute contextualize
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 14 resources
[INFO] Copying 3 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 96 source files to 
/srv/gump/public/workspace/tomcat-taglibs/standard/impl/target/classes
[INFO] -
[ERROR] COMPILATION ERROR : 
[INFO] -
[ERROR] 
/srv/gump/public/workspace/tomcat-taglibs/standard/impl/src/main/java/org/apache/taglibs/standard/tag/common/sql/DataSourceWrapper.java:[38,7]
 error: DataSourceWrapper is not abstract and does not override abstract method 
getParentLogger() in CommonDataSource
[INFO] 1 error
[INFO] -
[INFO] 
[ERROR] BUILD FAILURE
[INFO] 
[INFO] Compilation failure
/srv/gump/public/workspace/tomcat-taglibs/standard/impl/src/main/java/org/apache/taglibs/standard/tag/common/sql/DataSourceWrapper.java:[38,7]
 error: DataSourceWrapper is not abstract and does not override abstract method 
getParentLogger() in CommonDataSource

[INFO] 
[INFO] For more information, run Maven with the -e switch
[INFO] --

Re: svn commit: r1414046 - /tomcat/trunk/res/META-INF/tomcat-websocket.jar/web-fragment.xml

2012-11-27 Thread Mark Thomas
On 27/11/2012 13:48, Konstantin Kolinko wrote:
> 2012/11/27  :
>> Author: markt
>> Date: Tue Nov 27 09:52:09 2012
>> New Revision: 1414046
>>
>> URL: http://svn.apache.org/viewvc?rev=1414046&view=rev
>> Log:
>> Add a web-fragment.xml to tomcat-websocket.jar so it has a standard name.
>>
>> Added:
>> tomcat/trunk/res/META-INF/tomcat-websocket.jar/web-fragment.xml   (with 
>> props)
>>
>> @@ -0,0 +1,25 @@
>> (...)
>> +http://java.sun.com/xml/ns/javaee";
>> +  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>> +  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>> +  
>> http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd";
>> +  version="3.0"
>> +  metadata-complete="false">
> 
> Why metadata-complete="false" on this fragment?

I'm keeping my options open. At the moment there isn't anything to scan
for but that may not always be the case. It can change to true for now
if you prefer.

Mark


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



Re: svn commit: r1414046 - /tomcat/trunk/res/META-INF/tomcat-websocket.jar/web-fragment.xml

2012-11-27 Thread Konstantin Kolinko
2012/11/27  :
> Author: markt
> Date: Tue Nov 27 09:52:09 2012
> New Revision: 1414046
>
> URL: http://svn.apache.org/viewvc?rev=1414046&view=rev
> Log:
> Add a web-fragment.xml to tomcat-websocket.jar so it has a standard name.
>
> Added:
> tomcat/trunk/res/META-INF/tomcat-websocket.jar/web-fragment.xml   (with 
> props)
>
> @@ -0,0 +1,25 @@
>(...)
> +http://java.sun.com/xml/ns/javaee";
> +  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> +  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> +  http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd";
> +  version="3.0"
> +  metadata-complete="false">

Why metadata-complete="false" on this fragment?

My understanding is that this jar does not contribute
servlets/filters/listeners to the web application via annotations so I
think "true" will be more appropriate here
(and SCI processing happens regardless of the value).

> +  org.apache.tomcat.websocket
> +

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: r1414179 - in /tomcat/trunk/java/org/apache/tomcat/websocket: Constants.java LocalStrings.properties ServerContainerImpl.java

2012-11-27 Thread markt
Author: markt
Date: Tue Nov 27 13:28:36 2012
New Revision: 1414179

URL: http://svn.apache.org/viewvc?rev=1414179&view=rev
Log:
Use StringManager to provide i18n support

Added:
tomcat/trunk/java/org/apache/tomcat/websocket/Constants.java   (with props)
tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties   
(with props)
Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java

Added: tomcat/trunk/java/org/apache/tomcat/websocket/Constants.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/Constants.java?rev=1414179&view=auto
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/Constants.java (added)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/Constants.java Tue Nov 27 
13:28:36 2012
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+public class Constants {
+
+public static final String PACKAGE_NAME = "org.apache.tomcat.websocket";
+
+private Constants() {
+// Hide default constructor
+}
+}

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

Added: 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=1414179&view=auto
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties 
(added)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Tue 
Nov 27 13:28:36 2012
@@ -0,0 +1,15 @@
+# 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.
+sci.newInstance.fail=Failed to create an Endpoint instance of type [{0}]
\ No newline at end of file

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

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java?rev=1414179&r1=1414178&r2=1414179&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java Tue 
Nov 27 13:28:36 2012
@@ -24,6 +24,8 @@ import javax.websocket.Endpoint;
 import javax.websocket.ServerContainer;
 import javax.websocket.ServerEndpointConfiguration;
 
+import org.apache.tomcat.util.res.StringManager;
+
 /**
  * Provides a per class loader (i.e. per web application) instance of a
  * {@link ServerContainer}.
@@ -37,6 +39,9 @@ public class ServerContainerImpl extends
 classLoaderContainerMap = new WeakHashMap<>();
 private static Object classLoaderContainerMapLock = new  Object();
 
+private static StringManager sm = StringManager.getManager(
+Constants.PACKAGE_NAME);
+
 
 /**
  * Intended to be used by implementations of {@link
@@ -78,9 +83,8 @@ public class ServerContainerImpl extends
 System.out.println("Class [" + clazz.getName() +
 "] deployed to

svn commit: r1414151 - /tomcat/trunk/java/javax/websocket/ContainerProvider.java

2012-11-27 Thread markt
Author: markt
Date: Tue Nov 27 12:29:57 2012
New Revision: 1414151

URL: http://svn.apache.org/viewvc?rev=1414151&view=rev
Log:
Tweak the comments. No functional change.

Modified:
tomcat/trunk/java/javax/websocket/ContainerProvider.java

Modified: tomcat/trunk/java/javax/websocket/ContainerProvider.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/websocket/ContainerProvider.java?rev=1414151&r1=1414150&r2=1414151&view=diff
==
--- tomcat/trunk/java/javax/websocket/ContainerProvider.java (original)
+++ tomcat/trunk/java/javax/websocket/ContainerProvider.java Tue Nov 27 
12:29:57 2012
@@ -34,8 +34,8 @@ public class ContainerProvider {
  */
 public static ServerContainer getServerContainer() {
 // Note: No special handling required when running under a
-//   SecurityManager as the caller and this class will have the 
same
-//   ClassLoader
+//   SecurityManager as the container provider implementation and
+//   this class have the same class loader.
 ServerContainer result = null;
 try {
 Class clazz = Class.forName(CONTAINER_PROVIDER_IMPL);



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



svn commit: r1414150 - /tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java

2012-11-27 Thread markt
Author: markt
Date: Tue Nov 27 12:29:36 2012
New Revision: 1414150

URL: http://svn.apache.org/viewvc?rev=1414150&view=rev
Log:
FRom kkolinko:
A ReadWriteLock cannot be used to guard a WeakHashMap.  The
WeakHashMap may modify itself on get(), as it processes the reference
queue of items removed by GC.

Either a plain old lock / synchronization is needed, or some other solution
(e.g.  org.apache.tomcat.util.collections.ManagedConcurrentWeakHashMap )

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

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java?rev=1414150&r1=1414149&r2=1414150&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java Tue 
Nov 27 12:29:36 2012
@@ -18,9 +18,6 @@ package org.apache.tomcat.websocket;
 
 import java.util.Map;
 import java.util.WeakHashMap;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReadWriteLock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 import javax.websocket.DeploymentException;
 import javax.websocket.Endpoint;
@@ -38,40 +35,24 @@ public class ServerContainerImpl extends
 // stopped
 private static Map
 classLoaderContainerMap = new WeakHashMap<>();
-private static ReadWriteLock classLoaderContainerMapLock =
-new  ReentrantReadWriteLock();
+private static Object classLoaderContainerMapLock = new  Object();
 
 
 /**
- * Intended to be used be implementations of {@link
+ * Intended to be used by implementations of {@link
  * javax.websocket.ContainerProvider#getServerContainer()} to obtain the
  * correct {@link ServerContainer} instance.
  */
 public static ServerContainerImpl getServerContainer() {
-// TODO SecurityManager
 ClassLoader tccl = Thread.currentThread().getContextClassLoader();
 
 ServerContainerImpl result = null;
 
-Lock readlock = classLoaderContainerMapLock.readLock();
-try {
-readlock.lock();
+synchronized (classLoaderContainerMapLock) {
 result = classLoaderContainerMap.get(tccl);
-} finally {
-readlock.unlock();
-}
-
-if (result == null) {
-Lock writeLock = classLoaderContainerMapLock.writeLock();
-try {
-writeLock.lock();
-result = classLoaderContainerMap.get(tccl);
-if (result == null) {
-result = new ServerContainerImpl();
-classLoaderContainerMap.put(tccl, result);
-}
-} finally {
-writeLock.unlock();
+if (result == null) {
+result = new ServerContainerImpl();
+classLoaderContainerMap.put(tccl, result);
 }
 }
 return result;



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



Re: svn commit: r1414110 - in /tomcat/trunk/java/org/apache/tomcat/websocket: ServerContainerImpl.java Util.java

2012-11-27 Thread Mark Thomas
On 27/11/2012 10:49, Konstantin Kolinko wrote:
> 2012/11/27  :
>> Author: markt
>> Date: Tue Nov 27 10:35:30 2012
>> New Revision: 1414110
>>
>> URL: http://svn.apache.org/viewvc?rev=1414110&view=rev


> A ReadWriteLock cannot be used to guard a WeakHashMap.  The
> WeakHashMap may modify itself on get(), as it processes the reference
> queue of items removed by GC.
> 
> Either a plain old lock / synchronization is needed, or some other solution
> (e.g.  org.apache.tomcat.util.collections.ManagedConcurrentWeakHashMap )

Sorry, I should have remembered that having been bitten by it before. I
think ManagedConcurrentWeakHashMap is my preferred option. The question
is where to trigger maintain() from. I don't want to create a dependency
between this class and any other part of Tomcat as I would like this
implementation to be self-contained.

Mark


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



Re: svn commit: r1414110 - in /tomcat/trunk/java/org/apache/tomcat/websocket: ServerContainerImpl.java Util.java

2012-11-27 Thread Konstantin Kolinko
2012/11/27  :
> Author: markt
> Date: Tue Nov 27 10:35:30 2012
> New Revision: 1414110
>
> URL: http://svn.apache.org/viewvc?rev=1414110&view=rev
> Log:
> More Javadoc
>
> Modified:
> tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java
> tomcat/trunk/java/org/apache/tomcat/websocket/Util.java
>
> Modified: 
> tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java?rev=1414110&r1=1414109&r2=1414110&view=diff
> ==
> --- tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java 
> (original)
> +++ tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java 
> Tue Nov 27 10:35:30 2012
> @@ -27,16 +27,26 @@ import javax.websocket.Endpoint;
>  import javax.websocket.ServerContainer;
>  import javax.websocket.ServerEndpointConfiguration;
>
> +/**
> + * Provides a per class loader (i.e. per web application) instance of a
> + * {@link ServerContainer}.
> + */
>  public class ServerContainerImpl extends ClientContainerImpl implements
>  ServerContainer {
>
> -// Needs to be a WekaHashMap to prevent memory leaks when a context is
> +// Needs to be a WeakHashMap to prevent memory leaks when a context is
>  // stopped
>  private static Map
>  classLoaderContainerMap = new WeakHashMap<>();
>  private static ReadWriteLock classLoaderContainerMapLock =
>  new  ReentrantReadWriteLock();

A ReadWriteLock cannot be used to guard a WeakHashMap.  The
WeakHashMap may modify itself on get(), as it processes the reference
queue of items removed by GC.

Either a plain old lock / synchronization is needed, or some other solution
(e.g.  org.apache.tomcat.util.collections.ManagedConcurrentWeakHashMap )

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: r1414118 - in /tomcat/tc7.0.x/trunk: ./ java/javax/servlet/ServletContainerInitializer.java

2012-11-27 Thread markt
Author: markt
Date: Tue Nov 27 10:38:08 2012
New Revision: 1414118

URL: http://svn.apache.org/viewvc?rev=1414118&view=rev
Log:
Improve wording

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/javax/servlet/ServletContainerInitializer.java

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1414053,1414113

Modified: 
tomcat/tc7.0.x/trunk/java/javax/servlet/ServletContainerInitializer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/javax/servlet/ServletContainerInitializer.java?rev=1414118&r1=1414117&r2=1414118&view=diff
==
--- tomcat/tc7.0.x/trunk/java/javax/servlet/ServletContainerInitializer.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/javax/servlet/ServletContainerInitializer.java 
Tue Nov 27 10:38:08 2012
@@ -23,15 +23,15 @@ import java.util.Set;
  * file META-INF/services/javax.servlet.ServletContainerInitializer that must 
be
  * included in the JAR file that contains the SCI implementation.
  * 
- * SCIs processing is performed regardless of the setting of metadata-complete.
- * SCI processing can be controlled be JAR file via fragment ordering. If an
- * absolute ordering is defined, the only those fragments included in the
- * ordering will be scanned. To disable SCI processing completely, an empty
+ * SCI processing is performed regardless of the setting of metadata-complete.
+ * SCI processing can be controlled per JAR file via fragment ordering. If an
+ * absolute ordering is defined, the only those JARs included in the ordering
+ * will be processed for SCIs. To disable SCI processing completely, an empty
  * absolute ordering may be defined.
  * 
- * SCIs register an interest in annotations (class, method or field) or types
- * via the {@link javax.servlet.annotation.HandlesTypes} annotation which is
- * added to the {@link #onStartup(Set, ServletContext)} method.
+ * SCIs register an interest in annotations (class, method or field) and/or
+ * types via the {@link javax.servlet.annotation.HandlesTypes} annotation which
+ * is added to the class.
  *
  * @since Servlet 3.0
  */



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



svn commit: r1414113 - /tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java

2012-11-27 Thread markt
Author: markt
Date: Tue Nov 27 10:37:29 2012
New Revision: 1414113

URL: http://svn.apache.org/viewvc?rev=1414113&view=rev
Log:
Improve wording

Modified:
tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java

Modified: tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java?rev=1414113&r1=1414112&r2=1414113&view=diff
==
--- tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java (original)
+++ tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java Tue Nov 27 
10:37:29 2012
@@ -23,15 +23,15 @@ import java.util.Set;
  * file META-INF/services/javax.servlet.ServletContainerInitializer that must 
be
  * included in the JAR file that contains the SCI implementation.
  * 
- * SCIs processing is performed regardless of the setting of metadata-complete.
- * SCI processing can be controlled be JAR file via fragment ordering. If an
- * absolute ordering is defined, the only those fragments included in the
- * ordering will be scanned. To disable SCI processing completely, an empty
+ * SCI processing is performed regardless of the setting of metadata-complete.
+ * SCI processing can be controlled per JAR file via fragment ordering. If an
+ * absolute ordering is defined, the only those JARs included in the ordering
+ * will be processed for SCIs. To disable SCI processing completely, an empty
  * absolute ordering may be defined.
  * 
- * SCIs register an interest in annotations (class, method or field) or types
- * via the {@link javax.servlet.annotation.HandlesTypes} annotation which is
- * added to the {@link #onStartup(Set, ServletContext)} method.
+ * SCIs register an interest in annotations (class, method or field) and/or
+ * types via the {@link javax.servlet.annotation.HandlesTypes} annotation which
+ * is added to the class.
  *
  * @since Servlet 3.0
  */



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



svn commit: r1414110 - in /tomcat/trunk/java/org/apache/tomcat/websocket: ServerContainerImpl.java Util.java

2012-11-27 Thread markt
Author: markt
Date: Tue Nov 27 10:35:30 2012
New Revision: 1414110

URL: http://svn.apache.org/viewvc?rev=1414110&view=rev
Log:
More Javadoc

Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java
tomcat/trunk/java/org/apache/tomcat/websocket/Util.java

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java?rev=1414110&r1=1414109&r2=1414110&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java Tue 
Nov 27 10:35:30 2012
@@ -27,16 +27,26 @@ import javax.websocket.Endpoint;
 import javax.websocket.ServerContainer;
 import javax.websocket.ServerEndpointConfiguration;
 
+/**
+ * Provides a per class loader (i.e. per web application) instance of a
+ * {@link ServerContainer}.
+ */
 public class ServerContainerImpl extends ClientContainerImpl implements
 ServerContainer {
 
-// Needs to be a WekaHashMap to prevent memory leaks when a context is
+// Needs to be a WeakHashMap to prevent memory leaks when a context is
 // stopped
 private static Map
 classLoaderContainerMap = new WeakHashMap<>();
 private static ReadWriteLock classLoaderContainerMapLock =
 new  ReentrantReadWriteLock();
 
+
+/**
+ * Intended to be used be implementations of {@link
+ * javax.websocket.ContainerProvider#getServerContainer()} to obtain the
+ * correct {@link ServerContainer} instance.
+ */
 public static ServerContainerImpl getServerContainer() {
 // TODO SecurityManager
 ClassLoader tccl = Thread.currentThread().getContextClassLoader();
@@ -67,10 +77,12 @@ public class ServerContainerImpl extends
 return result;
 }
 
+
 private ServerContainerImpl() {
 // Hide default constructor
 }
 
+
 @Override
 public void publishServer(Class clazz)
 throws DeploymentException {
@@ -91,6 +103,15 @@ public class ServerContainerImpl extends
 }
 }
 
+
+/**
+ * Provides the equivalent of {@link #publishServer(Class)} for publishing
+ * plain old java objects (POJOs) that have been annotated as WebSocket
+ * endpoints.
+ *
+ * @param pojo
+ * @param path
+ */
 public void publishServer(Class pojo, String path) {
 // TODO Replace following debug code with something useful.
 System.out.println("Class [" + pojo.getName() +

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/Util.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/Util.java?rev=1414110&r1=1414109&r2=1414110&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/Util.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/Util.java Tue Nov 27 10:35:30 
2012
@@ -16,12 +16,24 @@
  */
 package org.apache.tomcat.websocket;
 
+/**
+ * Utility class for internal use only within the {@link
+ * org.apache.tomcat.websocket} package.
+ */
 class Util {
 
 private Util() {
 // Hide default constructor
 }
 
+/**
+ * Converts a path defined for a WebSocket endpoint into a path that can be
+ * used as a servlet mapping.
+ *
+ * @param wsPathThe WebSocket endpoint path to convert
+ *
+ * @return  The servlet mapping
+ */
 static String getServletMappingPath(String wsPath) {
 int templateStart = wsPath.indexOf('{');
 if (templateStart == -1) {



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



Re: svn commit: r1414053 - /tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java

2012-11-27 Thread Mark Thomas
On 27/11/2012 10:25, Konstantin Kolinko wrote:
> 2012/11/27  :
>> Author: markt
>> Date: Tue Nov 27 10:06:42 2012
>> New Revision: 1414053
>>
>> URL: http://svn.apache.org/viewvc?rev=1414053&view=rev
>> Log:
>> Populate the SCI Javadoc
>>
>> Modified:
>> tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java
>>
>> Modified: tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java
>> URL: 
>> http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java?rev=1414053&r1=1414052&r2=1414053&view=diff
>> ==
>> --- tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java 
>> (original)
>> +++ tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java Tue Nov 
>> 27 10:06:42 2012
>> @@ -19,18 +19,35 @@ package javax.servlet;
>>  import java.util.Set;
>>
>>  /**
>> + * ServletContainerInitializers (SCIs) are registered via an entry in the
>> + * file META-INF/services/javax.servlet.ServletContainerInitializer that 
>> must be
>> + * included in the JAR file that contains the SCI implementation.
>> + * 
>> + * SCIs processing is performed regardless of the setting of 
>> metadata-complete.
>> + * SCI processing can be controlled be JAR file via fragment ordering. If an
> 
> I do not understand the second "be" in the above line.

Nor me. I'll figure out what i meant to type and fix it.

>> + * absolute ordering is defined, the only those fragments included in the
>> + * ordering will be scanned. To disable SCI processing completely, an empty
>> + * absolute ordering may be defined.
>> + * 
>> + * SCIs register an interest in annotations (class, method or field) or 
>> types
>> + * via the {@link javax.servlet.HandlesTypes} annotation which is
>> + * added to the {@link #onStartup(Set, ServletContext)} method.
> 
> I read it that one needs to add @HandlesTypes to the onStartup() method.
> 
> I have not used this feature yet, but in our WsSci class the
> annotation is placed on the class as a whole, not on that particular
> method.
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsSci.java?view=markup

Yep. I'll fix that too.

Mark


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



Re: svn commit: r1414053 - /tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java

2012-11-27 Thread Konstantin Kolinko
2012/11/27  :
> Author: markt
> Date: Tue Nov 27 10:06:42 2012
> New Revision: 1414053
>
> URL: http://svn.apache.org/viewvc?rev=1414053&view=rev
> Log:
> Populate the SCI Javadoc
>
> Modified:
> tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java
>
> Modified: tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java?rev=1414053&r1=1414052&r2=1414053&view=diff
> ==
> --- tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java 
> (original)
> +++ tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java Tue Nov 
> 27 10:06:42 2012
> @@ -19,18 +19,35 @@ package javax.servlet;
>  import java.util.Set;
>
>  /**
> + * ServletContainerInitializers (SCIs) are registered via an entry in the
> + * file META-INF/services/javax.servlet.ServletContainerInitializer that 
> must be
> + * included in the JAR file that contains the SCI implementation.
> + * 
> + * SCIs processing is performed regardless of the setting of 
> metadata-complete.
> + * SCI processing can be controlled be JAR file via fragment ordering. If an

I do not understand the second "be" in the above line.

> + * absolute ordering is defined, the only those fragments included in the
> + * ordering will be scanned. To disable SCI processing completely, an empty
> + * absolute ordering may be defined.
> + * 
> + * SCIs register an interest in annotations (class, method or field) or types
> + * via the {@link javax.servlet.HandlesTypes} annotation which is
> + * added to the {@link #onStartup(Set, ServletContext)} method.

I read it that one needs to add @HandlesTypes to the onStartup() method.

I have not used this feature yet, but in our WsSci class the
annotation is placed on the class as a whole, not on that particular
method.
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsSci.java?view=markup

> + *
>   * @since Servlet 3.0
>   */
>  public interface ServletContainerInitializer {

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: r1414057 - /tomcat/tc7.0.x/trunk/java/javax/servlet/ServletContainerInitializer.java

2012-11-27 Thread markt
Author: markt
Date: Tue Nov 27 10:09:46 2012
New Revision: 1414057

URL: http://svn.apache.org/viewvc?rev=1414057&view=rev
Log:
Populate the SCI Javadoc

Modified:
tomcat/tc7.0.x/trunk/java/javax/servlet/ServletContainerInitializer.java

Modified: 
tomcat/tc7.0.x/trunk/java/javax/servlet/ServletContainerInitializer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/javax/servlet/ServletContainerInitializer.java?rev=1414057&r1=1414056&r2=1414057&view=diff
==
--- tomcat/tc7.0.x/trunk/java/javax/servlet/ServletContainerInitializer.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/javax/servlet/ServletContainerInitializer.java 
Tue Nov 27 10:09:46 2012
@@ -19,18 +19,35 @@ package javax.servlet;
 import java.util.Set;
 
 /**
+ * ServletContainerInitializers (SCIs) are registered via an entry in the
+ * file META-INF/services/javax.servlet.ServletContainerInitializer that must 
be
+ * included in the JAR file that contains the SCI implementation.
+ * 
+ * SCIs processing is performed regardless of the setting of metadata-complete.
+ * SCI processing can be controlled be JAR file via fragment ordering. If an
+ * absolute ordering is defined, the only those fragments included in the
+ * ordering will be scanned. To disable SCI processing completely, an empty
+ * absolute ordering may be defined.
+ * 
+ * SCIs register an interest in annotations (class, method or field) or types
+ * via the {@link javax.servlet.annotation.HandlesTypes} annotation which is
+ * added to the {@link #onStartup(Set, ServletContext)} method.
+ *
  * @since Servlet 3.0
- * $Id$
- * TODO SERVLET3 - Add comments
  */
 public interface ServletContainerInitializer {
 
 /**
- * 
- * @param c
- * @param ctx
- * @throws ServletException
+ * Receives notification during startup of a web application of the classes
+ * within the web application that matched the criteria defined via the
+ * {@link javax.servlet.annotation.HandlesTypes} annotation.
+ *
+ * @param c The (possibly null) set of classes that met the specified
+ *  criteria
+ * @param ctx   The ServletContext of the web application in which the
+ *  classes were discovered
+ *
+ * @throws ServletException If an error occurs
  */
-public void onStartup(Set> c, ServletContext ctx)
-throws ServletException;
+void onStartup(Set> c, ServletContext ctx) throws 
ServletException;
 }



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



svn commit: r1414054 - /tomcat/trunk/java/org/apache/tomcat/websocket/WsSci.java

2012-11-27 Thread markt
Author: markt
Date: Tue Nov 27 10:08:12 2012
New Revision: 1414054

URL: http://svn.apache.org/viewvc?rev=1414054&view=rev
Log:
Add some Javadoc

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

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsSci.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsSci.java?rev=1414054&r1=1414053&r2=1414054&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsSci.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsSci.java Tue Nov 27 
10:08:12 2012
@@ -24,6 +24,11 @@ import javax.servlet.ServletException;
 import javax.servlet.annotation.HandlesTypes;
 import javax.websocket.WebSocketEndpoint;
 
+/**
+ * Registers an interest in any class that is annotated with
+ * {@link WebSocketEndpoint} so that Endpoint can be published via the
+ * WebSocket server.
+ */
 @HandlesTypes({WebSocketEndpoint.class})
 public class WsSci implements ServletContainerInitializer {
 
@@ -42,5 +47,4 @@ public class WsSci implements ServletCon
 sc.publishServer(clazz, mappingPath);
 }
 }
-
 }



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



svn commit: r1414053 - /tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java

2012-11-27 Thread markt
Author: markt
Date: Tue Nov 27 10:06:42 2012
New Revision: 1414053

URL: http://svn.apache.org/viewvc?rev=1414053&view=rev
Log:
Populate the SCI Javadoc

Modified:
tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java

Modified: tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java?rev=1414053&r1=1414052&r2=1414053&view=diff
==
--- tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java (original)
+++ tomcat/trunk/java/javax/servlet/ServletContainerInitializer.java Tue Nov 27 
10:06:42 2012
@@ -19,18 +19,35 @@ package javax.servlet;
 import java.util.Set;
 
 /**
+ * ServletContainerInitializers (SCIs) are registered via an entry in the
+ * file META-INF/services/javax.servlet.ServletContainerInitializer that must 
be
+ * included in the JAR file that contains the SCI implementation.
+ * 
+ * SCIs processing is performed regardless of the setting of metadata-complete.
+ * SCI processing can be controlled be JAR file via fragment ordering. If an
+ * absolute ordering is defined, the only those fragments included in the
+ * ordering will be scanned. To disable SCI processing completely, an empty
+ * absolute ordering may be defined.
+ * 
+ * SCIs register an interest in annotations (class, method or field) or types
+ * via the {@link javax.servlet.annotation.HandlesTypes} annotation which is
+ * added to the {@link #onStartup(Set, ServletContext)} method.
+ *
  * @since Servlet 3.0
- * $Id$
- * TODO SERVLET3 - Add comments
  */
 public interface ServletContainerInitializer {
 
 /**
+ * Receives notification during startup of a web application of the classes
+ * within the web application that matched the criteria defined via the
+ * {@link javax.servlet.annotation.HandlesTypes} annotation.
  *
- * @param c
- * @param ctx
- * @throws ServletException
+ * @param c The (possibly null) set of classes that met the specified
+ *  criteria
+ * @param ctx   The ServletContext of the web application in which the
+ *  classes were discovered
+ *
+ * @throws ServletException If an error occurs
  */
-public void onStartup(Set> c, ServletContext ctx)
-throws ServletException;
+void onStartup(Set> c, ServletContext ctx) throws 
ServletException;
 }



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



svn commit: r1414046 - /tomcat/trunk/res/META-INF/tomcat-websocket.jar/web-fragment.xml

2012-11-27 Thread markt
Author: markt
Date: Tue Nov 27 09:52:09 2012
New Revision: 1414046

URL: http://svn.apache.org/viewvc?rev=1414046&view=rev
Log:
Add a web-fragment.xml to tomcat-websocket.jar so it has a standard name.

Added:
tomcat/trunk/res/META-INF/tomcat-websocket.jar/web-fragment.xml   (with 
props)

Added: tomcat/trunk/res/META-INF/tomcat-websocket.jar/web-fragment.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/res/META-INF/tomcat-websocket.jar/web-fragment.xml?rev=1414046&view=auto
==
--- tomcat/trunk/res/META-INF/tomcat-websocket.jar/web-fragment.xml (added)
+++ tomcat/trunk/res/META-INF/tomcat-websocket.jar/web-fragment.xml Tue Nov 27 
09:52:09 2012
@@ -0,0 +1,25 @@
+
+
+http://java.sun.com/xml/ns/javaee";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+  http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd";
+  version="3.0"
+  metadata-complete="false">
+  org.apache.tomcat.websocket
+
\ No newline at end of file

Propchange: tomcat/trunk/res/META-INF/tomcat-websocket.jar/web-fragment.xml
--
svn:eol-style = native



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