Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate Issue
    • Affects Version/s: 1.0
    • Fix Version/s: 2.0 (discussion)
    • Component/s: Events
    • Labels:
      None

      Description

      Consider including asynchronous events as their were specified in one of the previous drafts.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            mkouba Martin Kouba added a comment -

            AFAIK EJB asynchronous methods do not propagate transaction context (see 4.5.3 Transactions in spec). Frankly speaking I can not imagine how this (any context propagation) could work and what benefits it would bring.

            As CDI 1.1 will surely have context lifecycle support there is a place for portable extensions to implement non-EJB async events (e.g. deltaspike module).

            So I don't think it's necessary to define asychronous events in the spec. Nevertheless I do vote for independent execution with no context propagation.

            Show
            mkouba Martin Kouba added a comment - AFAIK EJB asynchronous methods do not propagate transaction context (see 4.5.3 Transactions in spec). Frankly speaking I can not imagine how this (any context propagation) could work and what benefits it would bring. As CDI 1.1 will surely have context lifecycle support there is a place for portable extensions to implement non-EJB async events (e.g. deltaspike module). So I don't think it's necessary to define asychronous events in the spec. Nevertheless I do vote for independent execution with no context propagation.
            Hide
            gpetracek Gerhard Petracek added a comment -

            based on deltaspike that's available since today ( see http://os890.blogspot.com/2013/05/async-cdi.html ) -> you can customize it easily (if you need more than what's available).

            Show
            gpetracek Gerhard Petracek added a comment - based on deltaspike that's available since today ( see http://os890.blogspot.com/2013/05/async-cdi.html ) -> you can customize it easily (if you need more than what's available).
            Hide
            mkouba Martin Kouba added a comment -

            Gerhard, I don't think your AsyncInterceptor impl is quite correct and portable. Firstly the interceptors spec states: "Around-invoke and around-timeout interceptor methods run in the same Java thread as the associated target method.". So if there's some associated interceptor to be invoked after AsyncInterceptor this spec rule is violated. Furthermore I don't think it's legal/portable to invoke InvocationContext.proceed() in a different thread...

            Show
            mkouba Martin Kouba added a comment - Gerhard, I don't think your AsyncInterceptor impl is quite correct and portable. Firstly the interceptors spec states: "Around-invoke and around-timeout interceptor methods run in the same Java thread as the associated target method.". So if there's some associated interceptor to be invoked after AsyncInterceptor this spec rule is violated. Furthermore I don't think it's legal/portable to invoke InvocationContext.proceed() in a different thread...
            Hide
            gpetracek Gerhard Petracek added a comment - - edited

            i haven't said that it is spec compliant or portable or supports every use-case. currently it only works with owb.

            Show
            gpetracek Gerhard Petracek added a comment - - edited i haven't said that it is spec compliant or portable or supports every use-case. currently it only works with owb.
            Hide
            antoinesabot-durand Antoine Sabot-Durand added a comment -

            This ticket has been superseded by CDI-499.

            Show
            antoinesabot-durand Antoine Sabot-Durand added a comment - This ticket has been superseded by CDI-499 .

              People

              • Assignee:
                Unassigned
                Reporter:
                nickarls Nicklas Karlsson
              • Votes:
                9 Vote for this issue
                Watchers:
                14 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development