• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Common .jars to all EJBs

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How i could deploy/use .JARs files in common for several applications?
I only can access libraries that the .jar file is included in the .EAR, but this is impossible due the fact that there are several deployed applications.

Leonardo Mira
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to include a copy of the jar with each EAR.
 
Leonardo Mira
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is not a option.
We have more than 10mb in libraries, and have each app with all jars is not good.
This is not even a "not recommended" option?
 
author & internet detective
Posts: 42148
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Leonardo,
We have about that size in libraries too. Keep in mind that you are deploying to a big server that has a lot of room. (If it doesn't have enough memory, you will have major performance problems.)

A big advantage of this system is that your ears don't all have to use the same version of the jar files. So if one application is ready to update, all the others don't need to be too.
 
Chris Mathews
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
10MB is not an option? Disk space is ridiculously cheap, 10MB is a drop in the bucket. Google is giving away Gmail accounts with 1GB of space... to hundreds of users! Like Jeanne, nearly all of the projects that I work on have third-party dependencies of this size or greater... it is not a big deal.

If you really want to avoid packaging the external dependencies with each EAR then you could always add them to your Application Server's System CLASSPATH. However, I would consider this approach a very poor decision on your part with major limitations. The most severe being the limitation that all of your applications would need to use the same version of the various third-party libraries at all times. This limitation is so severe that I am forced to consider this approach "broken".
[ May 27, 2004: Message edited by: Chris Mathews ]
 
Ranch Hand
Posts: 925
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
IBM recommend that you put shared libraries that have JNI calls into the appserver lib directory.

(The application will pass delegate native library loads to the server)

I would certainly put common shared libraries in there (Xalan, Xerces et al) also.

I guess it depends who you are sharing your appserver with.
 
Jeanne Boyarsky
author & internet detective
Posts: 42148
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also want to mention that it depends on the type of jar. If it's a jar that the server itself uses (like xerces), then by all means you should point to the server's version. But if it's something that you are using (like struts), it should be in the EAR/WAR.
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Leonardo,
OC4J applications are hierarchical. OC4J contains a "global" application that is the parent of all applications. The "application.xml" file -- in the "j2ee/home/config" subdirectory of the OC4J installation -- is the configuration file for the global application. This file contains a "library" element. The "library" element indicates a directory that can contain JAR files used by deployed applications. Hence you can put all your JAR files in this directory.

Of-course, this is all explained (in rather more detail) in the OC4J documentation, which is available from Oracle's OTN Web site.

Good Luck,
Avi.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic