geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <d...@coredevelopers.net>
Subject Re: [jsr77][core] AbstractContainer start dependancies
Date Mon, 15 Sep 2003 17:41:26 GMT
On Sunday, September 14, 2003, at 07:54 PM, Greg Wilkins wrote:

> Jan has noticed that the current implementation of 
> AbstractContainer.addComponent
> creates a start dependancy so that the component must be started 
> before the
> container is started.

Really.  That is backwards.  A child can't move to the running state 
until the parent is in the running state.

> I think this is the wrong way around, as it is legal in jsr77 for a 
> container to
> contain stopped components - else startRecursive would not be needed.
>
> This is causing Jan grief with the webcontainer, as it is insisting 
> that
> the webconnectors and webapplications are started before they are
> added to the webcontainer - which is not possible.

I'm not sure what you are saying here.  Declaration of a dependency is 
completely disconnected from the state of either object.

> I have changed this so that the dependancy says that the container must
> be started before the component is. It does not appear to break 
> anything else
> and it makes Jan's webcontainer start.   So I'll go for a lazy 
> consensus on
> this and commit this change tuesday unless anybody objects.

What did you change?  I can't seem to find it.   Anyway, I think we 
should change the signature of DependencyService from

addStartDependency(ObjectName startChild, ObjectName startParent)

to

addStartDependency(ObjectName startParent, ObjectName startChild)

It is just more natural to think parent then child.

-dain


Mime
View raw message