Re: [loom] External classpaths

"Peter Donald" <peter-4lf8KW9E9MLMqX/[email protected]> Sun, 25 Apr 2004 11:29:33 +1000
Newsgroups gmane.comp.java.jcontainer.interest
Message-ID <002b01c42a64$c3cee970$23991cd3@cookiemonster>
Hi,

> Is it possible to define external classpaths for a Loom application?
>
> One use case is a JDBC driver when the database is unknown upon
> assembly. Loom's lib directory could work in some cases, but then all
> applications would be forced to use the same version. That isn't always
> possible as some drivers aren't backwards compatible.

You may be able to do what you want by defining your own classpath
mechanism. The website has not been updated yet but if you look at
loom/site/xdocs/reference/classman.xml it should give you a basic overview
of the way to define the classpath.When defining the classpath you could
then define a classpath entry using property expansions such as

<classloader name="Y" parent="X">
    <entry location="${myApp.jdbcDriver.location}"/>
</classloader>

Then when you start up Loom you sure you set the system property to correct
value using something like

export LOOM_OPTS=-DmyApp.jdbcDriver.location=/usr/local/java/myDriver.jar
loom.sh start

I think that should work. Give us a yell if something does not work as
expected.


Cheers,


Peter Donald