avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen McConnell <mcconn...@apache.org>
Subject Re: [sandbox,merlin-servlet] missing Kernel.BASE_URL_KEY, DefaultLocator
Date Thu, 23 Oct 2003 09:33:33 GMT


Filip Defoort wrote:

> Hi,
>
> I updated MerlinServlet and have a basic version of it running. One 
> remaining
> question though:
>
> MerlinServlet used to set a getServletContext().setAttribute( "xxxx", 
> m_kernel.getUrl() );
> other classes like TestServlet and TargetTag were then using that 
> value and
> simply displaying it... 


ahhh, yes - memories ...

>
> I guess I need to replace this by some system that passes the Kernel / 
> Root Block(?) / Engine (?)
> to the TestServlet and TargetTag so that these classes can lookup 
> components and
> use the result of operations on components in their output? 


Yep.

The objective was to provide a means whereby a servie could be requested 
by name together with a bunch of parameters.  This would allow actional 
urls and other such stuff.  I never got to try it out in a production 
environment but it seemed to be heading in a good direction. 

>
> As simple as setAttribute("merlin-root-block", m_kernel.getRootBlock() 
> ) and then
> block.resolveAppliance("componentname") ? Still a bit confused on what 
> is what
> in Merlin ;-) 


Hey - I impressed with the progress your making!

>
>
> Couple of things I came across during the update:
> - in DefaultEmbeddedKernel, getSystemRepositoryDirectory() relies only 
> on System.getProperties(),
> there's no way to pass in an argument of some sort (via the Map()); 
> this forced me to do an
> ugly
>    system.setProperty( "maven.repo.local", 
> getInitParameter("maven.repo.local")) 


When we need additional parameters in the map - feel free to add as needed.

Remember that DefaultEmbeddedKernel is currently too strongly linked to 
the Maven context and that a getSystemRepositoryDirectory() should be 
returning something like ${merlin.home}/system - but I'm still playing 
with content to support that.  In the meantime its using the Maven repo 
- but that should be considered as a temporary condition.  Also, as this 
comes together there will be a case for rationalization across  
DefaultKernelContext, DefaultKernel, DefaultLoader, DefaultEmbeddedKernel.

>
>
> - in DefaultKernelContext: give a NullPointerException if 
> merlin.base.dir is not given.
> Bit surpised about this, was expecting to default to the current 
> working directory... 


Can you point to the actual code fragment?

Steve.


>
>
> So far, so good :-)
>
> - Filip
>
>
>
>
> Stephen McConnell wrote:
>
>>
>> MerlinServlet  was a first cut an embedding using version 2.1. Its 
>> way out of date and should be dropped - but I've left it around
>> in sandbox because it was example that handled some of the
>> web.xml things.
>>
>> Steve.
>>
>>
>>
>> Filip Defoort wrote:
>>
>>> Hi,
>>>
>>> I was playing around with the MerlinServlet to get an idea of how 
>>> Merlin can
>>> be embedded, but it won't compile for the moment: initially complaining
>>> about a missing ../../project.xml, which I then linked to 
>>> ../../../../avalon/merlin/project.xml;
>>> then complaining about Kernel.BASE_URL_KEY and DefaultLocator and 
>>> the likes...
>>>
>>> I'm guessing that the MerlinServlet would need to be updated to use the
>>> DefaultEmbeddedKernel iso doing the stuff directly as it's doing now ??
>>>
>>> Thanks,
>>> - filip
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
>>> For additional commands, e-mail: dev-help@avalon.apache.org
>>>
>>>
>>
>
>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message