Skip to navigation Skip to main content

Utilities

  • Subscriptions
  • Downloads
  • Containers
  • Support Cases
Red Hat Customer Portal
  • Subscriptions
  • Downloads
  • Containers
  • Support Cases
  • Products & Services

    Products

    Support

    • Production Support
    • Development Support
    • Product Life Cycles

    Services

    • Consulting
    • Technical Account Management
    • Training & Certifications

    Documentation

    • Red Hat Enterprise Linux
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenStack Platform
    • Red Hat OpenShift Container Platform
    All Documentation

    Ecosystem Catalog

    • Red Hat Partner Ecosystem
    • Partner Resources
  • Tools

    Tools

    • Troubleshoot a product issue
    • Packages
    • Errata

    Customer Portal Labs

    • Configuration
    • Deployment
    • Security
    • Troubleshoot
    All labs

    Red Hat Insights

    Increase visibility into IT operations to detect and resolve technical issues before they impact your business.

    Learn More
    Go to Insights
  • Security

    Red Hat Product Security Center

    Engage with our Red Hat Product Security team, access security updates, and ensure your environments are not exposed to any known security vulnerabilities.

    Product Security Center

    Security Updates

    • Security Advisories
    • Red Hat CVE Database
    • Security Labs

    Keep your systems secure with Red Hat's specialized responses to security vulnerabilities.

    View Responses

    Resources

    • Security Blog
    • Security Measurement
    • Severity Ratings
    • Backporting Policies
    • Product Signing (GPG) Keys
  • Community

    Customer Portal Community

    • Discussions
    • Private Groups
    Community Activity

    Customer Events

    • Red Hat Convergence
    • Red Hat Summit

    Stories

    • Red Hat Subscription Value
    • You Asked. We Acted.
    • Open Source Communities
Or troubleshoot an issue.

Select Your Language

  • English
  • 한국어
  • 日本語
  • 中文 (中国)

Infrastructure and Management

  • Red Hat Enterprise Linux
  • Red Hat Satellite
  • Red Hat Subscription Management
  • Red Hat Insights
  • Red Hat Ansible Automation Platform

Cloud Computing

  • Red Hat OpenShift
  • Red Hat OpenStack Platform
  • Red Hat OpenShift Container Platform
  • Red Hat OpenShift Data Science
  • Red Hat OpenShift Dedicated
  • Red Hat Advanced Cluster Security for Kubernetes
  • Red Hat Advanced Cluster Management for Kubernetes
  • Red Hat Quay
  • OpenShift Dev Spaces
  • Red Hat OpenShift Service on AWS

Storage

  • Red Hat Gluster Storage
  • Red Hat Hyperconverged Infrastructure
  • Red Hat Ceph Storage
  • Red Hat OpenShift Data Foundation

Runtimes

  • Red Hat Runtimes
  • Red Hat JBoss Enterprise Application Platform
  • Red Hat Data Grid
  • Red Hat JBoss Web Server
  • Red Hat Single Sign On
  • Red Hat support for Spring Boot
  • Red Hat build of Node.js
  • Red Hat build of Quarkus

Integration and Automation

  • Red Hat Application Foundations
  • Red Hat Fuse
  • Red Hat AMQ
  • Red Hat 3scale API Management
All Products

Table of contents

  1. Apache Karaf 事务指南
  2. 前言
  3. 使开源包含更多
  4. 1. 事务简介
    1. 1.1. 什么是事务?
    2. 1.2. 事务的 ACID 属性
    3. 1.3. 关于事务客户端
    4. 1.4. 事务术语的描述
    5. 1.5. 管理修改多个资源的事务
    6. 1.6. 事务和线程之间的关系
    7. 1.7. 关于事务服务质量
      1. 1.7.1. 由资源提供的服务质量
        1. 1.7.1.1. 事务隔离级别
        2. 1.7.1.2. 支持 XA 标准
      2. 1.7.2. 事务管理器提供的服务质量
        1. 1.7.2.1. 支持 suspend/resume 和 attach/detach
        2. 1.7.2.2. 支持多个资源
        3. 1.7.2.3. 分布式事务
        4. 1.7.2.4. 事务监控
        5. 1.7.2.5. 从失败中恢复
  5. 2. 开始使用 Karaf 上的事务(OSGi)
    1. 2.1. 先决条件
    2. 2.2. 构建 camel-jms 项目
    3. 2.3. camel-jms 项目的解释
  6. 3. 用于配置和引用事务管理器的接口
    1. 3.1. 事务管理器的作用
    2. 3.2. 关于本地、全局和分布式事务管理器
      1. 3.2.1. 关于本地事务管理器
      2. 3.2.2. 关于全局事务管理器
      3. 3.2.3. 关于分布式事务管理器
    3. 3.3. 使用>=< 事务客户端
    4. 3.4. 使用 Spring Boot 事务客户端
      1. 3.4.1. 使用 Spring PlatformTransactionManager 接口
        1. 3.4.1.1. PlatformTransactionManager 接口的定义
        2. 3.4.1.2. 关于 TransactionDefinition 接口
        3. 3.4.1.3. TransactionStatus 接口的定义
        4. 3.4.1.4. 平台TransactionManager 接口定义的方法
      2. 3.4.2. 使用事务管理器的步骤
      3. 3.4.3. 关于 Spring PlatformTransactionManager 实现
        1. 3.4.3.1. 本地平台TransactionManager 实现
        2. 3.4.3.2. 全局 PlatformTransactionManager 实现
    5. 3.5. 事务客户端和事务管理器之间的 OSGi 接口
  7. 4. 配置 Narayana 事务管理器
    1. 4.1. 关于 Narayana 安装
    2. 4.2. 支持的事务协议
    3. 4.3. 关于 Narayana 配置
    4. 4.4. 配置日志存储
  8. 5. 使用 Narayana 事务管理器
    1. 5.1. 使用 UserTransaction 对象
      1. 5.1.1. UserTransaction 接口的定义
      2. 5.1.2. 用户事务方法的描述
    2. 5.2. 使用 TransactionManager 对象
      1. 5.2.1. TransactionManager 接口的定义
      2. 5.2.2. TransactionManager 方法的描述
    3. 5.3. 使用 Transaction 对象
      1. 5.3.1. Transaction 接口的定义
      2. 5.3.2. Transaction 方法的描述
    4. 5.4. 解决 XA enlistment 问题
      1. 5.4.1. 如何列出 XA 资源
      2. 5.4.2. 关于自动加入
  9. 6. 使用 JDBC 数据源
    1. 6.1. 关于连接接口
    2. 6.2. JDBC 数据源概述
      1. 6.2.1. 特定于数据库和通用数据源
      2. 6.2.2. 有些通用数据源
      3. 6.2.3. 要使用的模式
    3. 6.3. 配置 JDBC 数据源
    4. 6.4. 使用 OSGi JDBC 服务
      1. 6.4.1. PAX- JDBC 配置服务
      2. 6.4.2. 处理的属性摘要
      3. 6.4.3. pax-jdb-config 捆绑包如何处理属性
    5. 6.5. 使用 JDBC 控制台命令
    6. 6.6. 使用加密配置值
    7. 6.7. 使用 JDBC 连接池
      1. 6.7.1. 使用 JDBC 连接池简介
      2. 6.7.2. 使用 dbcp2 连接池模块
        1. 6.7.2.1. BasicDataSource 的配置属性
        2. 6.7.2.2. 如何配置 DBCP2 池的示例
      3. 6.7.3. 使用 narayana 连接池模块
      4. 6.7.4. 使用 transx 连接池模块
    8. 6.8. 将数据源部署为工件
      1. 6.8.1. 手动部署数据源
      2. 6.8.2. 数据源的工厂部署
      3. 6.8.3. 数据源的混合部署
    9. 6.9. 将数据源与 Java™ 持久性 API 搭配使用
      1. 6.9.1. 关于数据源引用
      2. 6.9.2. 引用 JNDI 名称
  10. 7. 使用 JMS 连接工厂
    1. 7.1. 关于 OSGi JMS 服务
    2. 7.2. 关于 PAX-JMS 配置服务
      1. 7.2.1. 为 AMQ 7.1 创建连接工厂
      2. 7.2.2. 为 IBM MQ 8 或 IBM MQ 9 创建连接工厂
      3. 7.2.3. 在 Apache Karaf 上的 Fuse 中使用 JBoss A-MQ 6.3 客户端
        1. 7.2.3.1. 先决条件
        2. 7.2.3.2. 步骤
      4. 7.2.4. 处理的属性摘要
    3. 7.3. 使用 JMS 控制台命令
    4. 7.4. 使用加密配置值
    5. 7.5. 使用 JMS 连接池
      1. 7.5.1. 使用 JMS 连接池简介
      2. 7.5.2. 使用 pax-jms-pool-pooledjms 连接池模块
      3. 7.5.3. 使用 pax-jms-pool-narayana 连接池模块
      4. 7.5.4. 使用 pax-jms-pool-transx 连接池模块
    6. 7.6. 以工件的形式部署连接工厂
      1. 7.6.1. 手动部署连接工厂
      2. 7.6.2. 连接工厂部署
      3. 7.6.3. 连接工厂的混合部署
  11. 8. 关于 Java 连接器架构
    1. 8.1. 简单的 JDBC 模拟
    2. 8.2. 使用 JCA 概述
    3. 8.3. 关于 pax-transx 项目
  12. 9. 编写使用事务的 Camel 应用程序
    1. 9.1. 通过标记路由进行事务处理
      1. 9.1.1. 使用 JDBC 资源的路由示例
      2. 9.1.2. Java DSL 中的路由定义
      3. 9.1.3. Blueprint XML 中的路由定义
      4. 9.1.4. 默认事务管理器和转换的策略
      5. 9.1.5. 事务范围
      6. 9.1.6. 事务路由中没有线程池
      7. 9.1.7. 将路由拆分为片段
      8. 9.1.8. 资源端点
      9. 9.1.9. 使用资源端点的示例路由
    2. 9.2. 按事务端点划分
      1. 9.2.1. 带有 JMS 端点的路由示例
      2. 9.2.2. Java DSL 中的路由定义
      3. 9.2.3. Blueprint XML 中的路由定义
      4. 9.2.4. 不需要 DSL transacted () 命令
      5. 9.2.5. 路由开始时的事务端点
    3. 9.3. 声明事务的划分
      1. 9.3.1. bean-level 声明
      2. 9.3.2. 顶级声明
      3. 9.3.3. tx:transaction 属性的描述
    4. 9.4. 事务传播策略
      1. 9.4.1. 关于 Spring 事务策略
      2. 9.4.2. propagation 行为的描述
      3. 9.4.3. 在蓝图 XML 中定义策略 Bean
      4. 9.4.4. Java DSL 中带有 PROPAGATION_NEVER 策略的示例路由
      5. 9.4.5. 蓝图 XML 中带有 PROPAGATION_NEVER 策略的路由示例
    5. 9.5. 错误处理和回滚
      1. 9.5.1. 如何回滚事务
        1. 9.5.1.1. 使用运行时例外来触发回滚
        2. 9.5.1.2. 使用 rollback () DSL 命令
        3. 9.5.1.3. 使用 markRollbackOnly () DSL 命令
      2. 9.5.2. 如何定义死信队列
      3. 9.5.3. 捕获事务的例外
  13. 法律通告

前言

本指南提供有关实施 Fuse 事务应用程序的信息和说明。该信息组织如下:

  • 第 1 章 事务简介
  • 第 2 章 开始使用 Karaf 上的事务(OSGi)
  • 第 3 章 用于配置和引用事务管理器的接口
  • 第 4 章 配置 Narayana 事务管理器
  • 第 5 章 使用 Narayana 事务管理器
  • 第 6 章 使用 JDBC 数据源
  • 第 7 章 使用 JMS 连接工厂
  • 第 8 章 关于 Java 连接器架构
  • 第 9 章 编写使用事务的 Camel 应用程序
  1. Previous
  2. Next
Red Hat

Quick Links

  • Downloads
  • Subscriptions
  • Support Cases
  • Customer Service
  • Product Documentation

Help

  • Contact Us
  • Customer Portal FAQ
  • Log-in Assistance

Site Info

  • Trust Red Hat
  • Browser Support Policy
  • Accessibility
  • Awards and Recognition
  • Colophon

Related Sites

  • redhat.com
  • developers.redhat.com
  • connect.redhat.com
  • cloud.redhat.com

About

  • Red Hat Subscription Value
  • About Red Hat
  • Red Hat Jobs
Copyright © 2023 Red Hat, Inc.
  • Privacy Statement
  • Terms of Use
  • All Policies and Guidelines
Red Hat Summit Red Hat Summit
Twitter