super(beanContext, interfaceType, interfaces, mainInterface);
}
public Object createProxy(Object primaryKey, Class mainInterface) {
Object proxy = super.createProxy(primaryKey, mainInterface);
EjbObjectProxyHandler handler = null;
try {
handler = (EjbObjectProxyHandler) ProxyManager.getInvocationHandler(proxy);
} catch (Exception e) {
// try getting the invocation handler from the localbean
try {
Field field = proxy.getClass().getDeclaredField("invocationHandler");
field.setAccessible(true);
handler = (EjbObjectProxyHandler) field.get(proxy);
} catch (Exception e1) {
}
}
registerHandler(handler.getRegistryId(), handler);
return proxy;
}