The getObjectContext method of the AspContext class creates an instance of the ObjectContext object.
public static com.ms.mtx.IObjectContext getObjectContext();
This example shows how to create an instance of the ObjectContext. The ObjectContext is checked to determine if the component was called by a transacted ASP script. If it was called, the method returns true; otherwise, the method returns false.
import com.ms.iis.asp.*; import com.ms.mtx.*; public class testgetobjcont { public Boolean istransacted() { IObjectContext objContext = AspContext.getObjectContext(); MTx.getObjectContext(); if (objContext.IsInTransaction()) { //The component was called in a transacted script return true; } else { //it wasn't return false; } }