Advice Required on Creating Stateful COM+ Objects with .Net


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 1 of 1

Thread: Advice Required on Creating Stateful COM+ Objects with .Net

  1. #1
    Join Date
    Aug 2005
    Posts
    1

    Advice Required on Creating Stateful COM+ Objects with .Net

    Hi All,

    I know this topic (stateful/stateless) sometimes brings up some fairly long discussions, and I'm still confused even after all these years, so allow me to explain and provide some background about this particular situation for you. Just so you know, we're going with a stateful approach for the reasons below .

    We're currently moving some servers to 2003 from NT 4 (a case of 'have to do it'), and we have a fairly old service written in C running on there that provides mainframe access to about fifty users each on workstations, at most. Now this old service runs perfectly fine on 2003 (far better than on NT 4 in fact), but due to some problems with the old communication mechanism a component at a higher level uses we've decided to take some components from the workstation and re-write them to work on the server so all client/server communication works with DCOM/COM+. This actually works, and we've had a proof of concept up and running for a while, if a little ropy. The setup looks like this:

    Mainframe server (stateful) <-> COM+ server component (stateless) <-> COM DLL client component (stateful)

    For each mainframe connection there is a session id, which the mainframe server actually keeps track of, and the client DLL holds this state so it can pass this ID down the chain to use the session that it has created. We'd like to get away from the client having to know the session ID, and we'd rather the COM+ server was able to free up resources independently (implies knowing the session ID) because we can't always rely on the client doing it. What I'd like to do is this:

    Mainframe server (stateful) <-> COM+ server component (stateful) <-> COM dll client (stateless)

    In terms of state, all a COM+ instance would have would be a simple session ID variable - nothing expensive. The interesting thing to note here is that even though the COM+ server is stateful it doesn't actually matter at all what instance and session ID a client uses at any given time, so from their perspective it is stateless. What I'm aiming for here is to set up some object pooling so we can have far less than fifty instances up and running (perhaps as little as five or less sessions), as a call to the COM+ server and mainframe only takes around thirty milliseconds at most and then it will be released by the client for reuse. From this perspective, I think a stateful setup would be a good idea here as it would place far less stress on everything all-round, including the mainframe server, and people will love me .

    The COM+ server we have is written with VB 6, and of course, DLLs created with VB 6 do not support object pooling . Given the tools available (out of my hands), we've decided to write this COM+ component in VB.Net which will allow us to do this. So, my *real* question is:

    What advice, articles and books would people recommend for writing stateful COM+ components with VB.Net? My searches have turned up very little that's actually useful, and I'm quite surprised.

    Is it possible to pool stateful objects, and have them pooled and used automatically like stateless objects?

    Note: I should point out that the clients are all written with VB 6 and are COM based.
    Last edited by segedunum; 08-26-2005 at 06:22 PM.

Similar Threads

  1. Advice on best .NET resources!
    By Jerry in forum .NET
    Replies: 5
    Last Post: 08-26-2002, 03:02 PM
  2. Is .NET framework required
    By lostguy in forum .NET
    Replies: 3
    Last Post: 04-03-2002, 11:21 AM
  3. OO Considered Harmful
    By Richard Dalton . in forum Architecture and Design
    Replies: 33
    Last Post: 07-30-2001, 02:11 AM
  4. Replies: 1
    Last Post: 03-27-2001, 02:47 AM
  5. Creating a ASP+ in VStudio .NET
    By Bart Luyckx in forum ASP.NET
    Replies: 7
    Last Post: 09-25-2000, 03:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center