简体   繁体   English

使用WEB-INF / lib中的jar文件而不是创建新的Jboss模块的JDBC数据源

[英]JDBC datasource using jar file in WEB-INF/lib instead of creating a new Jboss module

As i understand it, with JBOSS 7, the data source is configured by creating a new module in $JBOSS_HOME/modules . 据我了解,使用JBOSS 7,可以通过在$JBOSS_HOME/modules创建一个新模块来配置数据源。 This process includes adding the jar file for the jdbc driver to be used by the datasourced to be configured. 此过程包括为要配置的数据源添加jdbc驱动程序的jar文件。

Is there any way i can configure a datasource without having to create a new module? 有什么方法可以配置数据源而无需创建新模块?

My web application has the MySQL Connector JDBC driver in the war file (in WEB-INF/lib - Included as part of the maven build). 我的Web应用程序在war文件(位于WEB-INF/lib -作为maven构建的一部分包含)中具有MySQL Connector JDBC驱动程序。 Wouldnt creating a new module result is a class conflict as this requires copying the jar file in the modules/../main/ folder ? 是否要创建新模块结果是类冲突,因为这需要将jar文件复制到modules/../main/ folder

I think, with MySQL at least, you have to create it as a module. 我认为,至少要使用MySQL,您必须将其创建为模块。 With compliant JDBC 4 you can deploy it as a JAR. 使用兼容的JDBC 4,您可以将其部署为JAR。

I don't know the details, but in JBoss AS 7.1.0 you will be able to use the -ds.xml files to describe your connection. 我不知道详细信息,但是在JBoss AS 7.1.0中,您将能够使用-ds.xml文件来描述您的连接。 There is some documentation on it here 有一些关于它的文件在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM