ModuleDefinitionHelper helper = new ModuleDefinitionHelper(module);
ServicePointDefinition sp = helper.addServicePoint(serviceName, serviceInterface);
helper.addSimpleServiceImplementation(sp, implementationClass, ServiceModel.SINGLETON);
// Add logging interceptor
InterceptorConstructor constructor = new AbstractServiceInterceptorConstructor(module.getLocation()) {
public void constructServiceInterceptor(InterceptorStack interceptorStack, Module contributingModule)
{
ClassFactory cf = (ClassFactory) contributingModule.getService(ClassFactory.class);
// Create the interceptor with the LoggingInterceptorClassFactory which is quite uncomfortable