geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vaughn_m <>
Subject Re: Multiple SharedLibs
Date Tue, 11 Aug 2009 16:21:58 GMT

When I tried the previous way I get class not found exceptions that relate to
the classes in the targeted directory.  I realize the repository is the best
way to go however, I am deploying web apps that have several jars (20 or so)
that need to be shared by several web apps.  I have not had a chance but if
there is a tool that can assist in creating the repository for each jar set,
that would be tremendously helpful.  I will give it a whirl again and let
you know my final outcome.

Thank you for you help,


djencks wrote:
> 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="">
>>  <!--Company Web App-->
>>  <environment>
>>    <moduleId>
>>      <groupId></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:
>> Sent from the Apache Geronimo - Dev mailing list archive at  

View this message in context:
Sent from the Apache Geronimo - Dev mailing list archive at

View raw message