Hi,

I have a rather large application which I am trying to keep as
pluggable/extensible as possible (looking at using Avalon/Fortress
right now). There's basically a set of
libraries that form the core of the application and then a
set of extension / "edition" libraries.

The extension libraries would need to do two things:
- add components to the system
- extend existing components in the system.

Examples:
- add components:
  Consider the provider stuff we've been talking about.
  I have a custom container inside of the main container with
  the standard providers. Now I would like to add additional providers
  into that container from the extension library.
  The problem is that the extension libraries are not loaded
  in the same class loader as the main components (I'm using
  a URL classloader to load all jars in a lib/ext/ directory
  and execute a main class in them -- that's what I would like
  to change to have a .xconf in each library and load that one
  to add the different components of the jar).

- extend components:
  Consider e.g. a component that maintains a list of available mime
  types. There's some
  basic mime types in the main configuration and the extension
  library wants to add mime types. How do I go about that?
  I could add a method addMimetype() to the main component,
  and look up that component when loading the library, and add
  the mime types, but isn't that circumventing the configure()
  lifecycle methods?

I was thinking about creating a ExtensionContainer which I pass
a list of .xconf files of the various extension libraries to load that would then load the various jars
and create subcontainers for each of the configurations that it would
find. That seems the cleanest solution, but then I have the problem
that I can't add components to e.g. provider container from the first
example above nor e.g. the list of mime types (I would then have two
different mime type components, one in the main container, one in the
extension container).
Also, components from the main container wouldn't be able to transparently access components from the sub container (the other way
around seems to be work fine)..


Anyways, I'm a little bit at a loss here, so if any of you guru's has
any insights that may push me a step in the right direction, that
will be very much appreciated !!

Thanks,
- Filip


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to