[cdi-dev] [JBoss JIRA] (CDI-144) Support Injection into Entity Listeners

Jens Schumann (JIRA) jira-events at lists.jboss.org
Wed Aug 22 11:48:15 EDT 2012


    [ https://issues.jboss.org/browse/CDI-144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713102#comment-12713102 ] 

Jens Schumann commented on CDI-144:
-----------------------------------

Since I have been running into this issue lately: JPA does not recommend EntityManager interactions within JPA lifecycle callbacks. Shouldn't we add a note somewhere that injected resources require special attention regarding JPA compliance? And because of that firing CDI events from a JPA entity listener is particularly dangerous?

In my case I tried to implement global available created/updated/deleted entity events which turned out to be an bad idea if implemented on EntityListener level.
                
> Support Injection into Entity Listeners
> ---------------------------------------
>
>                 Key: CDI-144
>                 URL: https://issues.jboss.org/browse/CDI-144
>             Project: CDI Specification Issues
>          Issue Type: Tracker
>    Affects Versions: 1.0
>            Reporter: Cody Lerum
>            Assignee: Pete Muir
>             Fix For: 1.1 (Proposed)
>
>
> It would be very convenient if CDI was available inside JPA Entity Listeners. 

--
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