As i understand it, with JBOSS 7, the data source is configured by creating a new module in $JBOSS_HOME/modules
. This process includes adding the jar file for the jdbc driver to be used by the datasourced to be configured.
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). Wouldnt creating a new module result is a class conflict as this requires copying the jar file in the modules/../main/ folder
?
I think, with MySQL at least, you have to create it as a module. With compliant JDBC 4 you can deploy it as a 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. There is some documentation on it here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.