Java开发网 |
注册 |
登录 |
帮助 |
搜索 |
排行榜 |
发帖统计
|
您没有登录 |
» Java开发网 » Database/JDBC/SQL/JDO/Hibernate
打印话题 寄给朋友 订阅主题 |
作者 | JBoss and mysql new intergation.. |
terrence3321
Jute User 发贴: 40 积分: 50 |
于 2003-05-09 15:27
Check this out Better performance..... First copy the jar file from mysql.com site" Please click here to download the jar file and unzip it in any temp folder" http://www.mysql.com/downloads/download.php?file=Downloads%2FConnector-J%2Fmysql-connector-java-3.1.0-alpha.zip&mirror=http%3A%2F%2Fmysql.mirrored.ca%2F from the just unziped folder copy the "mysql-connector-java-3.1.0-alpha-bin.jar" to this folder in jboss C:\jboss-3.2.1_tomcat-4.1.24\server\default\lib and now proceed to next step This how you would integrate MySQl with JBOSS version "Jboss-3.2.1_tomcat-4.1.24" Copy file mysql-ds.xml from folder "C:\jboss-3.2.1_tomcat-4.1.24\docs\examples\jca" to folder "C:\jboss-3.2.1_tomcat-4.1.24\server\default\deploy" and modify it to. Configuring "mysql-ds.xml" file is 100 times easier than configuring "mysql-service.xml" Sample of the file -- Note:- "this is the actual size of the file" <datasources> <local-tx-datasource> <jndi-name>MySQLDS</jndi-name> <connection-url>jdbc:mysql://localhost:3306/test</connection-url> <driver-class>org.gjt.mm.mysql.Driver</driver-class> <user-name>Yourusername</user-name> <password>yourpassword</password> </local-tx-datasource> </datasources> here "test"is the database name user-name and password would be for verifying with the database The driver main class has changed from "org.gjt.mm.mysql.Driver" to "com.mysql.jdbc.Driver" for new version "mysql-connector-java-3.1.0-alpha-bin.jar" mysql JDBC. But for configuring with JBoss you don`t have to do this and leave it as I have explained above in the example code of --> "mysql-ds.xml" |
话题树型展开 |
人气 | 标题 | 作者 | 字数 | 发贴时间 |
4724 | JBoss and mysql new intergation.. | terrence3321 | 1651 | 2003-05-09 15:27 |
已读帖子 新的帖子 被删除的帖子 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |