将 MySql 的连接器/j 包含在 EAR 文件中:Glassfish

发布于 2024-11-26 15:20:38 字数 197 浏览 9 评论 0原文

我们希望通过将 MySql 连接器/j jar 作为 EAR 的一部分来简化应用程序的部署过程。 (因此我们不需要手动将其复制到 Glassfish 服务器的 /lib 文件夹中)

这可能吗?

更新:我们已经了解到,使用 JBoss 中的 SAR 文件可以实现这一点,但我们认为在 Glassfish 中不可用。

We want to simplify the deployment process of an app by including the MySql connector/j jar as part of the EAR. (so we won't need to manually copy it in the /lib folder of our Glassfish servers)

Is it possible?

UPDATE: We have read this is possible using the SAR files in JBoss, but we don't think it's available in Glassfish.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谁与争疯 2024-12-03 15:20:38

由于 Glassfish 中的类加载器层次结构,我认为这是不可能的。 mysql 驱动程序 jar 需要在应用程序的类加载器之外可用,因为连接池是全局可用的。

http://download.oracle .com/docs/cd/E19226-01/820-7695/6niugesfp/index.html#indexterm-28

据我所知发现,Glassfish 不支持 .sar 文件之类的东西:
http://old.nabble.com/Migration -From-jboss-4.2.1-to-GlassFish-td18629992.html

也许投票支持这个问题,或者创建您自己的类似 .sar 的部署选项:
http://java.net/jira/browse/GLASSFISH-16915

Because of the classloader hierarchy in Glassfish I don't think this is possible. The mysql driver jar needs to be available outside of your application's classloader because the connection pool is globally available.

http://download.oracle.com/docs/cd/E19226-01/820-7695/6niugesfp/index.html#indexterm-28

From what I can find, Glassfish doesn't support anything like .sar files:
http://old.nabble.com/Migrating-From-jboss-4.2.1-to-GlassFish-td18629992.html

Maybe vote for this issue, or create your own for a .sar-like deployment option:
http://java.net/jira/browse/GLASSFISH-16915

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文