Details

    • Type: Tracker Tracker
    • Status: Resolved Resolved (View Workflow)
    • Priority: Minor Minor
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.1.PFD
    • Component/s: Contexts
    • Labels:
      None
    • Environment:
      Java EE
    • Estimated Difficulty:
      Low
    • Similar Issues:
      None

      Description

      Add TransctionalScope as a standard scope to define beans whose lifecycle is the same as a given transaction.
      This scope should start automatically when a transaction starts (but lazily when actually needed).

        Issue Links

          Activity

          Hide
          Pete Muir
          added a comment - - edited

          @Transactional is being developed as part of a JTA maintenance release. It will live in the package javax.transaction. If you have any issue with this, please contact Linda DeMichel with your feedback (please cc me). Putting comments on this issue won't help

          I think the current plan is for @Transactional to be meta-annotated with @InterceptorBinding. If you see a problem with this, then there is an alternative option, which is for it to be made an interceptor binding at CDI deployment time using the CDI SPI. Again, Linda is the person to address this feedback to.

          Currently all scopes are defined in CDI. I'm perfectly open to addressing whether they should be moved out, but that is another discussion. On this basis, @TransactionScoped is being considered as part of CDI.

          @Transactional is proposed to have a single member, transactionType, which will be an enum of TransactionType. TransactionType is identical TransactionAttributeType, and indeed @Transactional is identical to @TransactionAttribute. However the plan is to add new, identical annotations and NOT to move the existing TransactionAttribute and TransactionAttributeType. This can't be done due to backwards compatibility requirements.

          There is also an extensive discussion on how EJB CMT should interact with the new @Transactional, which I would strongly recommend getting involved with, as currently we are having to choose between a set of bad options.

          Show
          Pete Muir
          added a comment - - edited @Transactional is being developed as part of a JTA maintenance release. It will live in the package javax.transaction. If you have any issue with this, please contact Linda DeMichel with your feedback (please cc me). Putting comments on this issue won't help I think the current plan is for @Transactional to be meta-annotated with @InterceptorBinding. If you see a problem with this, then there is an alternative option, which is for it to be made an interceptor binding at CDI deployment time using the CDI SPI. Again, Linda is the person to address this feedback to. Currently all scopes are defined in CDI. I'm perfectly open to addressing whether they should be moved out, but that is another discussion. On this basis, @TransactionScoped is being considered as part of CDI. @Transactional is proposed to have a single member, transactionType, which will be an enum of TransactionType. TransactionType is identical TransactionAttributeType, and indeed @Transactional is identical to @TransactionAttribute. However the plan is to add new, identical annotations and NOT to move the existing TransactionAttribute and TransactionAttributeType. This can't be done due to backwards compatibility requirements. There is also an extensive discussion on how EJB CMT should interact with the new @Transactional, which I would strongly recommend getting involved with, as currently we are having to choose between a set of bad options.
          Hide
          Pete Muir
          added a comment -

          To address specific packaging concerns. JTA is the Java EE standard for transactions, so any work done on transactions in Java EE naturally belongs there.

          Show
          Pete Muir
          added a comment - To address specific packaging concerns. JTA is the Java EE standard for transactions, so any work done on transactions in Java EE naturally belongs there.
          Hide
          Reza Rahman
          added a comment -

          Completely agree with Pete.

          Show
          Reza Rahman
          added a comment - Completely agree with Pete.
          Hide
          Pete Muir
          added a comment -

          On discussion with Java EE spec leads, @TransactionScoped will be developed as part of the JTA maintenance release for Java EE 7, for which the EG is the Java EE EG.

          Show
          Pete Muir
          added a comment - On discussion with Java EE spec leads, @TransactionScoped will be developed as part of the JTA maintenance release for Java EE 7, for which the EG is the Java EE EG.
          Hide
          Pete Muir
          added a comment -

          This has been added to Java EE.

          Show
          Pete Muir
          added a comment - This has been added to Java EE.

            People

            • Assignee:
              Richard Hightower
              Reporter:
              Richard Hightower
            • Votes:
              0 Vote for this issue
              Watchers:
              17 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 3 days
                3d
                Remaining:
                Remaining Estimate - 3 days
                3d
                Logged:
                Time Spent - Not Specified
                Not Specified