The plan you show below should work if you include a dependency on the resulting plugin in your actual app.

The difference between this and the technique Chi Runhua suggested is that with your separate plan your <geronimo-home>/var/app/lib jars will always be loaded in the applib classloader, which will be a parent of each app classloader, whereas with Chi Runhua's suggestion, each app will get their own copy of the classes.

This might sound stupid, but how do you know this isn't working?

I also really suggest you rethink the relative convenience of using the geronimo repository and a custom shared lib folder. If you are dead set against using maven, then this might make sense, otherwise I recommend you try setting up a maven build of a custom server assembly that includes your apps.

thanks
david jencks

On Aug 11, 2009, at 4:13 AM, vaughn_m wrote:


Hello -

I am trying to create 4 different shared lib folders in different
directories.  I have read and tried to use the
org.apache.geronimo.system.sharedlib.SharedLib gbean (the plan is below) in the various web apps that might use the specific directory. But this has
been unsuccessful.  If I place my jars in the sharedlib folder
(var/shared/lib) it works perfectly. But if I place the jars in the
specified lib folder and remove the jars form the shared folder the
application will not deploy. I need to separate these libs in different folders so I can have an upgrade path for different components down the road. While I could use the repository as a last resort, it would be more convenient for me to reuse the SaredLib gbean to accomplish this task by referencing a specific external folder. Any insight anyone would have would
be helpful.  See the plan below for a reference.

Vaughn

<module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2";>
 <!--Company Web App-->
 <environment>
   <moduleId>
     <groupId>com.company.app</groupId>
     <artifactId>applib</artifactId>
     <version>2.2.07</version>
     <type>car</type>
   </moduleId>
   <dependencies>
     <dependency>
       <groupId>org.apache.geronimo.framework</groupId>
       <artifactId>rmi-naming</artifactId>
       <version>2.1.4</version>
       <type>car</type>
     </dependency>
   </dependencies>
   <hidden-classes/>
   <non-overridable-classes/>
 </environment>
 <gbean name="AppSharedLib"
class="org.apache.geronimo.system.sharedlib.SharedLib">
   <attribute name="classesDirs">var/app/classes</attribute>
   <attribute name="libDirs">var/app/lib</attribute>
   <reference name="ServerInfo">
     <name>ServerInfo</name>
   </reference>
 </gbean>
</module>
--
View this message in context: 
http://www.nabble.com/Multiple-SharedLibs-tp24915605s134p24915605.html
Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.


Reply via email to