|
MTX and Components
Microsoft Transaction Server (MTX) is a tool
included with IIS4 NT Option Pack. It is an essential long term ingredient to
scalable, maintainable, reliable websites. It is necessary for commerce or mission
critical websites, though it helps improve performance on all websites as well.
Without involving MTX, every request to create
an instance of a component (ala server.createobject) and destroy the instance of that component (ala set object=nothing) is sent directly to
the component. IIS tends to cache objects so that when you destroy an instance, IIS
probably will not remove it from memory so that the next creation attempt will be instant
since it is already in memory. This is a direct violation of the DCOM rule that when there
are zero instances of a component in memory, the component is automatically removed
from memory.
Any MTX aware component is now managed by MTX
and the following benefits are available:
MTX is managing the object so that it may
unload or load instances as needed to improve performance.
MTX objects need not run as the "standard
ASP User". Components registered with MTX can impersonate a specific user.
The typical segments of code that would be
unique to components managed by MTX would look like this:
| Concept |
Code |
| Capture Context shared by all MTX
managed components |
private mycntxt as ObjectContext
set mycntxt= GetObjectContext() |
| Tell MTX your component has completed it's task sucessfully |
mycntxt.SetComplete |
| Tell MTX your component has not completed it's task
sucessfully |
mycntxt.SetAbort |
| Tell MTX to create an instance of
your component (don't use new, createobject, or
server.createobject) |
mycntxt.CreateInstance("...
objectname ..") |
 |  |  |
 |
There are many worthy charities!!. But perhaps help starving children in Africa or South America AND help Charles too.
a $5 tip buys him lunch at McDonalds,
a $20 tip buys his kid Hitoshi a new computer game,
a $39 tip buys his daughter Michiko a few nice outfits.
See our donor list.
|  |
 |  |  |
|
|
|
|