geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan <>
Subject Re: shared lib classloader XStream Jettison issue
Date Wed, 13 Jul 2011 03:41:41 GMT
OK, I have some ideas in my mind, but they are somewhat depending on your
a. Create a geronimo service module as a customized shared lib component, it
is just a jar file with a META-INF folder, which contains a
geronimo-service.xml file, the content should be something like :
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="">
    <gbean name="SharedLib"
        <attribute name="classesDirs">var/shared/myclasses</attribute>
        <attribute name="libDirs">var/shared/mylib</attribute>
        <reference name="ServerInfo">
Then, places those jar files in the new folders, also change the dependency
configuration in your applications. With this solution, I think JasonUtils
should be able to initialize correctly. While the drawbacks are, your web
application could not use the xstream classes from the shared lib either, as
the filter string is configured. Removing the filter string will not make
sure the xstream class is loaded from shared lib, as they are more than one
parent classloader for your application.
b. You might also just configure a shared lib gbean in each your web
application, with that, all the jar files will be added to your web
applications classloaders, and with filter string, those xstream classes
could only be loaded from web applications themselves, while the problems is
that each web application will keep copies of those jar files in their own
classes realm, which means they are not shareable.
Hope it helps :-)

2011/7/13 ashwin nair <>

> Yes, that's what I was theorizing in my original post. The question is how
> do
> I configure sharedlib to not load from its parent for those classes which
> is
> already under its scope. Is there a GBEAN configuration I can apply to it?
> If so I would be extremely thankful as I have spent enough time with this
> already. :)
> --
> View this message in context:
> Sent from the Users mailing list archive at


View raw message