DO NOT REPLY [Bug 51276] Startup time is too high if there are few JARs in "lib/" and a few webapps.

2011-06-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51276

--- Comment #9 from Alex Dupre  2011-06-06 07:04:32 UTC ---
Is there an ETA for tomcat 7.0.15?

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

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



Re: svn commit: r1132367 - in /tomcat/trunk: java/org/apache/coyote/http11/Http11AprProcessor.java webapps/docs/changelog.xml

2011-06-06 Thread Remy Maucherat
On Sun, 2011-06-05 at 10:21 +, ma...@apache.org wrote:
> Author: markt
> Date: Sun Jun  5 10:21:25 2011
> New Revision: 1132367
> 
> URL: http://svn.apache.org/viewvc?rev=1132367&view=rev
> Log:
> Correctly handle range requests when using sendfile and the APR/native HTTP 
> connector.
> -"org.apache.tomcat.sendfile.end")).longValue();
> +"org.apache.tomcat.sendfile.end")).longValue() - 
> sendfileData.pos;

I don't understand, the code reads:
sendfileData = new AprEndpoint.SendfileData();
sendfileData.fileName = fileName;
sendfileData.start = ((Long) request.getAttribute(
"org.apache.tomcat.sendfile.start")).longValue();
sendfileData.end = ((Long) request.getAttribute(
"org.apache.tomcat.sendfile.end")).longValue() - sendfileData.pos; 

So how can sendfileData.pos not be 0 here ?

Rémy



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



svn commit: r1132569 - /tomcat/trunk/test/org/apache/catalina/valves/TesterAccessLogValve.java

2011-06-06 Thread kkolinko
Author: kkolinko
Date: Mon Jun  6 10:05:11 2011
New Revision: 1132569

URL: http://svn.apache.org/viewvc?rev=1132569&view=rev
Log:
Set svn:eol-style=native
Fixes bug 51323 reported by sebb

Modified:
tomcat/trunk/test/org/apache/catalina/valves/TesterAccessLogValve.java   
(props changed)

Propchange: 
tomcat/trunk/test/org/apache/catalina/valves/TesterAccessLogValve.java
--
svn:eol-style = native



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



DO NOT REPLY [Bug 51323] Svn property fixes

2011-06-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51323

Konstantin Kolinko  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #1 from Konstantin Kolinko  2011-06-06 
10:12:16 UTC ---
Fixed in r1132569: svn:eol-style on TesterAccessLogValve.java

Regarding the rest of the patch that sets svn:keywords property on the files in
/java/org/apache/tomcat/util/bcel/classfile/ -- it is wrong. None of those
files uses any keywords. Thus there is no need to set this property there.

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

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



Travel Assistance applications now open for ApacheCon NA 2011

2011-06-06 Thread Mladen Turk

The Apache Software Foundation (ASF)'s Travel Assistance Committee (TAC) is
now accepting applications for ApacheCon North America 2011, 7-11 November
in Vancouver BC, Canada.

The TAC is seeking individuals from the Apache community at-large --users,
developers, educators, students, Committers, and Members-- who would like to
attend ApacheCon, but need some financial support in order to be able to get
there. There are limited places available, and all applicants will be scored
on their individual merit.

Financial assistance is available to cover flights/trains, accommodation and
entrance fees either in part or in full, depending on circumstances.
However, the support available for those attending only the BarCamp (7-8
November) is less than that for those attending the entire event (Conference
+ BarCamp 7-11 November). The Travel Assistance Committee aims to support
all official ASF events, including cross-project activities; as such, it may
be prudent for those in Asia and Europe to wait for an event geographically
closer to them.

More information can be found at http://www.apache.org/travel/index.html
including a link to the online application and detailed instructions for
submitting.

Applications will close on 8 July 2011 at 22:00 BST (UTC/GMT +1).

We wish good luck to all those who will apply, and thank you in advance for
tweeting, blogging, and otherwise spreading the word.


Regards,
The Apache Tomcat Project Management Committee on behalf of
The Travel Assistance Committee




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



Re: svn commit: r1131263 - in /tomcat/trunk: java/org/apache/catalina/session/JDBCStore.java java/org/apache/catalina/session/LocalStrings.properties webapps/docs/changelog.xml webapps/docs/config/man

2011-06-06 Thread Keiichi Fujino
When jdbc-pool or DBCP is used as DB connection pool and
removeAbandoned is "true",
dbConnection is closed because dbConnection is not returned to the
connection pool.
And then, dbConnection is acquired again because dbConnection has been
already closed.

Should I return the connection to the connection pool?
Or, is the DB connection cached until removeAbandoned works?


2011/6/4  :
> Author: markt
> Date: Fri Jun  3 22:13:09 2011
> New Revision: 1131263
>
> URL: http://svn.apache.org/viewvc?rev=1131263&view=rev
> Log:
> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51264
> Allow the JDBC persistent session store to use a JNDI datasource to define 
> the database in which sessions are persisted.
> Patch provided by Felix Schumacher.
>
> Modified:
>    tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java
>    tomcat/trunk/java/org/apache/catalina/session/LocalStrings.properties
>    tomcat/trunk/webapps/docs/changelog.xml
>    tomcat/trunk/webapps/docs/config/manager.xml
>
> Modified: tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java?rev=1131263&r1=1131262&r2=1131263&view=diff
> ==
> --- tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java (original)
> +++ tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java Fri Jun  3 
> 22:13:09 2011
> @@ -33,6 +33,11 @@ import java.sql.SQLException;
>  import java.util.ArrayList;
>  import java.util.Properties;
>
> +import javax.naming.Context;
> +import javax.naming.InitialContext;
> +import javax.naming.NamingException;
> +import javax.sql.DataSource;
> +
>  import org.apache.catalina.Container;
>  import org.apache.catalina.LifecycleException;
>  import org.apache.catalina.Loader;
> @@ -102,6 +107,16 @@ public class JDBCStore extends StoreBase
>      */
>     protected String driverName = null;
>
> +    /**
> +     * name of the JNDI resource
> +     */
> +    protected String dataSourceName = null;
> +
> +    /**
> +     * DataSource to use
> +     */
> +    protected DataSource dataSource = null;
> +
>     // - Table & 
> cols
>
>     /**
> @@ -436,6 +451,27 @@ public class JDBCStore extends StoreBase
>         return (this.sessionLastAccessedCol);
>     }
>
> +    /**
> +     * Set the JNDI name of a DataSource-factory to use for db access
> +     *
> +     * @param dataSourceName The JNDI name of the DataSource-factory
> +     */
> +    public void setDataSourceName(String dataSourceName) {
> +        if (dataSourceName == null || "".equals(dataSourceName.trim())) {
> +            manager.getContainer().getLogger().warn(
> +                    sm.getString(getStoreName() + ".missingDataSourceName"));
> +            return;
> +        }
> +        this.dataSourceName = dataSourceName;
> +    }
> +
> +    /**
> +     * Return the name of the JNDI DataSource-factory
> +     */
> +    public String getDataSourceName() {
> +        return this.dataSourceName;
> +    }
> +
>     // - Public 
> Methods
>
>     /**
> @@ -866,6 +902,24 @@ public class JDBCStore extends StoreBase
>         if (dbConnection != null)
>             return (dbConnection);
>
> +        if (dataSourceName != null && dataSource == null) {
> +            Context initCtx;
> +            try {
> +                initCtx = new InitialContext();
> +                Context envCtx = (Context) initCtx.lookup("java:comp/env");
> +                this.dataSource = (DataSource) 
> envCtx.lookup(this.dataSourceName);
> +            } catch (NamingException e) {
> +                manager.getContainer().getLogger().error(
> +                        sm.getString(getStoreName() + ".wrongDataSource",
> +                                this.dataSourceName), e);
> +           }
> +        }
> +
> +        if (dataSource != null) {
> +            dbConnection = dataSource.getConnection();
> +            return dbConnection;
> +        }
> +
>         // Instantiate our database driver if necessary
>         if (driver == null) {
>             try {
>
> Modified: 
> tomcat/trunk/java/org/apache/catalina/session/LocalStrings.properties
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/LocalStrings.properties?rev=1131263&r1=1131262&r2=1131263&view=diff
> ==
> --- tomcat/trunk/java/org/apache/catalina/session/LocalStrings.properties 
> (original)
> +++ tomcat/trunk/java/org/apache/catalina/session/LocalStrings.properties Fri 
> Jun  3 22:13:09 2011
> @@ -27,6 +27,8 @@ JDBCStore.checkConnectionDBClosed=The da
>  JDBCStore.checkConnectionDBReOpenFail=The re-open on the database failed. 
> The database could be down.
>  JDBCStore.checkConnectionSQLException=A SQL exception occurred {0

Re: svn commit: r1132487 - in /tomcat/trunk: java/org/apache/coyote/http11/AbstractHttp11Processor.java webapps/docs/changelog.xml

2011-06-06 Thread Tim Funk
Ascii.parseInt can throw a NumberFormatException which should probably be
caught and a 400 returned.

-Tim

On Sun, Jun 5, 2011 at 4:26 PM,  wrote:

> Author: markt
> Date: Sun Jun  5 20:26:37 2011
> New Revision: 1132487
>
> URL: http://svn.apache.org/viewvc?rev=1132487&view=rev
> Log:
> Parse port as base10, not hex
>
> Modified:
>tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
>tomcat/trunk/webapps/docs/changelog.xml
>
> Modified:
> tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
> URL:
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1132487&r1=1132486&r2=1132487&view=diff
>
> ==
> --- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
> (original)
> +++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
> Sun Jun  5 20:26:37 2011
> @@ -39,7 +39,6 @@ import org.apache.juli.logging.Log;
>  import org.apache.tomcat.util.ExceptionUtils;
>  import org.apache.tomcat.util.buf.Ascii;
>  import org.apache.tomcat.util.buf.ByteChunk;
> -import org.apache.tomcat.util.buf.HexUtils;
>  import org.apache.tomcat.util.buf.MessageBytes;
>  import org.apache.tomcat.util.http.FastHttpDateFormat;
>  import org.apache.tomcat.util.http.MimeHeaders;
> @@ -993,26 +992,9 @@ public abstract class AbstractHttp11Proc
> }
> request.serverName().setChars(hostNameC, 0, valueL);
> } else {
> -
> request.serverName().setChars(hostNameC, 0, colonPos);
> -
> -int port = 0;
> -int mult = 1;
> -for (int i = valueL - 1; i > colonPos; i--) {
> -int charValue = HexUtils.getDec(valueB[i + valueS]);
> -if (charValue == -1) {
> -// Invalid character
> -error = true;
> -// 400 - Bad request
> -response.setStatus(400);
> -adapter.log(request, response, 0);
> -break;
> -}
> -port = port + (charValue * mult);
> -mult = 10 * mult;
> -}
> -request.setServerPort(port);
> -
> +request.setServerPort(Ascii.parseInt(
> +valueB, valueS + colonPos + 1, valueL - colonPos -
> 1));
> }
>
> }
>
>


DO NOT REPLY [Bug 51283] Session Fixation is solved without an invalidating of an existing HTTP session

2011-06-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51283

--- Comment #6 from Christopher Schultz  
2011-06-06 13:48:07 UTC ---
(In reply to comment #5)
> I tend to agree: if the users cannot trust the webapp, they should be using 
> it.

Umm... I meant "...should NOT be using it", of course.

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

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



DO NOT REPLY [Bug 51323] Svn property fixes

2011-06-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51323

--- Comment #2 from Sebb  2011-06-06 14:37:06 UTC ---
My checking script detected that the wrong syntax was used for the
svn:keywords.

The keywords are currently set to

"Author Date Id Revision"

rather than the correct

Author Date Id Revision

The leading and trailing quotes should not be present, as they stop Author and
Revision keywords from working (if present).

It's confusing to have the invalid keywords in the propery, so I suggest that
the properties are fixed or deleted.

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

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



Re: svn commit: r1132362 - in /tomcat/trunk/java/org/apache/coyote/http11: AbstractHttp11Processor.java Http11AprProcessor.java Http11NioProcessor.java Http11Processor.java

2011-06-06 Thread Mark Thomas
On 06/06/2011 06:54, Konstantin Kolinko wrote:
> 2011/6/6 Mark Thomas :
>> On 05/06/2011 17:47, Rainer Jung wrote:
>> +for (int i = valueL - 1; i > colonPos; i--) {
>> +int charValue = HexUtils.getDec(valueB[i + valueS]);
>
> Any idea, why hex digits (including a-f, A-F) are allowed in port numbers?
> 
> Probably that was just to do not invent a separate method.
> Another way to fix this would be to replace the next line
> if (charValue == -1) {
> with
> if (charValue == -1 || charValue > 9) {



> Regarding the patch,
> http://svn.apache.org/viewvc?rev=1132487&view=rev
> 
> Code looks OK but my small concern is that the invalid case is handled
> with a NumberFormatException here and it can be triggered by an
> external request. I have not tested it here, but general notion is
> that exception creation is expensive.
> 
> Maybe we can use a cached copy of NumberFormatException, like
> o.a.naming.resources.ImmutableNameNotFoundException

I think reverting to the original code and using the change you
suggested above is a better solution. I'll do that shortly.

> By the way, there are two HexUtils classes in trunk. Do we need both?

I'll take a look and remove one if I can. Thanks for spotting it.

Mark



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



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

2011-06-06 Thread markt
Author: markt
Date: Mon Jun  6 16:53:37 2011
New Revision: 1132700

URL: http://svn.apache.org/viewvc?rev=1132700&view=rev
Log:
Revert r1132487 and use Konstantin's suggested fix.

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

Modified: 
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1132700&r1=1132699&r2=1132700&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Mon 
Jun  6 16:53:37 2011
@@ -39,6 +39,7 @@ import org.apache.juli.logging.Log;
 import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.buf.Ascii;
 import org.apache.tomcat.util.buf.ByteChunk;
+import org.apache.tomcat.util.buf.HexUtils;
 import org.apache.tomcat.util.buf.MessageBytes;
 import org.apache.tomcat.util.http.FastHttpDateFormat;
 import org.apache.tomcat.util.http.MimeHeaders;
@@ -993,8 +994,23 @@ public abstract class AbstractHttp11Proc
 request.serverName().setChars(hostNameC, 0, valueL);
 } else {
 request.serverName().setChars(hostNameC, 0, colonPos);
-request.setServerPort(Ascii.parseInt(
-valueB, valueS + colonPos + 1, valueL - colonPos - 1));
+
+int port = 0;
+int mult = 1;
+for (int i = valueL - 1; i > colonPos; i--) {
+int charValue = HexUtils.getDec(valueB[i + valueS]);
+if (charValue == -1 || charValue > 9) {
+// Invalid character
+error = true;
+// 400 - Bad request
+response.setStatus(400);
+adapter.log(request, response, 0);
+break;
+}
+port = port + (charValue * mult);
+mult = 10 * mult;
+}
+request.setServerPort(port);
 }
 
 }

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1132700&r1=1132699&r2=1132700&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Jun  6 16:53:37 2011
@@ -51,7 +51,7 @@
   
   
 When parsing the port in the HTTP host header, treat the port as a base
-10 integer rather than a hexadecimal one. (rjung/markt) 
+10 integer rather than a hexadecimal one. (rjung/markt/kkolinko) 
   
 
   



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



svn commit: r1132702 - in /tomcat/trunk/java/org/apache/catalina: realm/RealmBase.java util/HexUtils.java

2011-06-06 Thread markt
Author: markt
Date: Mon Jun  6 16:53:58 2011
New Revision: 1132702

URL: http://svn.apache.org/viewvc?rev=1132702&view=rev
Log:
Only need 1 HexUtils class

Removed:
tomcat/trunk/java/org/apache/catalina/util/HexUtils.java
Modified:
tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java

Modified: tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java?rev=1132702&r1=1132701&r2=1132702&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java Mon Jun  6 
16:53:58 2011
@@ -48,11 +48,11 @@ import org.apache.catalina.deploy.LoginC
 import org.apache.catalina.deploy.SecurityCollection;
 import org.apache.catalina.deploy.SecurityConstraint;
 import org.apache.catalina.mbeans.MBeanUtils;
-import org.apache.catalina.util.HexUtils;
 import org.apache.catalina.util.LifecycleMBeanBase;
 import org.apache.catalina.util.MD5Encoder;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
+import org.apache.tomcat.util.buf.HexUtils;
 import org.apache.tomcat.util.res.StringManager;
 import org.ietf.jgss.GSSContext;
 import org.ietf.jgss.GSSCredential;
@@ -1142,7 +1142,7 @@ public abstract class RealmBase extends 
 }
 md.update(bytes);
 
-return (HexUtils.convert(md.digest()));
+return (HexUtils.toHexString(md.digest()));
 } catch (Exception e) {
 log.error(sm.getString("realmBase.digest"), e);
 return (credentials);
@@ -1290,7 +1290,7 @@ public abstract class RealmBase extends 
 }
 
 // Digest the credentials and return as hexadecimal
-return (HexUtils.convert(md.digest()));
+return (HexUtils.toHexString(md.digest()));
 } catch(Exception ex) {
 log.error(ex);
 return credentials;



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



Re: svn commit: r1132367 - in /tomcat/trunk: java/org/apache/coyote/http11/Http11AprProcessor.java webapps/docs/changelog.xml

2011-06-06 Thread Mark Thomas
On 06/06/2011 09:01, Remy Maucherat wrote:
> On Sun, 2011-06-05 at 10:21 +, ma...@apache.org wrote:
>> Author: markt
>> Date: Sun Jun  5 10:21:25 2011
>> New Revision: 1132367
>>
>> URL: http://svn.apache.org/viewvc?rev=1132367&view=rev
>> Log:
>> Correctly handle range requests when using sendfile and the APR/native HTTP 
>> connector.
>> -"org.apache.tomcat.sendfile.end")).longValue();
>> +"org.apache.tomcat.sendfile.end")).longValue() - 
>> sendfileData.pos;
> 
> I don't understand, the code reads:
> sendfileData = new AprEndpoint.SendfileData();
> sendfileData.fileName = fileName;
> sendfileData.start = ((Long) request.getAttribute(
>   "org.apache.tomcat.sendfile.start")).longValue();
> sendfileData.end = ((Long) request.getAttribute(
>   "org.apache.tomcat.sendfile.end")).longValue() - sendfileData.pos; 
> 
> So how can sendfileData.pos not be 0 here ?

Because when the DefaultServlet handles a range request start may be
non-zero. (line 1658 in trunk)

Mark



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



Re: svn commit: r1131263 - in /tomcat/trunk: java/org/apache/catalina/session/JDBCStore.java java/org/apache/catalina/session/LocalStrings.properties webapps/docs/changelog.xml webapps/docs/config/man

2011-06-06 Thread Mark Thomas
On 06/06/2011 11:59, Keiichi Fujino wrote:
> When jdbc-pool or DBCP is used as DB connection pool and
> removeAbandoned is "true",
> dbConnection is closed because dbConnection is not returned to the
> connection pool.
> And then, dbConnection is acquired again because dbConnection has been
> already closed.
> 
> Should I return the connection to the connection pool?
> Or, is the DB connection cached until removeAbandoned works?

The connection should be returned to the pool. If you could take care of
that, that would be great. Sorry for missing that when I applied the patch.

Mark

> 
> 
> 2011/6/4  :
>> Author: markt
>> Date: Fri Jun  3 22:13:09 2011
>> New Revision: 1131263
>>
>> URL: http://svn.apache.org/viewvc?rev=1131263&view=rev
>> Log:
>> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51264
>> Allow the JDBC persistent session store to use a JNDI datasource to define 
>> the database in which sessions are persisted.
>> Patch provided by Felix Schumacher.
>>
>> Modified:
>>tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java
>>tomcat/trunk/java/org/apache/catalina/session/LocalStrings.properties
>>tomcat/trunk/webapps/docs/changelog.xml
>>tomcat/trunk/webapps/docs/config/manager.xml
>>
>> Modified: tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java
>> URL: 
>> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java?rev=1131263&r1=1131262&r2=1131263&view=diff
>> ==
>> --- tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java (original)
>> +++ tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java Fri Jun  3 
>> 22:13:09 2011
>> @@ -33,6 +33,11 @@ import java.sql.SQLException;
>>  import java.util.ArrayList;
>>  import java.util.Properties;
>>
>> +import javax.naming.Context;
>> +import javax.naming.InitialContext;
>> +import javax.naming.NamingException;
>> +import javax.sql.DataSource;
>> +
>>  import org.apache.catalina.Container;
>>  import org.apache.catalina.LifecycleException;
>>  import org.apache.catalina.Loader;
>> @@ -102,6 +107,16 @@ public class JDBCStore extends StoreBase
>>  */
>> protected String driverName = null;
>>
>> +/**
>> + * name of the JNDI resource
>> + */
>> +protected String dataSourceName = null;
>> +
>> +/**
>> + * DataSource to use
>> + */
>> +protected DataSource dataSource = null;
>> +
>> // - Table & 
>> cols
>>
>> /**
>> @@ -436,6 +451,27 @@ public class JDBCStore extends StoreBase
>> return (this.sessionLastAccessedCol);
>> }
>>
>> +/**
>> + * Set the JNDI name of a DataSource-factory to use for db access
>> + *
>> + * @param dataSourceName The JNDI name of the DataSource-factory
>> + */
>> +public void setDataSourceName(String dataSourceName) {
>> +if (dataSourceName == null || "".equals(dataSourceName.trim())) {
>> +manager.getContainer().getLogger().warn(
>> +sm.getString(getStoreName() + 
>> ".missingDataSourceName"));
>> +return;
>> +}
>> +this.dataSourceName = dataSourceName;
>> +}
>> +
>> +/**
>> + * Return the name of the JNDI DataSource-factory
>> + */
>> +public String getDataSourceName() {
>> +return this.dataSourceName;
>> +}
>> +
>> // - Public 
>> Methods
>>
>> /**
>> @@ -866,6 +902,24 @@ public class JDBCStore extends StoreBase
>> if (dbConnection != null)
>> return (dbConnection);
>>
>> +if (dataSourceName != null && dataSource == null) {
>> +Context initCtx;
>> +try {
>> +initCtx = new InitialContext();
>> +Context envCtx = (Context) initCtx.lookup("java:comp/env");
>> +this.dataSource = (DataSource) 
>> envCtx.lookup(this.dataSourceName);
>> +} catch (NamingException e) {
>> +manager.getContainer().getLogger().error(
>> +sm.getString(getStoreName() + ".wrongDataSource",
>> +this.dataSourceName), e);
>> +   }
>> +}
>> +
>> +if (dataSource != null) {
>> +dbConnection = dataSource.getConnection();
>> +return dbConnection;
>> +}
>> +
>> // Instantiate our database driver if necessary
>> if (driver == null) {
>> try {
>>
>> Modified: 
>> tomcat/trunk/java/org/apache/catalina/session/LocalStrings.properties
>> URL: 
>> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/LocalStrings.properties?rev=1131263&r1=1131262&r2=1131263&view=diff
>> ==
>> --- tomcat/trunk/java/org/apache/catalina/session/LocalStrings.properties 
>> (origin

Re: svn commit: r1132487 - in /tomcat/trunk: java/org/apache/coyote/http11/AbstractHttp11Processor.java webapps/docs/changelog.xml

2011-06-06 Thread Mark Thomas
On 06/06/2011 13:04, Tim Funk wrote:
> Ascii.parseInt can throw a NumberFormatException which should probably be
> caught and a 400 returned.

Yep. Konstantin pointed out the same issue. Shoudl be fixed now.

Mark

> 
> -Tim
> 
> On Sun, Jun 5, 2011 at 4:26 PM,  wrote:
> 
>> Author: markt
>> Date: Sun Jun  5 20:26:37 2011
>> New Revision: 1132487
>>
>> URL: http://svn.apache.org/viewvc?rev=1132487&view=rev
>> Log:
>> Parse port as base10, not hex
>>
>> Modified:
>>tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
>>tomcat/trunk/webapps/docs/changelog.xml
>>
>> Modified:
>> tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
>> URL:
>> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1132487&r1=1132486&r2=1132487&view=diff
>>
>> ==
>> --- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
>> (original)
>> +++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
>> Sun Jun  5 20:26:37 2011
>> @@ -39,7 +39,6 @@ import org.apache.juli.logging.Log;
>>  import org.apache.tomcat.util.ExceptionUtils;
>>  import org.apache.tomcat.util.buf.Ascii;
>>  import org.apache.tomcat.util.buf.ByteChunk;
>> -import org.apache.tomcat.util.buf.HexUtils;
>>  import org.apache.tomcat.util.buf.MessageBytes;
>>  import org.apache.tomcat.util.http.FastHttpDateFormat;
>>  import org.apache.tomcat.util.http.MimeHeaders;
>> @@ -993,26 +992,9 @@ public abstract class AbstractHttp11Proc
>> }
>> request.serverName().setChars(hostNameC, 0, valueL);
>> } else {
>> -
>> request.serverName().setChars(hostNameC, 0, colonPos);
>> -
>> -int port = 0;
>> -int mult = 1;
>> -for (int i = valueL - 1; i > colonPos; i--) {
>> -int charValue = HexUtils.getDec(valueB[i + valueS]);
>> -if (charValue == -1) {
>> -// Invalid character
>> -error = true;
>> -// 400 - Bad request
>> -response.setStatus(400);
>> -adapter.log(request, response, 0);
>> -break;
>> -}
>> -port = port + (charValue * mult);
>> -mult = 10 * mult;
>> -}
>> -request.setServerPort(port);
>> -
>> +request.setServerPort(Ascii.parseInt(
>> +valueB, valueS + colonPos + 1, valueL - colonPos -
>> 1));
>> }
>>
>> }
>>
>>
> 




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



svn commit: r1132703 - in /tomcat/trunk/webapps/docs: changelog.xml logging.xml

2011-06-06 Thread markt
Author: markt
Date: Mon Jun  6 17:07:49 2011
New Revision: 1132703

URL: http://svn.apache.org/viewvc?rev=1132703&view=rev
Log:
Correct doc error reported on users list

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

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1132703&r1=1132702&r2=1132703&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Jun  6 17:07:49 2011
@@ -55,6 +55,14 @@
   
 
   
+  
+
+  
+Correct the log4j configuration settings when defining conversion
+patterns in the documentation web application. (markt)
+  
+
+  
 
 
   

Modified: tomcat/trunk/webapps/docs/logging.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/logging.xml?rev=1132703&r1=1132702&r2=1132703&view=diff
==
--- tomcat/trunk/webapps/docs/logging.xml (original)
+++ tomcat/trunk/webapps/docs/logging.xml Mon Jun  6 17:07:49 2011
@@ -420,7 +420,7 @@ log4j.appender.CATALINA.encoding=UTF-8
 log4j.appender.CATALINA.DatePattern='.'-MM-dd'.log'
 log4j.appender.CATALINA.layout = org.apache.log4j.PatternLayout
-log4j.appender.CATALINA.conversionPattern = %d [%t] %-5p %c- %m%n
+log4j.appender.CATALINA.layout.conversionPattern = %d [%t] %-5p %c- %m%n
 log4j.appender.CATALINA.append=true
 
 log4j.appender.LOCALHOST=org.apache.log4j.DailyRollingFileAppender
@@ -428,7 +428,7 @@ log4j.appender.LOCALHOST.file=${catalina
 log4j.appender.LOCALHOST.encoding=UTF-8
 log4j.appender.LOCALHOST.DatePattern='.'-MM-dd'.log'
 log4j.appender.LOCALHOST.layout = org.apache.log4j.PatternLayout
-log4j.appender.LOCALHOST.conversionPattern = %d [%t] %-5p %c- %m%n
+log4j.appender.LOCALHOST.layout.conversionPattern = %d [%t] %-5p %c- %m%n
 log4j.appender.LOCALHOST.append=true
 
 log4j.appender.MANAGER=org.apache.log4j.DailyRollingFileAppender
@@ -436,7 +436,7 @@ log4j.appender.MANAGER.file=${catalina.b
 log4j.appender.MANAGER.encoding=UTF-8
 log4j.appender.MANAGER.DatePattern='.'-MM-dd'.log'
 log4j.appender.MANAGER.layout = org.apache.log4j.PatternLayout
-log4j.appender.MANAGER.conversionPattern = %d [%t] %-5p %c- %m%n
+log4j.appender.MANAGER.layout.conversionPattern = %d [%t] %-5p %c- %m%n
 log4j.appender.MANAGER.append=true
 
 log4j.appender.HOST-MANAGER=org.apache.log4j.DailyRollingFileAppender
@@ -444,13 +444,13 @@ log4j.appender.HOST-MANAGER.file=${catal
 log4j.appender.HOST-MANAGER.encoding=UTF-8
 log4j.appender.HOST-MANAGER.DatePattern='.'-MM-dd'.log'
 log4j.appender.HOST-MANAGER.layout = org.apache.log4j.PatternLayout
-log4j.appender.HOST-MANAGER.conversionPattern = %d [%t] %-5p %c- %m%n
+log4j.appender.HOST-MANAGER.layout.conversionPattern = %d [%t] %-5p %c- 
%m%n
 log4j.appender.HOST-MANAGER.append=true
 
 log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
 log4j.appender.CONSOLE.encoding=UTF-8
 log4j.appender.CONSOLE.layout = org.apache.log4j.PatternLayout
-log4j.appender.CONSOLE.conversionPattern = %d [%t] %-5p %c- %m%n
+log4j.appender.CONSOLE.layout.conversionPattern = %d [%t] %-5p %c- %m%n
 
 # Configure which loggers log to which appenders
 
log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=INFO,
 LOCALHOST



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



svn commit: r1132705 - in /tomcat/tc6.0.x/trunk/webapps/docs: changelog.xml logging.xml

2011-06-06 Thread markt
Author: markt
Date: Mon Jun  6 17:08:11 2011
New Revision: 1132705

URL: http://svn.apache.org/viewvc?rev=1132705&view=rev
Log:
CTR
Correct doc error reported on users list

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

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1132705&r1=1132704&r2=1132705&view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Mon Jun  6 17:08:11 2011
@@ -186,6 +186,10 @@
 Manager application was running web applications that were defined in
 server.xml. (markt)
   
+  
+Correct the log4j configuration settings when defining conversion
+patterns in the documentation web application. (markt)
+  
 
   
   

Modified: tomcat/tc6.0.x/trunk/webapps/docs/logging.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/logging.xml?rev=1132705&r1=1132704&r2=1132705&view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/logging.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/logging.xml Mon Jun  6 17:08:11 2011
@@ -423,7 +423,7 @@ log4j.appender.CATALINA.encoding=UTF-8
 log4j.appender.CATALINA.DatePattern='.'-MM-dd'.log'
 log4j.appender.CATALINA.layout = org.apache.log4j.PatternLayout
-log4j.appender.CATALINA.conversionPattern = %d [%t] %-5p %c- %m%n
+log4j.appender.CATALINA.layout.conversionPattern = %d [%t] %-5p %c- %m%n
 log4j.appender.CATALINA.append=true
 
 log4j.appender.LOCALHOST=org.apache.log4j.DailyRollingFileAppender
@@ -431,7 +431,7 @@ log4j.appender.LOCALHOST.file=${catalina
 log4j.appender.LOCALHOST.encoding=UTF-8
 log4j.appender.LOCALHOST.DatePattern='.'-MM-dd'.log'
 log4j.appender.LOCALHOST.layout = org.apache.log4j.PatternLayout
-log4j.appender.LOCALHOST.conversionPattern = %d [%t] %-5p %c- %m%n
+log4j.appender.LOCALHOST.layout.conversionPattern = %d [%t] %-5p %c- %m%n
 log4j.appender.LOCALHOST.append=true
 
 log4j.appender.MANAGER=org.apache.log4j.DailyRollingFileAppender
@@ -439,7 +439,7 @@ log4j.appender.MANAGER.file=${catalina.b
 log4j.appender.MANAGER.encoding=UTF-8
 log4j.appender.MANAGER.DatePattern='.'-MM-dd'.log'
 log4j.appender.MANAGER.layout = org.apache.log4j.PatternLayout
-log4j.appender.MANAGER.conversionPattern = %d [%t] %-5p %c- %m%n
+log4j.appender.MANAGER.layout.conversionPattern = %d [%t] %-5p %c- %m%n
 log4j.appender.MANAGER.append=true
 
 log4j.appender.HOST-MANAGER=org.apache.log4j.DailyRollingFileAppender
@@ -447,13 +447,13 @@ log4j.appender.HOST-MANAGER.file=${catal
 log4j.appender.HOST-MANAGER.encoding=UTF-8
 log4j.appender.HOST-MANAGER.DatePattern='.'-MM-dd'.log'
 log4j.appender.HOST-MANAGER.layout = org.apache.log4j.PatternLayout
-log4j.appender.HOST-MANAGER.conversionPattern = %d [%t] %-5p %c- %m%n
+log4j.appender.HOST-MANAGER.layout.conversionPattern = %d [%t] %-5p %c- 
%m%n
 log4j.appender.HOST-MANAGER.append=true
 
 log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
 log4j.appender.CONSOLE.encoding=UTF-8
 log4j.appender.CONSOLE.layout = org.apache.log4j.PatternLayout
-log4j.appender.CONSOLE.conversionPattern = %d [%t] %-5p %c- %m%n
+log4j.appender.CONSOLE.layout.conversionPattern = %d [%t] %-5p %c- %m%n
 
 # Configure which loggers log to which appenders
 
log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=INFO,
 LOCALHOST



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



RE: svn commit: r1132367 - in /tomcat/trunk: java/org/apache/coyote/http11/Http11AprProcessor.java webapps/docs/changelog.xml

2011-06-06 Thread Caldarale, Charles R
> From: Mark Thomas [mailto:ma...@apache.org] 
> Subject: Re: svn commit: r1132367 - in /tomcat/trunk: 
> java/org/apache/coyote/http11/Http11AprProcessor.java 
> webapps/docs/changelog.xml

> On 06/06/2011 09:01, Remy Maucherat wrote:
> > I don't understand, the code reads:
> > sendfileData = new AprEndpoint.SendfileData();
> > sendfileData.fileName = fileName;
> > sendfileData.start = ((Long) request.getAttribute(
> > "org.apache.tomcat.sendfile.start")).longValue();
> > sendfileData.end = ((Long) request.getAttribute(
> > "org.apache.tomcat.sendfile.end")).longValue() - sendfileData.pos; 
> > 
> > So how can sendfileData.pos not be 0 here ?

> Because when the DefaultServlet handles a range request start may be
> non-zero. (line 1658 in trunk)

That's not the issue; the question is how could sendFileData.pos be non-zero in 
an object that was just instantiated from a class that has no explicit 
constructor?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.



Re: svn commit: r1132367 - in /tomcat/trunk: java/org/apache/coyote/http11/Http11AprProcessor.java webapps/docs/changelog.xml

2011-06-06 Thread Mark Thomas
On 06/06/2011 18:43, Caldarale, Charles R wrote:
>> From: Mark Thomas [mailto:ma...@apache.org] 
>> Subject: Re: svn commit: r1132367 - in /tomcat/trunk: 
>> java/org/apache/coyote/http11/Http11AprProcessor.java 
>> webapps/docs/changelog.xml
> 
>> On 06/06/2011 09:01, Remy Maucherat wrote:
>>> I don't understand, the code reads:
>>> sendfileData = new AprEndpoint.SendfileData();
>>> sendfileData.fileName = fileName;
>>> sendfileData.start = ((Long) request.getAttribute(
>>> "org.apache.tomcat.sendfile.start")).longValue();
>>> sendfileData.end = ((Long) request.getAttribute(
>>> "org.apache.tomcat.sendfile.end")).longValue() - sendfileData.pos; 
>>>
>>> So how can sendfileData.pos not be 0 here ?
> 
>> Because when the DefaultServlet handles a range request start may be
>> non-zero. (line 1658 in trunk)
> 
> That's not the issue; the question is how could sendFileData.pos be non-zero 
> in an object that was just instantiated from a class that has no explicit 
> constructor?

Doh. Got it. We do need to modify the length to handle range requests,
but not like that.

Mark



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



Re: svn commit: r1132367 - in /tomcat/trunk: java/org/apache/coyote/http11/Http11AprProcessor.java webapps/docs/changelog.xml

2011-06-06 Thread Remy Maucherat
On Mon, 2011-06-06 at 19:15 +0100, Mark Thomas wrote:
> Doh. Got it. We do need to modify the length to handle range requests,
> but not like that.

What's the issue exactly ? When actually sending data, "pos" is set to
"start" and the length is used as the usual "end - pos".

Rémy



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



DO NOT REPLY [Bug 51328] New: StringManager/ResourceBundle parsing error causes webapp deployment to fail on ppc64 gcj

2011-06-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51328

 Bug #: 51328
   Summary: StringManager/ResourceBundle parsing error causes
webapp deployment to fail on ppc64 gcj
   Product: Tomcat 6
   Version: 6.0.32
  Platform: All
OS/Version: other
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: dk...@redhat.com
Classification: Unclassified


Created attachment 27119
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27119
Patch for StringManager

On some jvms (IBM and GCJ/ jdk1.5 on ppc64,
org/apache/catalina/util/StringManager initialization can fail due to a runtime
exception when a localstring can't be parsed (e.g, NumberFormatException). The
failure can occur during context and session initialization and cause a
complete failure to deploy a webapp. A patch is attached.

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

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



Re: svn commit: r1131263 - in /tomcat/trunk: java/org/apache/catalina/session/JDBCStore.java java/org/apache/catalina/session/LocalStrings.properties webapps/docs/changelog.xml webapps/docs/config/man

2011-06-06 Thread Felix Schumacher
Am Montag, den 06.06.2011, 17:56 +0100 schrieb Mark Thomas:
> On 06/06/2011 11:59, Keiichi Fujino wrote:
> > When jdbc-pool or DBCP is used as DB connection pool and
> > removeAbandoned is "true",
> > dbConnection is closed because dbConnection is not returned to the
> > connection pool.
> > And then, dbConnection is acquired again because dbConnection has been
> > already closed.
> > 
> > Should I return the connection to the connection pool?
> > Or, is the DB connection cached until removeAbandoned works?
> 
> The connection should be returned to the pool. If you could take care of
> that, that would be great. Sorry for missing that when I applied the patch.
It was a conscious decision not to return the connection to the pool for
the following reasons:
 1. the original code didn't do it
 2. we would have to close the prepared statements in case of pooled
connections
 3. the connection is not really abandoned, so one could argue, that you
should run the pool with removeAbandoned set to 'false'

But I would gladly provide a patch where connections are returned to the
pool. 

Felix
> 
> Mark
> 
> > 
> > 
> > 2011/6/4  :
> >> Author: markt
> >> Date: Fri Jun  3 22:13:09 2011
> >> New Revision: 1131263
> >>
> >> URL: http://svn.apache.org/viewvc?rev=1131263&view=rev
> >> Log:
> >> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51264
> >> Allow the JDBC persistent session store to use a JNDI datasource to define 
> >> the database in which sessions are persisted.
> >> Patch provided by Felix Schumacher.
> >>
> >> Modified:
> >>tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java
> >>tomcat/trunk/java/org/apache/catalina/session/LocalStrings.properties
> >>tomcat/trunk/webapps/docs/changelog.xml
> >>tomcat/trunk/webapps/docs/config/manager.xml
> >>
> >> Modified: tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java
> >> URL: 
> >> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java?rev=1131263&r1=1131262&r2=1131263&view=diff
> >> ==
> >> --- tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java (original)
> >> +++ tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java Fri Jun  
> >> 3 22:13:09 2011
> >> @@ -33,6 +33,11 @@ import java.sql.SQLException;
> >>  import java.util.ArrayList;
> >>  import java.util.Properties;
> >>
> >> +import javax.naming.Context;
> >> +import javax.naming.InitialContext;
> >> +import javax.naming.NamingException;
> >> +import javax.sql.DataSource;
> >> +
> >>  import org.apache.catalina.Container;
> >>  import org.apache.catalina.LifecycleException;
> >>  import org.apache.catalina.Loader;
> >> @@ -102,6 +107,16 @@ public class JDBCStore extends StoreBase
> >>  */
> >> protected String driverName = null;
> >>
> >> +/**
> >> + * name of the JNDI resource
> >> + */
> >> +protected String dataSourceName = null;
> >> +
> >> +/**
> >> + * DataSource to use
> >> + */
> >> +protected DataSource dataSource = null;
> >> +
> >> // - Table 
> >> & cols
> >>
> >> /**
> >> @@ -436,6 +451,27 @@ public class JDBCStore extends StoreBase
> >> return (this.sessionLastAccessedCol);
> >> }
> >>
> >> +/**
> >> + * Set the JNDI name of a DataSource-factory to use for db access
> >> + *
> >> + * @param dataSourceName The JNDI name of the DataSource-factory
> >> + */
> >> +public void setDataSourceName(String dataSourceName) {
> >> +if (dataSourceName == null || "".equals(dataSourceName.trim())) {
> >> +manager.getContainer().getLogger().warn(
> >> +sm.getString(getStoreName() + 
> >> ".missingDataSourceName"));
> >> +return;
> >> +}
> >> +this.dataSourceName = dataSourceName;
> >> +}
> >> +
> >> +/**
> >> + * Return the name of the JNDI DataSource-factory
> >> + */
> >> +public String getDataSourceName() {
> >> +return this.dataSourceName;
> >> +}
> >> +
> >> // - Public 
> >> Methods
> >>
> >> /**
> >> @@ -866,6 +902,24 @@ public class JDBCStore extends StoreBase
> >> if (dbConnection != null)
> >> return (dbConnection);
> >>
> >> +if (dataSourceName != null && dataSource == null) {
> >> +Context initCtx;
> >> +try {
> >> +initCtx = new InitialContext();
> >> +Context envCtx = (Context) 
> >> initCtx.lookup("java:comp/env");
> >> +this.dataSource = (DataSource) 
> >> envCtx.lookup(this.dataSourceName);
> >> +} catch (NamingException e) {
> >> +manager.getContainer().getLogger().error(
> >> +sm.getString(getStoreName() + ".wrongDataSource",
> >> +this.dataSou

DO NOT REPLY [Bug 51328] StringManager/ResourceBundle parsing error causes webapp deployment to fail on ppc64 gcj

2011-06-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51328

--- Comment #1 from Konstantin Kolinko  2011-06-06 
21:01:15 UTC ---
What exactly error and stacktrace you are observing?

I do not quite get it where invalid values can come from. It it a real use
case? Why there is no MissingResourceException?


There is try/catch in the StringManager constructor already. Any additional
error handling may go there.


BTW,
1) The proposed patch is wrong (it does not update managers hashtable, it
catches too much - it should not catch Errors) and it does not respect code
formatting.
2) GCJ has known issues and is certainly not recommended for production
environments, as was mentioned several times on the users@ list.

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

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



DO NOT REPLY [Bug 51324] When OutputBuffer.doFlush gets Exception, doFlush gets stuck to true

2011-06-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51324

--- Comment #1 from Jeremy Norris  2011-06-07 06:12:53 UTC 
---
Created attachment 27122
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27122
Patch

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

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



DO NOT REPLY [Bug 51324] When OutputBuffer.doFlush gets Exception, doFlush gets stuck to true

2011-06-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51324

--- Comment #2 from Jeremy Norris  2011-06-07 06:14:27 UTC 
---
I'm also experiencing this problem.  Attached is a patch implementing both of
Bow's suggestions.

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

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



Passive Requestor Profile WS-Federation contribution

2011-06-06 Thread Oliver Wulff

http://zdownload.zurich.com/mailimages/ZHP_MailHeader.gif"; />

Hi there

I'd like to extend Tomcat to support the Passive Requestor Profile of
WS-Federation and contribute this to the community.

What is the approach I should proceed? Shall I log JIRA and apply the
"patch" there?

Thanks
Oliver








*** BITTE BEACHTEN ***
Diese Nachricht (wie auch allfällige Anhänge dazu) beinhaltet
möglicherweise vertrauliche oder gesetzlich geschützte Daten oder
Informationen. Zum Empfang derselben ist (sind) ausschliesslich die
genannte(n) Person(en) bestimmt. Falls Sie diese Nachricht
irrtümlicherweise erreicht hat, sind Sie höflich gebeten, diese unter
Ausschluss jeder Reproduktion zu zerstören und die absendende Person
umgehend zu benachrichtigen. Vielen Dank für Ihre Hilfe.

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