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

independent process 1

Status
Not open for further replies.

naveenprakashj

Technical User
May 2, 2002
14
US
Hi,

The outlook of my service is as follows....

service_name()
{

.
.
.
/* All the transactions have been successfuly completed */

write2file(); /* can be another service or routine */

tpreturn(success...);
}

I would like to invoke write2file() and immediately make a tpreturn. I dont want the current service to wait until write2file is executed. The outcome of the write2file is irrelevant to me.

I am not sure if tpacall with TPNOTRAN |TPNOREPLY will help me in achiving my objective.

Any suggestions which technique I can use???

Thanks for your time. :)
 
Yes, tpacall(...,TPNOTRAN+TPNORELY) is exactly what you need.

In addition, if you want to log something when the transaction has been rolled back e.g. by a TPESVCFAIL error before, you will have to use tpacall(...,TPNOTRAN+TPNORELY+TPNOBLOCK) because that's the only "legal" way to make a service call in such a situation (at least it was in version 6.5). I really don't know exactly *why* Tuxedo requires TPNOBLOCK when the transaction has been marked abort-only, but it is required. I wrote a little wrapper that retries tpacall() for 2 Minutes if a TPEBLOCK error occurs ;-) ;-)

hope that helps... :)
 
oops... "has been rolled back ... before" is wrong. Should have been "has been marked abort-only ... before". The actual rollback happens after the last tpreturn().
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top