• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Sharing resources between EARs

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey there everyone,


I'm trying to share some code (a couple of util classes or so) between EARs w/in WAS 4.0. Is there a good way to do this, outside of packaging two versions into the underlying JARs? This may be a very rudimentary problem, but I await your ideas... Thanks!
[ April 09, 2002: Message edited by: Andrew Sweeney ]
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, this can't be done, don't try it. EARs are meant to be separate, totally self-contained appliation packages. Just add the same ZIP or JAR file inside both EARs and update the manifest files of your WAR and EJB-JAR files appropriately.
Yes, there are classpaths in WebSphere that are shared by all EAR files, but DON'T USE THEM!
Kyle
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kyle,
We have some 10 web applications under an appserver and all are using log4j as the logging tool,I have put log4j jar file in the AppServers class path.Is this not the correct way to do?
Should i put them in all the ear file?
Expecting ur reply,
Senthil
 
Kyle Brown
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
IMHO, yes, Log4J should be included in the EAR file of each. Imagine what would happen if ONE of your 10 apps moved to a different level of Log4J than the other ones -- what you've done is create a dependency between your applications that shouldn't exist.
Don't worry about having multiple copies of the same code -- the space is not enough to worry about.
Kyle
 
Andrew Sweeney
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kyle,
I think my apprehension stems not from the storage issue, but more of a maintenance one. Imagine you have sixty EARs deployed, when the decision comes down that all apps now need a larger audit trail. This will involve going into every EAR and making the change within the code. Is there a way to maintain resource integrity, while still ensuring efficient maintainability?
-Andrew
 
Kyle Brown
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, we would advocate having a build process for your EARs that comes straight out of your source code repository (PVCS, ClearCase, CVS, etc.) so that when after an EAR is built it doesn't have to be monkeyed with. When you update your app, you request a build and voila, you get an up-to-date, complete EAR that you then redeploy.
Kyle
 
what if we put solar panels on top of the semi truck trailer? That could power this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic