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

Object Pooloing im MTS?!! What is the strategy followed?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
How is object pooling done in MTS? Is an object instantiated on it's method invocation and destroyed thereafter or is it taken from a pool of objects already instantiated?
 
from what I understand about MTS (and I understand very little at this point)...&nbsp;&nbsp;&nbsp;Setabort or set complete tells MTS that the object instance can be reused by other clients.&nbsp;&nbsp;The previous client still hangs onto the context wrapper so it thinks that it has a pointer the the instance.&nbsp;&nbsp;When it calls another method of the object if a free instance does not exist MTS creates another instance.&nbsp;&nbsp;Free instances hang around for 3 minutes before being destroyed by MTS.&nbsp;&nbsp;This is a setting in the MTS management console.<br><br>That is my 2 cents worth of info.&nbsp;&nbsp;Hope that it is right!!!
 
hi grad,<br><br>bingo! you are right. MTS follows what is called Just in time instantiation (JIT). An object is instantiated at the time of method invocation and is used by the client till a setabort/setcomplete is called. The object is deactivated and destroyed soon after (like you said about that 3 minutes setting). On the next method call the object is created and activated.<br><br>What you will notice from this technique is that it is not pure object pooling wherein we have a number of objects in a pool already created which only need to be activated and deactivated for use. In JIT type creation and activation occur together as is the case with deactivation and destruction. However for connection pooling MTS uses pure Object pooiling and not JIT instantiation.<br><br>bye
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top