码迷,mamicode.com
首页 > 其他好文 > 详细

测试项目环境配置

时间:2014-06-29 00:01:36      阅读:326      评论:0      收藏:0      [点我收藏+]

标签:java   数据   os   cti      name   

1.建立jiwuyf数据库,加入esfpicture1-100个分表,加入esfidfactory主键生成器表

2.jboss下的mysql-ds.xml中加入数据源配置

<local-tx-datasource>
<jndi-name>jiwuyf_slaves_db</jndi-name>
<connection-url>jdbc:mysql://192.168.1.253:3306/jiwuyf?useUnicode=true&amp;characterEncoding=UTF-8&amp;SelectMethod=Cursor;</connection-url>
<driver-class>org.gjt.mm.mysql.Driver</driver-class>
<user-name>jiwudev</user-name>
<password>jiwudev</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>

<local-tx-datasource>
<jndi-name>jiwuyf_master_db</jndi-name>
<connection-url>jdbc:mysql://192.168.1.253:3306/jiwuyf?useUnicode=true&amp;characterEncoding=UTF-8&amp;SelectMethod=Cursor;</connection-url>
<driver-class>org.gjt.mm.mysql.Driver</driver-class>
<user-name>jiwudev</user-name>
<password>jiwudev</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>

3.测试ejb的persistence.xml中加入

<persistence-unit name="jiwuyf_master" transaction-type="JTA">
<jta-data-source>java:/jiwuyf_master_db</jta-data-source>
<properties>
<property name="hibernate.dialect" value="com.jiwu.core.utils.BlobMySQLDialect"/>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.show_sql" value="false" />
</properties>
</persistence-unit>

<persistence-unit name="jiwuyf_slaves" transaction-type="JTA">
<jta-data-source>java:/jiwuyf_slaves_db</jta-data-source>
<properties>
<property name="hibernate.dialect" value="com.jiwu.core.utils.BlobMySQLDialect"/>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.show_sql" value="false" />
</properties>
</persistence-unit>

 

测试项目环境配置,布布扣,bubuko.com

测试项目环境配置

标签:java   数据   os   cti      name   

原文地址:http://www.cnblogs.com/jiwuyf/p/3794096.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!