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 Transaction Guide
  2. Preface
  3. Making open source more inclusive
  4. 1. Introduction to transactions
    1. 1.1. What is a transaction?
    2. 1.2. ACID properties of a transaction
    3. 1.3. About transaction clients
    4. 1.4. Descriptions of transaction terms
    5. 1.5. Managing transactions that modify multiple resources
    6. 1.6. Relationship between transactions and threads
    7. 1.7. About transaction service qualities
      1. 1.7.1. Qualities of service provided by resources
        1. 1.7.1.1. Transaction isolation levels
        2. 1.7.1.2. Support for the XA standard
      2. 1.7.2. Qualities of service provided by transaction managers
        1. 1.7.2.1. Support for suspend/resume and attach/detach
        2. 1.7.2.2. Support for multiple resources
        3. 1.7.2.3. Distributed transactions
        4. 1.7.2.4. Transaction monitoring
        5. 1.7.2.5. Recovery from failure
  5. 2. Getting started with transactions on Karaf (OSGi)
    1. 2.1. Prerequisites
    2. 2.2. Building the camel-jms project
    3. 2.3. Explanation of the camel-jms project
  6. 3. Interfaces for configuring and referencing transaction managers
    1. 3.1. What transaction managers do
    2. 3.2. About local, global, and distributed transaction managers
      1. 3.2.1. About local transaction managers
      2. 3.2.2. About global transaction managers
      3. 3.2.3. About distributed transaction managers
    3. 3.3. Using a JavaEE transaction client
    4. 3.4. Using a Spring Boot transaction client
      1. 3.4.1. Using the Spring PlatformTransactionManager interface
        1. 3.4.1.1. Definition of the PlatformTransactionManager interface
        2. 3.4.1.2. About the TransactionDefinition interface
        3. 3.4.1.3. Definition of the TransactionStatus interface
        4. 3.4.1.4. Methods defined by the PlatformTransactionManager interface
      2. 3.4.2. Steps for using the transaction manager
      3. 3.4.3. About Spring PlatformTransactionManager implementations
        1. 3.4.3.1. Local PlatformTransactionManager implementations
        2. 3.4.3.2. Global PlatformTransactionManager implementation
    5. 3.5. OSGi interfaces between transaction clients and the transaction manager
  7. 4. Configuring the Narayana transaction manager
    1. 4.1. About Narayana installation
    2. 4.2. Transaction protocols supported
    3. 4.3. About Narayana configuration
    4. 4.4. Configuring log storage
  8. 5. Using the Narayana transaction manager
    1. 5.1. Using UserTransaction objects
      1. 5.1.1. Definition of the UserTransaction interface
      2. 5.1.2. Description of UserTransaction methods
    2. 5.2. Using TransactionManager objects
      1. 5.2.1. Definition of the TransactionManager interface
      2. 5.2.2. Description of TransactionManager methods
    3. 5.3. Using Transaction objects
      1. 5.3.1. Definition of the Transaction interface
      2. 5.3.2. Description of Transaction methods
    4. 5.4. Resolving the XA enlistment problem
      1. 5.4.1. How to enlist an XA resource
      2. 5.4.2. About auto-enlistment
  9. 6. Using JDBC data sources
    1. 6.1. About the Connection interface
    2. 6.2. Overview of JDBC data sources
      1. 6.2.1. Database specific and generic data sources
      2. 6.2.2. Some generic data sources
      3. 6.2.3. Pattern to use
    3. 6.3. Configuring JDBC data sources
    4. 6.4. Using the OSGi JDBC service
      1. 6.4.1. PAX-JDBC configuration service
      2. 6.4.2. Summary of handled properties
      3. 6.4.3. How the pax-jdb-config bundle handles properties
    5. 6.5. Using JDBC console commands
    6. 6.6. Using encrypted configuration values
    7. 6.7. Using JDBC connection pools
      1. 6.7.1. Introduction to using JDBC connection pools
      2. 6.7.2. Using the dbcp2 connection pool module
        1. 6.7.2.1. Configuration properties for BasicDataSource
        2. 6.7.2.2. Example of how to configure DBCP2 pool
      3. 6.7.3. Using the narayana connection pool module
      4. 6.7.4. Using the transx connection pool module
    8. 6.8. Deploying data sources as artifacts
      1. 6.8.1. Manual deployment of data sources
      2. 6.8.2. Factory deployment of data sources
      3. 6.8.3. Mixed deployment of data sources
    9. 6.9. Using data sources with the Java™ persistence API
      1. 6.9.1. About data source references
      2. 6.9.2. Referring to JNDI names
  10. 7. Using JMS connection factories
    1. 7.1. About the OSGi JMS service
    2. 7.2. About the PAX-JMS configuration service
      1. 7.2.1. Creating a connection factory for AMQ 7.1
      2. 7.2.2. Creating a connection factory for IBM MQ 8 or IBM MQ 9
      3. 7.2.3. Using JBoss A-MQ 6.3 Client in Fuse on Apache Karaf
        1. 7.2.3.1. Prerequisites
        2. 7.2.3.2. Procedure
      4. 7.2.4. Summary of handled properties
    3. 7.3. Using JMS console commands
    4. 7.4. Using encrypted configuration values
    5. 7.5. Using JMS connection pools
      1. 7.5.1. Introduction to using JMS connection pools
      2. 7.5.2. Using the pax-jms-pool-pooledjms connection pool module
      3. 7.5.3. Using the pax-jms-pool-narayana connection pool module
      4. 7.5.4. Using the pax-jms-pool-transx connection pool module
    6. 7.6. Deploying connection factories as artifacts
      1. 7.6.1. Manual deployment of connection factories
      2. 7.6.2. Factory deployment of connection factories
      3. 7.6.3. Mixed deployment of connection factories
  11. 8. About Java connector architecture
    1. 8.1. Simple JDBC analogy
    2. 8.2. Overview of using JCA
    3. 8.3. About the pax-transx project
  12. 9. Writing a Camel application that uses transactions
    1. 9.1. Transaction demarcation by marking the route
      1. 9.1.1. Sample route with JDBC resource
      2. 9.1.2. Route definition in Java DSL
      3. 9.1.3. Route definition in Blueprint XML
      4. 9.1.4. Default transaction manager and transacted policy
      5. 9.1.5. Transaction scope
      6. 9.1.6. No thread pools in a transactional route
      7. 9.1.7. Breaking a route into fragments
      8. 9.1.8. Resource endpoints
      9. 9.1.9. Sample route with resource endpoints
    2. 9.2. Demarcation by transactional endpoints
      1. 9.2.1. Sample route with a JMS endpoint
      2. 9.2.2. Route definition in Java DSL
      3. 9.2.3. Route definition in Blueprint XML
      4. 9.2.4. DSL transacted() command not required
      5. 9.2.5. Transactional endpoints at start of route
    3. 9.3. Demarcation by declarative transactions
      1. 9.3.1. Bean-level declaration
      2. 9.3.2. Top-level declaration
      3. 9.3.3. Description of tx:transaction attributes
    4. 9.4. Transaction propagation policies
      1. 9.4.1. About Spring transaction policies
      2. 9.4.2. Descriptions of propagation behaviors
      3. 9.4.3. Defining policy beans in Blueprint XML
      4. 9.4.4. Sample route with PROPAGATION_NEVER policy in Java DSL
      5. 9.4.5. Sample route with PROPAGATION_NEVER policy in Blueprint XML
    5. 9.5. Error handling and rollbacks
      1. 9.5.1. How to roll back a transaction
        1. 9.5.1.1. Using runtime exceptions to trigger rollbacks
        2. 9.5.1.2. Using the rollback() DSL command
        3. 9.5.1.3. Using the markRollbackOnly() DSL command
      2. 9.5.2. How to define a dead letter queue
      3. 9.5.3. Catching exceptions around a transaction
  13. Legal Notice

Preface

This guide provides information and instructions for implementing Fuse transactional applications. The information is organized as follows:

  • Chapter 1, Introduction to transactions
  • Chapter 2, Getting started with transactions on Karaf (OSGi)
  • Chapter 3, Interfaces for configuring and referencing transaction managers
  • Chapter 4, Configuring the Narayana transaction manager
  • Chapter 5, Using the Narayana transaction manager
  • Chapter 6, Using JDBC data sources
  • Chapter 7, Using JMS connection factories
  • Chapter 8, About Java connector architecture
  • Chapter 9, Writing a Camel application that uses transactions
  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