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

后端 未结 3 1508
挽巷
挽巷 2021-01-13 00:51

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, bu

相关标签:
3条回答
  • 2021-01-13 01:05

    One option would be to put them in domains/domain1/lib. But actually, I suggest to read GlassFish equivalent to WebSphere's "shared libraries", including the comments.

    0 讨论(0)
  • 2021-01-13 01:19

    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.

    0 讨论(0)
  • 2021-01-13 01:19

    If I remember well, you can also specify additional libraries in the classpath via the admin console (in Application Server > JVM settings or something like this). Then you can put them wherever you want.

    (I had a quick look at Pascal's link, but I don't know if that's what they describe, if yes, my apologies for the duplicate answer.)

    0 讨论(0)
提交回复
热议问题