-
Out of processes components....where forth art thou?
What is the .Net equivalent?
More specifically, how can I recreate a class with the SingleUse instancing
property in an ActiveX EXE component?
I need to have a unique PID & RPC call for every user that connects to this
application. Is this possible in .Net?
Thank you.
-
Re: Out of processes components....where forth art thou?
Look into remoting...
"KraKheD" <S@S.com> wrote:
>
>What is the .Net equivalent?
>More specifically, how can I recreate a class with the SingleUse instancing
>property in an ActiveX EXE component?
>
>I need to have a unique PID & RPC call for every user that connects to this
>application. Is this possible in .Net?
>
>
>Thank you.
>
>
>
>
-
Re: Out of processes components....where forth art thou?
I don't know exactly what you plan to do, but you could obtain the
"functional equivalent" of an ActiveX EXE by creating a .NET class library
project that inherits from System.EnterpriseServices.ServicedComponent, then
host it in COM+ as a server application.
Using COM+ also gives you the advantage of load balancing. In Windows.NET
server, you could also turn your COM+ application into a Windows service...
There is an example using the ServicedComponent class in VS.NET beta 2.
Taiwo
"KraKheD" <S@S.com> wrote in message news:3bb370a1$1@news.devx.com...
>
> What is the .Net equivalent?
> More specifically, how can I recreate a class with the SingleUse
instancing
> property in an ActiveX EXE component?
>
> I need to have a unique PID & RPC call for every user that connects to
this
> application. Is this possible in .Net?
>
>
> Thank you.
>
>
>
>
-
Re: Out of processes components....where forth art thou?
Thanks for the info Taiwo.
When you say "functional equivalent", are you saying that this will provide
the same environment as a single instance class?
What I really need is to have a seperate NT ProcessID for every client that
starts this application. We utilize an old database system that requires
a connection to be open at all times. (This isn't a functional issue, however,
given the fact that there is no connection pooling and every connection takes
3 seconds, you can understand why the connection needs to be alive the duration
of the session.)
Previous tests have shown that compiling our VB6 code as a DLL did not work.
When we contacted the company who wrote our API to connect to the database,
they revealed a serious limitation. Every connection used the same RPC call,
hence, when one connection closed, they all close.
Enter the ActiveX exe.
The solution we contrived was simple. Set the class to single instance, and
allow a new exe to spawn in memory everytime a user logged into the application.
This worked only because every process had a unique PID.
Now that I have described the issue a little better, do you still believe
COM+ would work? Should the package be set to Library or Server? Does it
matter?
Thank you!
"Taiwo" <taiwo_a@hotmail.com> wrote:
>
>I don't know exactly what you plan to do, but you could obtain the
>"functional equivalent" of an ActiveX EXE by creating a .NET class library
>project that inherits from System.EnterpriseServices.ServicedComponent,
then
>host it in COM+ as a server application.
>
>Using COM+ also gives you the advantage of load balancing. In Windows.NET
>server, you could also turn your COM+ application into a Windows service...
>
>There is an example using the ServicedComponent class in VS.NET beta 2.
>
>Taiwo
>
>"KraKheD" <S@S.com> wrote in message news:3bb370a1$1@news.devx.com...
>>
>> What is the .Net equivalent?
>> More specifically, how can I recreate a class with the SingleUse
>instancing
>> property in an ActiveX EXE component?
>>
>> I need to have a unique PID & RPC call for every user that connects to
>this
>> application. Is this possible in .Net?
>>
>>
>> Thank you.
>>
>>
>>
>>
>
>
-
Re: Out of processes components....where forth art thou?
Although I can't categorically say that COM+ will work in your instance, but
you can try a little experiment:
Create a .NET class library project whose class inherits from
ServicedComponent. When you deploy it as a server application in COM+, set
the "object pooling" value to 1 or greater. This means that when the COM+
application is started, it creates as many instances as specified by the
pooling number. Used objects are simply returned to the pool when you
implement IObjectControl_CanBePooled and return True.
In fact, one good usage for object pooling is to pre-create or pre-allocate
expensive resources. But I don't know what the consequences of closing your
database connection in the IObjectControl_DeActivate method would be. That
is, I don't know if not closing it will deplete resources, or whether
closing it will close all other connections. You need to experiment with
this.
If this still doesn't work, look into the framework's help for "SingleCall".
Taiwo
"KraKheD" <S@S.com> wrote in message news:3bbb6d6a@news.devx.com...
>
> Thanks for the info Taiwo.
>
> When you say "functional equivalent", are you saying that this will
provide
> the same environment as a single instance class?
>
> What I really need is to have a seperate NT ProcessID for every client
that
> starts this application. We utilize an old database system that requires
> a connection to be open at all times. (This isn't a functional issue,
however,
> given the fact that there is no connection pooling and every connection
takes
> 3 seconds, you can understand why the connection needs to be alive the
duration
> of the session.)
>
> Previous tests have shown that compiling our VB6 code as a DLL did not
work.
> When we contacted the company who wrote our API to connect to the
database,
> they revealed a serious limitation. Every connection used the same RPC
call,
> hence, when one connection closed, they all close.
>
> Enter the ActiveX exe.
> The solution we contrived was simple. Set the class to single instance,
and
> allow a new exe to spawn in memory everytime a user logged into the
application.
> This worked only because every process had a unique PID.
>
>
> Now that I have described the issue a little better, do you still believe
> COM+ would work? Should the package be set to Library or Server? Does it
> matter?
>
> Thank you!
>
>
>
>
> "Taiwo" <taiwo_a@hotmail.com> wrote:
> >
> >I don't know exactly what you plan to do, but you could obtain the
> >"functional equivalent" of an ActiveX EXE by creating a .NET class
library
> >project that inherits from System.EnterpriseServices.ServicedComponent,
> then
> >host it in COM+ as a server application.
> >
> >Using COM+ also gives you the advantage of load balancing. In Windows.NET
> >server, you could also turn your COM+ application into a Windows
service...
> >
> >There is an example using the ServicedComponent class in VS.NET beta 2.
> >
> >Taiwo
> >
> >"KraKheD" <S@S.com> wrote in message news:3bb370a1$1@news.devx.com...
> >>
> >> What is the .Net equivalent?
> >> More specifically, how can I recreate a class with the SingleUse
> >instancing
> >> property in an ActiveX EXE component?
> >>
> >> I need to have a unique PID & RPC call for every user that connects to
> >this
> >> application. Is this possible in .Net?
> >>
> >>
> >> Thank you.
> >>
> >>
> >>
> >>
> >
> >
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|