我们专注攀枝花网站设计 攀枝花网站制作 攀枝花网站建设
成都网站建设公司服务热线:400-028-6601

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

JBoss中怎么配置MySQL数据源

JBoss中怎么配置MySQL数据源,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。

成都创新互联主营旌德网站建设的网络公司,主营网站建设方案,APP应用开发,旌德h5成都小程序开发搭建,旌德网站营销推广欢迎旌德等地区企业咨询

JBOSS_HOME

 +- modules

     +- com

         +-

             +- main    

                 +- module.xml     

                 +- mysql-connector-java-5.1.15.jar   (mysql的jdbc驱动jar文件,版本根据各自情况而定)

                 +- mysql-connector-java-5.1.15.jar.index

module.xml的?内?容?如?下?:

例1. module.xml

 

   

 

 

   

 

mysql-connector-java-5.1.15.jar.index的?内?容?如?下?:

例2. mysql-connector-java-5.1.15.jar.index

META-INF

META-INF/services

com

com/mysql

com/mysql/jdbc

com/mysql/jdbc/configs

com/mysql/jdbc/exceptions

com/mysql/jdbc/exceptions/jdbc4

com/mysql/jdbc/interceptors

com/mysql/jdbc/jdbc2

com/mysql/jdbc/jdbc2/optional

com/mysql/jdbc/jmx

com/mysql/jdbc/log

com/mysql/jdbc/profiler

com/mysql/jdbc/util

org

org/gjt

org/gjt/mm

org/gjt/mm/mysql

添?加?Server数?据?源?配?置?

AS7启?动?分?为?两?种?形?式?,一?种?是?domain形?式?的?,一?种?是?standalone,这?里?我?们?选?择?standalone。?

打?开?JBOSS_HOME\standalone\configuration\standalone.xml文?件?,在?下?添?加?如?下?内?容?:

例3. mysql-connector-java-5.1.15.jar.index

                   

                        jdbc:mysql://192.168.1.150:3306/hospital?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=utf-8

                   

                   

                        com.mysql

                   

                   

                        TRANSACTION_READ_COMMITTED

                   

                   

                       

                            10

                       

                       

                            100

                       

                       

                            true

                       

                       

                            false

                       

                       

                            FailingConnectionOnly

                       

                   

                   

                        

                            runes

                       

                       

                            runes

                       

                   

                   

                        

                            32

                       

                   

               

例4. mysql-connector-java-5.1.15.jar.index

                       

                            com.mysql.jdbc.jdbc2.optional.MysqlXADataSource

                       

                    

看完上述内容,你们掌握JBoss中怎么配置MySQL数据源的方法了吗?如果还想学到更多技能或想了解更多相关内容,欢迎关注创新互联行业资讯频道,感谢各位的阅读!


分享标题:JBoss中怎么配置MySQL数据源
当前网址:http://mswzjz.cn/article/ggddhh.html

其他资讯