No. I need the exact equivalent of what was the ITransactionContext in COM+
but withing the Enterprise Services.
I need to:
1) be able to create several transaction contexts on the same thread, and
begin a transaction on each of them, storing the contexts for use when:
2) there is a need to create an object within one of these contexts
3) there is a need to commit one of these transactional contexts
4) there is a need to abort one of these transactional contexts

Signature
Thanks in advance,
Juan Dent, M.Sc.
Hi
I think in .NET, we use the attribute to control the transaction creation.
TransactionAttribute Members
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystementerpriseservicestransactionattributememberstopic.asp
We use the TransactionOption as below to control whether the component will
be in a transaction.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystementerpriseservicestransactionoptionclasstopic.asp
Disabled Ignores any transaction in the current context.
NotSupported Creates the component in a context with no governing
transaction.
Required Shares a transaction, if one exists, and creates a new
transaction, if necessary.
RequiresNew Creates the component with a new transaction, regardless of the
state of the current context.
Supported Shares a transaction, if one exists.
e.g. If A is RequiresNew, B is Supported/Required, and you now create B in
A, then A and B will be in the same transation.
Best regards,
Peter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
Juan Dent - 27 Jul 2005 19:16 GMT
I am aware of the use of attributes. However transactions are controlled
automatically for serviced components (COM+ components) and that is not what
I need.
As I stated in my last posting, I rather need a behavior much more identical
to the old ITransactionContext. Let me show a code snippet to clarify:
--------
public void BeginTrans(int DBType )
{
ITransactionContext tranContext = new TransactionContextClass();
// store the intiated transaction according to DBType, until commit or
rollback are
// called
this.contextMap[ DBType ] = tranContext;
}
public void CommitTrans(int DBType)
{
// get appropiate transaction context on which to commit
ITransactionContext tranContext = this.contextMap[ DBType ];
tranContext.Commit();
}
public object CreateInstanceEx( string progId, int DBType )
{
ITransactionContext tranContext = this.contextMap[ DBType ];
return tranContext.CreateInstance( progId );
}
-----------
Does this clear up the desired functionality? And, I am aware of the
available attributes but I don't think they can help here. At least not the
[Transaction] attribute.

Signature
Thanks in advance,
Juan Dent, M.Sc.
> Hi
>
[quoted text clipped - 28 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no rights.
"Peter Huang" [MSFT] - 28 Jul 2005 08:38 GMT
Hi
So far I am researching the issue, and I will update you with new
information ASAP.
Best regards,
Peter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
"Peter Huang" [MSFT] - 29 Jul 2005 03:16 GMT
Hi
I think so far the Enterprise namespace have not covered all of the COM+
API.
We will improve in the next version, you may look at the
System.Transactions namespace in .NET 2.0:
http://msdn2.microsoft.com/library/a90c30fy(en-us,vs.80).aspx
I know it is beta still, but by waiting a few months and taking a
dependency on 2.0 you will avoid a lot of work.
Alternatively, you may try to look at "Services without components"
http://www.15seconds.com/issue/030930.htm
So far I would not recommend trying to interop to COMSVCS via PIA, because
it is not supported.
Best regards,
Peter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.