deltaspike-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerhard Petracek (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DELTASPIKE-320) moving the entity-manager injection can break the default handling
Date Wed, 13 Mar 2013 03:44:13 GMT

     [ https://issues.apache.org/jira/browse/DELTASPIKE-320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gerhard Petracek resolved DELTASPIKE-320.
-----------------------------------------

    Resolution: Fixed
    
> moving the entity-manager injection can break the default handling
> ------------------------------------------------------------------
>
>                 Key: DELTASPIKE-320
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-320
>             Project: DeltaSpike
>          Issue Type: Bug
>          Components: JPA-Module
>    Affects Versions: 0.3-incubating
>            Reporter: Gabriel Sosa
>            Assignee: Gerhard Petracek
>             Fix For: 0.4-incubating
>
>
> e.g. a refactoring from:
> public class TransactionalBean
> {
>     @Inject
>     private EntityManager entityManager;
>     @Transactional
>     public void executeInTransaction()
>     {
>         //...
>     }
> }
> to
> public class TransactionalBean
> {
>     @Inject
>     private BeanA beanA;
>     @Inject
>     private BeanB beanB;
>     @Transactional
>     public void executeInTransaction()
>     {
>         this.beanA.doA();
>         this.beanB.doB();
>     }
> }
> public class BeanA
> {
>     @Inject
>     private EntityManager entityManager;
>     public void doA()
>     {
>         //...
>     }
> }
> public class BeanB
> {
>     @Inject
>     private EntityManager entityManager;
>     public void doB()
>     {
>         //...
>     }
> }
> isn't possible without using @Transactional(qualifier = Default.class) explicitly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message