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

  • SEARCH
  • Home
  • 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 6866123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:08:27+00:00 2026-05-27T03:08:27+00:00

From the JCR specification I know that I can request an UserTransaction object (specified

  • 0

From the JCR specification I know that I can request an UserTransaction object (specified in JTA) and create a begin/commit/rollback sequence during the current session. May question is if I can do something similar in Sling? For example, when the user request an url which resolves to my servlet or during my bundle startup.

I can access the JCR Repository but will the transaction mechanism work as its supposed to when resources are concerned (wich may be not be JCR-backed up…)?

And also how does Sling/JCR/Jackrabbit with both “transaction controlled” sessions and not “transaction controlled” at one time? Could this kind of behavior bring some inconsistencies to the repository if something goes wrong?

  • 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-27T03:08:27+00:00Added an answer on May 27, 2026 at 3:08 am

    Do you really need transactions? The JCR Session’s transient space works well as a lightweight transaction mechanism, if you close the session without calling save() all changes will be thrown away. The usual pattern is to do stuff in the servlets or scripts that handle your request, and only save if said stuff was successful.

    On the other hand, Sling provides full access to the underlying JCR Session, so you should be able do anything suitable. If not, best is to ask on the Sling users lists, see http://sling.apache.org/site/project-information.html#ProjectInformation-lists

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

Sidebar

Related Questions

From what I can gather, there are three categories: Never use GET and use
From the calculation returns -30. How can I remove the minus, so it just
From a blog: The basic idea with CSS expressions is that you will have
I am using the JCR API that uses method overloading like so: setProperty(String value)
I'm working on a web app that will need to process DITA documents from
From viewing the source code that this code makes it looks like itemValue generate
From this article I see I can use msbuild to apply configuration transformations but
From the Spring JDBC documentation, I know how to insert a blob using JdbcTemplate
From this string: $input = Some terms with spaces between; how can I produce
I'm using the following JCR-SQL2 Query to retrieve some files from jackrabbit repository SELECT

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.