On Mon, Jul 08, 2002 at 12:56:53PM -0400, Peter Royal wrote: > On Monday 08 July 2002 12:46 pm, Marcus Crafter wrote: > > From what I can see the asynchronous initialization code within > > Fortress isn't working. When I trace through the code the component > > handlers aren't initialized until components are actually lookup()'d. > > Are you tracing w/a debugger? If the other thread might not get a chance to > run if you are stepping through with a debugger.
One of my ThreadSafe components wasn't being start()ed until I actually looked it up. If I forced sync init, everything worked fine, but with async init, it didn't. I also checked it with jswat too, but didn't completely trust the results as you pointed out too. > > In the ContextManager a default CommandQueue object is created if one > > is not specified (and also if setCommandQueue(null) is given to the > > ContextBuilder (which seems suspicious)) and there seems to be no > > ThreadManager associated with the CommandQueue, so initialize()'s are > > only done inside FortressComponent/ServiceManager.lookup(). > > The auto-creation of a CommandQueue doesn't work, for the reasons you noted. > > > Unfortunately I don't know the event and queue code well enough to > > fix this problem if my analysis is correct. Any thoughts from the > > more experienced developers there ? > > The async init does work though, if you specify a CommandQueue via the > ContextBuilder.setCommandQueue(). I have it working here (verified w/log msgs > and the source for some is the ThreadManager thread). Ok, so you created a command queue instead of using the default one that's created if its not specified. Would be great if you could post the code how its created & registered with the ThreadManager ? :) Unfortunately setCommandQueue(null) does not disable async init, as I thought it would due to OverridableContext which throws an exception if a null is stored :( Cheers, Marcus -- ..... ,,$$$$$$$$$, Marcus Crafter ;$' '$$$$: Computer Systems Engineer $: $$$$: ManageSoft GmbH $ o_)$$$: 82-84 Mainzer Landstrasse ;$, _/\ &&:' 60327 Frankfurt Germany ' /( &&& \_&&&&' &&&&. &&&&&&&: -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>