-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: Mrinal
Message 1 in Discussion

Hi , I am pretty confused about the underneath behaviour in one of my multi 
threaded application . Code snippets are like this : // Getting Type class 
object 
Type testClassType = System.Type.GetTypeFromProgID(testName,false) ; --> 
testName parameter is registered as a COM+ Application . Now instance is 
created as :
object instance = Activator.createInstance(testClassType) . This is what i do 
throughout the application , as i typecast after this with relevant base class 
and at run time it calls overriden methods . I create all this instances as 
local variables and dispose them explicitly at the end of method call . 
Meanwhile multiple threads are created for testing a functionality in stress 
mode and they keep on going on for a certain duration in loop and keep Main 
thread execution blocked . Now after that duration i call a clean up method  
from same main method that had earlier called this startup method , there again 
i create local instance of type object as shown above to call the explicit 
clean up code , now there sometimes it leads to : Exception: 
System.Runtime.InteropServices.COMException (0x80010108): The object invoked 
has disconnected from its clients.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode, 
IntPtr errorInfo)
at System.EnterpriseServices.Thunk.Proxy.SendDestructionEvents(IntPtr ctx, 
IntPtr stub, Boolean disposing)
at 
System.EnterpriseServices.ServicedComponentProxy.SendDestructionEvents(Boolean 
disposing)
at System.EnterpriseServices.ServicedComponentProxy.CleanupQueues(Boolean bGit)
at 
System.EnterpriseServices.ServicedComponentProxyAttribute.CreateInstance(Type 
serverType)
at 
System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(Type 
serverType, Object[] props, Boolean bNewObj)
at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type) So , as this execption message 
shows problem is somewhere related to COM+ itself , as this is just an 
intermittent issue and otherwise code works fine . Any pointer to resolve this 
issue will be great . thanks , Mrinal

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member 
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you 
received this message by mistake, please click the "Remove" link below. On the 
pre-addressed e-mail message that opens, simply click "Send". Your e-mail 
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to