开发者

Including the MySql's connector/j as part of an EAR file: Glassfish

开发者 https://www.devze.com 2023-03-22 22:26 出处:网络
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)

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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号