Mail Archive Home | fractal-commits List | May 2008 Index
| <-- Date Index --> | <-- Thread Index --> |
add some loggings
--- sandbox/ervalerio/fractal-bf/core/src/main/java/org/objectweb/fractal/bf/proxies/AbstractStubComponentFactory.java 2008-05-30 07:42:09 UTC (rev 7810)
+++ sandbox/ervalerio/fractal-bf/core/src/main/java/org/objectweb/fractal/bf/proxies/AbstractStubComponentFactory.java 2008-05-30 08:09:10 UTC (rev 7811)
@@ -32,7 +32,7 @@
* The generic factory used to instantiate components
*/
protected GenericFactory gf;
- protected StubContentGenerator stubContentGenerator;
+ protected StubContentGenerator<?> stubContentGenerator;
/**
* Abstract implementation for proxy factories.
@@ -53,13 +53,18 @@
public Component createStubComponent(InterfaceType iType,
BindHints bindHints) throws InstantiationException {
+
+ log
+ .fine("Creating stub component from client interface's interface type: "
+ + iType + " and bindHints: " + bindHints);
+
Class<?> clazz = null;
try {
clazz = Class.forName(iType.getFcItfSignature());
} catch (ClassNotFoundException e) {
e.printStackTrace();
throw new InstantiationException(
- "Invalid InterfaceType signature: "
+ "Cannot find class for interface type: "
+ iType.getFcItfSignature());
}
@@ -77,25 +82,33 @@
+ e.getCause());
}
- InterfaceType proxyInterfaceType = symmetricInterfaceType(iType);
-
- ComponentType proxyType = createProxyType(proxyInterfaceType);
-
+ InterfaceType stubInterfaceType = symmetricInterfaceType(iType);
+ log.finer("Interface type for stub component created: "
+ + stubInterfaceType);
+ ComponentType stubComponentType = createProxyType(stubInterfaceType);
+ log.finer("Component type for stub component created: "
+ + stubComponentType);
Object[] ctrlDesc = new Object[] {
stubComponentContentInstance.getClass().getClassLoader(),
proxyMembraneDescriptor() };
-
- Component proxyComponent = gf.newFcInstance(proxyType, ctrlDesc,
+ log.finest("Controller descriptor for stub component: " + ctrlDesc);
+ Component stubComponent = gf.newFcInstance(stubComponentType, ctrlDesc,
stubComponentContentInstance);
+ log.finer("Stub component created: " + stubComponent);
try {
- Fractal.getNameController(proxyComponent).setFcName(
- clazz.getCanonicalName() + "$$BindingFactoryGeneratedStub");
+ final String stubComponentFcName = clazz.getCanonicalName()
+ + "$$BindingFactoryGeneratedStub";
+ Fractal.getNameController(stubComponent).setFcName(
+ stubComponentFcName);
+ log.finer("Stub component name set to: " + stubComponentFcName);
} catch (NoSuchInterfaceException e) {
// do nothing
+ log
+ .warning("Cannot set the name of the stub component - (cannot find NameController interface)");
}
- return proxyComponent;
+ return stubComponent;
}
/**
| <-- Date Index --> | <-- Thread Index --> |
Powered by MHonArc.
Copyright © 2006-2007, OW2 Consortium | contact | webmaster.