Tempted to move this to the JBoss forum (you might find more help there) but it is probably a JDBC issue.
Are you using connection pooling or direct JDBC? The error your describing is if the database connection has been closed. I'm not sure why you are trying to read a closed database connection instead of opening a new one, but we'd likely need to see some code or hear more information to help.
Originally posted by rai talari: hi iam using jboss 3.2.3 it is giving sqlexception as "java.sql.SQLException: Connection handle has been closed and is unusable" .what may be the problem pls notify me
there's a setting in the yourapp-ds.xml file that allows for a reconnection to the database. i think this error is encountered when a network connection from the app server to the db server breaks, or, when the db server is restarted and the app server isn't.
have a look:
taken from a jboss4.0.2serverinstalldir/docs/examples/jca/mysql-ds.xml
This can be due to the way you handle the transactions. If you try to handle transactions manually with setAutoCommit() and at the same time try to use session beans which in turn do some
database operations using the datasource or entity beans or any other way this can happen.
Solution is to use JTA transactions for your manual transaction part. Following code snippet explains how.
UserTransaction ut = (UserTransaction) c.lookup("java:comp/UserTransaction");
//insert your database manipulation code here.
//insert your session beans access code here.