Our GUI layer is very thin -- most of the time all it does is call server.createobject and pass it parameters (usually XML strings). We did this because writing/debuging ASP and javascript code in Interdev is much harder than debugging VB code in the VB IDE. So, we write a VB DLL that does all our business logic and run it under COM+. Our ASP code would then call into this DLL (and other DLLs) for everything.
One other thing, you don't actually need to get a reference to the object context if what you're doing doesn't require a transaction. If all you're doing is SELECTing records, no transaction is required. But if you INSERT, UPDATE, or DELETE records, it should be done inside a transaction. What we did is create a class in our DLL for our non-transactional needs, and another one for the transactional operations. The MTS property on the classes was set appropiately. For example:
Non-transactional class:
[tab]MTSTransactionMode = 0 - Not an MTS object
[tab]No references to object context
Transactional class:
[tab]MTSTransacitonMode = 2 - Requires Transaction
[tab]Gets reference to object context, calls SetComplete and SetAbort as appropiate
If we need to go get a record from inside the transactional class, we just instantiate a copy of the non-transactional class and call the correct "fetch" method. Since the non-transactional class doesn't know or care about transactions, and isn't doing anything that would require a transaction, everything is OK.
Hope this helps.
Chip H.