JDBCSupport - An easy to use, light-weight JDBC framework -
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
JDBCSupport - An easy to use, light-weight JDBC framework -
# /*
# * This is what happens:
# * Thread 1 obtains a connection and closes it again (connection gets released into the pool)
# * Thread 1 then notifies Thread 2 which was waiting.
# * Thread 2 obtains a connection and runs a query (no exception expected).
# * Thread 2 then notifies Thread 1 which was waiting.
# * Thread 1 uses the connection instance it previously closed which should now be locked (Exception expected).
# */
Regards,
Alan Mehio
London, UK
JDBCSupport - An easy to use, light-weight JDBC framework -
That is why I decided to mark each connection instance with the id of the thread that is allowed to work with it.
Regards,
Alan Mehio
London, UK
JDBCSupport - An easy to use, light-weight JDBC framework -