This project is read-only.

Close OPF3 connection

Dec 9, 2009 at 9:36 PM
Edited Dec 9, 2009 at 11:19 PM

How is it done? As I understand it, OPF3 will handle all the closing automatically during a dispose (or wherever), but I've got a very specific scenario where I need to close my connections manually.

UPDATE

Hmm upon further examination of the source code, it looks like this really isn't possible. Here's the problem I'm having. I've created a WCF service. This service is called through jQuery to retrieve user information etc. I'm having a lot of connections being left open from this. I'm not entirely sure why, since these connections appear to close properly from what I've seen in the code (unless it's a transaction, which in my case it is not). Eventually if I leave a page open without doing anything, my pools will all become used up. I've used OPF3 for about 2 years now and I've never had an issue like this before. What am I missing?

Thanks

 

UPDATE

Alright the culprit obviously is connection pooling soooo a simple Pooling=false is going to solve my problems for now.

Dec 11, 2009 at 4:30 AM

The connection pool should get used up if you do stress testing. That is what the connection pool is actually for. If setting the pool to false closes the connection properly this only means that you are using the pool properly... or am I missing something?