I m using the Enterprise lib to connect Oracle Database
class Customer{
private readonly Database _db;
public Customer(){
_db = = DatabaseFactory.CreateDatabase(_userSettings.ConnstringName);
}
.. stuff to use this connection..
}
When I run the application and opens multiple screen now Oracle show multiple session for same Application
Also I tried by changing code as
class Customer{
private readonly Database _db;
public Customer(){
_db = = (_userSettings.GetInstance().GetDatabase);
}
.. stuff to use this connection..
}
*_userSettings is a singleton object*
But same thing happens..?
What's going wrong?
Pls Help
Thanks.
There is too little information here to give an answer. We'd need to see more about your connection code. What version of oracle are you using?
What may be happening, is you may not be setting a timeout on your user's session, so that these sessions you keep making are staying active.
You need to explicitly close the connection using Close() or use a using block to ensure the unmanaged code is garbage collected properly.