测试项目环境配置

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>

 

你可能感兴趣的:(环境配置)