Hi,
I'm guessing that as the JNDI-zed way to access services is not that mature,
I have to do with the URL-ized way. According to the
BlockURLHandler.parseURL() javadoc, Block URL are supposed to conform to one
of the following patterns:
block://localhost/root#org.apache.playground.Demo
block://localhost/root/subcontainer/demo
Well, I'm having a single component deployed twice in two different
containers, the root one and a 'test' one, as shown in the following
block.xml file:
<block>
<info>
<name>root</name>
</info>
<implementation>
<component name="resource-manager"
class="test.services.resources.ResourceManagerImpl"
activation="startup">
</component>
<container name="test">
<component name="resource-manager"
class="test.services.resources.ResourceManagerImpl"
activation="startup">
</component>
</container>
</implementation>
</block>
Fist, what's about this 'root' container ? Is it an implicit name (which has
nothing to do with the actual block name as declared in the block.xml file
?). The fact is that trying to use the URL pattern
[kernelURL]/root/resource-manager it looks like Merlin doesn't know about
the 'root' path as shown in the stack trace below :
java.lang.IllegalArgumentException: Unresolvable path: /root/
at
org.apache.avalon.assembly.appliance.impl.DefaultApplianceRepository.resolve
Appliance(DefaultApplianceRepository.java:408)
at
org.apache.avalon.assembly.appliance.impl.BlockURLConnection.getContent(Bloc
kURLConnection.java:145)
at
org.apache.avalon.assembly.appliance.impl.BlockURLConnection.getContent(Bloc
kURLConnection.java:127)
at java.net.URL.getContent(URL.java:807)
[...]
This works when I remove the 'root' element in the URL
(([kernelURL]/resource-manager).
The following URL don't work either (maybe that is what's expected, but a
litte documentation about the URL pattern would help ;-) ) :
[kernelURL]/root#test.services.resources.ResourceManager
(test.services.resources.ResourceManager being the service interface
exported by my component)
[kernelURL]/root#test.services.resources.ResourceManagerImpl
[kernelURL]/#test.services.resources.ResourceManager
[kernelURL]/#test.services.resources.ResourceManagerImpl
[kernelURL]/test#test.services.resources.ResourceManager
[kernelURL]/test#test.services.resources.ResourceManagerImpl
Actually, the only URLs that work seem to be:
[kernelURL]/resource-manager
[kernelURL]/test/resource-manager
Laurent (who thinks this URL pattern should be clarified !)
************************************************************************
Ce message a ete inspecte par un anti-virus
Nous vous rappelons que la taille des messages ne doit pas depasser 1.5 Mo
************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]