dbTalk Databases Forums  

connection pooling in xmla

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss connection pooling in xmla in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John Tai
 
Posts: n/a

Default connection pooling in xmla - 12-20-2004 , 09:32 PM






can someone please clarify the connection pooling feature that comes with
ADOConPool ? I was able to run the sample code below just fine,
i ran the program below a few times with a few seconds in between the runs,
but when I check the application events using the event viewer (after making
the necessary changes to the registry to record olap open and close
connections), i notice that there is a pair of open and close events with no
delay for every program run,

in other words, the connection is not being pooled between application runs,
i've checked the MaxSession (32) and Timeout (300) properties, and the
defaults seems fine,

am i misunderstanding how connection pooling here works ?

if so, is there any way to obtain the benefits of connection pooling on a
webpage that queries an analysis services without caching the connection
object in an Application object ? Caching the connection object in a
application object i believe would serialize all request to the web
application and i would like to avoid that

sample code:

Private Sub Command1_Click()
Dim objconnpool As MSXmlAnalysisSCLib.ADOConPool
Dim objconn As ADODB.Connection

strtmp = "Data
Source=localhost;Provider=MSOLAP.2;Trusted_Connect ion=yes;Initial
Catalog=FoodMart 2000"

Set objconnpool = New MSXmlAnalysisSCLib.ADOConPool
Set objconn = objconnpool.GetConnection(strtmp)

objconnpool.ReturnConnection objconn

Set objconnpool = Nothing
Set objconn = Nothing
End Sub




Reply With Quote
  #2  
Old   
Akshai Mirchandani [MS]
 
Posts: n/a

Default Re: connection pooling in xmla - 12-21-2004 , 01:38 PM






Hi John,

The way the connection pool is supposed to be used is as follows:

1. Application Start: create connection pool
2. Processing client request: fetch connection from pool
3. End processing client request: return connection to pool
4. Steps 2, 3 occur concurrently while the application is running
5. Background timer: calls Shrink on the connection pool at regular
intervals (or use some other mechanism to call Shrink)
6. Application Ends: connection pool dies

The point here is that the connection pool is not something that is shared
between processes -- every process creates its own connection pool.

Thanks,
Akshai
--
This posting is provided "AS IS" with no warranties, and confers no rights
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.

"John Tai" <htai (AT) nyc (DOT) rr.com> wrote

Quote:
can someone please clarify the connection pooling feature that comes with
ADOConPool ? I was able to run the sample code below just fine,
i ran the program below a few times with a few seconds in between the
runs,
but when I check the application events using the event viewer (after
making
the necessary changes to the registry to record olap open and close
connections), i notice that there is a pair of open and close events with
no
delay for every program run,

in other words, the connection is not being pooled between application
runs,
i've checked the MaxSession (32) and Timeout (300) properties, and the
defaults seems fine,

am i misunderstanding how connection pooling here works ?

if so, is there any way to obtain the benefits of connection pooling on a
webpage that queries an analysis services without caching the connection
object in an Application object ? Caching the connection object in a
application object i believe would serialize all request to the web
application and i would like to avoid that

sample code:

Private Sub Command1_Click()
Dim objconnpool As MSXmlAnalysisSCLib.ADOConPool
Dim objconn As ADODB.Connection

strtmp = "Data
Source=localhost;Provider=MSOLAP.2;Trusted_Connect ion=yes;Initial
Catalog=FoodMart 2000"

Set objconnpool = New MSXmlAnalysisSCLib.ADOConPool
Set objconn = objconnpool.GetConnection(strtmp)

objconnpool.ReturnConnection objconn

Set objconnpool = Nothing
Set objconn = Nothing
End Sub






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.