Re: Can not get annotation instance on advised methods

2012-10-22 Thread Rural Hunter
No, it does not seems what I wanted. It's a pity that the annotation is lost in plastic class transformation. I have to find other ways. thanks anyway. 于 2012/10/23 2:16, Taha Siddiqi 写道: May be I didn't get you but may be JpaTransactionAdvisorImpl can help. It uses @CommitAfter and checks th

Re: Can not get annotation instance on advised methods

2012-10-22 Thread Taha Siddiqi
May be I didn't get you but may be JpaTransactionAdvisorImpl can help. It uses @CommitAfter and checks the PersistenceContext using @PersistenceContext on the same method to get the context for which the method has to be advised. On Oct 22, 2012, at 8:22 PM, Rural Hunter wrote: > hmm...I thin

Re: Can not get annotation instance on advised methods

2012-10-22 Thread Rural Hunter
hmm...I think it won't work in any way trying to get the annotation from the method where plastic already removes the annotation... 于 2012/10/22 18:34, Taha Siddiqi 写道: May be get the annotation in the advisor implementation using MethodAdviceReceiver#getMethodAnnotation On Oct 22, 2012, at

Re: Can not get annotation instance on advised methods

2012-10-22 Thread Taha Siddiqi
May be get the annotation in the advisor implementation using MethodAdviceReceiver#getMethodAnnotation On Oct 22, 2012, at 3:11 PM, Rural Hunter wrote: > 于 2012/10/22 17:02, Taha Siddiqi 写道: >> Did you try invocation.getInstance().getAnnotation() ? > What is that for? I read the API and seems i

Re: Can not get annotation instance on advised methods

2012-10-22 Thread Rural Hunter
于 2012/10/22 17:02, Taha Siddiqi 写道: Did you try invocation.getInstance().getAnnotation() ? What is that for? I read the API and seems it's not what I needed. My annotation is on methods being advised, not on the class instance. I also tried invocation.getMethod().getAnnotations() and it return

Re: Can not get annotation instance on advised methods

2012-10-22 Thread Taha Siddiqi
Did you try invocation.getInstance().getAnnotation() ? On Oct 22, 2012, at 1:15 PM, Rural Hunter wrote: > Hi, > > I have an annotation: > @Documented > @Retention(RetentionPolicy.RUNTIME) > @Target(ElementType.METHOD) > public @interface Audit > { >String operate() default ""; >String de

Can not get annotation instance on advised methods

2012-10-22 Thread Rural Hunter
Hi, I have an annotation: @Documented @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface Audit { String operate() default ""; String desc() default ""; int type(); int idParamIndex() default 0; } I put on some methods of my DAO services and advised