Subject Re: Failure to delist resource
Author Dmitry Shohov
I found how to reproduce this bug (or whatever it is).
1. Get the connection to the database,
2. do some selects (don't know if it is needed)
3. then get another connection to the same database while first connection is still open
4. do some selects with second connection
5. close second connection
6. close first connection.
7. wait 25 min. and try to get connection
8. you'll get an exception in Datasource.getConnection()

I have all the sources needed and small jar file with bean and
scheduler. If someone (Roman) needs it I can send it.

DS> Hi!

DS> We are using JayBird JCA driver with JBoss and have a problem.
DS> We have some code that performs some actions on database (inserts
DS> updates, deletes, selects). Once this code executed after about 20
DS> minutes we are starting to get exceptions. Any suggestions?

DS> Vesions: Jaybird 1.5 RC4, Firebird 1.5.1, Jboss 3.2.5

--
Dmitry

Connection connection = getConnection();
try {
PreparedStatement preparedStatement = connection.prepareStatement("SELECT testcol FROM testtable");
try {
ResultSet resultSet = preparedStatement.executeQuery();
try {
while (resultSet.next()) {
String testColValue = resultSet.getString(1);
System.out.println(testColValue);
}
} finally {
resultSet.close();
}
} finally {
preparedStatement.close();
}
Connection connection2 = getConnection();
try {
PreparedStatement preparedStatement2 = connection2.prepareStatement("SELECT testcol FROM testtable");
try {
ResultSet resultSet = preparedStatement2.executeQuery();
try {
while (resultSet.next()) {
String testColValue = resultSet.getString(1);
System.out.println(testColValue);
}
} finally {
resultSet.close();
}
} finally {
preparedStatement2.close();
}
} finally {
connection2.close();
}
} finally {
connection.close();
}