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

后端 未结 3 1536
挽巷
挽巷 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: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.

提交回复
热议问题