不带 JDBC 的 Atomikos 或 JBossTS
如果数据源不可通过 JDBC 调用,是否可以实现以前的事务管理器之一?
已编辑
我想为现有应用程序创建一个插件。我的插件应负责记录长期运行工作流事务的读写访问。我的插件应该另外负责缓存变量,以防需要它们 - 这样每次访问变量时就不必进行读/写操作。
该应用程序在 Tomcat6 环境中运行,我通过调用插件管理器(它保存从不同数据源获取的数据)来获取数据。
您知道我可以阅读的任何链接吗?或者也许知道一些现有的解决方案?
is it possible to implement one of the former Transaction Manager if the datasource is not callable via JDBC?
Edited
I want to create an addin for an existing application. My addin shall be responsible for logging of the read and write accesses of long run workflow transactions. My addin should be additionally responsible for caching variables in case that they are required - so that there should not neccessarily be a read/write operation everytime a variable is accessed.
The application is running in a Tomcat6 environment and I get the data by calling a plugin manager ( which holds gets data from the different datasources ).
Do you know any links which I could read - or maybe know of some existing solution?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来您还没有完全掌握事务管理器和资源管理器之间的区别。 JBossTS 等事务管理器通过 RM 驱动程序提供的 XAResources 驱动 Oracle、MSSQL 等资源管理器。
您没有实现事务管理器 - 它已经实现了。您正在实现一个新的资源管理器并使用现有的事务管理器来驱动它。阅读 XA 规范,然后实现 XAResource 并使用事务管理器登记您的资源。只要您的 impl 符合规范,事务管理器就会以与数据库驱动程序或消息队列提供的实现相同的方式使用它。
请注意,在 ACID 事务范围内对外部(即非事务)系统进行 I/O 基本上是不可能的。您所能期望的最好结果是某种形式的基于补偿的模型或具有最后资源提交优化的 1PC 行为。
Sounds like you still have not fully grasped the distinction between transaction manager and resource manager. Transactions managers like JBossTS drive resource managers like Oracle, MSSQL etc, via XAResources supplied by the RM's drivers.
You're not implementing a transaction manager - it's already implemented. You're implementing a new resource manager and using the existing transaction manager to drive it. Read the XA specification, then implement XAResource and enlist your resource with the transaction manager. As long as your impl is spec compliant the transaction manager will use it just the same way it does with the implementations supplied by database drivers or message queues.
Note that doing I/O to external (i.e. non-transactional) systems in ACID transaction scope is basically impossible. The best you can hope for is some form of compensation based model or 1PC behaviour with last resource commit optimization.