protected ComponentContext getInternalContext() throws Exception {
if (context == null) {
if (factory == null) {
if (context != null) {
factory = new ClientFactory() {
public ServiceMixClient createClient() throws JBIException {
return new ServiceMixClientFacade(context);
}
};
} else if (container != null) {