cd $JBOSS_HOME
cp -r server/default server/defaultMySQL
cp docs/examples/jca/mysql-ds.xml server/defaultMySQL/deploy/
vi server/defaultMySQL/deploy/mysql-ds.xml
<jndi-name>DefaultDS</jndi-name>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<connection-url>jdbc:mysql://localhost:3306/jbossdb</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>jbossdb</user-name>
<password>jbossdb</password>
rm server/defaultMySQL/deploy/hsqldb-ds.xml
cp docs/examples/jms/mysql-persistence-service.xml server/defaultMySQL/deploy/messaging/
vi server/defaultMySQL/deploy/messaging/mysql-persistence-service.xml
<!-- disable
<depends optional-attribute-name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</depends>
-->
rm server/defaultMySQL/deploy/messaging/hsqldb-persistence-service.xml
Download JDBC Driver for MySQL (Connector/J)
http://www.mysql.com/products/connector/
untar/unzip it and extract the jar file
cp mysql-connector-java-5.1.7-bin.jar $JBOSS_HOME/server/defaultMySQL/lib/mysql-connector-java-5.1.7-bin.jar
$JBOSS_HOME/bin/run.sh -c defaultMySQL
2009年5月4日
MySQL as DefaultDS in JBoss
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言