■配置jboss
mysql-connector-java-5.0.8-bin.jar (MySql的驱动,这个到网上找一下,下载一个)
1.把MySql的驱动拷到JBoss的/opt/jboss/server/default/lib目录下.
2.设置环境变量,/etc/profile添加如下:
export CLASSPATH=$CLASSPATH:/opt/jboss/server/default/lib/mysql-connector-java-5.0.8-bin.jar
3.把/opt/jboss/docs/examples/jca/mysql-ds.xml文件拷到/opt/jboss/server/default/deploy目录下,
然后把内容修改成如下内容:
jdbc:mysql://localhost:3306/jbossdb test 123456
4./opt/jboss/server/default/deploy目录下的hsqldb-ds.xml 删掉
5./opt/jbos/server/default/deploy/jms/hsqldb-jdbc2-service.xml 删掉
6.cp /opt/jboss/docs/examples/jms/mysql-jdbc2-service.xml /opt/jbos/server/default/deploy/jms/
■测试
启动JBOSS,确认LOG正常。查看数据库jbossdb中是否生成如下表:
mysql -A jbossdb;
mysql> show tables;
+-------------------+
| Tables_in_jbossdb |
+-------------------+
| JMS_MESSAGES |
| JMS_TRANSACTIONS |
+-------------------+
并且/opt/jboss/server/default/data/hypersonic/下没有生成相应的数据文件。
阅读(1510) | 评论(0) | 转发(0) |