[JBoss-dev] [ jboss-Bugs-644496 ] a problem of JCA's connection pool
Bugs item #644496, was opened at 2002-11-27 02:48 You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=376685aid=644496group_id=22866 Category: JBossServer Group: None Status: Closed Resolution: Fixed Priority: 5 Submitted By: longjianglei (catherine_long) Assigned to: David Jencks (d_jencks) Summary: a problem of JCA's connection pool Initial Comment: Operating System :windows2000 professional JDK Version :v1.3.1 Server trace from the console :none Steps to reproduce the bug : 1.Enviroment: *a jboss server *a MSSQL database server They are not in the same computer. *we use LocalTX *jboss version is 3.0.2 2.Write a EJB on jboss server which has a test method that access the database continuously. 3.At beginning,the EJB's client call this test method,we can see accessing database is OK. 4.Then we disconnect the network between the jboss server and database,we found accessing database fail. 5.When we reconnect the network, we found accessing database always fail and can not success again. Conclusion: 1.We have traced the src code of JCA.We found that when a SQLException ocurred during accessing database,JCA does not kill the bad connection.So,when this connection is put back to connection pool,user will get an invalid connection when they re-get a connection.In the worst case,all of the connections in connection pool are invalid,user can not get any connection again. -- Comment By: David Jencks (d_jencks) Date: 2003-02-16 20:07 Message: Logged In: YES user_id=60525 The weblogic-like solution is implemented in 3.0.x, 3.2, and 4. To use it include a mcf property CheckValidConnectionSQL for a *-service.xml file (3.0.x or 3.2) or a check-valid-connection-sql element for 4 (and possibly 3.2). In either case the element content should be an SQL statement that will demonstrate whether the connection is usable, such as SELECT cound(*) FROM myemptytable. Weblogic has several other options to detect dead connections as well that I am considering, although they are much more complicated to implement for jca rather than plain jdbc. -- Comment By: Toby Allsopp (tobyallsopp) Date: 2002-11-28 03:41 Message: Logged In: YES user_id=140871 WebLogic handles this particular case by optionally executing a test statement (e.g. select * from dual) on each connection before it is given out from the pool (or returned to the pool) and recreating the connection if an exception is thrown. This approach seems much more robust and general to me than trying to decide if any given exception is fatal or not. Seems more like a feature request than a bug though... -- Comment By: David Jencks (d_jencks) Date: 2002-11-28 02:47 Message: Logged In: YES user_id=60525 As I've discussed many times on various lists and on forums, I don't see a simple solution to this problem. It is easy (as I recall uncommenting one line) to enable any sql exception kills the connection, however this is apt to break a large amount of BMP code (at least it breaks a lot of the testsuite). The problem is that there is no standard way to distinguish something like a pk or uniqueness violation from the db server crashing. If you destroy the connection on say a pk violation, you lose whatever work you already did in the transaction (with a local tx) and have to start the tx over. I think the best solution is to write driver specific exception adapters that will decide whether an exception from a specific driver means that the connection is dead. The jca wrapper is set up to make this very easy to write, but I haven't been able to interest anyone in writing such an extension. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=376685aid=644496group_id=22866 --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [ jboss-Bugs-644496 ] a problem of JCA's connection pool
Bugs item #644496, was opened at 2002-11-27 02:48 You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=376685aid=644496group_id=22866 Category: JBossServer Group: None Status: Open Resolution: None Priority: 5 Submitted By: longjianglei (catherine_long) Assigned to: David Jencks (d_jencks) Summary: a problem of JCA's connection pool Initial Comment: Operating System :windows2000 professional JDK Version :v1.3.1 Server trace from the console :none Steps to reproduce the bug : 1.Enviroment: *a jboss server *a MSSQL database server They are not in the same computer. *we use LocalTX *jboss version is 3.0.2 2.Write a EJB on jboss server which has a test method that access the database continuously. 3.At beginning,the EJB's client call this test method,we can see accessing database is OK. 4.Then we disconnect the network between the jboss server and database,we found accessing database fail. 5.When we reconnect the network, we found accessing database always fail and can not success again. Conclusion: 1.We have traced the src code of JCA.We found that when a SQLException ocurred during accessing database,JCA does not kill the bad connection.So,when this connection is put back to connection pool,user will get an invalid connection when they re-get a connection.In the worst case,all of the connections in connection pool are invalid,user can not get any connection again. -- Comment By: David Jencks (d_jencks) Date: 2002-11-28 02:47 Message: Logged In: YES user_id=60525 As I've discussed many times on various lists and on forums, I don't see a simple solution to this problem. It is easy (as I recall uncommenting one line) to enable any sql exception kills the connection, however this is apt to break a large amount of BMP code (at least it breaks a lot of the testsuite). The problem is that there is no standard way to distinguish something like a pk or uniqueness violation from the db server crashing. If you destroy the connection on say a pk violation, you lose whatever work you already did in the transaction (with a local tx) and have to start the tx over. I think the best solution is to write driver specific exception adapters that will decide whether an exception from a specific driver means that the connection is dead. The jca wrapper is set up to make this very easy to write, but I haven't been able to interest anyone in writing such an extension. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=376685aid=644496group_id=22866 --- This SF.net email is sponsored by: Get the new Palm Tungsten T handheld. Power Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [ jboss-Bugs-644496 ] a problem of JCA's connection pool
Bugs item #644496, was opened at 2002-11-27 02:48 You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=376685aid=644496group_id=22866 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: longjianglei (catherine_long) Assigned to: Nobody/Anonymous (nobody) Summary: a problem of JCA's connection pool Initial Comment: Operating System :windows2000 professional JDK Version :v1.3.1 Server trace from the console :none Steps to reproduce the bug : 1.Enviroment: *a jboss server *a MSSQL database server They are not in the same computer. *we use LocalTX *jboss version is 3.0.2 2.Write a EJB on jboss server which has a test method that access the database continuously. 3.At beginning,the EJB's client call this test method,we can see accessing database is OK. 4.Then we disconnect the network between the jboss server and database,we found accessing database fail. 5.When we reconnect the network, we found accessing database always fail and can not success again. Conclusion: 1.We have traced the src code of JCA.We found that when a SQLException ocurred during accessing database,JCA does not kill the bad connection.So,when this connection is put back to connection pool,user will get an invalid connection when they re-get a connection.In the worst case,all of the connections in connection pool are invalid,user can not get any connection again. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=376685aid=644496group_id=22866 --- This SF.net email is sponsored by: Get the new Palm Tungsten T handheld. Power Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [ jboss-Bugs-644496 ] a problem of JCA's connection pool
Bugs item #644496, was opened at 2002-11-27 02:48 You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=376685aid=644496group_id=22866 Category: JBossServer Group: None Status: Open Resolution: None Priority: 5 Submitted By: longjianglei (catherine_long) Assigned to: David Jencks (d_jencks) Summary: a problem of JCA's connection pool Initial Comment: Operating System :windows2000 professional JDK Version :v1.3.1 Server trace from the console :none Steps to reproduce the bug : 1.Enviroment: *a jboss server *a MSSQL database server They are not in the same computer. *we use LocalTX *jboss version is 3.0.2 2.Write a EJB on jboss server which has a test method that access the database continuously. 3.At beginning,the EJB's client call this test method,we can see accessing database is OK. 4.Then we disconnect the network between the jboss server and database,we found accessing database fail. 5.When we reconnect the network, we found accessing database always fail and can not success again. Conclusion: 1.We have traced the src code of JCA.We found that when a SQLException ocurred during accessing database,JCA does not kill the bad connection.So,when this connection is put back to connection pool,user will get an invalid connection when they re-get a connection.In the worst case,all of the connections in connection pool are invalid,user can not get any connection again. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=376685aid=644496group_id=22866 --- This SF.net email is sponsored by: Get the new Palm Tungsten T handheld. Power Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development