3.5.5.3. Enable Transaction Recovery


Transaction recovery is disabled by default in JBoss Data Grid. When disabled, the Transaction Manager cannot determine which transactions require manual intervention.
Using XML

Enable transaction recovery using XML configuration as follows:

<transaction useEagerLocking="true" eagerLockSingleNode="true">
    <recovery enabled="true" recoveryInfoCacheName="noRecovery"/>
</transaction>
The recoveryInfoCacheName attribute is optional.
Programmatic Configuration

Alternatively, enable transaction recovery through the fluent configuration API as follows:

Procedure 3.2. Configure Transaction Recovery Programmatically

  1. To enable JBoss Data Grid's Transaction Recovery, call .recovery:
    configuration.fluent().transaction().recovery();
    
  2. To check Transactions Recovery's status, use the following programmatic configuration:
    boolean isRecoveryEnabled = configuration.isTransactionRecoveryEnabled();
    
  3. To disable JBoss Data Grid's Transaction recovery, use the following programmatic configuration:
    configuration.fluent().transaction().recovery().disable();
    
Transaction recovery can be enabled or disabled on a per cache basis. For example, it is possible for a transaction to span one cache with transaction recovery enabled and then another cache with transaction recovery disabled.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.