Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MTS Question Please Help Urgent !

Status
Not open for further replies.

datapro1

Programmer
Aug 2, 2001
1
0
0
US
Hi,
This is Sanjay here. I have a question on MTS(COM+ IN WIN2K).I hope you will respond soon.

Is it possible that in web-based environment ,if MTS holds a one instance of COM component,then same instance can be used by all the clients.

For example :

I have a COM Component installed on COM+ Server in Win-2000.

I need to access this component from 2 different ASP Pages.
But What I want to achieve is that once a instance of this component(in MTS) is created,it should be there in the MTS memory and this instance can be used by all ASP pages.


If I use in my ASP pages
set obj = server.createobject("myproj.myclass")
to create instance of the COM component in MTS ,then different instances of this component will be created ,which i don't want to have.I just want once instance of the COM component to be used in all ASP pages.Is it possible?

If possible how to get the reference to the COM component in MTS using ASP.

I will appreicate your help.

Regards
Sanjay
 
Dear Sanjay
its not adviseable to do what u want because good MTS componets shoud be STATELESS all u want to maintain the state okay u can do this if u made ur compoenetn in VB then there is a property name "Persistant" in class of ur MTS object which make that object persistant
Regards
Nouman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top