Posted By:
sundar_manyapu
Posted On:
Thursday, January 24, 2002 06:07 AM
To connect to the database i wrote a class which i called as DBManager which i made singleton class. In the constructor of DBManager i created OracleConnectionPoolDatasource(ocpd) and pooled connection object. From the pooled connection object(javax.sql.PooledConnection), the first user could able to take a connection object.(Logical). Using the connection object first user did a database operation. After operation he waits for 10 seconds(say) before he can go for next operation. In the mean time another user accesses the database does the database operation and closes the connection. Now the first user finds the connection is lost when he comes for the databse access.(Logical handle no longer exists)??? Why thi
More>>
To connect to the database i wrote a class which i called as DBManager which i made singleton class. In the constructor of DBManager i created OracleConnectionPoolDatasource(ocpd) and pooled connection object.
From the pooled connection object(javax.sql.PooledConnection), the first user could able to take a connection object.(Logical).
Using the connection object first user did a database operation. After operation he waits for 10 seconds(say) before he can go for next operation. In the mean time another user accesses the database does the database operation and closes the connection.
Now the first user finds the connection is lost when he comes for the databse access.(Logical handle no longer exists)??? Why this happens so?
I could able to find the reason to this behavior as the two users have two different references.
Kindly let me know your view on this. Can someone clarify on this???
Thanks in Advance.
Regards,
Sundar
<<Less