}
Endpoint e = message.getExchange().get(Endpoint.class);
if (e != null && e.getService() != null) {
Invoker invoker = e.getService().getInvoker();
if (invoker instanceof FactoryInvoker) {
FactoryInvoker factoryInvoker = (FactoryInvoker)invoker;
if (factoryInvoker.isSingletonFactory()) {
return factoryInvoker.getServiceObject(message.getExchange());
}
}
}
return null;
}