Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Weblogic, Loading order of jars in APP-INF/lib/

227 views
Skip to first unread message

amila...@yahoo.com

unread,
Sep 29, 2006, 9:10:12 PM9/29/06
to
Hi,
I would like to know the order in which the jar files are loaded from
<deployment>/APP-INF/lib, in weblogic 8.1. This really matters when we
have the same class in two or more jar files, in APP-INF/lib. For an
example, if I have test.class inside a.jar and b.jar (jar files are
inside APP-INF/lib), when classloader loads the test.class, which will
be loaded, from a.jar or from b.jar?
Thanks in advance,
Amila

sti...@gmail.com

unread,
Oct 16, 2006, 4:04:40 PM10/16/06
to

amila...@yahoo.com skrev:

Dear sir,

According to specifications, I don't think you can be guaranteed any
load-order of .jar files in this way.

Anyway, if classes are really the same, the jar load order shouldn't
matter... And I wouldn't recommend under any circumstances to use
different classes - with same package and classnames... Most likely,
you'll end up with with a marshalling error down the road (when
different classloaders on fx. client/server loads from a.jar and b.jar
- and try to process objects passed from each other).

As you're probably aware of - just remember to make sure that classes
using each other through static initializers are all contained in the
same .jar . That's easier than trying to make sure that .jar's are
loaded in any particular order.

Hope to have been of service! Best of luck.

/www.seniorconsultant.co.uk

0 new messages