lundi janv. 31, 2011

Packaging libraries with EARs

This blog has moved to alexismp.wordpress.com
Follow the link for the most up-to-date version of this blog entry.

Hong's recent packaging response on the GlassFish Forum reminded me of other similar problems faced by GlassFish users.

When packaging applications in an EAR file, the library JARs need to be placed in the archive lib directory (jars at the archive root level are not added to the classpath and thus available from other EAR artifacts..

The library jars placed in the "/lib" directory of the EAR (the directory name can be overridden in application.xml) will be visible to all sub-modules (JARs, WARs, and RARs) with no further configuration. No need to add Class-Path entries in the EAR manifest.

In the sub-modules, you can use Class-Path entries to explicitly reference library JAR files you may need.

Of course you can also "install" those libraries in the GlassFish "/lib" directory but you may run into other problems since they would be visible and shared from all applications.

GlassFish also offers a asadmin deploy --libraries foo.jar option (something a good number of people end up using when looking for an equivalent to "shared libraries" offered by other containers).

Then of course, if you're like most server-side Java developer you could probably put your application on a diet and remove a few of those JARs to use what's already in the platform.

mercredi juin 10, 2009

GlassFish v3 a la carte screencast - Part 1

This blog has moved to alexismp.wordpress.com
Follow the link for the most up-to-date version of this blog entry.

Given the modular approach taken in GlassFish v3 (170+ OSGi bundles in v3 Preview) and the IPS/pkg(5) tooling provided, I created a first screencast showing the following :
• install the IPS toolkit image (download), a 5MB bootstrap
• define the repository to get to the GlassFish v3 bits (pkg.glassfish.org/v3/dev/ in this case)
• install the minimum set of packages required to create and start a domain (using the pkg command-line and the graphical updatetool)

The full-size (and offline) video is available here (15MB, video/x-m4v).
Further screencasts will show how one can add selected features (containers) to deploy specific applications.

Of course you don't have to be fiddling around with the various GlassFish v3 packages and could also be downloading one of two GlassFish v3 Preview distributions: web profile and full Java EE 6. Even then you'll only pay for what you use.

About

This blog has moved

Alexis Moussine-Pouchkine's Weblog

GlassFish - Stay Connected

Search

Archives
« juillet 2014
lun.mar.mer.jeu.ven.sam.dim.
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
   
       
Today
Blogroll

No bookmarks in folder

News

No bookmarks in folder