Quantcast
Viewing all articles
Browse latest Browse all 9052

ADO .Net pooling creates connections on every call

HI!

 

I'm making a connection through an instance transaction variable to my Oracle DB on a wcf webservice (PB .NET)

 

I set up my connection string using Native Driver and pooling, and seems to be working good.

 

Following a recommendation of using ADO .Net instead of Native Drivers (because of some delay within webservices calls), I change it to ADO, and as far as I know I set up its connection string properly, but every time that wcf webservice receives a call, I can see 10 connections on my DB, which doesn't happen if I switch to Oracle.

 

this is the logic of my webservice:

 

1) if  not isvalid(itr_trans) then itr_trans = create transaction

2) if itr_trans (instance transaction).DBHandle() <= 0 then ===> call method to assign values and connect using itr_trans

3) method logic (selects, inserts, update, deletes, etc etc) calling 'n' methods

 

in case of error it calls a method that ROLLBACKs and DISCONNECTs (both using itr_trans)

 

4) COMMIT using itr_trans

5) DISCONNECT using itr_trans;

 

For every call Connections are created and they live forever, so there's a point when no one can connect to Database 'cause it exceeded the connections limit.

 

This is my Connection string for ADO .Net:

 

Namespace='Oracle.DataAccess.Client',DataSource='PICFE_DESAR',ID='myid',Password='mypwd',PBCatalogOwner='myowner',DateFormat='DD/MM/YYYY',DateTimeFormat='DD/MM/YYYY HH:MM:SS',TimeFormat='HH:MM:SS',TrimSpaces=1,DelimitIdentifier='No',PBMaxBlobSize=2147483647,CommitOnDisconnect='No',TimeOut=300,CommandTimeOut=300,DisableBind=0,OJSyntax='PB',PROVIDERSTRING='Pooling=TRUE; User Id=myid; Password=mypwd; Min Pool Size=10; Connection Lifetime=120;Connection Timeout=60;Incr Pool Size=5;Decr Pool Size=2;'

 

 

For Oracle driver:

 

CommitOnDisconnect='No',Date=' ''''dd/mm/yyyy'''' ',DateTime=' ''''dd/mm/yyyy hh:mm:ss'''' ',Time=' ''''hh:mm:ss'''' ',StaticBind=0,Pooling='Connection Pooling',PoolCreator='myid',PoolPwd='mypwd',TrimSpaces=1


Viewing all articles
Browse latest Browse all 9052

Trending Articles