Roberto Juarez wrote:
Hi everyone,
I am using the Merlin container and would like to know how can I run an application that has several jar files in Merlin. I have tried the examples that come with the distribution of Merlin, in particular those that deal with services. I am able to run the random generator example by defining all components inside the same block and packaging all resources in one jar file.
I want to separate the service provider resources in one jar file
(random generator interface, component that implements the interface,
type descriptors, etc...), say random.jar, and the service consumer
resources (hello component, etc...) in another jar file, say
hello.jar. Can this be done?
Absolutely.
How?
See attached avalon-http-test.block. This is an example of a container that is using multiple jar files. Each jar file is declared as an artifact in the classloader <classpath>. Each artifact reference is resolved to a jar file in the working repository.
Cheers, Steve.
--
|---------------------------------------| | Magic by Merlin | | Production by Avalon | | | | http://avalon.apache.org | |---------------------------------------|
<?xml version="1.0" encoding="ISO-8859-1"?>
<container name="test"> <classloader> <classpath> <artifact>jar:avalon/http/avalon-http-impl#1.0.0-DEV</artifact> <artifact>jar:avalon/http/avalon-http-spi#1.0.0-DEV</artifact> <artifact>jar:avalon/http/avalon-http-api#1.0.0-DEV</artifact> <artifact>jar:servletapi/servletapi#2.3</artifact> <artifact>jar:avalon/http/avalon-http-util#1.0.0-DEV</artifact> <artifact>jar:avalon/util/avalon-util-configuration#1.0.0</artifact> <artifact>jar:avalon/framework/avalon-framework-api#4.3.0-DEV</artifact> <artifact>jar:avalon/framework/avalon-framework-impl#4.3.0-DEV</artifact> <artifact>jar:avalon/framework/avalon-framework-legacy#4.3.0-DEV</artifact> <artifact>jar:avalon/logkit/avalon-logkit#2.0.0</artifact> <artifact>jar:jetty/org.mortbay.jetty#4.2.15</artifact> <artifact>jar:avalon/http/avalon-http-test</artifact> </classpath> </classloader> <component name="primary" profile="primary" class="test.http.TestComponent"/> <component name="secondary" profile="secondary" class="test.http.TestComponent"/> <component name="listener" class="org.apache.avalon.http.impl.DefaultModelListener"/> </container>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]