我如何在glassfish中使用共享库来避免部署巨大的库? [英] how can i use a shared lib in glassfish to avoid deployment of the huge libs?

查看:144
本文介绍了我如何在glassfish中使用共享库来避免部署巨大的库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须为我的应用程序上传大约30M,因为它使用了很多图书馆,日志,网页引擎等。

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

我认为应该有一种方式在玻璃鱼上分享这些库,但我没有弄清楚。我试图将它们放在域/ lib / ext中,但不起作用。

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.

推荐答案

为什么domaindir / lib / ext不起作用?

Why domaindir/lib/ext does not work?

from glassfish手册:

from glassfish manual:


可选包是Java类和相关联的本机代码的包,应用程序
开发人员可以使用扩展核心平台的功能。
要使用Java可选包机制,将JAR文件复制到domain-dir / lib / ext
目录中,然后重新启动服务器。

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.

为什么domaindir / lib工作?

Why domaindir/lib work?


要使用Common类加载器,将JAR文件复制到domain-dir / lib或as-install / lib
目录,或将.class文件(和其他需要的文件,如.properties文件)复制到
domain-dir / lib / classes目录中,然后重新启动服务器。
使用Common类加载器可以使所有应用程序
或部署在共享相同配置的服务器上的模块访问应用程序或模块。但是,此辅助功能
不会扩展到应用程序客户端。 p>

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.

这篇关于我如何在glassfish中使用共享库来避免部署巨大的库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆