Hi,
possible to call a CDI bean from a cxfrs resourceclass or register the
resource class as CDI bean? (Wildfly Camel 4.9.0)
from("cxfrs:http://localhost:8080/tua-kodtar/rest?resourceClasses=hu.fornax.tua.kodtar.rest.KodtarRESTImpl&performInvocation=true)
@Named("kodtarRESTImpl")
public class KodtarRESTImpl implements KodtarREST {
@Inject
private KodtarService kodtarService;
calling the rest endpoint getting NPE because the injected
kodtarService is null.
tried in this way :
@Inject
@Named("kodtarRESTImpl")
KodtarRESTImpl kodtarRESTImpl;
@Override
public void configure() throws Exception {
from("cxfrs:http://localhost:8080/tua-kodtar/restresourceClasses=#kodtarRESTImpl&performInvocation=true")
at the deploy:
Caused by: java.lang.ClassNotFoundException: #kodtarRESTImpl
Thanks,
Topicfun