Hej, mam nadzieję, że nie wygonicie mnie stąd za temat związany z jboss-em :) Wiem również że jest mnóstwo tutoriali jak skonfigurować jboss z mysql z tym że robię wszystko dokładnie jak tam i nie działa :(. Więc może ktoś z was zauważy jakiś problem :) Paczkę mysql.jar wraz z module.xml wrzuciłem do jboss-eap-6.2\modules\com\mysql\main.
module.xml
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="com.mysql.jdbc">
<properties>
<property name="jboss.api" value="unsupported"/>
</properties>
<resources>
<resource-root path="mysql-connector-java-5.1.33-bin.jar"/>
<!-- Insert resources here -->
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
<module name="javax.servlet.api" optional="true"/>
</dependencies>
</module>
standalone.xml
<subsystem xmlns="urn:jboss:domain:datasources:1.1">
<datasources>
<datasource jta="true" jndi-name="java:/labdb" pool-name="my_pool" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:mysql://localhost:3306/labdb</connection-url>
<driver>mysql</driver>
<pool>
<min-pool-size>10</min-pool-size>
<max-pool-size>300</max-pool-size>
<prefill>true</prefill>
</pool>
<security>
<user-name>root</user-name>
<password></password>
</security>
<validation>
<check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
<validate-on-match>false</validate-on-match>
<background-validation>true</background-validation>
<background-validation-millis>60000</background-validation-millis>
<use-fast-fail>true</use-fast-fail>
</validation>
<timeout>
<idle-timeout-minutes>0</idle-timeout-minutes>
</timeout>
</datasource>
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
</datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
<driver name="mysql" module="com.mysql">
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>
Po uruchomieniu serwera dostaję error w logach:
18:53:14,656 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 25) JBAS014613: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "mysql")
]) - failure description: "JBAS010441: Failed to load module for driver [com.mysql]"