在JBoss 7中配置JDBC驱动程序作为部署OR作为模块? [英] Configure JDBC driver in JBoss 7 - as a deployment OR as a module?

查看:201
本文介绍了在JBoss 7中配置JDBC驱动程序作为部署OR作为模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如文章 https://community.jboss.org/wiki/DataSourceConfigurationInAS7 中所述JBoss 7提供了两种配置数据源的主要方式。

As mentioned in the article https://community.jboss.org/wiki/DataSourceConfigurationInAS7 JBoss 7 provides 2 main ways to configure a data source.

在JBoss 7 AS中配置数据源的最佳实践是什么?

What is the BEST practice of configuring a data source in JBoss 7 AS ? Is it


  1. 作为模块?

  2. 作为部署?

(线程中已经提到了相同的问题 https://community.jboss.org/thread/198023 ,但没有人提供可接受的答案。)

(The same question has been asked in the thread https://community.jboss.org/thread/198023, but no one has provided an acceptable answer yet.)

推荐答案

指南 JBoss AS7 DS配置指南说,推荐的方法是配置数据源部署

The guide JBoss AS7 DS configuration says the recommended way is to configure the datasource by deployment

但是根据 Jboss 7指南第54页的DS配置JBoss社区讨论提到部署JDBC驱动程序的推荐方法是使用模块化方法

But according to discussion on the link Jboss 7 DS configuration JBoss Community Discussion on page 54 of the guide it mentions that the recommended way to deploy JDBC driver is to use modular approach

但是我个人认为配置JDBC驱动程序的更好(不是最好的)方法是使用模块,因为o f 3原因

But I personally say that the better(not the best) approach to configure JDBC driver would be to use modules because of 3 reasons


  1. JDBC驱动程序通常不会更改。

  2. 可重用性:可以使用相同的模块跨各种应用程序,而不是与每个应用程序一起部署jar,这样可以防止重复。

  3. 空间有效:使用模块方法可以让您减少EAR / WAR的大小

因此,我会认为这两种方法中的更好的方式是通过模块

Hence I would argue that the better of the two approaches is via modules

这篇关于在JBoss 7中配置JDBC驱动程序作为部署OR作为模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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