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: Architectural Question
Date Thu, 18 Jul 2002 17:11:45 GMT
On Thu, 2002-07-18 at 08:21, Steve Osselton wrote:
> Hi Guys,

hi!

> We're starting to use Avalon

you like it so far?

> and have components that require persistent
> initialization (creation of table/entries) and destruction (removal of said
> tables/entries). I was wondering why this is not supported as a framework
> activity interface?

there hasn't been enough need, I guess...besides it would make the
framework considerably more complex. Everything specified as an
'official' lifecycle interface is something that needs to work in every
application. Since database portability is JNP (just not possible), we'd
have to include a database activation/passivation abstraction layer
within the framework as well.

Also, your persistence needs may exceed the scope of your avalon
container. The idea of the lifecycle is that its methods are all called
during a single container 'run'.

I would suggest you make your persistence layer/service into a
block/component which all your other components (that need persistence)
depend on:

service( ServiceManager sm )
{
	m_store = (PersistenceStore)sm.lookup( PersistenceStore.ROLE );
}

initialize()
{
	m_store.create( this );
}

dispose()
{
	m_store.destroy( this );
}

that's "the easiest thing that could possibly work".

- There has been talk of adding a Persistable interface (Berin Loritsch
took a stab at it, it is in the jakarta-avalon CVS under /src/proposal),
but that code is still pre-alpha.

- Fortress has been recently modified to support an extensible lifecycle
(you can basically add the Persistable interface yourself as a
'framework extension'), this is still alpha code

- there is some Persistence code in both cornerstone and excalibur (I
think); I'm not sure what the status of that code is; haven't use it
myself.

I'm forwarding this to the general avalon-dev list as this discussion
pertains to more than just phoenix.

regards,

- 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