Hi,
there are several ways of using shared libraries with GlassFish. You
already mentioned the obvious one of putting it in the domain/lib dir
where it's put into the common classpath of all apps.
The official way of dealing with shared libraries in GlassFish might be
using deployment libraries.When you deploy an app with glassfish using
asadmin (also possible with admin gui) you can do the following:
"asadmin deploy --target <server> --libraries <mySharedLib.jar>
<myDeploymentPackage.war/.ear/.jar>.
In this case <mySharedLib.jar> is a shared lib thats needed by your
app. You can specify multiple jars here, seperated by comma. The path
to the jars can be a relative one or an absolute on. Relative paths are
relative to the <domain-name>/lib/applibs directory. Unlike the approach
you mentioned those libs are only visible for the app where you
specified them for deployment.
Here is the official doc:
http://docs.sun.com/app/docs/doc/819-3675/deploy-1?a=view
http://docs.sun.com/app/docs/doc/819-3672/6n5sj2shu?a=view
Hope that helps.
Daniel
glassfish_at_javadesktop.org schrieb:
> Thought I'd try again and see if anyone using glassfish uses shared libraries? I can't imagine this is too uncommon of a use case?
>
> Is the official answer just to put it in glassfish/domains/<domain-name>/lib ??
> [Message sent by forum member 'areplogle' (areplogle)]
>
> http://forums.java.net/jive/thread.jspa?messageID=290938
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
--
========================================================================
Daniel Adelhardt Tel: +49 89 460082443
Software Architect Mobile: +49 172 8417283
Sun Microsystems GmbH Email: daniel.adelhardt_at_sun.com
Sonnenallee 1
D-85551 Kirchheim-Heimstetten
Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, D-85551
Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer