avalon-phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Simons" <leosim...@apache.org>
Subject RE: managing applications
Date Wed, 06 Mar 2002 08:50:13 GMT
> In this case I believe it is the responsibility of the Block to kill the 
> connection - I usually do it in dispose.

so should Block extend Disposable? Dunno.
Should a stop() of an application dispose()
a block?

> > Or should there be
> > more intelligence in DefaultApplication
> > to avoid problems like aforementioned?
> 
> Got any ideas on how we would do this?

1) check whether Block implements Stoppable
2) if yes, stop()
3) if not, check for Disposable
4) if yes, dispose()
5) if not, dereference the block completely,
then call System.gc()

(...)

I'm being rather stupid. 

if:

- the Block binds resources during initialize()
- the Block does not bind resource during start()
- the Block does not unbing resource during stop()
- the Block unbinds resource during dispose()

- calling initialize() on the Application calls
  initialize() on its Blocks
- calling start() on the Application calls start()
  on its Blocks
- calling stop() on the Application calls stop()
  on its Blocks
- calling dispose() on the Application calls
  dispose() on its Blocks

there is no problem. I'm guessing there's a little
logic error in both XCommander and in
DefaultApplication, which results in a bigger problem.

Anyway, going away for 1 1/2 week, so this will have
to wait a little =)

cheers,

- Leo


--
To unsubscribe, e-mail:   <mailto:avalon-phoenix-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-phoenix-dev-help@jakarta.apache.org>


Mime
View raw message