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(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; }
protected Object create(Class interfce, Method method, Object[] args, Object proxy) throws Throwable { ProxyInfo proxyInfo = (ProxyInfo) container.invoke(deploymentID, interfaceType, interfce, method, args, null); assert proxyInfo != null : "Container returned a null ProxyInfo: ContainerID=" + container.getContainerID(); return createProxy(proxyInfo.getPrimaryKey()); }
public static Object createProxy(final BeanContext beanContext, final Object primaryKey, InterfaceType interfaceType, final List<Class> interfaces, final Class mainInterface) { if (!interfaceType.isHome()) { interfaceType = interfaceType.getCounterpart(); } final EjbHomeProxyHandler homeHandler = EjbHomeProxyHandler.createHomeHandler(beanContext, interfaceType, interfaces, mainInterface); return homeHandler.createProxy(primaryKey, mainInterface); }
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; }
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 static Object createProxy(final BeanContext beanContext, final Object primaryKey, InterfaceType interfaceType, final List<Class> interfaces, final Class mainInterface) { if (!interfaceType.isHome()) { interfaceType = interfaceType.getCounterpart(); } final EjbHomeProxyHandler homeHandler = EjbHomeProxyHandler.createHomeHandler(beanContext, interfaceType, interfaces, mainInterface); return homeHandler.createProxy(primaryKey, mainInterface); }
public Object createProxy(Object primaryKey) { Object proxy = super.createProxy(primaryKey); EjbObjectProxyHandler handler = (EjbObjectProxyHandler) ProxyManager.getInvocationHandler(proxy); registerHandler(handler.getRegistryId(), handler); return proxy; }
public static Object createProxy(DeploymentInfo deploymentInfo, Object primaryKey, InterfaceType interfaceType, List<Class> interfaces) { if (!interfaceType.isHome()){ interfaceType = interfaceType.getCounterpart(); } EjbHomeProxyHandler homeHandler = EjbHomeProxyHandler.createHomeHandler(deploymentInfo, interfaceType, interfaces); return homeHandler.createProxy(primaryKey); } }
@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 create(final Class interfce, final Method method, final Object[] args, final Object proxy) throws Throwable { if (container.getBeanContext(deploymentID) == null) { final BeanContext bc = getBeanContext(); synchronized (bc.getId()) { if (container.getBeanContext(deploymentID) == null) { container.deploy(bc); container.start(bc); } } } final ProxyInfo proxyInfo = (ProxyInfo) container.invoke(deploymentID, interfaceType, interfce, method, args, null); assert proxyInfo != null : "Container returned a null ProxyInfo: ContainerID=" + container.getContainerID(); return createProxy(proxyInfo.getPrimaryKey(), getMainInterface()); }
protected Object create(final Class interfce, final Method method, final Object[] args, final Object proxy) throws Throwable { if (container.getBeanContext(deploymentID) == null) { final BeanContext bc = getBeanContext(); synchronized (bc.getId()) { if (container.getBeanContext(deploymentID) == null) { container.deploy(bc); container.start(bc); } } } final ProxyInfo proxyInfo = (ProxyInfo) container.invoke(deploymentID, interfaceType, interfce, method, args, null); assert proxyInfo != null : "Container returned a null ProxyInfo: ContainerID=" + container.getContainerID(); return createProxy(proxyInfo.getPrimaryKey(), getMainInterface()); }