QueryInvocationContext is null.

2017-12-19 Thread Luís Alves
I have the following code: @Repository public abstract class ConfigurationRepository extends AbstractEntityRepository implements EntityRepository, EntityManagerDelegate< Configuration> { *// FIXME: why this is null?!?@Injectprivate

Re: Could there be a final Java 6 version of DeltaSpike released?

2018-04-28 Thread Luís Alves
Hi Colin, Thanks for clarifying that. As I'm on vacation I did even tried to use 1.8.1, but AFAIK it shouldn't work. LA On Fri, Apr 27, 2018 at 9:20 PM, Astley, Colin (C.J.) wrote: > Hello, > > I'm writing to let you know that I tested 1.8.x with our applications and > it

Re: Could there be a final Java 6 version of DeltaSpike released?

2018-05-02 Thread Luís Alves
> Hi Luis, > > I want to make sure we're talking about the same thing. I tested some > fixes Thomas made and added to 1.8.x that make DeltaSpike Data work on WAS > 8 again. It had stopped working in 1.8.1. > > Colin > > -----Original Message- > From: Luís Alves <

Re: Could there be a final Java 6 version of DeltaSpike released?

2018-05-02 Thread Luís Alves
uld be great if you could test it ;) > > > 2018-05-02 9:49 GMT+02:00 Luís Alves <luisalve...@gmail.com>: > > > Hi Colin, > > > > what you've asked has nothing to do with issue I had. > > I was tying to use JCache (JSR-107) annotation in a @Repository and

Re: Could there be a final Java 6 version of DeltaSpike released?

2018-05-02 Thread Luís Alves
Tested. It works as in the master. Thanks :) LA On Wed, May 2, 2018 at 9:59 AM, Luís Alves <luisalve...@gmail.com> wrote: > Ok...I just have to finish something that I have on my working > copy...let's hope it doesn't take 6 hours to build like last time ;) > > LA > >

deltaspike with javax.transaction.Transactional

2018-02-06 Thread Luís Alves
Will deltaspike work with javax.transaction.Transactional? Do I need to specify an interceptor? Where can I find an example?

Re: deltaspike with javax.transaction.Transactional

2018-02-06 Thread Luís Alves
r server, you may need to just point to the container managed > transaction approach. What container are you deploying to (including > version)? > > On Tue, Feb 6, 2018 at 12:37 PM Luís Alves <luisalve...@gmail.com> wrote: > > > Will deltaspike work with javax.tr

Re: deltaspike with javax.transaction.Transactional

2018-02-06 Thread Luís Alves
a2...@gmail.com>: > > > > If you use wildfly10 it came with jeee7 that already came with > > annotation@Transactional. > > > > So if you use wildfy 10 you dont have to use deltaspike. > > Mauro > > > > Il 6 feb 2018 19:31, "Luís Alves&q

Re: deltaspike @Repository scope

2018-02-13 Thread Luís Alves
t; > 2018-02-13 11:39 GMT+01:00 Luís Alves <luisalve...@gmail.com>: > > > "An instance of a dependent bean is never shared between *different > clients > > *or different injection points." > > "Beans with scope @Dependent don’t need a proxy ob

Re: deltaspike @Repository scope

2018-02-13 Thread Luís Alves
gt; > please have a look at [1]. > > regards, > gerhard > > [1] http://deltaspike.apache.org/documentation/jpa.html#Basicusage > > > > 2018-02-13 12:11 GMT+01:00 Luís Alves <luisalve...@gmail.com>: > > > Well...I have REST services...so I think RequestSco

Re: deltaspike @Repository scope

2018-02-13 Thread Luís Alves
on the mode you are using. > > regards, > gerhard > > > > 2018-02-13 12:31 GMT+01:00 Luís Alves <luisalve...@gmail.com>: > > > There you use the @RequestScopedand you present @TransactionScoped, > > which seems exactly what I want but not sure what happens w

deltaspike @Repository scope

2018-02-13 Thread Luís Alves
Hi, What is the scope of @Repository? Do you use a similar approach of Spring? @Singleton and proxy the EM? Regards, LA

Re: deltaspike @Repository scope

2018-02-13 Thread Luís Alves
"An instance of a dependent bean is never shared between *different clients *or different injection points." "Beans with scope @Dependent don’t need a proxy object. The client holds a direct reference to its instance." so...I think I should be OK. On Tue, Feb 13, 2018 at

Re: deltaspike @Repository scope

2018-02-13 Thread Luís Alves
ead of BMT). > > regards, > gerhard > > [1] > https://github.com/apache/deltaspike/blob/master/ > deltaspike/modules/jpa/impl/src/main/java/org/apache/deltaspike/jpa/impl/ > transaction/ContainerManagedTransactionStrategy.java > > > > 2018-02-13 12:58 GMT+01:00

Re: deltaspike @Repository scope

2018-02-14 Thread Luís Alves
> hi luis, > > just fyi: > the ds-scheduler module [1] is using quartz as a default implementation and > provides a proper scope-handling out-of-the-box. > > regards, > gerhard > > [1] http://deltaspike.apache.org/documentation/scheduler.html > > > >

Re: deltaspike @Repository scope

2018-02-14 Thread Luís Alves
ith the EE7 concurrency-utils. > It doesn't require the request context to get activated :( > > You can work around this with DeltaSpike CdiCtrl or the CDI-2.0 Context > activator (if you are on an EE 8 server). > > LieGrue, > strub > > > Am 13.02.2018 um 15:48 sc

Re: @CacheResult not intercepted.

2018-02-14 Thread Luís Alves
self; Is this safe/good idea? On Wed, Feb 14, 2018 at 2:31 PM, Luís Alves <luisalve...@gmail.com> wrote: > This is not really DS specific, but DS might have some solutions. > > I'm using @CacheResult, but if I do a call from the same class the > interceptor is not triggered so

@CacheResult not intercepted.

2018-02-14 Thread Luís Alves
This is not really DS specific, but DS might have some solutions. I'm using @CacheResult, but if I do a call from the same class the interceptor is not triggered so the cache doesn't work. I suffered from the same issue with Spring (describe here:

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 <johndam...@apache.org> 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

Re: deltaspike with javax.transaction.Transactional

2018-02-08 Thread Luís Alves
operties, as John point out. Or I need to place this alternative on the jar(s) of my sevice layer where the TX is started. I'm going to try some scenarios this afternoon. On Wed, Feb 7, 2018 at 5:35 PM, Luís Alves <luisalve...@gmail.com> wrote: > Thanks John. I going to test it tomor

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

Gradle

2018-02-22 Thread Luís Alves
For Test Control to work I've placed this: //place the resources into the classesDir as described in https://deltaspike.apache.org/documentation/test-control.html#_gradle sourceSets { main { output.resourcesDir = output.classesDir } test { output.resourcesDir =

Re: @Observes @Initialized(ApplicationScoped.class) No active contexts for RequestScoped

2018-04-09 Thread Luís Alves
ically register it. > > On Mon, Apr 9, 2018 at 8:41 AM Luís Alves <luisalve...@gmail.com> wrote: > > > It partially worked on @PostConstruct :), my colleague is having some > issue > > with the TX. I'm working from home today, so I can only have a clear look > > tomorrow. >

Re: @Observes @Initialized(ApplicationScoped.class) No active contexts for RequestScoped

2018-04-11 Thread Luís Alves
100% sure. Should I have a dispose or not? Regards, LA On Mon, Apr 9, 2018 at 3:50 PM, Luís Alves <luisalve...@gmail.com> wrote: > Thanks John. > DS allows to programmatically activate the scope (Container Control > Module). > Not sure if it works the same way of @ActivateRequest

Re: @Observes @Initialized(ApplicationScoped.class) No active contexts for RequestScoped

2018-04-09 Thread Luís Alves
and not at @Observes @Initialized(ApplicationScoped.class)? - @Inject(ed) beans are available here LA On Mon, Apr 9, 2018 at 8:44 AM, Martin Kouba <mko...@redhat.com> wrote: > Dne 9.4.2018 v 09:33 Luís Alves napsal(a): > >> Thanks for you answers. >> Before I left we tried

@Observes @Initialized(ApplicationScoped.class) No active contexts for RequestScoped

2018-04-06 Thread Luís Alves
Hello, I'm getting: Caused by: java.lang.RuntimeException: org.jboss.weld.context.ContextNotActiveException: WELD-001303: No active contexts for scope type javax.enterprise.context.RequestScoped On bootstrap: @ApplicationScoped public class BootConfig { @Inject private Logger logger;

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
I have to leave :( don't do any change until I can confirm everything ;( have a nice weekend. On Fri, Apr 20, 2018 at 5:12 PM, Luís Alves <luisalve...@gmail.com> wrote: > wellI think we might have an issue with the proceed part: > > try { > //Call the annotated met

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
203 instead of my method :( any ideas? On Fri, Apr 20, 2018 at 5:07 PM, Luís Alves <luisalve...@gmail.com> wrote: > seems to work: org.apache.deltaspike.proxy.impl.invocation. > ManualInvocationContext@59fae308 > > not sure the cache is actually working but I think it's

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
where the hell is DeltaSpikeProxyInterceptorLookup? which jar I have to import?! On Fri, Apr 20, 2018 at 4:25 PM, Luís Alves <luisalve...@gmail.com> wrote: > I'll try@Specializes on CustomDeltaSpikeProxyInterceptorLookup > extends DeltaSpikeProxyInterceptorLookup should

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
ltaspike/modules/proxy/api/src/main/java/org/apache/ > deltaspike/proxy/spi/invocation/DeltaSpikeProxyInterceptorLookup.java#L90 > > This code would need ask CDI if this annotation is a interceptor binding > (if possible, not sure if it's in the CDI API). Then your case should work.

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
; inject/spi/BeanManager.html#isInterceptorBinding-java.lang.Class- > > Would be great if you can test it, create a issue and provide a patch. > > Am Freitag, 20. April 2018 schrieb Luís Alves : > > > I have no idea if it's possible or not. Isn't any CDI expert on the > mailing > >

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
So far I found that @Repository is actually a @PartialBeanBinding and I found: "Currently CDI Interceptors applied via @Interceptors, @Intercepted and @Decorator are not supported by our proxies! "...does it means that I'm screwed ;)? LA On Fri, Apr 20, 2018 at 10:11 AM, Luís Alves

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
; > 2018-04-20 11:22 GMT+02:00 Thomas Andraschko <andraschko.tho...@gmail.com > >: > > > Interceptors in generell should be supported but only via custom binding > - > > not via "@Interceptors, @Intercepted and @Decorator" > > > > 2018

@Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
Hi, @Repository is @Dependent scoped...and seems that @Dependent don't run interceptors, so @CacheResult(cacheName = "my-cache") annotation isn't working :( I remember that some one proposed that @Repository could/should be @ApplicationScoped...if I change them do I have to worry with anything?

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
So far no success...@CacheResult on @ApplicationScoped @Repository public abstract class SomeRepository doesn't seem to work :S not sure what I'm doing wrong. On Fri, Apr 20, 2018 at 11:03 AM, Luís Alves <luisalve...@gmail.com> wrote: > I ditched the CustomBaseRepository for now...

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
moved the @CustomInterceptor declaration of the interceptor for the web app beans.xml and now it gets calledSO it should work for the cache as well. Any hint? On Fri, Apr 20, 2018 at 12:43 PM, Luís Alves <luisalve...@gmail.com> wrote: > So I've created a custom one (in fact i

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
@Retention(RUNTIME) @Target({ TYPE, METHOD }) // @InterceptorBinding public @interface CustomInterceptor { } I suspect is this @InterceptorBindingbut not 100% surewhat is the purpose of that? On Fri, Apr 20, 2018 at 1:06 PM, Luís Alves <luisalve...@gmail.com> wrote: > don't

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
Apr 20, 2018 at 10:45 AM, Luís Alves <luisalve...@gmail.com> wrote: > Thanks Thomas, > > if I understood correctly if they are on the bean.xml they should works > :)...only annotated one don't work. > > I'm now (not sur

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
. > I don't have time to prepare it by myself. > > > 2018-04-20 12:40 GMT+02:00 Luís Alves <luisalve...@gmail.com>: > > > So far no success...@CacheResult on > > > > @ApplicationScoped > > @Repository > > public abstract class SomeRepository > >

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
can you update your test to remove @InterceptorBinding? and check if it works? javax.cache.annotation.CacheResult is standard so I don't want to extend it to have the @InterceptorBinding.if this is really the problem. On Fri, Apr 20, 2018 at 1:11 PM, Luís Alves <luisalve...@gmail.com>

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
don't you want to rewrite your tests with the @CacheResult interceptor ;) ? to see if it works? On Fri, Apr 20, 2018 at 12:57 PM, Thomas Andraschko < andraschko.tho...@gmail.com> wrote: > No idea, debug if the interceptor is really called ;) > > 2018-04-20 13:56 GMT+02:00 Luís

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
Submitted: https://github.com/jsr107/jsr107spec/issues/401 I suppose they will tell the issue is from DS...:( On Fri, Apr 20, 2018 at 2:36 PM, Luís Alves <luisalve...@gmail.com> wrote: > I suppose it's CDI capable. > > https://www.jcp.org/en/jsr/detail?id=107 > >

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
> > work without? > > > > > > Am Freitag, 20. April 2018 schrieb Luís Alves : > > > >> can you update your test to remove @InterceptorBinding? and check if it > >> works? > >> > >> javax.cache.annotation.CacheResult is

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
PM, Luís Alves <luisalve...@gmail.com> wrote: > I suppose it's CDI capable. > > https://www.jcp.org/en/jsr/detail?id=107 > > > > On Fri, Apr 20, 2018 at 2:24 PM, Thomas Andraschko < > andraschko.tho...@gmail.com> wrote: > >> Puh, i wonder why they

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-20 Thread Luís Alves
"see" the annotation? On Fri, Apr 20, 2018 at 3:25 PM, Luís Alves <luisalve...@gmail.com> wrote: > This is the reference implementation of the interceptors: > https://github.com/jsr107/RI > They have: > > http://java.sun.com/xml/ns/javaee; >xmlns:xsi

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-23 Thread Luís Alves
2018 at 8:11 PM, Thomas Andraschko < andraschko.tho...@gmail.com> wrote: > Would be great if you could create a issue + unittest, so i can fix it next > week. > > Am Freitag, 20. April 2018 schrieb Luís Alves : > > > I have to leave :( don't do any change until I can c

Re: @Repository and @CacheResult(cacheName = "my-cache")

2018-04-24 Thread Luís Alves
pr 23, 2018 at 1:36 PM, Thomas Andraschko < andraschko.tho...@gmail.com> wrote: > Should be fixed now by DELTASPIKE-1339. > > 2018-04-23 11:31 GMT+02:00 Luís Alves <luisalve...@gmail.com>: > > > when: > > > > //Call the a

Re: TransactionRequiredException when a transaction should exist

2020-05-08 Thread Luís Alves
Lucian, I think you are trying to persist a detached entity. Try this: @Transactional public void update(StuffDto stuffDto) throws Exception { Stuff entity = repository.findById(stuffDto.getId()); entity.setName(stuffDto.getName()); //To do mapping use something like mapstruct