new InvocationHandler() {
public Object invoke(Object proxy,
Method method,
Object[] args) throws Throwable {
// use runtimeContext from TLS
RuntimeContext runtimeContext =
RuntimeContextTLS.getRuntimeContext();
// get the real context from the
// RuntimeContext
Object context =
runtimeContext.getAttribute(contextClass);
// invoke the method on the real
// context
return method.invoke(context, args);
}
});