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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COM+ And Threads

Status
Not open for further replies.

DASMAN

Programmer
Mar 27, 2001
24
AR
Hi,
I have a com+ component and I want to create a thread to launch another com+ component.

cA -> thread -> cB

I want that both component support transactions so i can abort the transaction from any of them.

I have been trying to do this but when i create a thread a com+ component (ca) i loose the object context, the transaction finalizes (before the thread and cB) and if the component cB abort the transaction the data saved by cA is saved and cB's data don't

Someone try thi's yet?

the idea it's create a thread (or something similar) in a com+ component to launch other com+ component

Thanks
DAS
 
I donot understand why you need to use a thread to launch another component.
You can create cB from cA's ObjectContext using CreateInstance method.


Regards! IPO_z@cmmail.com
Garbage in,Garbage out
 
Yes, I can create the component using ObjectContext but in that case when I call any method stop the execution of the caller component until the called method finishes, that's the normal way of work with com+,

but I wan't both components working at the same time, so, that's the reason why I tried to use a thread.

Thanks
DAS


 
Maybe you should use MSMQ to implement it instead of using threads.
cA sends a message to a message queue and continues running.cB fetches the message and run....

Regards! IPO_z@cmmail.com
Garbage in,Garbage out
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top