On Saturday 15 November 2003 05:44, Dominique Paquin wrote:
> One of my avalon services, once it reaches the initialize method,
> instantiate a thread that needs a reference on the parent caller,
> namelly the Service in question, to execute code immediatelly. But the
> service manager states that the service is not available through a
> Kilometer long exception thrown at me.
>
> Is there methods somewhere, in the current implementation, that would
> permit my thread to be notified once my required service as completed
> initializing and is properlly started?
You ARE breaking the so called LifeCycle contract, and it will not be
tolerated ;o) (hence the LongKilometerException )
I think you should do something like;
public void initialize()
{
}
public void service( ServiceManager man )
{
SomeParent parent = (SomeParent) man.lookup( SomeRole );
Runnable worker = new SomeWorker( parent );
m_Thread = new Thread( worker );
}
public void start()
{
m_Thread.start();
}
I think you need to elaborate a little bit of why you need what you are
requesting.
Cheers
Niclas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]