JBossas7 configuration mysql data source
The default data source of AS7 is H2.Although H2 is convenient, the general production environment is mostly MySQL, ORACLE, and SQLServer.This article describes how to configure the MySQL data source in AS7.
According to the Jboss community documentation, configuring a new data source is roughly divided into two steps.The description is as follows:
Add JDBC driver file
Add the following directory structure and files to the JBOSS_HOME/modules directory:
JBOSS_HOME +-modules +-com +-mysql +-main +-module.xml +-mysql-connector-java-5.1.15.jar (mysql jdbc driver jar file, the version is based on the respective condition depends) +-mysql-connector-java-5.1.15.jar.index
The content of module.xml is as follows:
The content of mysql-connector-java-5.1.15.jar.index is as follows:
META-INF META-INF/services com com/mysql com/mysql/jdbc com/mysql/jdbc/configs com/mysql/jdbc/exceptions com/mysql/jdbc/exceptions/jdbc4 com/mysql/jdbc/interceptors com/mysql/jdbc/jdbc2 com/mysql/jdbc/jdbc2/optional com/mysql/jdbc/jmx com/mysql/jdbc/log com/mysql/jdbc/profiler com/mysql/jdbc/util org org/gjt org/gjt/mm org/gjt/mm/mysql
Add Server data source configuration
AS7 startup is divided into two forms, one is domain form, the other is standalone, here we choose standalone.Open the JBOSS_HOMEstandaloneconfigurationstandalone.xml file and add the following under
jdbc:mysql://192.168.1.150:3306/hospital? createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=utf-8com.mysqlTRANSACTION_READ_COMMITTED10100truefalseFailingConnectionOnlyrunesrunes32
Then add the following under
com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
OK, this completes the configuration of the MySQL data source.Now start AS7 in the form of standalone, and you will see the content of the MySQL data source in the input, as shown below:
buy atorvastatin 40mg for sale & lt;a href="https://lipiws.top/"& gt;atorvastatin 20mg over the counter& lt;/a& gt; buy atorvastatin 80mg pills
Qiknfm
2024-03-07