public Object createProxy(final Object primaryKey, final Class mainInterface) { final Object proxy = super.createProxy(primaryKey, mainInterface); EjbObjectProxyHandler handler = null; try { handler = (EjbObjectProxyHandler) ProxyManager.getInvocationHandler(proxy); } catch (final Exception e) { // try getting the invocation handler from the localbean try { final Field field = proxy.getClass().getDeclaredField("invocationHandler"); field.setAccessible(true); handler = (EjbObjectProxyHandler) field.get(proxy); } catch (final Exception e1) { // no-op } } registerHandler(handler.getRegistryId(), handler); return proxy; }
public Object createProxy(final Object primaryKey, final Class mainInterface) { final Object proxy = super.createProxy(primaryKey, mainInterface); EjbObjectProxyHandler handler = null; try { handler = (EjbObjectProxyHandler) ProxyManager.getInvocationHandler(proxy); } catch (final Exception e) { // try getting the invocation handler from the localbean try { final Field field = proxy.getClass().getDeclaredField("invocationHandler"); field.setAccessible(true); handler = (EjbObjectProxyHandler) field.get(proxy); } catch (final Exception e1) { // no-op } } registerHandler(handler.getRegistryId(), handler); return proxy; }
public Object createProxy(Object primaryKey) { Object proxy = super.createProxy(primaryKey); 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; }
public Object createProxy(final Object primaryKey, final Class mainInterface) { final Object proxy = super.createProxy(primaryKey, mainInterface); EjbObjectProxyHandler handler = null; try { handler = (EjbObjectProxyHandler) ProxyManager.getInvocationHandler(proxy); } catch (final Exception e) { // try getting the invocation handler from the localbean try { final Field field = proxy.getClass().getDeclaredField("invocationHandler"); field.setAccessible(true); handler = (EjbObjectProxyHandler) field.get(proxy); } catch (final Exception e1) { // no-op } } registerHandler(handler.getRegistryId(), handler); return proxy; }
public Object createProxy(final Object primaryKey, final Class mainInterface) { final Object proxy = super.createProxy(primaryKey, mainInterface); EjbObjectProxyHandler handler = null; try { handler = (EjbObjectProxyHandler) ProxyManager.getInvocationHandler(proxy); } catch (final Exception e) { // try getting the invocation handler from the localbean try { final Field field = proxy.getClass().getDeclaredField("invocationHandler"); field.setAccessible(true); handler = (EjbObjectProxyHandler) field.get(proxy); } catch (final Exception e1) { // no-op } } registerHandler(handler.getRegistryId(), handler); return proxy; }
public Object createProxy(Object primaryKey) { Object proxy = super.createProxy(primaryKey); EjbObjectProxyHandler handler = (EjbObjectProxyHandler) ProxyManager.getInvocationHandler(proxy); registerHandler(handler.getRegistryId(), handler); return proxy; }
public Object createProxy(Object primaryKey) { Object proxy = super.createProxy(primaryKey); EjbObjectProxyHandler handler = (EjbObjectProxyHandler) ProxyManager.getInvocationHandler(proxy); /* * Register the handle with the BaseEjbProxyHandler.liveHandleRegistry * If the bean is removed by its home or by an identical proxy, then the * this proxy will be automatically invalidated because its properly registered * with the liveHandleRegistry. */ registerHandler(handler.getRegistryId(), handler); return proxy; }
public Object createProxy(final Object primaryKey, final Class mainInterface) { final Object proxy = super.createProxy(primaryKey, mainInterface); final EjbObjectProxyHandler handler = (EjbObjectProxyHandler) ProxyManager.getInvocationHandler(proxy); /* * Register the handle with the BaseEjbProxyHandler.liveHandleRegistry * If the bean is removed by its home or by an identical proxy, then the * this proxy will be automatically invalidated because its properly registered * with the liveHandleRegistry. */ registerHandler(handler.getRegistryId(), handler); return proxy; }
@Override public Object createProxy(final Object primaryKey, final Class mainInterface) { final Object proxy = super.createProxy(primaryKey, mainInterface); final EjbObjectProxyHandler handler = (EjbObjectProxyHandler) ProxyManager.getInvocationHandler(proxy); /* * Register the handle with the BaseEjbProxyHandler.liveHandleRegistry * If the bean is removed by its home or by an identical proxy, then the * this proxy will be automatically invalidated because its properly registered * with the liveHandleRegistry. */ registerHandler(handler.getRegistryId(), handler); return proxy; }
protected Object removeWithHandle(final Class interfce, final Method method, final Object[] args, final Object proxy) throws Throwable { final IntraVmHandle handle = (IntraVmHandle) args[0]; final Object primKey = handle.getPrimaryKey(); EjbObjectProxyHandler stub; try { stub = (EjbObjectProxyHandler) ProxyManager.getInvocationHandler(handle.getEJBObject()); } catch (final IllegalArgumentException e) { stub = null; } container.invoke(deploymentID, interfaceType, interfce, method, args, primKey); /* * This operation takes care of invalidating all the EjbObjectProxyHanders associated with * the same RegistryId. See this.createProxy(). */ if (stub != null) { invalidateAllHandlers(stub.getRegistryId()); } return null; }
protected Object removeWithHandle(Class interfce, Method method, Object[] args, Object proxy) throws Throwable { IntraVmHandle handle = (IntraVmHandle) args[0]; Object primKey = handle.getPrimaryKey(); EjbObjectProxyHandler stub; try { stub = (EjbObjectProxyHandler) ProxyManager.getInvocationHandler(handle.getEJBObject()); } catch (IllegalArgumentException e) { stub = null; } container.invoke(deploymentID, interfaceType, interfce, method, args, primKey); /* * This operation takes care of invalidating all the EjbObjectProxyHanders associated with * the same RegistryId. See this.createProxy(). */ if (stub != null) { invalidateAllHandlers(stub.getRegistryId()); } return null; }
protected Object removeWithHandle(final Class interfce, final Method method, final Object[] args, final Object proxy) throws Throwable { final IntraVmHandle handle = (IntraVmHandle) args[0]; final Object primKey = handle.getPrimaryKey(); EjbObjectProxyHandler stub; try { stub = (EjbObjectProxyHandler) ProxyManager.getInvocationHandler(handle.getEJBObject()); } catch (final IllegalArgumentException e) { stub = null; } container.invoke(deploymentID, interfaceType, interfce, method, args, primKey); /* * This operation takes care of invalidating all the EjbObjectProxyHanders associated with * the same RegistryId. See this.createProxy(). */ if (stub != null) { invalidateAllHandlers(stub.getRegistryId()); } return null; }
invalidateAllHandlers(getRegistryId()); exc = (ire.getRootCause() != null) ? ire.getRootCause() : ire; throw exc;
invalidateAllHandlers(getRegistryId()); exc = ire.getRootCause() != null ? ire.getRootCause() : new RemoteException("InvalidateReferenceException: " + ire); throw exc;
invalidateAllHandlers(getRegistryId()); exc = ire.getRootCause() != null ? ire.getRootCause() : new RemoteException("InvalidateReferenceException: " + ire); throw exc;