DO NOT REPLY [Bug 40162] JNDI Environment is null within subthreads in Servlet.destroy()

2009-07-14 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=40162


Mark Thomas  changed:

   What|Removed |Added

 Status|NEEDINFO|RESOLVED
 Resolution||INVALID




--- Comment #5 from Mark Thomas   2009-07-14 00:11:40 PST ---
For future reference, when providing test cases please include the source.
Without the source we either have to guess what the test case is doing or use a
tool like JAD.

This isn't going to work out of the box without some additional work on your
part. Take a look at the code in the org.apache.naming package, particularly
SelectorContext, ContextBindings and java.javaURLContextFactory

Alternatively, a simpler solution would be to move the shared code to your web
application. Disk and memory is cheap and a good build tool (eg Ant) will let
you keep a single copy of the code, whilst using it in multiple locations.

If you have any further questions, please ask on the Tomcat 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 40162] JNDI Environment is null within subthreads in Servlet.destroy()

2009-07-14 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=40162


Horst Scheruga  changed:

   What|Removed |Added

  Attachment #19320|0   |1
is obsolete||




--- Comment #6 from Horst Scheruga   2009-07-14 03:10:59 
PST ---
Created an attachment (id=23974)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23974)
test web application with source and ant build file

-- 
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 40162] JNDI Environment is null within subthreads in Servlet.destroy()

2009-07-14 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=40162





--- Comment #7 from Horst Scheruga   2009-07-14 03:11:48 
PST ---
(In reply to comment #5)

Sorry for forgetting to attach the source code.
I corrected the attachment to contain the source and an ant build file.

Using the shared directory instead of putting the files to each web application
is allows sometimes easier release management and development.

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

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



svn commit: r793882 - /tomcat/trunk/java/org/apache/juli/FileHandler.java

2009-07-14 Thread kkolinko
Author: kkolinko
Date: Tue Jul 14 12:23:43 2009
New Revision: 793882

URL: http://svn.apache.org/viewvc?rev=793882&view=rev
Log:
Allow encoding to be specified for JULI FileHandler, and its subclasses 
(AsyncFileHandler).

Modified:
tomcat/trunk/java/org/apache/juli/FileHandler.java

Modified: tomcat/trunk/java/org/apache/juli/FileHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/juli/FileHandler.java?rev=793882&r1=793881&r2=793882&view=diff
==
--- tomcat/trunk/java/org/apache/juli/FileHandler.java (original)
+++ tomcat/trunk/java/org/apache/juli/FileHandler.java Tue Jul 14 12:23:43 2009
@@ -18,9 +18,13 @@
 
 package org.apache.juli;
 
+import java.io.BufferedOutputStream;
 import java.io.File;
-import java.io.FileWriter;
+import java.io.FileOutputStream;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
 import java.sql.Timestamp;
 import java.util.logging.ErrorManager;
 import java.util.logging.Filter;
@@ -209,6 +213,16 @@
 if (suffix == null)
 suffix = getProperty(className + ".suffix", ".log");
 
+// Get encoding for the logging file
+String encoding = getProperty(className + ".encoding", null);
+if (encoding != null && encoding.length() > 0) {
+try {
+setEncoding(encoding);
+} catch (UnsupportedEncodingException ex) {
+// Ignore
+}
+}
+
 // Get logging level for the handler
 setLevel(Level.parse(getProperty(className + ".level", "" + 
Level.ALL)));
 
@@ -268,7 +282,12 @@
 try {
 String pathname = dir.getAbsolutePath() + File.separator +
 prefix + date + suffix;
-writer = new PrintWriter(new FileWriter(pathname, true), true);
+String encoding = getEncoding();
+OutputStream os = new BufferedOutputStream(new FileOutputStream(
+pathname, true));
+writer = new PrintWriter(
+(encoding != null) ? new OutputStreamWriter(os, encoding)
+: new OutputStreamWriter(os), true);
 writer.write(getFormatter().getHead(this));
 } catch (Exception e) {
 reportError(null, e, ErrorManager.OPEN_FAILURE);



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



svn commit: r793884 - /tomcat/tc6.0.x/trunk/STATUS.txt

2009-07-14 Thread kkolinko
Author: kkolinko
Date: Tue Jul 14 12:28:32 2009
New Revision: 793884

URL: http://svn.apache.org/viewvc?rev=793884&view=rev
Log:
proposal

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=793884&r1=793883&r2=793884&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jul 14 12:28:32 2009
@@ -170,3 +170,7 @@
   +1: markt, rjung, kkolinko
   -1: 
 
+* Allow encoding to be specified for JULI FileHandler
+  http://svn.apache.org/viewvc?rev=793882&view=rev
+  +1: kkolinko
+  -1:



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



svn commit: r793885 - /tomcat/current/tc5.5.x/STATUS.txt

2009-07-14 Thread kkolinko
Author: kkolinko
Date: Tue Jul 14 12:29:28 2009
New Revision: 793885

URL: http://svn.apache.org/viewvc?rev=793885&view=rev
Log:
proposal

Modified:
tomcat/current/tc5.5.x/STATUS.txt

Modified: tomcat/current/tc5.5.x/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/current/tc5.5.x/STATUS.txt?rev=793885&r1=793884&r2=793885&view=diff
==
--- tomcat/current/tc5.5.x/STATUS.txt (original)
+++ tomcat/current/tc5.5.x/STATUS.txt Tue Jul 14 12:29:28 2009
@@ -95,3 +95,8 @@
   http://svn.apache.org/viewvc?rev=793682&view=rev
   +1: markt, rjung, kkolinko
   -1: 
+
+* Allow encoding to be specified for JULI FileHandler
+  http://svn.apache.org/viewvc?rev=793882&view=rev
+  +1: kkolinko
+  -1:



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



DO NOT REPLY [Bug 47524] New: [TRUNK] McastServiceImpl executor is not dispatching events.

2009-07-14 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47524

   Summary: [TRUNK] McastServiceImpl executor is not dispatching
events.
   Product: Tomcat 6
   Version: unspecified
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Cluster
AssignedTo: dev@tomcat.apache.org
ReportedBy: arieland...@hotmail.com


Created an attachment (id=23977)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23977)
Fix proposal

The class McastServiceImpl does not dispatch events, because the the executor
is not creating threads.

The class ReceiverBase has its own queue to address this issue.
I have refactored the code a little to reuse the class. (attaching the diff
file)

I'm not sure if filing a bug in Bugzilla is the right procedure for Trunk
branch.
If not, could you please tell me how should I proceed?

Regards,
Ariel

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

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



svn commit: r793913 - in /tomcat/trunk/java/org/apache/catalina/tribes: membership/McastServiceImpl.java transport/ReceiverBase.java util/ExecutorFactory.java

2009-07-14 Thread fhanik
Author: fhanik
Date: Tue Jul 14 14:46:34 2009
New Revision: 793913

URL: http://svn.apache.org/viewvc?rev=793913&view=rev
Log:
Patch by arieland...@hotmail.com
Fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=47524


Added:
tomcat/trunk/java/org/apache/catalina/tribes/util/ExecutorFactory.java   
(with props)
Modified:

tomcat/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
tomcat/trunk/java/org/apache/catalina/tribes/transport/ReceiverBase.java

Modified: 
tomcat/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java?rev=793913&r1=793912&r2=793913&view=diff
==
--- 
tomcat/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java 
(original)
+++ 
tomcat/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java 
Tue Jul 14 14:46:34 2009
@@ -27,8 +27,6 @@
 import java.net.SocketTimeoutException;
 import java.util.Arrays;
 import java.util.concurrent.ExecutorService;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.catalina.tribes.Channel;
@@ -37,6 +35,7 @@
 import org.apache.catalina.tribes.MessageListener;
 import org.apache.catalina.tribes.io.ChannelData;
 import org.apache.catalina.tribes.io.XByteBuffer;
+import org.apache.catalina.tribes.util.ExecutorFactory;
 
 /**
  * A membership implementation using simple multicast.
@@ -145,7 +144,7 @@
 /**
  * Dont interrupt the sender/receiver thread, but pass off to an executor
  */
-protected ExecutorService executor = new ThreadPoolExecutor(0, 2, 0L, 
TimeUnit.MILLISECONDS, new LinkedBlockingQueue());
+protected ExecutorService executor = ExecutorFactory.newThreadPool(0, 2, 
2, TimeUnit.SECONDS);
 
 /**
  * disable/enable local loopback message

Modified: 
tomcat/trunk/java/org/apache/catalina/tribes/transport/ReceiverBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/transport/ReceiverBase.java?rev=793913&r1=793912&r2=793913&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/tribes/transport/ReceiverBase.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/transport/ReceiverBase.java 
Tue Jul 14 14:46:34 2009
@@ -21,12 +21,8 @@
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
 import java.net.ServerSocket;
-import java.util.Collection;
 import java.util.concurrent.ExecutorService;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.RejectedExecutionException;
 import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 
@@ -34,6 +30,7 @@
 import org.apache.catalina.tribes.ChannelReceiver;
 import org.apache.catalina.tribes.MessageListener;
 import org.apache.catalina.tribes.io.ListenCallback;
+import org.apache.catalina.tribes.util.ExecutorFactory;
 import org.apache.juli.logging.Log;
 
 /**
@@ -94,10 +91,8 @@
 public void start() throws IOException {
 if ( executor == null ) {
 //executor = new 
ThreadPoolExecutor(minThreads,maxThreads,60,TimeUnit.SECONDS,new 
LinkedBlockingQueue());
-TaskQueue taskqueue = new TaskQueue();
 TaskThreadFactory tf = new 
TaskThreadFactory("Tribes-Task-Receiver-");
-executor = new ThreadPoolExecutor(minThreads, maxThreads, 
maxIdleTime, TimeUnit.MILLISECONDS,taskqueue, tf);
-taskqueue.setParent((ThreadPoolExecutor)executor);
+executor = ExecutorFactory.newThreadPool(minThreads, maxThreads, 
maxIdleTime, TimeUnit.MILLISECONDS, tf);
 }
 }
 
@@ -549,46 +544,6 @@
 this.udpTxBufSize = udpTxBufSize;
 }
 
- // -- TaskQueue Inner Class
-class TaskQueue extends LinkedBlockingQueue {
-ThreadPoolExecutor parent = null;
-
-public TaskQueue() {
-super();
-}
-
-public TaskQueue(int initialCapacity) {
-super(initialCapacity);
-}
-
-public TaskQueue(Collection c) {
-super(c);
-}
-
-public void setParent(ThreadPoolExecutor tp) {
-parent = tp;
-}
-
-public boolean force(Runnable o) {
-if ( parent.isShutdown() ) throw new 
RejectedExecutionException("Executor not running, can't force a command into 
the queue");
-return super.offer(o); //forces the item onto the queue, to be 
used if the task is rejected
-}
-
-public boolean offer(Runnable o) {
-//we can't do any checks
-if (parent==null) return 

DO NOT REPLY [Bug 47524] [TRUNK] McastServiceImpl executor is not dispatching events.

2009-07-14 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47524


Filip Hanik  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #1 from Filip Hanik   2009-07-14 07:48:24 PST ---
Ariel, thank you very much for the patch.
It has been applied to revision 793913 ( 
https://svn.apache.org/viewcvs.cgi?view=rev&rev=793913 ) 
I did make a small change, the patch had hardcoded the unit of the thread pool
executor instead of using the provided 'unit' parameter.
The process you follow is correct, so please, continue to help.

thanks
Filip

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

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



svn commit: r793919 - in /tomcat/trunk/modules/jdbc-pool: ./ java/org/apache/tomcat/jdbc/pool/interceptor/ test/org/apache/tomcat/jdbc/test/

2009-07-14 Thread fhanik
Author: fhanik
Date: Tue Jul 14 14:53:20 2009
New Revision: 793919

URL: http://svn.apache.org/viewvc?rev=793919&view=rev
Log:
more javadoc

Modified:
tomcat/trunk/modules/jdbc-pool/.classpath

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractCreateStatementInterceptor.java

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractQueryReport.java

tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/DefaultTestCase.java

Modified: tomcat/trunk/modules/jdbc-pool/.classpath
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/.classpath?rev=793919&r1=793918&r2=793919&view=diff
==
--- tomcat/trunk/modules/jdbc-pool/.classpath (original)
+++ tomcat/trunk/modules/jdbc-pool/.classpath Tue Jul 14 14:53:20 2009
@@ -8,5 +8,6 @@



+   

 

Modified: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractCreateStatementInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractCreateStatementInterceptor.java?rev=793919&r1=793918&r2=793919&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractCreateStatementInterceptor.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractCreateStatementInterceptor.java
 Tue Jul 14 14:53:20 2009
@@ -23,6 +23,9 @@
 import org.apache.tomcat.jdbc.pool.PooledConnection;
 
 /**
+ * Abstraction interceptor. This component intercepts all calls to create some 
type of SQL statement.
+ * By extending this class, one can intercept queries and update statements by 
overriding the {...@link #createStatement(Object, Method, Object[], Object, 
long)}
+ * method.
  * @author Filip Hanik
  * @version 1.0
  */
@@ -34,6 +37,9 @@
 super();
 }
 
+/**
+ * {...@inheritdoc}
+ */
 @Override
 public Object invoke(Object proxy, Method method, Object[] args) throws 
Throwable {
 if (compare(CLOSE_VAL,method)) {
@@ -54,18 +60,30 @@
 }
 
 /**
- * This method should return a wrapper object around a
+ * This method will be invoked after a successful statement creation. This 
method can choose to return a wrapper
+ * around the statement or return the statement itself.
+ * If this method returns a wrapper then it should return a wrapper object 
that implements one of the following interfaces.
  * {...@link java.sql.Statement}, {...@link java.sql.PreparedStatement} or 
{...@link java.sql.CallableStatement}
- * @param proxy
- * @param method
- * @param args
- * @param statement
+ * @param proxy the actual proxy object
+ * @param method the method that was called. It will be one of the methods 
defined in {...@link #statements}
+ * @param args the arguments to the method
+ * @param statement the statement that the underlying connection created
  * @return a {...@link java.sql.Statement} object
  */
 public abstract Object createStatement(Object proxy, Method method, 
Object[] args, Object statement, long time);
 
+/**
+ * Method invoked when the operation {...@link 
java.sql.Connection#close()} is invoked. 
+ */
 public abstract void closeInvoked();
 
+/**
+ * Returns true if the method that is being invoked matches one of the 
method names passed in
+ * @param names list of method names that we want to intercept
+ * @param method the method being invoked on the proxy
+ * @param process boolean result used for recursion
+ * @return returns true if the method name matched
+ */
 protected boolean process(String[] names, Method method, boolean process) {
 final String name = method.getName();
 for (int i=0; (!process) && ihttp://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractQueryReport.java?rev=793919&r1=793918&r2=793919&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractQueryReport.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractQueryReport.java
 Tue Jul 14 14:53:20 2009
@@ -30,7 +30,11 @@
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.jdbc.pool.JdbcInterceptor;
-
+/**
+ * Abstract class that wraps statements and intercepts query executions.
+ * @author fhanik
+ *
+ */
 public abstract class AbstractQueryReport extends 
AbstractCreateStatementInterceptor {
 //logger
 protected static Log log = LogFactory.getLog(AbstractQueryReport.class);
@

svn commit: r793937 - in /tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor: ConnectionState.java ResetAbandonedTimer.java StatementFinalizer.java

2009-07-14 Thread fhanik
Author: fhanik
Date: Tue Jul 14 15:22:05 2009
New Revision: 793937

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

Modified:

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

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/ResetAbandonedTimer.java

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/StatementFinalizer.java

Modified: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/ConnectionState.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/ConnectionState.java?rev=793937&r1=793936&r2=793937&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/ConnectionState.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/ConnectionState.java
 Tue Jul 14 15:22:05 2009
@@ -28,7 +28,14 @@
 import org.apache.tomcat.jdbc.pool.PooledConnection;
 
 /**
- * Interceptor that keep track of connection state to avoid roundtrips to the 
database
+ * Interceptor that keep track of connection state to avoid roundtrips to the 
database.
+ * The {...@link org.apache.tomcat.jdbc.pool.ConnectionPool} is optimized to 
do as little work as possible.
+ * The pool itself doesn't remember settings like {...@link 
java.sql.Connection#setAutoCommit(boolean)}, 
+ * {...@link java.sql.Connection#setReadOnly(boolean)}, {...@link 
java.sql.Connection#setCatalog(String)} or
+ * {...@link java.sql.Connection#setTransactionIsolation(int)}. It relies on 
the application to remember how and when 
+ * these settings have been applied.
+ * In the cases where the application code doesn't know or want to keep track 
of the state, this interceptor helps cache the 
+ * state, and it also avoids roundtrips to the database asking for it.
  * @author fhanik
  *
  */

Modified: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/ResetAbandonedTimer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/ResetAbandonedTimer.java?rev=793937&r1=793936&r2=793937&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/ResetAbandonedTimer.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/ResetAbandonedTimer.java
 Tue Jul 14 15:22:05 2009
@@ -25,7 +25,10 @@
 
 /**
  * Class that resets the abandoned timer on any activity on the 
- * Connection or any successful query executions
+ * Connection or any successful query executions.
+ * This interceptor is useful for when you have a {...@link 
org.apache.tomcat.jdbc.pool.PoolConfiguration#setRemoveAbandonedTimeout(int)}
+ * that is fairly low, and you want to reset the abandoned time each time any 
operation on the connection is performed
+ * This is useful for batch processing programs that use connections for 
extensive amount of times.
  * @author fhanik
  *
  */

Modified: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/StatementFinalizer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/StatementFinalizer.java?rev=793937&r1=793936&r2=793937&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/StatementFinalizer.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/StatementFinalizer.java
 Tue Jul 14 15:22:05 2009
@@ -26,7 +26,8 @@
 import org.apache.tomcat.jdbc.pool.ConnectionPool;
 import org.apache.tomcat.jdbc.pool.PooledConnection;
 /**
- * Keeps track of statements associated with a connection and invokes close 
upon connection.close()
+ * Keeps track of statements associated with a connection and invokes close 
upon {...@link java.sql.Connection#close()}
+ * Useful for applications that dont close the associated statements after 
being done with a connection.
  * @author fhanik
  *
  */
@@ -39,7 +40,8 @@
 public Object createStatement(Object proxy, Method method, Object[] args, 
Object statement, long time) {
 // TODO Auto-generated method stub
 try {
-statements.add(new WeakReference((Statement)statement));
+if (statement instanceof Statement)
+statements.add(new 
WeakReference((Statement)statement));
 }catch (ClassCastException x) {
 //ignore this one
 }



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

svn commit: r793945 - /tomcat/trunk/java/org/apache/naming/LocalStrings.properties

2009-07-14 Thread markt
Author: markt
Date: Tue Jul 14 15:38:07 2009
New Revision: 793945

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

Modified:
tomcat/trunk/java/org/apache/naming/LocalStrings.properties

Modified: tomcat/trunk/java/org/apache/naming/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/LocalStrings.properties?rev=793945&r1=793944&r2=793945&view=diff
==
--- tomcat/trunk/java/org/apache/naming/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/naming/LocalStrings.properties Tue Jul 14 
15:38:07 2009
@@ -16,7 +16,7 @@
 contextBindings.unknownContext=Unknown context name : {0}
 contextBindings.noContextBoundToThread=No naming context bound to this thread
 contextBindings.noContextBoundToCL=No naming context bound to this class loader
-selectorContext.noJavaUrl=This context must be accessed throught a java: URL
+selectorContext.noJavaUrl=This context must be accessed through a java: URL
 namingContext.contextExpected=Name is not bound to a Context
 namingContext.failResolvingReference=Unexpected exception resolving reference
 namingContext.nameNotBound=Name {0} is not bound in this Context



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



5.5.28 Tag - no more holding back

2009-07-14 Thread Filip Hanik - Dev Lists

I will tag on Friday, 12pm MST.
I will throw up a vote on Monday July 20th and hopefully a release by 
the end of next week.


Filip


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



svn commit: r793967 - /tomcat/tags/JDBC_POOL_1_0_6/

2009-07-14 Thread fhanik
Author: fhanik
Date: Tue Jul 14 16:36:37 2009
New Revision: 793967

URL: http://svn.apache.org/viewvc?rev=793967&view=rev
Log:
Another release candidate, I all is good

Added:
tomcat/tags/JDBC_POOL_1_0_6/   (props changed)
  - copied from r793966, tomcat/trunk/modules/jdbc-pool/

Propchange: tomcat/tags/JDBC_POOL_1_0_6/
--
--- svn:ignore (added)
+++ svn:ignore Tue Jul 14 16:36:37 2009
@@ -0,0 +1,3 @@
+build.properties
+includes
+output

Propchange: tomcat/tags/JDBC_POOL_1_0_6/
--
svn:mergeinfo = /tomcat/tc6.0.x/trunk/modules/jdbc-pool:742915



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



JDBC-POOL release candidate

2009-07-14 Thread Filip Hanik - Dev Lists

think it should be all in order now

http://people.apache.org/~fhanik/jdbc-pool/v1.0.6/

If everyone thinks it looks ok, then I will put up for a vote in a few days

Filip

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



svn commit: r793979 - /tomcat/trunk/java/org/apache/catalina/filters/WebdavFixFilter.java

2009-07-14 Thread markt
Author: markt
Date: Tue Jul 14 17:18:21 2009
New Revision: 793979

URL: http://svn.apache.org/viewvc?rev=793979&view=rev
Log:
Implements, doesn't override

Modified:
tomcat/trunk/java/org/apache/catalina/filters/WebdavFixFilter.java

Modified: tomcat/trunk/java/org/apache/catalina/filters/WebdavFixFilter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/filters/WebdavFixFilter.java?rev=793979&r1=793978&r2=793979&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/filters/WebdavFixFilter.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/filters/WebdavFixFilter.java Tue Jul 
14 17:18:21 2009
@@ -74,19 +74,18 @@
 private static final String UA_MINIDIR_5_2_3790 =
 "Microsoft-WebDAV-MiniRedir/5.2.3790";
 
-@Override
 public void init(FilterConfig filterConfig) throws ServletException {
+// NOOP
 }
 
-   @Override
public void destroy() {
+   // NOOP
}
 
 /**
  * Check for the broken MS WebDAV client and if detected issue a re-direct
  * that hopefully will cause the non-broken client to be used.
  */
-   @Override
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException 
{
if (!(request instanceof HttpServletRequest) ||



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



svn commit: r793981 - /tomcat/trunk/java/org/apache/catalina/session/StandardSession.java

2009-07-14 Thread markt
Author: markt
Date: Tue Jul 14 17:22:47 2009
New Revision: 793981

URL: http://svn.apache.org/viewvc?rev=793981&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=40380
Correct synchronisation of expire()
Should now only run one per session

Modified:
tomcat/trunk/java/org/apache/catalina/session/StandardSession.java

Modified: tomcat/trunk/java/org/apache/catalina/session/StandardSession.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StandardSession.java?rev=793981&r1=793980&r2=793981&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/session/StandardSession.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/session/StandardSession.java Tue Jul 
14 17:22:47 2009
@@ -162,7 +162,7 @@
  * certain IllegalStateException tests.  NOTE:  This value is not
  * included in the serialized version of this object.
  */
-protected transient boolean expiring = false;
+protected transient volatile boolean expiring = false;
 
 
 /**
@@ -220,7 +220,7 @@
 /**
  * Flag indicating whether this session is valid or not.
  */
-protected boolean isValid = false;
+protected volatile boolean isValid = false;
 
 
 /**
@@ -683,15 +683,20 @@
  */
 public void expire(boolean notify) {
 
-// Mark this session as "being expired" if needed
-if (expiring)
+// Check to see if expire is in progress or has previously been called
+if (expiring || !isValid)
 return;
 
 synchronized (this) {
+// Check again, now we are inside the sync so this code only runs 
once
+// Double check locking - expiring and isValid need to be volatile
+if (expiring || !isValid)
+return;
 
 if (manager == null)
 return;
 
+// Mark this session as "being expired"
 expiring = true;
 
 // Notify interested application event listeners



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



svn commit: r793985 - /tomcat/tc6.0.x/trunk/STATUS.txt

2009-07-14 Thread markt
Author: markt
Date: Tue Jul 14 17:32:35 2009
New Revision: 793985

URL: http://svn.apache.org/viewvc?rev=793985&view=rev
Log:
Proposal

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=793985&r1=793984&r2=793985&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jul 14 17:32:35 2009
@@ -164,7 +164,6 @@
   +1: rjung, kkolinko
   -1: 
 
-
 * Update to Commons Pool 1.5.2
   http://svn.apache.org/viewvc?rev=793682&view=rev
   +1: markt, rjung, kkolinko
@@ -174,3 +173,9 @@
   http://svn.apache.org/viewvc?rev=793882&view=rev
   +1: kkolinko
   -1:
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=40380
+  Correct synchronisation of expire(). Method should only run once.
+  https://issues.apache.org/bugzilla/show_bug.cgi?id=40380
+  +1: markt
+  -1: 



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



svn commit: r793986 - /tomcat/current/tc5.5.x/STATUS.txt

2009-07-14 Thread markt
Author: markt
Date: Tue Jul 14 17:36:37 2009
New Revision: 793986

URL: http://svn.apache.org/viewvc?rev=793986&view=rev
Log:
Proposal

Modified:
tomcat/current/tc5.5.x/STATUS.txt

Modified: tomcat/current/tc5.5.x/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/current/tc5.5.x/STATUS.txt?rev=793986&r1=793985&r2=793986&view=diff
==
--- tomcat/current/tc5.5.x/STATUS.txt (original)
+++ tomcat/current/tc5.5.x/STATUS.txt Tue Jul 14 17:36:37 2009
@@ -100,3 +100,10 @@
   http://svn.apache.org/viewvc?rev=793882&view=rev
   +1: kkolinko
   -1:
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=40380
+  Correct synchronisation of expire(). Method should only run once.
+  https://issues.apache.org/bugzilla/show_bug.cgi?id=40380
+  +1: markt
+  -1:
+



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



DO NOT REPLY [Bug 40380] Potential syncro problem in StandardSession.expire(boolean)

2009-07-14 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=40380


Mark Thomas  changed:

   What|Removed |Added

 Status|NEEDINFO|NEW




--- Comment #3 from Mark Thomas   2009-07-14 10:36:52 PST ---
This has been fixed in trunk and proposed for 6.0.x and 5.5.x

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

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



svn commit: r793991 - /tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/MultiLockFairBlockingQueue.java

2009-07-14 Thread fhanik
Author: fhanik
Date: Tue Jul 14 17:49:03 2009
New Revision: 793991

URL: http://svn.apache.org/viewvc?rev=793991&view=rev
Log:
Add experimental new queue, runs faster but is not yet complete and needs some 
work around concurrency, iterators and remove operations

Added:

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/MultiLockFairBlockingQueue.java
   (with props)

Added: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/MultiLockFairBlockingQueue.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/MultiLockFairBlockingQueue.java?rev=793991&view=auto
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/MultiLockFairBlockingQueue.java
 (added)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/MultiLockFairBlockingQueue.java
 Tue Jul 14 17:49:03 2009
@@ -0,0 +1,537 @@
+/*
+ * 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.jdbc.pool;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.NoSuchElementException;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.locks.ReentrantLock;
+
+/**
+ * EXPERIMENTAL AND NOT YET COMPLETE!
+ *
+ *
+ * An implementation of a blocking queue with fairness waiting and lock 
dispersal to avoid contention.
+ * invocations to method poll(...) will get handed out in the order they were 
received.
+ * Locking is fine grained, a shared lock is only used during the first level 
of contention, waiting is done in a 
+ * lock per thread basis so that order is guaranteed once the thread goes into 
a suspended monitor state.
+ * 
+ * Not all of the methods of the {...@link java.util.concurrent.BlockingQueue} 
are implemented.
+ * @author Filip Hanik
+ *
+ */
+
+public class MultiLockFairBlockingQueue implements BlockingQueue {
+
+final int LOCK_COUNT = Runtime.getRuntime().availableProcessors();
+
+final AtomicInteger putQueue = new AtomicInteger(0);
+final AtomicInteger pollQueue = new AtomicInteger(0);
+
+public int getNextPut() {
+int idx = Math.abs(putQueue.incrementAndGet()) % LOCK_COUNT;
+return idx;
+}
+
+public int getNextPoll() {
+int idx = Math.abs(pollQueue.incrementAndGet()) % LOCK_COUNT;
+return idx;
+}
+/**
+ * Phase one entry lock in order to give out 
+ * per-thread-locks for the waiting phase we have 
+ * a phase one lock during the contention period.
+ */
+final ReentrantLock[] locks = new ReentrantLock[LOCK_COUNT];
+
+/**
+ * All the objects in the pool are stored in a simple linked list
+ */
+final LinkedList[] items;
+
+/**
+ * All threads waiting for an object are stored in a linked list
+ */
+final LinkedList>[] waiters;
+
+/**
+ * Creates a new fair blocking queue.
+ */
+public MultiLockFairBlockingQueue() {
+items = new LinkedList[LOCK_COUNT];
+waiters = new LinkedList[LOCK_COUNT];
+for (int i=0; i();
+waiters[i] = new LinkedList>();
+locks[i] = new ReentrantLock(false);
+}
+}
+
+//--
+// USED BY CONPOOL IMPLEMENTATION
+//--
+/**
+ * Will always return true, queue is unbounded.
+ * {...@inheritdoc}
+ */
+public boolean offer(E e) {
+int idx = getNextPut();
+//during the offer, we will grab the main lock
+final ReentrantLock lock = this.locks[idx];
+lock.lock();
+ExchangeCountDownLatch c = null;
+try {
+//check to see if threads are waiting for an object
+if (waiters[idx].size() > 0) {
+  

[Tomcat Wiki] Update of "FAQ/Connectors" by abacon

2009-07-14 Thread Apache Wiki
Dear Wiki user,

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

The following page has been changed by abacon:
http://wiki.apache.org/tomcat/FAQ/Connectors

The comment on the change is:
Fixed AJP Link

--
 acceptCount="100" debug="0" connectionTimeout="2"
 useURIValidationHack="false" disableUploadTimeout="true" />}}}
  
- For a more complete description of the Connector config, see the 
[http://tomcat.apache.org/tomcat-6.0-doc/config/http.html HTTP Connector docs] 
or the see the [http://tomcat.apache.org/tomcat-6.0-doc/config/http.html AJP 
Connector docs].
+ For a more complete description of the Connector config, see the 
[http://tomcat.apache.org/tomcat-6.0-doc/config/http.html HTTP Connector docs] 
or the see the [http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html AJP 
Connector docs].
  
  [[Anchor(Q7)]]'''Where can I download a binary distribution of my 
connector?'''
  

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



svn commit: r794082 - in /tomcat/trunk/java/org/apache/naming: LocalStrings.properties SelectorContext.java

2009-07-14 Thread markt
Author: markt
Date: Tue Jul 14 21:52:14 2009
New Revision: 794082

URL: http://svn.apache.org/viewvc?rev=794082&view=rev
Log:
JNDI lookup errors often only include part of the name being looked up.
Provide debug logging that includes the complete name and how it was requested.

Modified:
tomcat/trunk/java/org/apache/naming/LocalStrings.properties
tomcat/trunk/java/org/apache/naming/SelectorContext.java

Modified: tomcat/trunk/java/org/apache/naming/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/LocalStrings.properties?rev=794082&r1=794081&r2=794082&view=diff
==
--- tomcat/trunk/java/org/apache/naming/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/naming/LocalStrings.properties Tue Jul 14 
21:52:14 2009
@@ -17,6 +17,8 @@
 contextBindings.noContextBoundToThread=No naming context bound to this thread
 contextBindings.noContextBoundToCL=No naming context bound to this class loader
 selectorContext.noJavaUrl=This context must be accessed through a java: URL
+selectorContext.methodUsingName=Call to method ''{0}'' with a Name of ''{1}''
+selectorContext.methodUsingString=Call to method ''{0}'' with a String of 
''{1}''
 namingContext.contextExpected=Name is not bound to a Context
 namingContext.failResolvingReference=Unexpected exception resolving reference
 namingContext.nameNotBound=Name {0} is not bound in this Context

Modified: tomcat/trunk/java/org/apache/naming/SelectorContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/SelectorContext.java?rev=794082&r1=794081&r2=794082&view=diff
==
--- tomcat/trunk/java/org/apache/naming/SelectorContext.java (original)
+++ tomcat/trunk/java/org/apache/naming/SelectorContext.java Tue Jul 14 
21:52:14 2009
@@ -59,6 +59,9 @@
 public static final String IC_PREFIX = "IC_";
 
 
+private static org.apache.juli.logging.Log log =
+org.apache.juli.logging.LogFactory.getLog(SelectorContext.class);
+
 // --- Constructors
 
 
@@ -119,6 +122,12 @@
  */
 public Object lookup(Name name)
 throws NamingException {
+
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("selectorContext.methodUsingName", "lookup",
+name));
+}
+
 // Strip the URL header
 // Find the appropriate NamingContext according to the current bindings
 // Execute the lookup on that context
@@ -135,6 +144,12 @@
  */
 public Object lookup(String name)
 throws NamingException {
+
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("selectorContext.methodUsingString", 
"lookup",
+name));
+}
+
 // Strip the URL header
 // Find the appropriate NamingContext according to the current bindings
 // Execute the lookup on that context
@@ -293,6 +308,12 @@
  */
 public NamingEnumeration list(Name name)
 throws NamingException {
+
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("selectorContext.methodUsingName", "list",
+name));
+}
+
 return getBoundContext().list(parseName(name));
 }
 
@@ -308,6 +329,12 @@
  */
 public NamingEnumeration list(String name)
 throws NamingException {
+
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("selectorContext.methodUsingString", "list",
+name));
+}
+
 return getBoundContext().list(parseName(name));
 }
 
@@ -327,6 +354,12 @@
  */
 public NamingEnumeration listBindings(Name name)
 throws NamingException {
+
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("selectorContext.methodUsingName",
+"listBindings", name));
+}
+
 return getBoundContext().listBindings(parseName(name));
 }
 
@@ -342,6 +375,12 @@
  */
 public NamingEnumeration listBindings(String name)
 throws NamingException {
+
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("selectorContext.methodUsingString",
+"listBindings", name));
+}
+
 return getBoundContext().listBindings(parseName(name));
 }
 
@@ -439,6 +478,12 @@
  */
 public Object lookupLink(Name name)
 throws NamingException {
+
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("selectorContext.methodUsingName",
+"lookupLink", name));
+}
+
 return getBoundContext().lookupLink(parseName(name));
 }
 
@@ -454,6 +499,12 @@
  */
 public Object lookupLink(String name)
 throws NamingException {
+
+if (log.isDebugEnabled()) {
+lo

svn commit: r794084 - /tomcat/tc6.0.x/trunk/STATUS.txt

2009-07-14 Thread markt
Author: markt
Date: Tue Jul 14 21:53:54 2009
New Revision: 794084

URL: http://svn.apache.org/viewvc?rev=794084&view=rev
Log:
Proposal

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=794084&r1=794083&r2=794084&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jul 14 21:53:54 2009
@@ -179,3 +179,8 @@
   https://issues.apache.org/bugzilla/show_bug.cgi?id=40380
   +1: markt
   -1: 
+
+* Improve JNDI debug logging for lookups
+  http://svn.apache.org/viewvc?rev=794082&view=rev
+  +1: markt
+  -1: 



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



svn commit: r794091 - /tomcat/tc6.0.x/trunk/STATUS.txt

2009-07-14 Thread kkolinko
Author: kkolinko
Date: Tue Jul 14 22:14:01 2009
New Revision: 794091

URL: http://svn.apache.org/viewvc?rev=794091&view=rev
Log:
correct Mark's proposal URL and vote

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=794091&r1=794090&r2=794091&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jul 14 22:14:01 2009
@@ -176,8 +176,8 @@
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=40380
   Correct synchronisation of expire(). Method should only run once.
-  https://issues.apache.org/bugzilla/show_bug.cgi?id=40380
-  +1: markt
+  http://svn.apache.org/viewvc?rev=793981&view=rev
+  +1: markt, kkolinko
   -1: 
 
 * Improve JNDI debug logging for lookups



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



svn commit: r794092 - /tomcat/current/tc5.5.x/STATUS.txt

2009-07-14 Thread kkolinko
Author: kkolinko
Date: Tue Jul 14 22:14:51 2009
New Revision: 794092

URL: http://svn.apache.org/viewvc?rev=794092&view=rev
Log:
correct Mark's proposal URL and vote

Modified:
tomcat/current/tc5.5.x/STATUS.txt

Modified: tomcat/current/tc5.5.x/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/current/tc5.5.x/STATUS.txt?rev=794092&r1=794091&r2=794092&view=diff
==
--- tomcat/current/tc5.5.x/STATUS.txt (original)
+++ tomcat/current/tc5.5.x/STATUS.txt Tue Jul 14 22:14:51 2009
@@ -103,7 +103,7 @@
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=40380
   Correct synchronisation of expire(). Method should only run once.
-  https://issues.apache.org/bugzilla/show_bug.cgi?id=40380
-  +1: markt
+  http://svn.apache.org/viewvc?rev=793981&view=rev
+  +1: markt, kkolinko
   -1:
 



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



svn commit: r794115 - /tomcat/tc6.0.x/trunk/STATUS.txt

2009-07-14 Thread kkolinko
Author: kkolinko
Date: Tue Jul 14 23:40:04 2009
New Revision: 794115

URL: http://svn.apache.org/viewvc?rev=794115&view=rev
Log:
votes

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=794115&r1=794114&r2=794115&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jul 14 23:40:04 2009
@@ -156,7 +156,7 @@
   AJP connectors do not handle certificate chains
   Patch by Patrik Schnellmann
   https://issues.apache.org/bugzilla/attachment.cgi?id=23951
-  +1: markt, rjung
+  +1: markt, rjung, kkolinko
   -1: 
 
 * Correct errorlevel handling in setclasspath.bat
@@ -182,5 +182,5 @@
 
 * Improve JNDI debug logging for lookups
   http://svn.apache.org/viewvc?rev=794082&view=rev
-  +1: markt
+  +1: markt, kkolinko
   -1: 



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



svn commit: r794119 - /tomcat/current/tc5.5.x/STATUS.txt

2009-07-14 Thread kkolinko
Author: kkolinko
Date: Wed Jul 15 00:08:56 2009
New Revision: 794119

URL: http://svn.apache.org/viewvc?rev=794119&view=rev
Log:
vote

Modified:
tomcat/current/tc5.5.x/STATUS.txt

Modified: tomcat/current/tc5.5.x/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/current/tc5.5.x/STATUS.txt?rev=794119&r1=794118&r2=794119&view=diff
==
--- tomcat/current/tc5.5.x/STATUS.txt (original)
+++ tomcat/current/tc5.5.x/STATUS.txt Wed Jul 15 00:08:56 2009
@@ -56,8 +56,12 @@
   AJP connectors do not handle certificate chains
   Patch by Patrik Schnellmann
   https://issues.apache.org/bugzilla/attachment.cgi?id=23952
-  +1: markt
+  +1: markt, kkolinko
   -1: 
+  kkolinko: in the lines of RequestHandler.java that are seen in the patch,
+but are not changed by it there is a bug:  "certString.getBytes()" - it
+uses Platform default encoding. Though it should not be of much value
+for base64 encoded data that these certificates are.
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=39844
   Port r588477 (fix for #43668) by billbarker that corrected this for Tomcat 6



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



svn commit: r794122 - in /tomcat/trunk/java/org/apache: catalina/connector/ catalina/deploy/ catalina/startup/ coyote/ coyote/http11/

2009-07-14 Thread fhanik
Author: fhanik
Date: Wed Jul 15 00:33:14 2009
New Revision: 794122

URL: http://svn.apache.org/viewvc?rev=794122&view=rev
Log:
Start working on async, fairly similar to comet but much more convulated.
I'm gonna do checkins in fairly small chunks so folks can tag along and help 
out. Instead of doing one giant checkin

Added:
tomcat/trunk/java/org/apache/catalina/connector/AsyncContextImpl.java   
(with props)
tomcat/trunk/java/org/apache/catalina/connector/AsyncListenerWrapper.java   
(with props)
Modified:
tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/trunk/java/org/apache/catalina/connector/Request.java
tomcat/trunk/java/org/apache/catalina/deploy/FilterDef.java
tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java
tomcat/trunk/java/org/apache/coyote/ActionCode.java
tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java

Added: tomcat/trunk/java/org/apache/catalina/connector/AsyncContextImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/AsyncContextImpl.java?rev=794122&view=auto
==
--- tomcat/trunk/java/org/apache/catalina/connector/AsyncContextImpl.java 
(added)
+++ tomcat/trunk/java/org/apache/catalina/connector/AsyncContextImpl.java Wed 
Jul 15 00:33:14 2009
@@ -0,0 +1,161 @@
+/*
+ * 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.catalina.connector;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.AsyncContext;
+import javax.servlet.AsyncListener;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
+/**
+ * 
+ * @author fhanik
+ *
+ */
+public class AsyncContextImpl implements AsyncContext {
+protected static Log log = LogFactory.getLog(AsyncContextImpl.class);
+
+private boolean started = false;
+private ServletRequest servletRequest = null;
+private ServletResponse servletResponse = null;
+private List listeners = new 
ArrayList();
+private boolean hasOriginalRequestAndResponse = true;
+
+public AsyncContextImpl() {
+//TODO SERVLET3 - async
+}
+
+@Override
+public void complete() {
+// TODO SERVLET3 - async
+
+for (AsyncListenerWrapper wrapper : listeners) {
+try {
+wrapper.fireOnComplete();
+}catch (IOException x) {
+//how does this propagate, or should it?
+   //TODO SERVLET3 - async 
+log.error("",x);
+}
+}
+
+}
+
+@Override
+public void dispatch() {
+// TODO SERVLET3 - async
+
+}
+
+@Override
+public void dispatch(String path) {
+// TODO SERVLET3 - async
+
+}
+
+@Override
+public void dispatch(ServletContext context, String path) {
+// TODO SERVLET3 - async
+
+}
+
+@Override
+public ServletRequest getRequest() {
+return getServletRequest();
+}
+
+@Override
+public ServletResponse getResponse() {
+return getServletResponse();
+}
+
+@Override
+public void start(Runnable run) {
+// TODO SERVLET3 - async
+
+}
+
+public void addAsyncListener(AsyncListener listener) {
+AsyncListenerWrapper wrapper = new AsyncListenerWrapper();
+wrapper.setListener(listener);
+wrapper.setServletRequest(getServletRequest());
+wrapper.setServletResponse(getServletResponse());
+listeners.add(wrapper);
+}
+
+public void addAsyncListener(AsyncListener listener, ServletRequest 
servletRequest, ServletResponse servletResponse) {
+AsyncListenerWrapper wrapper = new AsyncListenerWrapper();
+wrapper.setListener(listener);
+wrapper.setServletRequest(servletRequest);
+wrapper.setServletResponse(servletResponse);
+listeners.add(wrapp

DO NOT REPLY [Bug 40162] JNDI Environment is null within subthreads in Servlet.destroy()

2009-07-14 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=40162





--- Comment #8 from Konstantin Kolinko   2009-07-14 
19:58:30 PST ---
You cannot do what you are trying.

Once a Web Application is stopped, its resources are to be available for
garbage collection, that includes their classloader, context etc. Thus all
references to them in global objects are being cleared.

In your example you expect that the Runnable will obtain the InitialContext
that belongs to the web application. There is a race condition, but in most
cases it won't be able to obtain it, because to get it you should go through
some static methods, use some global lookup table, and the references there are
already cleared.
And even if it can, I think that there is no guarantee that the Context will be
usable at that time.


To dig into the code, see
o.a.naming.java.javaURLContextFactory#getInitialContext() and
o.a.naming.ContextBindings#unbindClassLoader(..)
Well, Mark already mentioned those classes.


I do not know, where "shared" code comes into the play. I do not believe that
moving the code into webapp will fix/workaround this.

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

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



svn commit: r794156 - in /tomcat/trunk/webapps/examples: WEB-INF/ WEB-INF/jsp/ jsp/ jsp/jsp2/el/ jsp/jsp2/jspattribute/ jsp/jsp2/misc/ jsp/simpletag/

2009-07-14 Thread markt
Author: markt
Date: Wed Jul 15 06:53:20 2009
New Revision: 794156

URL: http://svn.apache.org/viewvc?rev=794156&view=rev
Log:
Partial fix for bug 47444.
Update taglib URIs in examples, removing Jakarta references

Modified:
tomcat/trunk/webapps/examples/WEB-INF/jsp/debug-taglib.tld
tomcat/trunk/webapps/examples/WEB-INF/jsp/example-taglib.tld
tomcat/trunk/webapps/examples/WEB-INF/web.xml
tomcat/trunk/webapps/examples/jsp/jsp2/el/functions.jsp
tomcat/trunk/webapps/examples/jsp/jsp2/jspattribute/jspattribute.jsp
tomcat/trunk/webapps/examples/jsp/jsp2/jspattribute/shuffle.jsp
tomcat/trunk/webapps/examples/jsp/jsp2/misc/config.jsp
tomcat/trunk/webapps/examples/jsp/jsp2/misc/dynamicattrs.jsp
tomcat/trunk/webapps/examples/jsp/simpletag/foo.jsp
tomcat/trunk/webapps/examples/jsp/source.jsp

Modified: tomcat/trunk/webapps/examples/WEB-INF/jsp/debug-taglib.tld
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/jsp/debug-taglib.tld?rev=794156&r1=794155&r2=794156&view=diff
==
--- tomcat/trunk/webapps/examples/WEB-INF/jsp/debug-taglib.tld (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/jsp/debug-taglib.tld Wed Jul 15 
06:53:20 2009
@@ -25,7 +25,7 @@
   1.0
   1.2
   debug
-  http://jakarta.apache.org/tomcat/debug-taglib
+  http://tomcat.apache.org/debug-taglib
   
 This tag library defines no tags.  Instead, its purpose is encapsulated
 in the TagLibraryValidator implementation that simply outputs the XML

Modified: tomcat/trunk/webapps/examples/WEB-INF/jsp/example-taglib.tld
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/jsp/example-taglib.tld?rev=794156&r1=794155&r2=794156&view=diff
==
--- tomcat/trunk/webapps/examples/WEB-INF/jsp/example-taglib.tld (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/jsp/example-taglib.tld Wed Jul 15 
06:53:20 2009
@@ -24,7 +24,7 @@
   1.0
   1.2
   simple
-  http://jakarta.apache.org/tomcat/example-taglib
+  http://tomcat.apache.org/example-taglib
   
A simple tab library for the examples
   

Modified: tomcat/trunk/webapps/examples/WEB-INF/web.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/web.xml?rev=794156&r1=794155&r2=794156&view=diff
==
--- tomcat/trunk/webapps/examples/WEB-INF/web.xml (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/web.xml Wed Jul 15 06:53:20 2009
@@ -184,7 +184,7 @@
 
 

-  http://jakarta.apache.org/tomcat/debug-taglib
+  http://tomcat.apache.org/debug-taglib


   /WEB-INF/jsp/debug-taglib.tld
@@ -193,7 +193,7 @@
 


-  http://jakarta.apache.org/tomcat/examples-taglib
+  http://tomcat.apache.org/examples-taglib


   /WEB-INF/jsp/example-taglib.tld
@@ -202,7 +202,7 @@
 


-  http://jakarta.apache.org/tomcat/jsp2-example-taglib
+  http://tomcat.apache.org/jsp2-example-taglib


   /WEB-INF/jsp2/jsp2-example-taglib.tld

Modified: tomcat/trunk/webapps/examples/jsp/jsp2/el/functions.jsp
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/jsp/jsp2/el/functions.jsp?rev=794156&r1=794155&r2=794156&view=diff
==
--- tomcat/trunk/webapps/examples/jsp/jsp2/el/functions.jsp (original)
+++ tomcat/trunk/webapps/examples/jsp/jsp2/el/functions.jsp Wed Jul 15 06:53:20 
2009
@@ -15,7 +15,7 @@
   limitations under the License.
 -->
 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"; %>
-<%@ taglib prefix="my" 
uri="http://jakarta.apache.org/tomcat/jsp2-example-taglib"%>
+<%@ taglib prefix="my" uri="http://tomcat.apache.org/jsp2-example-taglib"%>
 
 
   

Modified: tomcat/trunk/webapps/examples/jsp/jsp2/jspattribute/jspattribute.jsp
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/jsp/jsp2/jspattribute/jspattribute.jsp?rev=794156&r1=794155&r2=794156&view=diff
==
--- tomcat/trunk/webapps/examples/jsp/jsp2/jspattribute/jspattribute.jsp 
(original)
+++ tomcat/trunk/webapps/examples/jsp/jsp2/jspattribute/jspattribute.jsp Wed 
Jul 15 06:53:20 2009
@@ -14,7 +14,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<%@ taglib prefix="my" 
uri="http://jakarta.apache.org/tomcat/jsp2-example-taglib"%>
+<%@ taglib prefix="my" uri="http://tomcat.apache.org/jsp2-example-taglib"%>
 
 
   

Modified: tomcat/trunk/webapps/examples/jsp/jsp2/jspattribute/shuffle.jsp
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/jsp/jsp2/

svn commit: r794157 - /tomcat/trunk/webapps/docs/balancer-howto.xml

2009-07-14 Thread markt
Author: markt
Date: Wed Jul 15 06:55:25 2009
New Revision: 794157

URL: http://svn.apache.org/viewvc?rev=794157&view=rev
Log:
Remove commented out reference to the balancer web-app. This is not included in 
trunk.

Modified:
tomcat/trunk/webapps/docs/balancer-howto.xml

Modified: tomcat/trunk/webapps/docs/balancer-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/balancer-howto.xml?rev=794157&r1=794156&r2=794157&view=diff
==
--- tomcat/trunk/webapps/docs/balancer-howto.xml (original)
+++ tomcat/trunk/webapps/docs/balancer-howto.xml Wed Jul 15 06:55:25 2009
@@ -36,10 +36,7 @@
 
 Using the JK native connector
 
-Using Apache HTTP Server 2.x and mod_proxy
-
+Using Apache HTTP Server 2.x and mod_proxy
 
 
 
@@ -58,111 +55,6 @@
 
 
 
-
-
 
 
 



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