Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7178195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:52:20+00:00 2026-05-28T16:52:20+00:00

I have an interceptor binding, which is parameterized: @InterceptorBinding @Target({ ElementType.METHOD, ElementType.TYPE }) @Retention(RetentionPolicy.RUNTIME)

  • 0

I have an interceptor binding, which is parameterized:

@InterceptorBinding
@Target({ ElementType.METHOD, ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
public @interface Traced {

   @Nonbinding
   boolean traceFull() default true;
}

Then I define an interceptor implementation

@Interceptor
@Traced
public class TracingInterceptor implements Serializable { ... }

In the implementation I want to check which value is set to the traceFull-parameter.
(I do not want to implement three interceptor implementations for true, false and null)

So my implementation checks the Interceptor-Binding-Annotation of the intercepted method:

Traced traceAnnotation = context.getMethod().getAnnotation(Traced.class);
if (traceAnnotation != null && traceAnnotation.traceFull()) { ... }

This works fine but if I use a Stereotype or a nested interceptor binding then I don’t get the @Traced annotatopn of the method and I cannot check the value which is set.

So my question is: How can I get the ‘calling’ binding within my interceptor implementation?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T16:52:21+00:00Added an answer on May 28, 2026 at 4:52 pm

    This is not possible in CDI 1.0, but should be in CDI 1.1

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Spring Interceptor which attempts to add an HTTP header in the
Let's say I have an interceptor that looks smth like this: public class AuthorizationInterceptor
I have rest controllers that returns Json response. I have added interceptor which will
I have an interceptor in Spring, which autowires two different services. Both services have
In my JEE6-CDI-webapp, i declared a Security Interceptor, like this one: //Secure.java @Inherited @Target({TYPE,
Which option is better ? I have an interceptor PermissionInterceptor which needs access to
I have a class which inherits from QTreeWidgetItem and I intercept the click event.
Have just started using Visual Studio Professional's built-in unit testing features, which as I
I have some beans for which, in specific injections, I want to add a
In my application I have added interceptor to filter the request.Here each user is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.