Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Invalid Use of Transaction - COM+/MSMQ

6 views
Skip to first unread message

Stephen Gray

unread,
Feb 23, 2001, 4:17:24 AM2/23/01
to
Hi All,

I've posted this question numerous times .. I guess it's a 'feature'.

If you create a root object that requires transactions it will be created in
a transaction. If this creates a secondary object that uses transactions it
will also be created in the same transaction context. You can easily modify
how the second object is created by changing the transaction mode (uses, not
an MTS object etc....).

Now if this secondary object is in a transaction and it tries to create a
third object this object will ALWAYS be created in a transaction even if
you specify that the object is not an MTS object or even create the object
via the New operator. I guess this is a design feature but because my third
object tries to create an MSMQ object (used for code tracing) COM+ will
throw an error 'Invalid Use of Transaction' .. of which there is NO
documentation. The reason it throws this is because it can 'see' that the
MSMQ object has been created in a transaction (I don't want it to for
tracing .. too much overhead!!) and because the Q in non transactional it
throws the exception.

So it looks like you can control the transaction usage of the secondary
object but NOT ANY levels below. So if the secondary object is in a
transaction contexts so will any of the objects that it creates. Is this a
'bug' or a design feature?

I hope you can help.

Regards

Steve Gray
sg...@yarg.com


Stephen Gray

unread,
Feb 23, 2001, 5:36:51 AM2/23/01
to
Sorry I missed out that the trace component works okay in a transaction as
long as you set MQ_NO_TRANSACTION when you send a message the default is
MQ_MTS_TRANSACTION. So the interesting problem lies in secondary objects
that are in transactions creating objects that are NOT in transactions..
very weird .. I guess by design?


"Stephen Gray" <sg...@yarg.co.uk> wrote in message
news:3a962...@news.netdirect.net.uk...

0 new messages