You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Filip Defoort <fi...@cirquedigital.com> on 2003/11/07 19:22:39 UTC
[merlin] embedding servlet questions..
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>
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 ?
Thanks,
- Filip
PS: 30, born in Belgium, but living in Los Angeles since the last couple
of years..
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: [merlin] embedding servlet questions..
Posted by Stephen McConnell <mc...@apache.org>.
Just a note - as part of the overall repository stuff we have some
utilities to get the merlin home location. This will be integrated into
a new kernel embeddor so that you will not have to deal with this - it
will just happen automatically. All of the existing embedded scenarios
(cli, unit, servlet, etc. will need to be updated to use the new
embeddor model).
Cheers, Steve.
Alexis Agahi wrote:
>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
>
>
>
>
--
Stephen J. McConnell
mailto:mcconnell@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: [merlin] embedding servlet questions..
Posted by Filip DeFoort <fi...@cirquedigital.com>.
Hi,
It's all pretty straightforward, MerlinServlet and web.xml in
attachment...
Let me know if you need anyhting else... Hope the attachments
go through...
- Filip
> 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
Re: [merlin] embedding servlet questions..
Posted by Alexis Agahi <al...@users.sf.net>.
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