You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by Daniel Cunha <da...@gmail.com> on 2015/06/30 21:38:21 UTC

Data and JPA module

Hi folks,

we have a new issue little bit weird.
https://issues.apache.org/jira/browse/DELTASPIKE-940

My doubt is:
If we have define EntityManagerConfig in ours Repository, so.. we does'

-- 
Best regard,
Daniel Cunha (soro)

Re: Data and JPA module

Posted by Daniel Cunha <da...@gmail.com>.
Hi folks,

we have a new issue little bit weird.
https://issues.apache.org/jira/browse/DELTASPIKE-940

My doubt is:
If we have define EntityManagerConfig in ours Repository, so.. Do we use
the @Transactional in some method, what is assumed?
@Transactional or the EntityManagerResolver in EntityManagerConfig?

On Tue, Jun 30, 2015 at 4:38 PM, Daniel Cunha <da...@gmail.com> wrote:

> Hi folks,
>
> we have a new issue little bit weird.
> https://issues.apache.org/jira/browse/DELTASPIKE-940
>
> My doubt is:
> If we have define EntityManagerConfig in ours Repository, so.. we does'
>
> --
> Best regard,
> Daniel Cunha (soro)
>



-- 
Best regard,
Daniel Cunha (soro)

Re: Data and JPA module

Posted by Daniel Cunha <da...@gmail.com>.
Thomas,

I get it.
Thank you.

On Wed, Jul 1, 2015 at 6:51 AM, Thomas Hug <th...@gmail.com> wrote:

> Hi Daniel
> AFAIR we have a hook in the JPA module [1][2] where we can propagate the
> repository EM to the transaction strategy (DefaultEntityManagerHolder and
> [3]). So EntityManagerResolver should have precedence, but it depends
> overall on the TransactionStrategy if it's picked up or not.
>
> Agree that it would be nice to be consistent here. EntityManagerConfig was
> introduced AFAIR to have the same concept as MessageContextConfig /
> Resolver in the JSF module. The current @Transactional way works not with
> qualifier attributes.
>
> [1]
>
> https://github.com/apache/deltaspike/blob/master/deltaspike/modules/jpa/api/src/main/java/org/apache/deltaspike/jpa/spi/entitymanager/ActiveEntityManagerHolder.java
> [2]
>
> https://github.com/apache/deltaspike/blob/master/deltaspike/modules/jpa/impl/src/main/java/org/apache/deltaspike/jpa/impl/transaction/ResourceLocalTransactionStrategy.java#L87
> [3]
>
> https://github.com/apache/deltaspike/blob/master/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/tx/TransactionalQueryRunner.java
>
> On Tue, Jun 30, 2015 at 9:40 PM, Daniel Cunha <da...@gmail.com>
> wrote:
>
> > Hi folks,
> >
> > we have a new issue little bit weird.
> > https://issues.apache.org/jira/browse/DELTASPIKE-940
> >
> > My doubt is:
> > If we have define EntityManagerConfig in ours Repository, so.. Do we use
> > the @Transactional in some method, what is assumed?
> > @Transactional or the EntityManagerResolver in EntityManagerConfig?
> >
> > On Tue, Jun 30, 2015 at 4:38 PM, Daniel Cunha <da...@gmail.com>
> > wrote:
> >
> > > Hi folks,
> > >
> > > we have a new issue little bit weird.
> > > https://issues.apache.org/jira/browse/DELTASPIKE-940
> > >
> > > My doubt is:
> > > If we have define EntityManagerConfig in ours Repository, so.. we does'
> > >
> > > --
> > > Best regard,
> > > Daniel Cunha (soro)
> > >
> >
> >
> >
> > --
> > Best regard,
> > Daniel Cunha (soro)
> >
>



-- 
Best regard,
Daniel Cunha (soro)

Re: Data and JPA module

Posted by Thomas Hug <th...@gmail.com>.
Hi Daniel
AFAIR we have a hook in the JPA module [1][2] where we can propagate the
repository EM to the transaction strategy (DefaultEntityManagerHolder and
[3]). So EntityManagerResolver should have precedence, but it depends
overall on the TransactionStrategy if it's picked up or not.

Agree that it would be nice to be consistent here. EntityManagerConfig was
introduced AFAIR to have the same concept as MessageContextConfig /
Resolver in the JSF module. The current @Transactional way works not with
qualifier attributes.

[1]
https://github.com/apache/deltaspike/blob/master/deltaspike/modules/jpa/api/src/main/java/org/apache/deltaspike/jpa/spi/entitymanager/ActiveEntityManagerHolder.java
[2]
https://github.com/apache/deltaspike/blob/master/deltaspike/modules/jpa/impl/src/main/java/org/apache/deltaspike/jpa/impl/transaction/ResourceLocalTransactionStrategy.java#L87
[3]
https://github.com/apache/deltaspike/blob/master/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/tx/TransactionalQueryRunner.java

On Tue, Jun 30, 2015 at 9:40 PM, Daniel Cunha <da...@gmail.com> wrote:

> Hi folks,
>
> we have a new issue little bit weird.
> https://issues.apache.org/jira/browse/DELTASPIKE-940
>
> My doubt is:
> If we have define EntityManagerConfig in ours Repository, so.. Do we use
> the @Transactional in some method, what is assumed?
> @Transactional or the EntityManagerResolver in EntityManagerConfig?
>
> On Tue, Jun 30, 2015 at 4:38 PM, Daniel Cunha <da...@gmail.com>
> wrote:
>
> > Hi folks,
> >
> > we have a new issue little bit weird.
> > https://issues.apache.org/jira/browse/DELTASPIKE-940
> >
> > My doubt is:
> > If we have define EntityManagerConfig in ours Repository, so.. we does'
> >
> > --
> > Best regard,
> > Daniel Cunha (soro)
> >
>
>
>
> --
> Best regard,
> Daniel Cunha (soro)
>