avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexis Agahi <a...@users.sf.net>
Subject Re: [merlin] embedding servlet questions..
Date Fri, 07 Nov 2003 18:59:51 GMT
On Friday 07 November 2003 19:22, Filip Defoort wrote:
> Hi gang,
>
> I'm embedding merlin into a servlet -- all seems to work well, but
> there's a couple of
> remaining issues before everything is completely cleaned up:
>
> 1/ How do I get to the merlin application repository directory ? Right
> now, I'm
> using a parameter in the web.xml that basically hardcodes the
> repository.. Not
> very elegant, e.g. if I would distribute/commit the example into the
> sandbox,
> anybody checking it out would have to manually update that link.
>
>     <init-param>
>       <param-name>merlin.repository.dir</param-name>
>       <param-value>F:/home/filipdef/maven</param-value>
>     </init-param>
>     <init-param>
>       <param-name>maven.repo.local</param-name>
>       <param-value>F:/home/filipdef/maven</param-value>
>     </init-param>

there is no solution I guess.
At one point you will always be obliged to specify the repository directory.
(If this is really a prob you could use current system maven/merlin env 
properties)
take a look at
kernel/unit/src/java/org/apache/avalon/merlin/unit/DefaultEmbeddedKernel.java

> 2/ The merlin servlet is simply a wrapper that loads a component jar --
> should
> I package that jar in the .war file or connect to a local/remote
> repository to get
> to the actual component.. Currently I'm doign the equally unelegant:
>      <!-- ... web.xml .... -->
>     <init-param>
>       <param-name>block</param-name>
>
> <param-value>/WEB-INF/lib/merlin-service-tutorial-1.0.jar</param-value>
>     </init-param>
>
>      // .... MerlinServlet.java...
>     String blockPath = getInitParameter( "block", "BLOCK-INF/block.xml" );
>     URL block = new File( home, blockPath ).toURL();
>     ContainmentModel root = m_kernel.getContainmentModel();
>      root.addContainmentModel( block, conf );
>
> Anybody any thoughts/suggestions ?


Interesting... (I was just working on DefaultEmbeddedKernel.java to embed 
merlin in jboss (again))

Could you send me your MerlinServlet.java impl? I'll be happy to see in detail 
how you proceed.

Regards

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


Mime
View raw message