On Sunday 30 May 2004 02:49, Eike Stepper wrote: > you are right. i'll try to let merlin run embedded in an eclipse plugin at > client-side. in fact i already succeeded to port the "generic embedding" > example to a plugin. the resulting DefaultKernel is obviously running and > can be shut down programatically. but i have no clue how to make my block > boot. could you give me one more hint?
Boot (?) the block?? Do you mean loading it into the kernel container? Do you mean getting it to run once it has been loaded? Embedding is not my area, but I assume you are doing something like; InitialContextFactory initial = new DefaultInitialContextFactory( "merlin" ); File home = initial.getHomeDirectory(); initial.setCacheDirectory( new File( home, "system" ) ); InitialContext context = initial.createInitialContext(); String spec = "artifact:merlin/merlin-impl#3.3.0"; Artifact artifact = Artifact.createArtifact( spec ); Builder builder = context.newBuilder( artifact ); Factory factory = builder.getFactory(); Map criteria = factory.createDefaultCriteria(); to get everything established before creating the kernel. I think(!) you need to do a criteria.put( "merlin.deployment", arguments ); Kernel kernel = factory.create( criteria ); kernel.startup(); where 'arguments' is a string array containing the 'rest of commandline', i.e. the block file. > the more i think about it the more i like the idea to combine both merlin > and eclipse at client-side as well as at server-side (but eclipse in > headless-mode to avoid the ui). this way the merlin (avalon?) components > could benefit from eclipse's plugin registry and its web update manager. IMHO, Merlin's remote repository functionality is superior of the update manager. Declare your resources in the block and give Repository (the subsystem) an URL to your local repo-server (http) and/or global ones, for central administration of Jars. Even Merlin itself can bootstrap from a http server, if that is needed, and since you are embedding you can take great advantage of that. Cheers Niclas -- +------//-------------------+ / http://www.bali.ac / / http://niclas.hedhman.org / +------//-------------------+ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]