public void configure(DeploymentPhaseContext context, ComponentConfiguration componentConfiguration, ViewDescription description, ViewConfiguration configuration) throws DeploymentUnitProcessingException {
final Method TO_STRING_METHOD;
try {
TO_STRING_METHOD = Object.class.getMethod("toString");
} catch (NoSuchMethodException nsme) {
throw new DeploymentUnitProcessingException(nsme);
}
List<Method> methods = configuration.getProxyFactory().getCachedMethods();
for (Method method : methods) {
if (TO_STRING_METHOD.equals(method)) {
configuration.addClientInterceptor(method, new ImmediateInterceptorFactory(new ToStringMethodInterceptor(EJBComponentDescription.this.getComponentName())), InterceptorOrder.Client.TO_STRING);