Issue Details (XML | Word | Printable)

Key: JERSEY-1997
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Jakub Podlesak
Reporter: Jakub Podlesak
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
jersey

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

Created: 02/Aug/13 09:26 AM   Updated: 08/Aug/13 11:40 AM   Resolved: 07/Aug/13 05:37 PM
Component/s: containers
Affects Version/s: 2.1
Fix Version/s: 2.2

Time Tracking:
Original Estimate: Not Specified
Remaining Estimate: 0 minutes
Remaining Estimate - 0 minutes
Time Spent: 3 hours
Time Spent - 3 hours

Tags:
Participants: Jakub Podlesak


 Description  « Hide

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"));
    }
}


Jakub Podlesak added a comment - 07/Aug/13 05:37 PM

fixed in the master branch