Home > Database > Mysql Tutorial > body text

如何在Jboss中配置数据源

WBOY
Release: 2016-06-07 17:06:09
Original
1107 people have browsed it

数据源配置:在jboss/doc/examples/jca,如果你的是mysql数据库,则选mysql-ds.xml

数据源配置:在jboss/doc/examples/jca,如果你的是mysql数据库,则选mysql-ds.xml

 

    DefaultMySqlDS

    jdbc:mysql://localhost:3306/itcast?useUnicode=true&characterEncoding=UTF-8

   org.gjt.mm.mysql.Driver

   root

   123456

   3

   100

 

  org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter

   

      mySQL

   

 


数据源的起名必须遵守规定,如mysql-ds.xml,即所有数据源的后缀名都必须是ds.xml结尾的.

把数据库驱动包拷贝到配置项的lib目录下.如default/lib
然后把数据源的配置文件放到deploy目录下面.重启jobss即可.
然后可以进到jboss的管理页面进行管理.注意在这里进行更改的话,是只有这一次运行期间才是有效的,如果关闭了则失效了,如果要永久性的生效的话,那么只能在ds.xml配置文件中进行更改。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!