e.printStackTrace();
}
//create service and register using export types
Child service = newChild();
serviceRegistry.addService(null, "moduleName", new StaticServiceBeanReference(service), Arrays.asList(exportTypes) , null, classLoader);
try {
child.childMethod();
fail();
}
catch (NoServiceException e) {
e.printStackTrace();
}
//register using bean name too
serviceRegistry.addService("mybean", "moduleName", new StaticServiceBeanReference(service), Arrays.asList(exportTypes) , null, classLoader);
child.childMethod();
}