I am using jboss-4.0.3. i am experimenting with DAO patterns i wrote a program which handels all DB related operations like add, update, delete etc., For any DB operations i am unble to get the success. i am always ending with the exception stack trace.
UserDao is my Class name
createUser is my method name
14:24:13,764 ERROR [UserDao] >>>>>>>>>> SQLException In UserDao.createUser() java.sql.SQLException: Connection handle has been closed and is unusable at org.jboss.resource.adapter.jdbc.WrappedConnection.checkStatus(WrappedConnection.java:526)
if anybody got the solution. plz let me know it would realy boost my task.
i am getting a separate connection for each and every opperation and closing that connection after compleetion.
is this the right way of getting a new connection for each new opperation. or can i maintain a single connection for all the operations plz let me know.
After connection.close, to get a new connection use DataSource.open() again.
I'm trying to keep a jdbc connection open between method calls but it seems to close automatically. How can I keep it open? I'm using Jboss 4.0.5. Thanks
Please send your solution here. I have the same problem.