数据库 Oracle 9i
#jdbc.properties
jdbc.driverClassName=oracle.jdbc.xa.client.OracleXADataSource
jdbc.url=jdbc:oracle:thin:@hostOne:1521:one
jdbc.username=oracle
jdbc.password=oracle
jdbc.driverClassName1=oracle.jdbc.xa.client.OracleXADataSource
jdbc.url1=jdbc:oracle:thin:@hostTow:two
jdbc.username1=oracle
jdbc.password1=oracle
############################################
#jta.properties
com.atomikos.icatch.service=com.atomikos.icatch.standalone.UserTransactionServiceFactory
com.atomikos.icatch.console_file_name = tm.out
com.atomikos.icatch.log_base_name = tmlog
com.atomikos.icatch.tm_unique_name = com.atomikos.spring.jdbc.tm
com.atomikos.icatch.console_log_level = INFO
###############################################
依赖的库
AtomikosTransactionsEssentials-3.3.1/lib/ojdbc14.jar
AtomikosTransactionsEssentials-3.3.1/dist/atomikos-util.jar
AtomikosTransactionsEssentials-3.3.1/dist/transactions.jar
AtomikosTransactionsEssentials-3.3.1/dist/transactions-api.jar
AtomikosTransactionsEssentials-3.3.1/dist/transactions-jta.jar
AtomikosTransactionsEssentials-3.3.1/dist/transactions-jdbc.jar
AtomikosTransactionsEssentials-3.3.1/lib/slf4j-api-1.4.3.jar
AtomikosTransactionsEssentials-3.3.1/lib/slf4j-nop-1.4.3.jar
AtomikosTransactionsEssentials-3.3.1/examples/lib/activemq-3.1.jar
AtomikosTransactionsEssentials-3.3.1/examples/lib/concurrent.jar
AtomikosTransactionsEssentials-3.3.1/examples/lib/fsjclient.jar
AtomikosTransactionsEssentials-3.3.1/examples/lib/geronimo-spec-j2ee-management-1.0-rc4.jar
spring-framework-2.5.2/dist/modules/spring-tx.jar
spring-framework-2.5.2/dist/modules/spring-aop.jar
spring-framework-2.5.2/dist/modules/spring-beans.jar
spring-framework-2.5.2/dist/modules/spring-context.jar
spring-framework-2.5.2/dist/modules/spring-context-support.jar
spring-framework-2.5.2/dist/modules/spring-core.jar
spring-framework-2.5.2/dist/modules/spring-jdbc.jar
spring-framework-2.5.2/dist/modules/spring-test.jar
spring-framework-2.5.2/lib/junit/junit-3.8.2.jar
spring-framework-2.5.2/lib/jakarta-commons/commons-logging.jar
spring-framework-2.5.2/lib/aopalliance/aopalliance.jar
spring-framework-2.5.2/lib/aspectj/aspectjrt.jar
spring-framework-2.5.2/lib/aspectj/aspectjweaver.jar
spring-framework-2.5.2/lib/j2ee/jta.jar
spring-framework-2.5.2/lib/cglib/cglib-nodep-2.1_3.jar
//dataAccessContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans default-autowire="byName" default-lazy-init="false">
<bean id="dataSource"
class="com.atomikos.jdbc.AtomikosDataSourceBean" init-method="init"
destroy-method="close">
<property name="uniqueResourceName">
<value>oracle/main</value>
</property>
<property name="xaDataSourceClassName">
<value>${jdbc.driverClassName}</value>
</property>
<property name="xaProperties">
<props>
<prop key="URL">${jdbc.url}</prop>
<prop key="user">${jdbc.username}</prop>
<prop key="password">${jdbc.password}</prop>
</props>
</property>
<property name="poolSize">
<value>1</value>
</property>
</bean>
<bean id="dataSourceB"
class="com.atomikos.jdbc.AtomikosDataSourceBean" init-method="init"
destroy-method="close" lazy-init="true">
<property name="uniqueResourceName">
<value>mysql/main</value>
</property>
<property name="xaDataSourceClassName">
<value>${jdbc.driverClassName1}</value>
</property>
<property name="xaProperties">
<props>
<prop key="URL">${jdbc.url1}</prop>
<prop key="user">${jdbc.username1}</prop>
<prop key="password">${jdbc.password1}</prop>
</props>
</property>
<property name="poolSize">
<value>1</value>
</property>
</bean>
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="jtaTransactionManager" ref="atomikosTransactionManager" />
<property name="configLocations">
<list>
<value>classpath*:/config/hibernate.cfg.xml</value>
</list>
</property>
<property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration"/>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">${hibernate.dialect}</prop>
<prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
<prop key="hibernate.cache.use_query_cache">${hibernate.cache.use_query_cache}</prop>
<prop key="hibernate.cache.provider_class">${hibernate.cache.provider_class}</prop>
<prop key="current_session_context_class">jta</prop>
<prop key="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</prop>
<prop key="hibernate.connection.release_mode">after_statement</prop>
</props>
</property>
</bean>
<bean id="atomikosTransactionManager"
class="com.atomikos.icatch.jta.UserTransactionManager"
init-method="init" destroy-method="close">
<!-- when close is called, should we force transactions to terminate or not? -->
<property name="forceShutdown">
<value>true</value>
</property>
</bean>
<bean id="atomikosUserTransaction"
class="com.atomikos.icatch.jta.UserTransactionImp">
<property name="transactionTimeout" value="240" />
</bean>
<bean id="transactionManager"
class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="transactionManager">
<ref bean="atomikosTransactionManager" />
</property>
<property name="userTransaction">
<ref bean="atomikosUserTransaction" />
</property>
</bean>
</beans>
//applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"
default-autowire="byName" default-lazy-init="false">
<!-- 属性文件读入 -->
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath*:config/jdbc.properties</value>
<value>classpath*:spring/jta.properties</value>
</list>
</property>
</bean>
<!-- 支持 @Transactional 标记 -->
<tx:annotation-driven/>
<!-- 支持 @AspectJ 标记-->
<aop:aspectj-autoproxy/>
<!-- 以AspectJ方式 定义 AOP -->
<aop:config proxy-target-class="true">
<aop:advisor pointcut="execution(* com.ibm.jta.demo.service.*Service.*(..))" advice-ref="txAdvice"/>
</aop:config>
<tx:advice id="txAdvice">
<tx:attributes>
<tx:method name="get*" read-only="true"/>
<tx:method name="*"/>
</tx:attributes>
</tx:advice>
</beans>
分享到:
相关推荐
jquery-3.3.1.js和jquery-3.3.1.min.js免费下载哈。jquery-3.3.1.js和jquery-3.3.1.min.js免费下载哈。jquery-3.3.1.js和jquery-3.3.1.min.js免费下载哈。jquery-3.3.1.js和jquery-3.3.1.min.js免费下载哈。jquery-...
《jQuery核心库:深入理解jquery-3.3.1.js与jquery.min-3.3.1.js》 jQuery,作为一款广泛使用的JavaScript库,极大地简化了网页中的DOM操作、事件处理、动画设计以及Ajax交互。在给定的文件中,我们有两个版本的...
《jQuery 3.3.1:JavaScript开发的强大工具》 jQuery,这个JavaScript库自2006年发布以来,已经成为Web开发中不可或缺的一部分。它的设计理念是"Write Less, Do More",通过简洁的API,让JavaScript编程变得更为...
赠送原API文档:ehcache-3.3.1-javadoc.jar; 赠送源代码:ehcache-3.3.1-sources.jar; 赠送Maven依赖信息文件:ehcache-3.3.1.pom; 包含翻译后的API文档:ehcache-3.3.1-javadoc-API文档-中文(简体)-英语-对照版....
**jQuery 3.3.1:JavaScript开发的强大工具** jQuery,作为一款强大的JavaScript库,自2006年发布以来,已经成为Web开发中不可或缺的一部分。它简化了HTML文档遍历、事件处理、动画制作以及Ajax交互等任务,使得...
asm-commons-3.3.1.jar
jquery-3.3.1源码及压缩版的jquery-min-3.3.1,jquery基础源码工具集合,看到有些黑心作者标30C币,看不下去了,公用的技术标天价,呵呵,想免费分享,奈何最低只能选1,将就着用吧
bootstrap-3.3.7-dist 中的 jquery-3.3.1.min.js 代码写js特效
asm-3.3.1.jar asm-3.3.1.jar asm-3.3.1.jar asm-3.3.1.jar
这个“hadoop-3.3.1.tar.gz”文件是一个压缩包,包含了所有必要的组件和配置文件,用于在各种操作系统上安装和运行Hadoop。 1. **Hadoop架构** Hadoop由两个主要组件构成:Hadoop Distributed File System (HDFS) ...
赠送原API文档:core-3.3.1-javadoc.jar; 赠送源代码:core-3.3.1-sources.jar; 赠送Maven依赖信息文件:core-3.3.1.pom; 包含翻译后的API文档:core-3.3.1-javadoc-API文档-中文(简体)-英语-对照版.zip; Maven...
《jQuery 3.3.1:JavaScript库的基石》 jQuery,这个小巧而强大的JavaScript库,自2006年发布以来,一直是Web开发领域的核心工具之一。在本篇文章中,我们将深入探讨jQuery 3.3.1版本,了解其在简化DOM操作、事件...
ext-3.3.1ext-3.3.1ext-3.3.1ext-3.3.1ext-3.3.1ext-3.3.1
jquery-3.3.1.slim.min.js
Java_apache-maven-3.3.1.rar_安装包_kaic Java_apache-maven-3.3.1.rar_安装包_kaic Java_apache-maven-3.3.1.rar_安装包_kaic Java_apache-maven-3.3.1.rar_安装包_kaic Java_apache-maven-3.3.1.rar_安装包_kaic ...
赠送原API文档:okhttp-3.3.1-javadoc.jar; 赠送源代码:okhttp-3.3.1-sources.jar; 包含翻译后的API文档:okhttp-3.3.1-javadoc-API文档-中文(简体)版.zip 对应Maven信息:groupId:com.squareup.okhttp3,...
python_ldap-3.3.1-cp37-cp37m-win_amd64
jeecg-framework-3.3.1.beta.zipjeecg-framework-3.3.1.beta.zipjeecg-framework-3.3.1.beta.zipjeecg-framework-3.3.1.beta.zipjeecg-framework-3.3.1.beta.zipjeecg-framework-3.3.1.beta.zipjeecg-framework-...
因为ie浏览器调用ajax接口被拦截问题,是由于接口被加上参数后不符合ie浏览器的规则,因此修改了一下jquery.js,使得ie浏览器ajax调用接口的正常,版本为:jquery-3.3.1.js
很多人为了配置jpa找这个动态产生字节码的jar文件,hibernate-distribution-3.3.1.GA包太大,而hibernate-distribution-3.3.2.GA的jar没有这个jar文件,希望对大家有用