Re: null QueryInvocationContext (querydsl)

2018-02-08 Thread John D. Ament
Correct, QueryInvocationContext is not valid in the scenario you have listed. On Thu, Feb 8, 2018 at 10:47 AM Luís Alves wrote: > well...I can acess the current EM with: > > final JPAQuery qry = new JPAQuery( > *entityManager()*).from(c) > .where(c.key.eq(key)); > > so I don't ne

Re: null QueryInvocationContext (querydsl)

2018-02-08 Thread Luís Alves
well...I can acess the current EM with: final JPAQuery qry = new JPAQuery( *entityManager()*).from(c) .where(c.key.eq(key)); so I don't need to inject the context. I don't need a fancy delegate. On Thu, Feb 8, 2018 at 3:39 PM, Luís Alves wrote: > Hello, > > I'm trying to user

null QueryInvocationContext (querydsl)

2018-02-08 Thread Luís Alves
Hello, I'm trying to user QueryDSL. From the examples at https://deltaspike.apache.org/documentation/data.html O got to something like this: @Repository public abstract class ConfigurationRepository extends AbstractEntityRepository implements EntityRepository, EntityManagerDelegate {

Re: deltaspike with javax.transaction.Transactional

2018-02-08 Thread Luís Alves
yup :) thanks John On Thu, Feb 8, 2018 at 12:39 PM, John D. Ament wrote: > Luis, > > This issue is solved by using the global alternative in > META-INF/apache-deltaspike.properties. > > John > > On Thu, Feb 8, 2018 at 7:11 AM Luís Alves wrote: > > > So... from the stack: > > > > Caused by: java

Re: deltaspike with javax.transaction.Transactional

2018-02-08 Thread John D. Ament
Luis, This issue is solved by using the global alternative in META-INF/apache-deltaspike.properties. John On Thu, Feb 8, 2018 at 7:11 AM Luís Alves wrote: > So... from the stack: > > Caused by: java.lang.IllegalStateException: A JTA EntityManager cannot use > getTransaction() > at > > org.

Re: deltaspike with javax.transaction.Transactional

2018-02-08 Thread Luís Alves
So... from the stack: Caused by: java.lang.IllegalStateException: A JTA EntityManager cannot use getTransaction() at org.hibernate.jpa.spi.AbstractEntityManagerImpl.getTransaction(AbstractEntityManagerImpl.java:1333) at org.jboss.as.jpa.container.AbstractEntityManager.getTransaction(Abstra