avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Terry Laurenzo" <TerryLaure...@amexbf.com>
Subject Possibility for a light weight Phoenix container
Date Tue, 18 Mar 2003 17:07:05 GMT
Phoenix developers/users:

I have been working to integrate Phoenix into our internal service infrastructure for about
a month now. I led the adoption of Avalon as a whole over a year ago and we have been using
it through a set of wrapper Java classes that essentially delegate most work down to the Excalibur
DefaultComponentManager. Since the functionality that this provides is extremely limited,
I made the decision to dive into Phoenix. Specifically, I have been using the post 4.0 developer
snapshots that include the added functionality of managing Maps and Arrays of dependencies
instead of enforcing one to one relationships. 

Using the Phoenix container is compelling with one caveat: it does not play well with others.
It looks like there was initial work done to build an embedded version with PhoenixServlet
but this is badly out of date. Phoenix makes a great stand-alone container but many of us
who are trying to integrate these new tools with our existing set of processes do not have
the luxury to build on Phoenix from the ground up. It would be really nice to have an officially
maintained embedding API (that is documented!) for embedding the container into other applications
or loading as part of a webapp (I know the Phoenix "way" says to host the web server in Phoenix,
but this is not always feasible).

To this end, I spent about two days digging into the bowels of Phoenix and building such functionality.
First, I built a SimpleAppEmbeddor class that is primarily configured with a Configuration
for the assembly and a Configuration for the block configurations (just like what would normally
exist in the SAR). It leaves out most of the ClassLoader, logging and instrumentation (although
instrumentation could be reenabled by including the right components in the primordial ServiceManager
that is used to initialize the kernel). I then built a new PhoenixServlet that will load a
Phoenix application and store a ServiceManager representing all of the components it contains
into the Servlet context so that all servlets in the web app have access to it. 

I know that some of what I am proposing is counter to the goals of Phoenix the container,
but I think that Phoenix the embedded component has different goals. The goals in this situation
are to be as light-weight as possible and expose the core Phoenix functionality within applications
that have been built apart from Phoenix. There is a lot of useful stuff in Phoenix that makes
development so much easier. I would just like to make these core features useful to everyone
instead of being restricted to those who have the luxury of building things from the ground
up.

So, my proposal is to begin defining such a set of components to be formally included within
Phoenix instead of being developed as an add-on. Currently, the add-on approach is difficult
because the Phoenix source code is in such a state of flux.

Am I out in left field here or does anyone else have interest in such a thing?

Terry Laurenzo

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message