[cdi-dev] [JBoss JIRA] (CDI-252) Allow transaction control inside observer methods

Pete Muir (JIRA) jira-events at lists.jboss.org
Wed Aug 22 12:24:15 EDT 2012


Pete Muir created CDI-252:
-----------------------------

             Summary: Allow transaction control inside observer methods
                 Key: CDI-252
                 URL: https://issues.jboss.org/browse/CDI-252
             Project: CDI Specification Issues
          Issue Type: Bug
          Components: Events, Java EE integration
    Affects Versions: 1.1.EDR
            Reporter: Pete Muir
             Fix For: TBD


>From Tom Jenkinson

{quote}

Would it make sense to maintain the same restrictions as JMS?

In JMS you can initiate a new transaction from onMessage, analogous to a method decorated with @Observes. If the method returns without completing the transaction then an error is logged and the transaction rolled back.

Flowing a transaction from an event producer to an event consumer isn't a great idea (it doesn't work in JMS either). But allowing a consumer to control their own transaction does seem to make sense to me.

Admittedly this is a gut reaction, I read through the Jira and the doc you linked to though, and used my JEE experience to draw analogies, do let me know if I got the wrong end of the stick please!

{quote}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the cdi-dev mailing list