I finally managed to get an embedded merlin kernel up and running. Wasn't
that hard after al ;) What's more, I think I can see how I can access
components managed by merlin:
final Appliance app = kernel.locate("/container-name/component-name");
final Object component = app.resolve();
Is this the way to go?
I currently have a minimal setup where one SampleComponent implementing the
work interface Sample is managed inside merlin. Calling app.resolve()
returns a DynamicProxy wrapping SampleComponent as revealed by calling
toString() on it (-> [EMAIL PROTECTED]). What puzzles me is that
I cannot cast this proxy to the Sample. The relevant code in merlin (mostly
in DefaultAppliance, I think) seems to be pretty straightforward. Still, the
proxy does not implement any interfaces. Smells like a configuration
problem, yet I double checked SampleComponent.xinfo, sample.block and even
looked inside the jar. What am I doing wrong here?
Cheers,
Olaf
samples.SampleComponent.xinfo:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE type PUBLIC "-//AVALON/Type DTD Version 1.0//EN"
"http://avalon.apache.org/dtds/meta/type_1_1.dtd" >
<type>
<info>
<name>sample</name>
<version>1.0.0</version>
<lifestyle>singleton</lifestyle>
</info>
<services>
<service type="samples.Sample"/>
</services>
</type>
sample.block:
<container name="org.merlinaop.samples">
<classloader>
<classpath>
<repository>
<resource id="avalon-framework:avalon-framework-impl"
version="4.1.5"/>
<resource id="merlin-aop/samples:merlin-aop-samples"
version="0.1"/>
<resource id="merlin-aop/aspects:merlin-aop-aspects"
version="0.1"/>
</repository>
</classpath>
</classloader>
<component name="sample" class="samples.SampleComponent"/>
</container>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]