This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -q "http://search.maven.org/remotecontent?filepath=mysql/mysql-\ | |
connector-java/5.1.32/mysql-connector-java-5.1.32.jar" -O mysql-connector-java.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$JBOSS_HOME/bin/jboss-cli.sh -c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[standalone@localhost:9990 /] module add --name=com.mysql\ | |
--resources=mysql-connector-java.jar\ | |
--dependencies=javax.api,javax.transaction.api | |
[standalone@localhost:9990 /] /subsystem=datasources/jdbc-driver=mysql:\ | |
add(driver-name=mysql,driver-module-name=com.mysql,\ | |
driver-xa-datasource-class-name=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource) | |
{"outcome" => "success"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[standalone@localhost:9990 /] data-source add --name=MySqlDS\ | |
--driver-name=mysql --jndi-name=java:jboss/datasources/MySqlDS\ | |
--connection-url=jdbc:mysql://localhost:3306/mydb --user-name=myuser\ | |
--password=password --enabled=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[standalone@localhost:9990 /] xa-data-source add --name=XAMySqlDS\ | |
--driver-name=mysql --jndi-name=java:jboss/datasources/XAMySqlDS\ | |
--user-name=myuser --password=password --xa-datasource-properties={\ | |
"ServerName" => "localhost", "PortNumber" => "3306",\ | |
"DatabaseName" => "mydb"}\ | |
--xa-datasource-class=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource\ | |
--valid-connection-checker-class-name=org.jboss.resource.adapter.jdbc.\ | |
vendor.MySQLValidConnectionChecker\ | |
--exception-sorter-class-name=org.jboss.resource.adapter.jdbc.vendor.\ | |
MySQLExceptionSorter --enabled=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[standalone@localhost:9990 /] data-source add --help | |
DESCRIPTION: | |
Add a new data-source | |
REQUIRED ARGUMENTS: | |
--name - Required argument in commands which identifies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[standalone@localhost:9990 /] /subsystem=datasources:read-resource | |
{ | |
"outcome" => "success", | |
"result" => { | |
"data-source" => { | |
"ExampleDS" => undefined, | |
"MySqlDS" => undefined | |
}, | |
"jdbc-driver" => { | |
"h2" => undefined, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[standalone@localhost:9990 /] data-source test-connection-in-pool --name=MySqlDS | |
true | |
[standalone@localhost:9990 /] xa-data-source test-connection-in-pool --name=XAMySqlDS | |
true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[standalone@localhost:9990 /] data-source read-resource --name=MySqlDS\ | |
--include-runtime=true --recursive=true | |
allocation-retry=n/a | |
allocation-retry-wait-millis=n/a | |
allow-multiple-users=false | |
background-validation=n/a | |
background-validation-millis=n/a | |
blocking-timeout-wait-millis=n/a | |
capacity-decrementer-class=n/a | |
capacity-decrementer-properties=n/a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<profile> | |
... | |
<subsystem xmlns="urn:jboss:domain:undertow:3.0"> | |
... | |
<server name="default-server"> | |
... | |
<host name="default-host" alias="localhost"> | |
... | |
<filter-ref name="request-dumper"/> |