Timothy Bennett wrote:
"Timothy Bennett" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
I've got a basic
idea of the merlin container, and how to create new components for the
container, but I don't have a clear idea how to re-use my Phoenix blocks
even though there is much press touting that merlin supports re-use of the
Phoenix-style blocks.
Ok... maybe it is easier if I work from an example. I've got this SAR that I built that wraps a Phoenix block around an embedded web server. Here's the layout of the SAR:
--- SAR-INF --- config.xml --- assembly.xml --- environment.xml --- lib --- all jars needed to run my app --- jar(s) that contain my services and blocks including my Phoenix xinfo files
These need to be declared under a classloader directive. E.g.:
<container name="demo">
<classloader>
<repository>
<resource id="my:jar-file" version="3.2.1"/>
</repository>
</classloader><!-- component declarations go here -->
</container>
You can put the jar file in the maven repository, or in the merlin repository, or in you own repository. There is not currently a packaging model like the sar file - instead I'm looking at how we can create a virtual repository from something like a sar file (or equivalent).
--- www --- index.html --- style.css
Ok... I'm thinking that in merlin-land, the config.xml and assembly.xml can be (for simplicity sake) reduced to the merlin block.xml file, right? And the environment.xml isn't really ported to merlin.
Sort of yes - environment aspects are exposed in either the kernel.xml file or inside container defintions in your block.xml.
My real question is where in merlin-land do I put my jars that my app needs to run - the ones that are in the SAR-INF/lib directory.
Either in a repository of your choice or in the filesystem somewhere. You can tell merlin to look in multiple repositories by adding multiple host entries in the kernel.xml repository declaration.
Also, I'm assuming
the Phoenix xinfo files are portable to merlin, and this meta info will have
to be regenerated using a maven build, right?
Merlin will recognize Phoenix xinfo files. You can regenerate to use the Avalon Meta model - and there are properties in the Avalobn Meta generator plugin that enable you to have phoenix and avalon meta corexist.
Which means I need to change the doclet tags in my block code to conform to the merlin tags, right?
No necessarily - but I would recommend switching.
Finally, I've got some html file(s) specified in a root context directory (www) that is configured in my block's config.xml file. Where do I put this directory and files in merlin-land so that when my web server app starts, the index.html can be served up by the web server?
Merlin creates a working directory for a component relative to its path and componet name. For example if I have the following structure:
<container name="demo">
<container name="web-stuff">
<component name="server" class="MyWebServer"/>
</container>
</container>Then you component path will be "/demo/web-stuff/server" and the directory provided to the component in the context will be [merlin-home-directory]/demo/web-stuff/server/.
Hope that helps!
Stephen.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--
Stephen J. McConnell mailto:[EMAIL PROTECTED] http://www.osm.net
Sent via James running under Merlin as an NT service. http://avalon.apache.org/sandbox/merlin
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
