use of org.jboss.wsf.spi.deployment.Reference in project jbossws-cxf by jbossws.
the class ServletHelper method injectServiceAndHandlerResources.
private static void injectServiceAndHandlerResources(Endpoint endpoint) {
org.apache.cxf.endpoint.Endpoint ep = endpoint.getAttachment(org.apache.cxf.endpoint.Endpoint.class);
if (ep != null) {
@SuppressWarnings("rawtypes") List<Handler> chain = ((JaxWsEndpointImpl) ep).getJaxwsBinding().getHandlerChain();
if (chain != null) {
for (Handler<?> handler : chain) {
if (handler instanceof ConfigDelegateHandler) {
handler = ((ConfigDelegateHandler<?>) handler).getDelegate();
}
final Reference handlerReference = endpoint.getInstanceProvider().getInstance(handler.getClass().getName());
if (!handlerReference.isInitialized()) {
final Object handlerInstance = handlerReference.getValue();
InjectionHelper.callPostConstructMethod(handlerInstance);
handlerReference.setInitialized();
}
}
}
}
}
Aggregations