avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen McConnell <mcconn...@apache.org>
Subject [repository] news - update - etc.
Date Sun, 30 Nov 2003 08:59:42 GMT

Have just committed a bunch of updates on the sandbox repository.  These
updates are focussed on getting the API and SPI just right (leveraging
trials with the embedded Merlin scenario). 

The embedding approach looks like the following:

  // create the initial repository context during which
  // we declare the system cache and the set of remote hosts
  // (in this example I'm using the maven repo as the local
  // cache)

  InitialContext context =
    new DefaultInitialContext(
      getDefaultHosts() );

  // create a reference to the application we want to
  // deploy (in this example it's merlin but it could be
  // any application)

  Artifact artifact =
    Artifact.createArtifact( "merlin", "merlin-impl", "3.2.2-dev" );

  // create an application builder using the initial repository
  // context and the application artifact - then use this to
  // construct an application factory from which we get the
  // default criteria (which we can customize based on information
  // specific to the embedding scenario) then use the criteria to
  // instantiate the application

  Builder builder = new DefaultBuilder( context, artifact );
  Factory factory = builder.getFactory();
  Map criteria = factory.createDefaultCriteria();
  criteria.put( "merlin.debug", new Boolean( true ) );
  Object app = factory.create( criteria );

I'm still working on the Merlin side of things to sort out to
sort out a clean approach to the handling of the app that is
established by the builder.  What I'm aiming towards is to have
the builder deploy an application handler (like a JMX server or
just a simple thread running) based on a supplied parameter.

Working examples of the above are available in the sandbox under
the kernel/test directory.  You can also try things out by by
executing the following command (the cache parameter is optional):

$ java -jar avalon-repository-main-1.2-dev.jar /
    -artifact merlin:merlin-impl;3.2.2-dev     /
    -cache %MAVEN_HOME%\repository

Cheers, Steve.


Stephen J. McConnell

| Magic by Merlin                                |
| Production by Avalon                           |
|                                                |
| http://avalon.apache.org/merlin                |
| http://dpml.net/                               |

To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org

View raw message