jersey
  1. jersey
  2. JERSEY-1997

EJB/CDI integration does not work for JAX-RS providers, only for resource classes

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.2
    • Component/s: containers
    • Labels:
      None

      Description

      The following provider will cause NPE, as the @EJB injection does not happen:

      @Provider
      @Singleton
      public class MyFilter implements javax.ws.rs.container.ContainerResponseFilter{
      
          @EJB EchoBean bean;
      
          @Override
          public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) throws IOException {
              responseContext.getHeaders().add("EchoFilterHeader", bean.echo("hi"));
          }
      }
      

        Activity

        Hide
        Jakub Podlesak added a comment -

        fixed in the master branch

        Show
        Jakub Podlesak added a comment - fixed in the master branch

          People

          • Assignee:
            Jakub Podlesak
            Reporter:
            Jakub Podlesak
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 3 hours
              3h