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

MTS Multistep call

Status
Not open for further replies.

jkelly2956

Programmer
Jul 31, 2002
37
US
I have a list of three object method calls from ASP page that I want to all succeed or all fail. Is this possible like the following

if something then
oObject.thisMethod()
oObject.otherMethod()
oObject.LastMethod()
end if

If any one of these fails I want them all to fail...

 
Easy.
make sure you have the COM+ service type library loaded
in each meathod if you get a error then do
GetObjectContext.SetAbort
err.raise .....

then in your calling routine just handle the error

on your last method if a error didn't happen call

GetObjectContext.SetComplete

Make sure the object is set to requires a newtransaction or requires a transaction.

Better design would be to creat 1 method in your object and call it and have it call the 3 methods internally. This will speed things up a bit.

When using MTS objects should be made to be stateless. Ie objects should not have to keep state information from one call to the next (from the client) but should be passed, via parameters, all the information they need.

 
I have set up an ASP page to handle the transaction. I have added the @transaction=required tag to the top of the page. The page works wonderfully on our test machine(win2000) but hangs for about two minutes and gives me a generic MTS error on our production machine(win2000) Any Idea what the hanging could be.

Thanks.
 
At what point is the production machine hanging?

Are your components installed on the IIS server? On both machines?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top