Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can i use a shared lib in glassfish to avoid deployment of the huge libs?

I have to upload about 30M for my app since it uses a lot of libraries, log, web engine and so on.

I think there should be a way to share these libs on glassfish, but I failed to figure it out. I tried to put them in domain/lib/ext but does not work.

So where should I store these libs and how should I refer to them? thank you.

like image 670
Ben Avatar asked Jul 30 '10 07:07

Ben


1 Answers

Why domaindir/lib/ext does not work?

from glassfish manual:

Optional packages are packages of Java classes and associated native code that application developers can use to extend the functionality of the core platform. To use the Java optional package mechanism, copy the JAR files into the domain-dir/lib/ext directory, then restart the server.

Why domaindir/lib work?

To use the Common class loader, copy the JAR files into the domain-dir/lib or as-install/lib directory or copy the .class files (and other needed files, such as .properties files) into the domain-dir/lib/classes directory, then restart the server. Using the Common class loader makes an application or module accessible to all applications or modules deployed on servers that share the same configuration.However, this accessibility does not extend to application clients.

like image 130
Ben Avatar answered Sep 19 '22 23:09

Ben