You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Gerhard Petracek (JIRA)" <ji...@apache.org> on 2013/03/13 04:44:13 UTC
[jira] [Resolved] (DELTASPIKE-320) moving the entity-manager
injection can break the default handling
[ 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