Re: Sharing oo4o connection pool IIS and C++

From: carl <carlt_at_mint.net>
Date: Thu, 9 Nov 2000 23:54:37 -0500
Message-ID: <8ufv2e$66m$1_at_ruby.mint.net>


Hi John,

Sounds like you're on the right track trying to access the OraSession object from the IIS Application, however I'm talking out of school here as this is over my head ;-)

Have you thought about enlisting MTS (that is Microsoft Transaction Server or COM+ in Win2K)? I believe that MTS/COM+ will also pool the connection/sessions to the db and you can mark your COM objects as not participating in transactions if you want to avoid that overhead. I'm facing similar issues in trying to decide whether to use ADO or OO4O. I have a hunch that OO4O will out perform ADO, however I have alot of learning to do with OO4O.

I'd appreciate hearing about anything more you learn. Best of luck,
Carl

ctrapani_at_tkiweb.com
carlt_at_mint.net

<jejablonski_at_my-deja.com> wrote in message news:8uca8h$4ub$1_at_nnrp1.deja.com...
> I'm wondering if it's possible to use Oracle Objects for OLE (oo4o) in
> a coordinated way from both ASP pages coded in VBScript and COM objects
> coded in C++? I'm using oo4o inside a COM object successfully when I
> create a C++ ODatabase object and call the database through it. I'm
> trying to figure out how to create an OSession object with Application
> scope which can manage a pool of database connections to be used by
> multiple ASP pages and COM objects.
>
> Following the examples, I have declared an object with application
> scope in my Global.asa file. I can use this object from any number of
> ASP pages. The trouble is in passing a reference to this object into
> my C++ COM objects. I've tried storing a reference to the object in
> the Application namespace which I can access in the COM object. The
> code in C++ seems to be retrieving something from the
> IVariantDictionary object holding the entities in the application
> namespace, I'm just not sure how to use the value I'm getting.
>
> I've tried declaring the thing as a CComPtr<Iunknown>, but then the
> compiler won't recognize any of the method calls which it would if I
> had the definition for something like an IOSession. I'm able to call
> methods on the application object by declaring a pointer to it as
> CComPtr<IApplicationObject>. It seems I need to do something similar
> with the OSession object.
>
> Alternatively, I'd settle for being only able to share the connection
> pool between different COM objects. For this approach I've defined a
> dedicated COM object which uses the C++ syntax to declare an OSession
> object, and I keep a reference to this dedicated object in the
> application namespace. Now, my other COM objects need to gain access
> to this object and run a method which returns some king of usable
> reference to the OSession. Again I'm in a bit over my head and I start
> to worry about the safety of passing reference to C++ objects from one
> COM object to another. It seems I need to learn a lot more about COM
> and maybe need to know some of the internals of the implementation of
> oo4o.
>
> I'm also open to the notion that I'm going about this the wrong way and
> trying to accomplish an unnatural act. Any advice you can offer is
> most appreciated.
>
> --John
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Fri Nov 10 2000 - 05:54:37 CET

Original text of this message