- 浏览: 117564 次
- 性别:
- 来自: 深圳
文章分类
最新评论
-
cike8899:
jquery的blur在ie中不能用$('#poppan__o ...
IE和FF下输入框blur事件流程处理的差别引起的focus兼容性问题 -
Canace_lemon:
你好,请问你测试的时候是怎么解决的呢? 也就是你的DAO文件是 ...
JOTM事务管理时报JNDI错误问题,实在没辙了,熟悉JOTM的麻烦看下 -
love2java:
根据atian25的思路,我使用settimeout解决了问题 ...
IE和FF下输入框blur事件流程处理的差别引起的focus兼容性问题 -
lifesinger:
ie下有个事件 beforedeactive, 可以阻止失去焦 ...
IE和FF下输入框blur事件流程处理的差别引起的focus兼容性问题 -
atian25:
ff下 blur在focus之后,settimeout做个延迟 ...
IE和FF下输入框blur事件流程处理的差别引起的focus兼容性问题
主函数代码:
ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml"); IUserServiceDS userService = (IUserServiceDS) ctx.getBean("userServiceDS"); User1 user1 = new User1(); user1.setName("user1"); User2 user2 = new User2(); user2.setName("user2"); userService.insertBothUser(user1, user2);
DS相关代码:
private User1DAO dao1; private User2DAO dao2; public void insertBothUser(User1 user1, User2 user2) throws Exception { this.insertUser1(user1); if(user2.getName().equalsIgnoreCase("user2")){ throw new Exception(); } else { this.insertUser2(user2); } } public void insertUser1(User1 user1) { dao1.save(user1); } public void insertUser2(User2 user2) { dao2.save(user2); }
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" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> <!-- JOTM配置 开始 --> <bean id="jotm" class="org.springframework.transaction.jta.JotmFactoryBean" /> <bean id="txManager" class="org.springframework.transaction.jta.JtaTransactionManager"> <property name="userTransaction" ref="jotm" /> </bean> <bean id="ds1" class="org.enhydra.jdbc.pool.StandardXAPoolDataSource"> <property name="dataSource"> <bean class="org.enhydra.jdbc.standard.StandardXADataSource"> <property name="transactionManager" ref="jotm" /> <property name="driverName" value="com.mysql.jdbc.Driver" /> <property name="url" value="jdbc:mysql://10.129.68.170:3306/jotm1" /> </bean> </property> <property name="user" value="root" /> <property name="password" value="root" /> </bean> <bean id="sessFactory1" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource"> <ref bean="ds1" /> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> <prop key="hibernate.show_sql">true</prop> </props> </property> <property name="mappingResources"> <list> <value>com/xa/model/User1.hbm.xml</value> </list> </property> <property name="jtaTransactionManager"> <ref bean="jotm" /> </property> </bean> <bean id="ds2" class="org.enhydra.jdbc.pool.StandardXAPoolDataSource"> <property name="dataSource"> <bean class="org.enhydra.jdbc.standard.StandardXADataSource"> <property name="transactionManager" ref="jotm" /> <property name="driverName" value="com.mysql.jdbc.Driver" /> <property name="url" value="jdbc:mysql://10.129.68.170:3306/jotm2" /> </bean> </property> <property name="user" value="root" /> <property name="password" value="root" /> </bean> <bean id="sessFactory2" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource"> <ref local="ds2" /> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> <prop key="hibernate.show_sql">true</prop> </props> </property> <property name="mappingResources"> <list> <value>com/xa/model/User2.hbm.xml</value> </list> </property> <property name="jtaTransactionManager"> <ref bean="jotm" /> </property> </bean> <!-- JOTM配置 结束 --> <bean id="User1DAO" class="com.xa.dao.User1DAO"> <property name="sessionFactory"> <ref bean="sessFactory1" /> </property> </bean> <bean id="User2DAO" class="com.xa.dao.User2DAO"> <property name="sessionFactory"> <ref bean="sessFactory2" /> </property> </bean> <bean id="userServiceDS" class="com.xa.service.UserServiceDS"> <property name="dao1" ref="User1DAO" /> <property name="dao2" ref="User2DAO" /> </bean> <!-- 事务拦截 开始 --> <bean id="beanNameProxy" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator"> <property name="beanNames"> <list> <value>*DS</value> </list> </property> <property name="interceptorNames"> <list> <value>transactionInterceptor</value> </list> </property> </bean> <bean id="transactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor"> <property name="transactionManager" ref="txManager" /> <property name="transactionAttributeSource" ref="txAttributeSource" /> </bean> <bean id="txAttributeSource" class="org.springframework.transaction.interceptor.NameMatchTransactionAttributeSource"> <property name="properties"> <props> <prop key="insert*">PROPAGATION_REQUIRED,-Exception</prop> </props> </property> </bean> <!-- 事务拦截 结束 --> </beans>
carol.properties内容:
# do not use CAROL JNDI wrapper carol.start.jndi=false # do not start a name server carol.start.ns=false # Naming Factory carol.jndi.java.naming.factory.url.pkgs=org.apache.naming
运行时报的异常为:
org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,656 -- INFO -- RDBMS: MySQL, version: 5.1.34-community org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,656 -- INFO -- JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.7 ( Revision: ${svn.Revision} ) org.hibernate.dialect.Dialect 2009-11-24 11:24:27,656 -- INFO -- Using dialect: org.hibernate.dialect.MySQLDialect org.hibernate.transaction.TransactionFactoryFactory 2009-11-24 11:24:27,656 -- INFO -- Transaction strategy: org.hibernate.transaction.JTATransactionFactory org.hibernate.util.NamingHelper 2009-11-24 11:24:27,656 -- INFO -- JNDI InitialContext properties:{} org.hibernate.transaction.TransactionManagerLookupFactory 2009-11-24 11:24:27,671 -- INFO -- instantiating TransactionManagerLookup: org.springframework.orm.hibernate3.LocalTransactionManagerLookup org.hibernate.transaction.TransactionManagerLookupFactory 2009-11-24 11:24:27,671 -- INFO -- instantiated TransactionManagerLookup org.hibernate.transaction.TransactionManagerLookupFactory 2009-11-24 11:24:27,671 -- INFO -- instantiating TransactionManagerLookup: org.springframework.orm.hibernate3.LocalTransactionManagerLookup org.hibernate.transaction.TransactionManagerLookupFactory 2009-11-24 11:24:27,671 -- INFO -- instantiated TransactionManagerLookup org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- Automatic flush during beforeCompletion(): disabled org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- Automatic session close at end of transaction: disabled org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- JDBC batch size: 15 org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- JDBC batch updates for versioned data: disabled org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- Scrollable result sets: enabled org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- JDBC3 getGeneratedKeys(): enabled org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- Connection release mode: auto org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- Maximum outer join fetch depth: 2 org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- Default batch fetch size: 1 org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- Generate SQL with comments: disabled org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- Order SQL updates by primary key: disabled org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- Order SQL inserts for batching: disabled org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory org.hibernate.hql.ast.ASTQueryTranslatorFactory 2009-11-24 11:24:27,671 -- INFO -- Using ASTQueryTranslatorFactory org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- Query language substitutions: {} org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- JPA-QL strict compliance: disabled org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- Second-level cache: enabled org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- Query cache: disabled org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- Cache provider: org.hibernate.cache.NoCacheProvider org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- Optimize cache for minimal puts: disabled org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- Structured second-level cache entries: disabled org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- Echoing all SQL to stdout org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- Statistics: disabled org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- Deleted entity synthetic identifier rollback: disabled org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- Default entity-mode: pojo org.hibernate.cfg.SettingsFactory 2009-11-24 11:24:27,671 -- INFO -- Named query checking : enabled org.hibernate.impl.SessionFactoryImpl 2009-11-24 11:24:27,671 -- INFO -- building session factory org.hibernate.impl.SessionFactoryObjectFactory 2009-11-24 11:24:27,671 -- INFO -- Not binding factory to JNDI, no JNDI name configured org.hibernate.transaction.JTATransaction 2009-11-24 11:24:27,859 -- ERROR -- Could not find UserTransaction in JNDI javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325) at javax.naming.InitialContext.lookup(InitialContext.java:392) at org.hibernate.transaction.JTATransaction.<init>(JTATransaction.java:60) at org.hibernate.transaction.JTATransactionFactory.createTransaction(JTATransactionFactory.java:57) at org.hibernate.jdbc.JDBCContext.registerSynchronizationIfPossible(JDBCContext.java:172) at org.hibernate.impl.SessionImpl.checkTransactionSynchStatus(SessionImpl.java:1867) at org.hibernate.impl.SessionImpl.getFlushMode(SessionImpl.java:1295) at org.springframework.orm.hibernate3.HibernateTemplate.checkWriteOperationAllowed(HibernateTemplate.java:1184) at org.springframework.orm.hibernate3.HibernateTemplate$12.doInHibernate(HibernateTemplate.java:696) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419) at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374) at org.springframework.orm.hibernate3.HibernateTemplate.save(HibernateTemplate.java:694) at com.xa.dao.User1DAO.save(User1DAO.java:34) at com.xa.service.UserServiceDS.insertUser1(UserServiceDS.java:24) at com.xa.service.UserServiceDS.insertBothUser(UserServiceDS.java:13) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy0.insertBothUser(Unknown Source) at app.AppMain.main(AppMain.java:27) com.xa.dao.User1DAO 2009-11-24 11:24:27,875 -- ERROR -- save failed org.springframework.orm.hibernate3.HibernateSystemException: Could not find UserTransaction in JNDI: ; nested exception is org.hibernate.TransactionException: Could not find UserTransaction in JNDI: at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:676) at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:424) at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374) at org.springframework.orm.hibernate3.HibernateTemplate.save(HibernateTemplate.java:694) at com.xa.dao.User1DAO.save(User1DAO.java:34) at com.xa.service.UserServiceDS.insertUser1(UserServiceDS.java:24) at com.xa.service.UserServiceDS.insertBothUser(UserServiceDS.java:13) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy0.insertBothUser(Unknown Source) at app.AppMain.main(AppMain.java:27) Caused by: org.hibernate.TransactionException: Could not find UserTransaction in JNDI: at org.hibernate.transaction.JTATransaction.<init>(JTATransaction.java:64) at org.hibernate.transaction.JTATransactionFactory.createTransaction(JTATransactionFactory.java:57) at org.hibernate.jdbc.JDBCContext.registerSynchronizationIfPossible(JDBCContext.java:172) at org.hibernate.impl.SessionImpl.checkTransactionSynchStatus(SessionImpl.java:1867) at org.hibernate.impl.SessionImpl.getFlushMode(SessionImpl.java:1295) at org.springframework.orm.hibernate3.HibernateTemplate.checkWriteOperationAllowed(HibernateTemplate.java:1184) at org.springframework.orm.hibernate3.HibernateTemplate$12.doInHibernate(HibernateTemplate.java:696) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419) ... 17 more Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325) at javax.naming.InitialContext.lookup(InitialContext.java:392) at org.hibernate.transaction.JTATransaction.<init>(JTATransaction.java:60) ... 24 more Exception in thread "main" org.springframework.orm.hibernate3.HibernateSystemException: Could not find UserTransaction in JNDI: ; nested exception is org.hibernate.TransactionException: Could not find UserTransaction in JNDI: at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:676) at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:424) at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374) at org.springframework.orm.hibernate3.HibernateTemplate.save(HibernateTemplate.java:694) at com.xa.dao.User1DAO.save(User1DAO.java:34) at com.xa.service.UserServiceDS.insertUser1(UserServiceDS.java:24) at com.xa.service.UserServiceDS.insertBothUser(UserServiceDS.java:13) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy0.insertBothUser(Unknown Source) at app.AppMain.main(AppMain.java:27) Caused by: org.hibernate.TransactionException: Could not find UserTransaction in JNDI: at org.hibernate.transaction.JTATransaction.<init>(JTATransaction.java:64) at org.hibernate.transaction.JTATransactionFactory.createTransaction(JTATransactionFactory.java:57) at org.hibernate.jdbc.JDBCContext.registerSynchronizationIfPossible(JDBCContext.java:172) at org.hibernate.impl.SessionImpl.checkTransactionSynchStatus(SessionImpl.java:1867) at org.hibernate.impl.SessionImpl.getFlushMode(SessionImpl.java:1295) at org.springframework.orm.hibernate3.HibernateTemplate.checkWriteOperationAllowed(HibernateTemplate.java:1184) at org.springframework.orm.hibernate3.HibernateTemplate$12.doInHibernate(HibernateTemplate.java:696) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419) ... 17 more Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325) at javax.naming.InitialContext.lookup(InitialContext.java:392) at org.hibernate.transaction.JTATransaction.<init>(JTATransaction.java:60) ... 24 more
我是参照:
http://blog.csdn.net/soleghost/archive/2006/10/13/1332443.aspx
进行配置的,可进行事务管理时就报错,我使用JOTM,就是不想使用JNDI的。
===================
很久没更新了,不好意思。
下面这个配置是可以成功的,各位可以参考下:
<bean id="jotm" class="com....transaction.jta.JotmFactoryBean" /> <bean id="jotmTXManager" class="com....transaction.jta.JtaTransactionManager"> <property name="userTransaction" ref="jotm" /> </bean> <bean id="dataSource" class="org.enhydra.jdbc.pool.StandardXAPoolDataSource"> <property name="dataSource"> <bean class="org.enhydra.jdbc.standard.StandardXADataSource"> <property name="transactionManager" ref="jotm" /> <property name="driverName" value="oracle.jdbc.driver.OracleDriver" /> <property name="url" value="..." /> </bean> </property> </bean> <bean id="dataSource2" class="org.enhydra.jdbc.pool.StandardXAPoolDataSource"> <property name="dataSource"> <bean class="org.enhydra.jdbc.standard.StandardXADataSource"> <property name="transactionManager" ref="jotm" /> <property name="driverName" value="oracle.jdbc.driver.OracleDriver" /> <property name="url" value="jdbc:oracle:thin:@...:1521:..." /> </bean> </property> </bean> <bean id="sessFactory1" class="com......LocalSessionFactoryBean"> <property name="dataSource" ref="dataSource"/> <property name="mappingLocations"> <list> <value>classpath:com/**/*.hbm.xml</value> </list> </property> </bean> <bean id="sessFactory2" class="com.....LocalSessionFactoryBean"> <property name="dataSource" ref="dataSource"/> <property name="mappingLocations"> <list> <value>classpath:com/**/*.hbm.xml</value> </list> </property> </bean>
发表评论
-
codebyte
2012-12-26 07:27 0#!/bin/bash #usage : To ... -
httpclient
2012-06-25 00:58 0http://guojuanjun.blog.51cto.co ... -
tomcat
2011-07-19 17:22 0http://www.ibm.com/developerwor ... -
xxxxxxxxxxxxxx
2009-12-12 17:20 0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ... -
hibernate 对 sql server 2005 分页改进
2009-07-09 11:19 3452引用链接:http://www.uandroid.com/ho ...
相关推荐
### Spring + JOTM 多数据源事务管理详解(三):JNDI + Tomcat 在本篇文章中,我们将深入探讨如何利用Spring框架结合JOTM(Java Open Transaction Manager)来实现多数据源下的分布式事务管理。我们将通过具体实例...
本文将深入探讨如何使用JOTM(Java Open Transaction Manager)来实现这样的功能,尤其关注在多数据源环境下的事务协调。 JOTM是Java世界里一个开源的事务管理器,遵循JTA(Java Transaction API)规范,提供了...
在Spring中集成JOTM可以提供更高级别的事务控制,确保在多数据源环境下事务的一致性和完整性。 首先,我们需要了解在没有使用JOTM时,Spring与Hibernate的常规配置。在提供的XML配置代码中,可以看到Spring配置了一...
Spring框架作为一个广泛使用的Java应用程序开发框架,提供了多种支持事务管理的解决方案,其中包括集成JOTM(Java Open Transaction Manager)来处理分布式事务。本文将深入探讨Spring与JOTM结合使用的知识点,帮助...
**开源事务管理器 JOTM** JOTM(Java Open Transaction Manager)是一个强大的、完全开源的事务处理系统,专门设计用于Java平台。它遵循Java Transaction API (JTA)规范,为分布式事务处理提供了全面的支持。JTA是...
JOTM(Java Open Transaction Manager)是一款开源的事务管理器,专为Java应用程序设计,它提供了强大的事务处理能力,支持JTA(Java Transaction API)规范,使得在分布式环境中进行事务管理变得更加便捷。JOTM ...
2. **配置JNDI**:在Tomcat的`server.xml`文件中添加一个全局JNDI资源,定义JOTM事务管理器。 3. **Spring配置**:在Spring的配置文件中,使用`jee:jta-data-source`或`jee:resource-ref`元素来引用之前创建的JNDI...
开源事务管理器 JOTM 是一个基于 Java 的开放源代码事务处理系统,它遵循 Java Transaction API (JTA) 标准,为分布式环境中的应用程序提供事务管理服务。JOTM 提供了高度可配置和可扩展的框架,使得开发者能够在...
NULL 博文链接:https://jackyin5918.iteye.com/blog/1922379
JOTM是一个开源的Java事务管理器,它实现了JTA(Java Transaction API),允许开发者在分布式环境中进行事务管理。 描述中的“多数据源所需配置文件”暗示了这些JAR文件可能用于配置和管理多个数据源,这是在企业级...
Java Open Transaction Manager (JOTM) 是一个基于Java平台的开源事务管理器,它遵循了X/Open XA标准,能够支持分布式事务处理。在Java应用系统中,事务管理是核心部分,确保数据的一致性和完整性。JOTM提供了一种...
Java开源事务管理器JOTM(Java Open Transaction Manager)是一个强大的工具,用于处理分布式系统中的事务一致性。在Java应用程序中,事务管理是确保数据完整性和一致性的关键组件,尤其是在涉及多资源操作时。JOTM...
在这个文件中,我们可以添加JNDI(Java Naming and Directory Interface)条目来注册JOTM作为全局事务管理器。这样,Web应用程序可以通过JNDI查找并使用JOTM进行事务管理。通常,我们需要在`<Context>`元素内创建一...
JOTM,全称为Java Open Transaction Manager,是一个开源的、完全符合JTA(Java Transaction API)规范的事务管理器。JTA是Java平台上的标准接口,用于管理分布式事务处理,确保在多线程和分布式环境中的数据一致性...
Java源码:开源事务管理器JOTM是一个重要的学习资源,尤其对于那些深入理解Java企业级应用和事务处理机制的开发者来说。JOTM(Java Open Transaction Manager)是基于Java平台的一个开放源代码的事务管理器,它实现...
标题“jotm 2.1.4 source dist”指的是JOTM的2.1.4版本源代码分发版,这是一个重要的中间件组件,主要关注于事务管理。JOTM,全称Java Open Transaction Manager,是开源的Java事务管理系统,它实现了JTA(Java ...