users@glassfish.java.net

Connection Pooling - Validation and Recreating Connection does not work!

From: <glassfish_at_javadesktop.org>
Date: Tue, 20 Feb 2007 08:13:52 PST

Hi! I have a problem with connection pooling. Our current app server set up uses connection pooling with Oracle. When I redeploy a Web application with Netbeans, the connections to Oracle are somehow destroyed. In the app server admin tool, I set up the connection pool to validate connections using a table and to destroy and recreate connections once there is a connection failure.

However, for some reason, that connection reconnection feature isn't working as I'd expect. Here is my log for what happens in place of connection reconnection:


[code]2007-02-20 08:03:43;ConnectionManager.getPooledConnection Exception: javax.naming.NameNotFoundException: No object bound for java:comp/env/jdbc/oraclesccweb [Root exception is java.lang.NullPointerException] - For: oraclesccweb
2007-02-20 08:03:43;ConnectionManager Exception: java.lang.NullPointerException - For: oraclesccweb, pooled, true
2007-02-20 08:03:43;ConnectionManager.getStatement Exception: java.lang.NullPointerException - Timeout set for: 400
2007-02-20 08:03:43;Database.getSelect STMT Exception: Java SQL Statement received was null - With: SELECT * FROM BE_SESSIONS WHERE SESSION_ID LIKE '951171987423416'
2007-02-20 08:03:43;ConnectionManager.getPooledConnection Exception: javax.naming.NameNotFoundException: No object bound for java:comp/env/jdbc/oraclesccweb [Root exception is java.lang.NullPointerException] - For: oraclesccweb
2007-02-20 08:03:43;ConnectionManager Exception: java.lang.NullPointerException - For: oraclesccweb, pooled, true
2007-02-20 08:03:43;ConnectionManager.getStatement Exception: java.lang.NullPointerException - Timeout set for: 400
2007-02-20 08:03:43;Database.getSelect STMT Exception: Java SQL Statement received was null - With: SELECT * FROM BE_SESSIONS WHERE SESSION_ID LIKE '671171987423423'
2007-02-20 08:03:43;ConnectionManager.getPooledConnection Exception: javax.naming.NameNotFoundException: No object bound for java:comp/env/jdbc/oraclesccweb [Root exception is java.lang.NullPointerException] - For: oraclesccweb
2007-02-20 08:03:43;ConnectionManager Exception: java.lang.NullPointerException - For: oraclesccweb, pooled, true
2007-02-20 08:03:43;ConnectionManager.getStatement Exception: java.lang.NullPointerException - Timeout set for: 400
2007-02-20 08:03:43;Database.getSelect STMT Exception: Java SQL Statement received was null - With: SELECT * FROM BE_SESSIONS WHERE SESSION_ID='531171987423428'
2007-02-20 08:03:43;ConnectionManager.getPooledConnection Exception: javax.naming.NameNotFoundException: No object bound for java:comp/env/jdbc/oraclesccweb [Root exception is java.lang.NullPointerException] - For: oraclesccweb
2007-02-20 08:03:43;ConnectionManager Exception: java.lang.NullPointerException - For: oraclesccweb, pooled, true
2007-02-20 08:03:43;ConnectionManager.getStatement Exception: java.lang.NullPointerException - Timeout set for: 400
2007-02-20 08:03:43;Database.getSelect STMT Exception: Java SQL Statement received was null - With: SELECT * FROM BE_SESSIONS WHERE SESSION_ID='KEEP'
2007-02-20 08:03:43;ConnectionManager.getPooledConnection Exception: javax.naming.NameNotFoundException: No object bound for java:comp/env/jdbc/oraclesccweb [Root exception is java.lang.NullPointerException] - For: oraclesccweb
2007-02-20 08:03:43;ConnectionManager Exception: java.lang.NullPointerException - For: oraclesccweb, pooled, true
2007-02-20 08:03:43;ConnectionManager.getStatement Exception: java.lang.NullPointerException - Timeout set for: 0
2007-02-20 08:03:43;Database.getInsertUpdateDelete STMT Exception: Java SQL Statement received was null - With: INSERT INTO BE_SESSIONS (SESSION_ID,SESSION_DATE,LAST_QUERY) VALUES ('531171987423428' , TO_DATE('2007-02-20 08:03:43','YYYY-MM-DD HH24:MI:SS'), '' )[/code]

You'll see - it tries to connect a few times, but never gets through. The only way I can remedy this problem is by restarting the app server. When I set connection validation=true, use connection validation method=table, and set fail all connections=true, why doesn't the app server fail and reconnect all connections?

dailysun
[Message sent by forum member 'dailysun' (dailysun)]

http://forums.java.net/jive/thread.jspa?messageID=204436