Hi,

I have tried to inject CDI Bean (using @Inject) in the CXF interceptor but
it is not instantiated and is null.
However If I use the CDI injection in the Webservice implementation class,
then it is instantiated correctly.

Interceptor
public class InfoInterceptor extends AbstractPhaseInterceptor<Message>  {

        public InfoInterceptor() {
                super(Phase.RECEIVE);
        }

        @Inject InfoBean info;  // not instantiated and null!!
....
 }

Webservice (declared interceptor in webservice).
@org.apache.cxf.interceptor.InInterceptors(interceptors =
{"org.test.sample.InfoInterceptor"})
@WebService(....)
public class InfoImpl { ...

        @Inject InfoBean info;  // works here
...
}

Does CXF interceptors not support CDI injection currently ? 

Appreciate your response on this. Thanks



--
Sent from: http://cxf.547215.n5.nabble.com/cxf-user-f547216.html

Reply via email to