Firstly thanks to everyone who is contributing to this. This is really
helpful to me and far better than anything I have found in the
documentation so far.

Steve,
Just to clarify, I am using VB.NET and COM+ 1.0

Brent,
I am concerned about your statement
"This object will generally be in its initial (just instantiated
state)."

- are there instances when it wouldn't be in its initial state ? If so,
can objects be pooled still holding their state so that another request
to the object might pick up the wrong state. My main concern here is
with connection strings.

Generally,

Should I be implementing IObjectControl as a matter of course or only if
I want to capture some of the events?

If each method (apart from Init) set EnableCommit() or DisableCommit()
rather than SetComplete() or SetAbort() would my object always hold its
state for future calls by the same caller without having to call Init()
again.
If so, would there then be any mileage in having a Dispose() method on
each class that just called DeactivateOnReturn(). The Dispose() would be
called on the object when it is no longer needed and then it would be
deactivated and pooled.

My original code example would then look like ....

        Dim objMyObject as New TransactionalObject()
        objMyObject.Init(x,y,z)
        For c = 1 TO n
        objMyObject.TransactionalMethod(.. , .. , ..)
        Next
        objMyObject.Dispose()

.. or am I playing with fire here?


Thanks again

Alan

-----Original Message-----
From: Peter Foreman [mailto:[EMAIL PROTECTED]]
Sent: 18 April 2002 19:42
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] Serviced Components and New()


--- Steve Holak <[EMAIL PROTECTED]> wrote:
> If it's an object that maintains state, then there's no problem.  If
it's a
> stateless COM+ component, then no.  I do recommend ditching the Intit
> method and initializing the property values in the constructor call :

Doh!  We're going round in circles. :-)

> IIRC, the Init functions evolved from VB classes not supporting
> parameterized constructors.

I'd say COM.

> Of course, if you're not talking .NET, then VB6 will not allow
> parameterized constructors.  Which  . . . reading through the thread,
you
> probably are, so ignore everything . . .

LOL.  He's talking about COM+

Peter

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to