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!

Help needed for developing a non transactional MTS component

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I a totally new to MTS programming.Can any one tell me ?
when I develop a a component which does not support transaction ,how do tell the MTS that my operartion is over,can I call setAbort or setComplete of Object context object ?

like in my case I have couple data accessing components some which do not need a transaction so how do script them?Do I need to get reference to objectContext and call its setAbort or setComplete methods?

See these components perform simple queries and do not need any transaction.

thanks in advance for any help.
 
Dear Canty
ur post consist of two q
1) how do tell the MTS that my operartion is over,can I call setAbort or setComplete of Object context object ?
ans :- well u see you could use setAbort or SetComplete not just for transactional behavoiur its also use for JIT (Just Intime activation) which is preferable when used.You see if you want to enable transcation then you could do it be STORED PROC or By MTS to me MTS transaction is the preferred method of doing this...and in this case you have to use SetAbort and SetComplete
2) I have couple data accessing components some which do not need a transaction so how do script them..
ans :- ans is same used SetAbort and Setcomplete for any components ,i used it for those components which only get data from back-end but i always used them becuase of other thigs supported by doing this but yes you could not use them but still its alternative approach which i never used..
hope this will help you
Regards
Nouamn
 
I am using COM+ and ASP. I call a method from an MTS object through ASP. I am deactivated the MTS Object using SetComplete. However, looking at the Status View in Component Services, the number of objects remains 1 while the Activate, InCall, and CallTime changes to 0 when the dll finishes. The problem is my asp page doesn't reestablish code control until I shut down the application(or Package). I have debugged my dll using inserts into a log file at critical points showing the method being called has finished its work. Any ideas why the number of Objects remains 1?? thanks.
 
Dear Kimo_Jo
have u set the object to nothing ,just set it nothing once u have finished with the object ,for e.g i am pasting a code which can help you in understanding what i want to tell

Dim objBOButtonCat As Object
Set objBOButtonCat = Server.CreateObject("CC_OE_ORDER_BO.clsBoOrdersN")

Set GetButtonCategories = objBOButtonCat.GetButtonCategoriesByStyleCode(varInfo, StyleCode) 'this is the Call to MTS Object

Set objBOButtonCat = Nothing 'this will finished the object

Hope it will help you
Regards
Nouman
 
I am setting the MTS object to nothing. Here is my asp code.

dim i, obj
'call mts object
set obj = Server.CreateObject("BuyByGeography.BuildReport")
obj.ConnectionString = strinisettings3
obj.SQL = "WB_sp_PrintBuyByGeoVendorUS"
i = obj.Display 'method
'set mts object to nothing
set obj = nothing

The MTS object is writing to a log file when the object is finished running the Display method. This also appears to be alright. If this helps, when I run this in MTS I am able to run my code. Now we that we went to COM+ I am getting this issue. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top