开发者

Including the MySql's connector/j as part of an EAR file: 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.


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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜