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:16:16 UTC
[jira] [Created] (DELTASPIKE-320) moving the entity-manager
injection can break the default handling
Gerhard Petracek created DELTASPIKE-320:
-------------------------------------------
Summary: 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