Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6136347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:35:32+00:00 2026-05-23T17:35:32+00:00

According to the JTA spec: This interface is intended for use by system level

  • 0

According to the JTA spec:

This interface is intended for use by system level application server
components such as persistence managers, resource adapters, as well
as EJB and Web application components. This provides the ability to
register synchronization objects with special ordering semantics,
associate resource objects with the current transaction, get the
transaction context of the current transaction, get current
transaction status, and mark the current transaction for rollback.

Also:

The user of getResource() and putResource() methods is a library
component that manages transaction-specific data on behalf of a
caller. The transaction-specific data provided by the caller is not
immediately flushed to a transaction-enlisted resource, but instead is
cached. The cached data is stored in a transaction-related data
structure that is in a zero-or-one-to-one relationship with the
transactional context of the caller.

However I am still puzzled.

First, what does “[…] provides the ability to register synchronization objects with special ordering semantics” mean and how is it possible to setup the ordering?

Then, what are some use cases in which it’s necessary to “associate resource objects with the current transaction”?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T17:35:32+00:00Added an answer on May 23, 2026 at 5:35 pm

    First, what does “[…] provides the ability to register
    synchronization objects with special ordering semantics” mean and how
    is it possible to setup the ordering?

    The “special ordering semantics” are explained in the registerInterposedSynchronization javadoc, which is trying to explain how those listeners are fired relative to Transaction.registerSynchronization.

    Then, what are some use cases in which it’s necessary to “associate
    resource objects with the current transaction”?

    putResource/getResource let a caller store “transaction-local” objects.

    For example, a JPA container might registerInterposedSynchronization when used. A stateful session bean might update an entity during SessionSynchronization.beforeCompletion. The EntityManager would store the entity on the current transaction using putResource, and then flush the data to the database during its Synchronization.beforeCompletion, which is guaranteed to run after.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to this discussion , the iphone agreement says that it doesn't allow loading
According to select name from system_privilege_map System has been granted: SELECT ANY TABLE ...and
According to what I have found so far, I can use the following code:
According to the answers to this question, I cannot embed a file version in
According to this article Silverlight 2 Beta 2 supports the DataContractJsonSerializer object. But, when
According to MSDN, System.Int32 is immutable, and its members always return new instances. Some
According to a post at the very end of this thread you can replace
According to this SDK guide , unit-testing a Library project can be achieved by
According to Single-Threaded Application with Long-Running Calculation MSDN example, there is a possibility of
According to my last post in here one of friends suggested this code: using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.