geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Wilkins <>
Subject Re: [jsr77][core] AbstractContainer start dependancies
Date Mon, 15 Sep 2003 22:15:33 GMT


I have not changed anything in CVS yet.  But gianni, jan and I have
all fixed this locally.

Are you going to change the method signature - or shall I flip the
arguments for now?

Dain Sundstrom wrote:
> 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.

exactly.  And a client is allowed to remain stopped even if it's parent
is started.

>> 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.

yeh - I didn't say that very well did I.     It is just trying to start
the component BEFORE it starts the container... but the webconnector component
can't start until it has a started webcontainer.

>> 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.

what about:

   addStartDependency(ObjectName thisMustBeStarted, ObjectName beforeThisIS)

only half joking :-)

View raw message