Pass data from ContainerRequestFilter to Resource
<p>I don't know how to pass object data from container request filter to any other resources, by using CDI, because I cannot get my data in the resource. Any idea?</p>

<pre><code>@Provider
public class AuthFilter implements ContainerRequestFilter {
    @Inject
    private SomeBean bean;

    @Override
    public void filter(ContainerRequestContext requestContext) throws IOException {
        bean.setData("test");
    }
}

@ManagedBean
@RequestScoped
public class SomeBean
{
    private String data;

    public String getData() {
        return data;
    }
}
</code></pre>

<p>And in my resource class I have the following:</p>

<pre><code>@Inject
private SomeBean bean;

@GET
public Response someMethod() {
    return Response.ok(bean.getData()).build();
}
</code></pre>