[jboss-jira] [JBoss JIRA] Resolved: (JBAS-8120) EE Field Producer pattern isn't working well for persistence contexts and declarative TX management

Marius Bogoevici (JIRA) jira-events at lists.jboss.org
Wed Jun 23 16:27:46 EDT 2010


     [ https://jira.jboss.org/browse/JBAS-8120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marius Bogoevici resolved JBAS-8120.
------------------------------------

    Resolution: Done


JBossJpaServices should not use createEntityManager() for creating the EntityManager that is injected, as that is effectively an application-manager EntityManager. A TransactionScopedEntityManager should be used instead.

> EE Field Producer pattern isn't working well for persistence contexts and declarative TX management
> ---------------------------------------------------------------------------------------------------
>
>                 Key: JBAS-8120
>                 URL: https://jira.jboss.org/browse/JBAS-8120
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Weld/CDI
>            Reporter: Pete Muir
>            Assignee: Marius Bogoevici
>             Fix For: 6.0.0.M4
>
>
> The producer field pattern, described 3.5.1 of the CDI spec isn't working well right now. The intent is that a PC declared should come under the declarative TX management of an ejb. For example
> class EEProducers {
>    @Produces @PersistenceContext EntityManager em;
> }
> @Stateful
> class FooManager {
>    @Inject EntityManager em;
>    public void persistFoo(foo) {
>       em.persist(foo);
>    }
> }
> em should respect the declarative TX management of the EJB.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list