Re: [VOTE] Releasing Apache Tomcat Native 1.1.16

2008-11-12 Thread Henri Gomez
[X] Stable - no major issues, no regressions
[ ] Beta   - at least one significant issue -- tell us what it is
[ ] Alpha  - multiple significant issues -- tell us what they are

SLES Linux PPC & x86

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [VOTE] Releasing Apache Tomcat Native 1.1.16

2008-11-12 Thread Lorenz Breu
Using 1.1.15 under WinXP I noticed that recvfrom() would not set the
port of the data source, however I couldn't try the repo version as I
couldn't compile under WinXP. On my kubuntu box everything seems to work
fine.
I am now trying to use Multicast.ointerface(sock,iface), but I still
have to find a way to get that pointer to the interface in java in order
to pass it to the native code. Maybe a method to get an interface by ip
address in string form would be a nice addition.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



1.1.16 release

2008-11-12 Thread Lorenz Breu
I also just checked the file
http://tomcat.apache.org/dev/dist/tomcat-connectors/native/source/1.1.16/tomcat-native-1.1.16-win32-src.zip



The "Mulicast" typo in multicast.c is still there

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svn commit: r712278 - in /tomcat/trunk/java/org/apache/tomcat/util/net: NioEndpoint.java SocketProperties.java

2008-11-12 Thread Peter Rossbach

Many thanks,

I will check at evening.

Peter



Am 11.11.2008 um 23:59 schrieb Filip Hanik - Dev Lists:


done

Filip
Peter Rossbach wrote:

Yes, please
Peter


Am 11.11.2008 um 20:18 schrieb Filip Hanik - Dev Lists:


hi Peter, the one line patch is in my email,
that is the patch that you should apply, instead of your patch
socketProperties.setProperties(serverSock.socket());

would you like me to do it?
Filip

Peter Rossbach wrote:

Hi Filip,

I don't see the one line patch. I also the problem, but I got a  
lot of NPE without the patch.


need help,

Peter


Am 11.11.2008 um 18:06 schrieb Filip Hanik - Dev Lists:


-1

this was intentional, and yes, it accidentally broke the NIO  
connector

the proper way to do this is to call

socketProperties.setProperties(serverSock.socket());

this way, your patch is only one line, and also doesn't add in  
a bunch of -1 illegal values


Filip


[EMAIL PROTECTED] wrote:

Author: pero
Date: Fri Nov  7 13:40:37 2008
New Revision: 712278

URL: http://svn.apache.org/viewvc?rev=712278&view=rev
Log:
Fix NPE to use Http11NioProtocol handler with default parameters!
# example:


   port="8080"  
protocol="org.apache.coyote.http11.Http11NioProtocol" 
connectionTimeout="2" 
redirectPort="8443" />


Used at MAC OS X with "-Djava.net.preferIPv4Stack=true"

I am not sure that default returns are correct!

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/ 
SocketProperties.java


Modified: tomcat/trunk/java/org/apache/tomcat/util/net/ 
NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/ 
tomcat/util/net/NioEndpoint.java? 
rev=712278&r1=712277&r2=712278&view=diff
= 
=
--- tomcat/trunk/java/org/apache/tomcat/util/net/ 
NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/ 
NioEndpoint.java Fri Nov  7 13:40:37 2008

@@ -735,7 +735,12 @@
 return;
  serverSock = ServerSocketChannel.open();
-serverSock.socket().setPerformancePreferences 
(socketProperties.getPerformanceConnectionTime(),
+int performanceConnectionTime =  
socketProperties.getPerformanceConnectionTime();
+int performanceLatency=  
socketProperties.getPerformanceLatency();
+int performanceBandwidth =  
socketProperties.getPerformanceBandwidth();
+if (performanceConnectionTime != -1 &&  
performanceLatency != -1 &&

+performanceBandwidth != -1)
+serverSock.socket().setPerformancePreferences 
(socketProperties.getPerformanceConnectionTime(),

socketProperties.getPerformanceLatency(),

socketProperties.getPerformanceBandwidth());
 InetSocketAddress addr = (address!=null?new  
InetSocketAddress(address,port):new InetSocketAddress(port));


Modified: tomcat/trunk/java/org/apache/tomcat/util/net/ 
SocketProperties.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/ 
tomcat/util/net/SocketProperties.java? 
rev=712278&r1=712277&r2=712278&view=diff
= 
=
--- tomcat/trunk/java/org/apache/tomcat/util/net/ 
SocketProperties.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/ 
SocketProperties.java Fri Nov  7 13:40:37 2008

@@ -210,55 +210,82 @@
 }
  public boolean getOoBInline() {
-return ooBInline.booleanValue();
+if(ooBInline != null)
+return ooBInline.booleanValue();
+return false;
 }
  public int getPerformanceBandwidth() {
-return performanceBandwidth.intValue();
+if(performanceBandwidth != null)
+return performanceBandwidth.intValue();
+return -1;
 }
  public int getPerformanceConnectionTime() {
-return performanceConnectionTime.intValue();
+if(performanceConnectionTime!= null)
+return performanceConnectionTime.intValue();
+return -1;
+   }
  public int getPerformanceLatency() {
-return performanceLatency.intValue();
+if(performanceLatency != null)
+return performanceLatency.intValue();
+return -1 ;
 }
  public int getRxBufSize() {
-return rxBufSize.intValue();
+if(rxBufSize != null)
+return rxBufSize.intValue();
+return -1;
 }
  public boolean getSoKeepAlive() {
-return soKeepAlive.booleanValue();
+if(soKeepAlive != null)
+return soKeepAlive.booleanValue();
+return false;
 }
  public boolean getSoLingerOn() {
-return soLingerOn.booleanValue();
+if(soLingerOn != null)
+return soLingerOn.booleanValue();
+return false;
 }
  public int getSoLingerTime() 

DO NOT REPLY [Bug 46193] New: Potential Thread problem with SessionManager

2008-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46193

   Summary: Potential Thread problem with SessionManager
   Product: Tomcat 6
   Version: 6.0.16
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: [EMAIL PROTECTED]


Hi to all,

Under heavly load (about 500k/requests by day), I see this error about
30 times last week on a Tomcat 6.0.16 (with libtcnative 1.1.14 on a
Suse SLES 10 and IBM JDK 1.6-jvmxi3260-20080415_18762).

We have many HTTP sessions on our application and so frequent session cleanup
done by Tomcat.

We see theses errors :

WARNING: Exception processing manager
[EMAIL PROTECTED] background
process
Throwable occurred: java.lang.ArrayIndexOutOfBoundsException
   at java.util.AbstractCollection.toArray(Unknown Source)
   at
org.apache.catalina.session.ManagerBase.findSessions(ManagerBase.java:873)
   at
org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:676)
   at
org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:667)
   at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1316)
   at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
   at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
   at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
   at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
   at java.lang.Thread.run(Thread.java:735)
7 nov. 2008 16:18:21 org.apache.catalina.core.ContainerBase backgroundProcess

---

WARNING: Exception processing manager
[EMAIL PROTECTED] background
process
Throwable occurred: java.lang.IllegalMonitorStateException
   at
java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:140)
   at
java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1188)
   at
java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:444)
   at
java.util.concurrent.ConcurrentHashMap$Segment.remove(ConcurrentHashMap.java:555)
   at
java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:936)
   at org.apache.catalina.session.ManagerBase.remove(ManagerBase.java:885)
   at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:743)
   at
org.apache.catalina.session.StandardSession.isValid(StandardSession.java:592)
   at
org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:682)
   at
org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:667)
   at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1316)
   at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
   at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
   at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
   at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
   at java.lang.Thread.run(Thread.java:735)


We take a look at ManagerBase and the sessions is using ConcurrentHashMap.

We wonder if they couldn't be some Concurrency problems when some threads are
updating the sessions Map while ManagerBase try to dump the sessions into
sessions array in findSessions.

>From ConcurrentHashMap comments :

 * Enumerations return elements reflecting the state of the hash table
 * at some point at or since the creation of the iterator/enumeration.
 * They do not throw
 * [EMAIL PROTECTED] ConcurrentModificationException}.  However, iterators are
 * designed to be used by only one thread at a time.


Regards


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r713522 - in /tomcat/trunk/modules/jdbc-pool: doc/ java/org/apache/tomcat/jdbc/pool/ test/org/apache/tomcat/jdbc/test/

2008-11-12 Thread fhanik
Author: fhanik
Date: Wed Nov 12 13:50:03 2008
New Revision: 713522

URL: http://svn.apache.org/viewvc?rev=713522&view=rev
Log:
Updated documentation and added wrappers for toString and added an example

Added:

tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/SimplePOJOExample.java
Modified:
tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PooledConnection.java

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ProxyConnection.java

Modified: tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml?rev=713522&r1=713521&r2=713522&view=diff
==
--- tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml (original)
+++ tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml Wed Nov 12 13:50:03 2008
@@ -338,6 +338,98 @@
   
 
 
+
+  Other examples of Tomcat configuration for JDBC usage can be found http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html";>in
 the Tomcat documentation. 
+  
+Here is a simple example of how to create and use a data source. 
+
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.Statement;
+
+import org.apache.tomcat.jdbc.pool.DataSource;
+import org.apache.tomcat.jdbc.pool.PoolProperties;
+
+public class SimplePOJOExample {
+
+public static void main(String[] args) throws Exception {
+PoolProperties p = new PoolProperties();
+
p.setUrl("jdbc:mysql://localhost:3306/mysql?autoReconnect=true");
+p.setDriverClassName("com.mysql.jdbc.Driver");
+p.setUsername("root");
+p.setPassword("password");
+p.setJmxEnabled(true);
+p.setTestWhileIdle(false);
+p.setTestOnBorrow(true);
+p.setValidationQuery("SELECT 1");
+p.setTestOnReturn(false);
+p.setValidationInterval(3);
+p.setTimeBetweenEvictionRunsMillis(3);
+p.setMaxActive(100);
+p.setInitialSize(10);
+p.setMaxWait(1);
+p.setRemoveAbandonedTimeout(60);
+p.setMinEvictableIdleTimeMillis(3);
+p.setMinIdle(10);
+p.setLogAbandoned(true);
+p.setRemoveAbandoned(true);
+DataSource datasource = new DataSource();
+datasource.setPoolProperties(p); 
+
+Connection con = null;
+try {
+  con = datasource.getConnection();
+  Statement st = con.createStatement();
+  ResultSet rs = st.executeQuery("select * from user");
+  int cnt = 1;
+  while (rs.next()) {
+  System.out.println((cnt++)+". Host:" 
+rs.getString("Host")+" User:"+rs.getString("User")+" 
Password:"+rs.getString("Password"));
+  }
+  rs.close();
+  st.close();
+} finally {
+  if (con!=null) try {con.close();}catch (Exception ignore) {}
+}  
+}
+
+}
+
+  
+  
+And here is an example on how to configure a resource for JNDI 
lookups
+
+
+
+
+
+  
+  
+  
+
+
+
 
 
 

Modified: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java?rev=713522&r1=713521&r2=713522&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache

pool for beta testing

2008-11-12 Thread Filip Hanik - Dev Lists

gents,
I was planning on doing a beta release of the connection pool, but first 
announce it for testing.


any thoughts on doing that or the process involved?

Filip

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: pool for beta testing

2008-11-12 Thread Yoav Shapira
On Wed, Nov 12, 2008 at 7:36 PM, Filip Hanik - Dev Lists
<[EMAIL PROTECTED]> wrote:
> gents,
> I was planning on doing a beta release of the connection pool, but first
> announce it for testing.
>
> any thoughts on doing that or the process involved?

Sounds like a good idea.  I don't see a need for much formality.  Just
post something on this list and the user list, asking for help testing
a new feature.

Yoav

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: pool for beta testing

2008-11-12 Thread Mark Thomas
Filip Hanik - Dev Lists wrote:
> gents,
> I was planning on doing a beta release of the connection pool, but first
> announce it for testing.
> 
> any thoughts on doing that or the process involved?

2 options

1) Just announce it to dev and put it on people.a.o like we do for our release
candidates.

2) Do 1) and then call a vote for a formal release and then put it on the 
mirrors.

Personally, I'd do a couple of RCs from people and when you think you have one
good enough for a beta, call a vote and do a formal release so we can put it on
the mirrors and the web site.

Mark



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: pool for beta testing

2008-11-12 Thread Filip Hanik - Dev Lists

I'll do one, email coming shortly

Filip

Mark Thomas wrote:

Filip Hanik - Dev Lists wrote:
  

gents,
I was planning on doing a beta release of the connection pool, but first
announce it for testing.

any thoughts on doing that or the process involved?



2 options

1) Just announce it to dev and put it on people.a.o like we do for our release
candidates.

2) Do 1) and then call a vote for a formal release and then put it on the 
mirrors.

Personally, I'd do a couple of RCs from people and when you think you have one
good enough for a beta, call a vote and do a formal release so we can put it on
the mirrors and the web site.

Mark



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 46038] Tomcat JDBC Connection Pool contribution

2008-11-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46038


Filip Hanik <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #4 from Filip Hanik <[EMAIL PROTECTED]>  2008-11-12 17:32:21 PST ---
Completed and contributed as a module


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[ANNOUNCE] Beta candidate for Tomcat connection pool

2008-11-12 Thread Filip Hanik - Dev Lists

The Apache Tomcat team announces the immediate availability of
Apache Tomcat JDBC  Connection Pool

Apache Tomcat Connectors version 1.0.1-beta is a new module within the 
Tomcat development realm, aimed to provide a high performance, 
concurrent and extensible connection pool to the Tomcat community. The 
pool, can of course also be used independently.


Assorted set of binaries are available for testing at:
http://tomcat.apache.org/dev/dist/jdbc-pool/v1.0.1-beta/

If you find any bugs while using this test release, please fill in the
Bugzilla Bug Report or send an e-mail to Tomcat Developers List.
When entering bug use the following link:
https://issues.apache.org/bugzilla/query.cgi?product=Tomcat%206

The contribution was started with
https://issues.apache.org/bugzilla/show_bug.cgi?id=46038


Thank you,
--
The Apache Tomcat Team



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]