quality@glassfish.java.net

Re: java ee dependency management (Re: admin_gui not starting anymore when xercesImpl.jar present in domain1/lib/?)

From: Kristian Rink <rink_at_planconnect.de>
Date: Thu, 24 Sep 2009 10:53:59 +0200

Hi Richard, *;

Richard Kolb schrieb:
> Yes, I suspect hibernate gets confused across class loaders.
> We spent a week of company trying to fix this to no avail.

I know what you mean. :) This, along with the size issues, is one of the
reasons however why we tried to focus on technologies that comes
pre-provided by Glassfish v2/v3 (JPA, EclipseLink, ...) in order to also
keep the set of additional dependencies required reduced to a minimum. The
set of dependencies still is big enough in our case. ;)


> These large WAR etc. files are a real problem in GlassFish. And I say
> GlassFish because Tomcat has two lib folders. shared/lib and common/lib
> that prevent problems like you are experiencing. (sorry I am repeating
> myself, just making it clear to the other people reading)

I think / thought it would be the same in Glassfish v3: I see the
"glassfish/lib/" which I consider a place to store jars available to the
server (i.e. in gfv2 I dumped some tomcat libs in there to make gfv2 capable
of being used along with mod_jk which is really pretty neat and fortunately
comes out-of-the-box with gfv3... :) ), "domains/<domain>/lib/" the place to
dump libraries available to the domain = the applications running in there?
IIRC "asadmin deploy" invoked with --library does put things to
"<domain>/lib/applibs/" instead of just "<domain>/lib/".

Maybe this is a good question to the doc team: Is there a piece of
documentation on gfv3 available outlining...

- ... which files to put to <domain>/lib/ and its subfolders
(applibs,classes,databases,ext), and

- ... where to put jar files to be considered to contain "shared code" used
by many (all) ejb or war modules in a domain?

If not, this would make a good FAQ entry IMHO. ;)


> And this begs the question, if I want to deduce the size of my WAR file,
> where do I copy the dependencies to in GlassFish 3 ? The domainX/lib ?
> After I know this I would like to do some testing and maybe Kristian can
> too.

Indeed this would help, eventually along with notes like "Jars to keep out
of <domain>/lib/*". I mean, after all, not putting servlet.jar (or other
libraries provided by the container itself already) seems a reasonable and
obvious thing. For other libraries, it's not that obvious. ;)

Cheers,
Kristian


-- 
Dipl.-Ing.(BA) Kristian Rink * Software- und Systemingenieur
planConnect GmbH * Könneritzstr. 33 * 01067 Dresden
fon: 0351 215 203 71 * cell: 0176 2447 2771 * mail: rink_at_planconnect.de
Amtsgericht Dresden HRB: 20 015 * St.-Nr. FA DD I 201 / 116 / 05360
Geschäftsführer: Stefan Voß, Karl Stierstorfer