Giter Site home page Giter Site logo

Comments (6)

rdebusscher avatar rdebusscher commented on July 23, 2024

With the @NestedLRA you can implement a specific scenario which is not possible when using only @lra(type=Type.NEW)

This is the current spec document (see https://github.com/eclipse/microprofile-lra/blob/master/spec/src/main/asciidoc/microprofile-lra-spec.adoc)

  • If the nested LRA is closed but the outer LRA is cancelled then the
    participants registered with the nested LRA will be told to compensate.
  • If the nested LRA is cancelled the outer LRA can be still closed.

So a NestedLRA is not completely independent from the 'parent' LRA in which it runs. If the parent is cancelled, the compensate actions for the NestedLRA are also called. But the NestedLRA can be cancelled although the 'parent' LRA can just be successfully closed.

When you try to implement it using only the @LRA, there is no possibility to the achieve the above scenario.

Also what happens if an LRA isn't active when @NestedLRA is called?

An exception should be thrown indicating this wrong usage status. But is isn't specified in the spec at the moment.
I have opened eclipse/microprofile-lra#117

from microprofile-sandbox.

mmusgrov avatar mmusgrov commented on July 23, 2024

How about adding the NESTED option to the Type attributed of the @LRA annotation, ie

NESTED, REQUIRED, REQUIRES_NEW, MANDATORY, SUPPORTS, NOT_SUPPORTED, NEVER

from microprofile-sandbox.

kenfinnigan avatar kenfinnigan commented on July 23, 2024

Wondering if this issue should be moved to https://github.com/eclipse/microprofile-lra and the LRA code removed from the sandbox?

from microprofile-sandbox.

mmusgrov avatar mmusgrov commented on July 23, 2024

+1 I'll do that as soon as @nmcl and the team have resolved this current question

from microprofile-sandbox.

mmusgrov avatar mmusgrov commented on July 23, 2024

@nmcl we have created issue #117 for this in the microprofile-lra repo. Do you mind if we close this one in preparation for removing LRA from the sandbox.

from microprofile-sandbox.

mmusgrov avatar mmusgrov commented on July 23, 2024

Moved to eclipse/microprofile-lra#117

from microprofile-sandbox.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.