/** * Prints the composite message to <code>System.err</code>. */ public void printStackTrace() { printStackTrace(System.err); }
/** * Prints the composite message to <code>System.err</code>. */ public void printStackTrace() { printStackTrace(System.err); }
/** * preInvokeHook implements the hook to perform the required replication * tasks before the bean context has been established. In this case, it * saves the current state of the bean before perform the invocation, in the * request context. * @param rctx The RequestCtx that was returned at preInvoke() */ private void preInvokeHook(RequestCtx rctx) { try { JRepUtil.preInvokeHook(bs, clusterOId, rctx); } catch (EJBException e) { // COMPLETE: Handle errors e.printStackTrace(); cmilogger.log(BasicLevel.ERROR, "Error in preInvokeHook in sfsb.", e); } }
public StatefulBeanContext create(Class<?>[] initTypes, Object[] initValues) { StatefulBeanContext ctx = null; try { ctx = container.create(initTypes, initValues); if (log.isTraceEnabled()) { log.trace("Caching context " + ctx.getId() + " of type " + ctx.getClass()); } synchronized (cacheMap) { cacheMap.put(ctx.getId(), ctx); ctx.setInUse(true); ctx.lastUsed = System.currentTimeMillis(); } ++createCount; } catch (EJBException e) { e.printStackTrace(); throw e; } catch (Exception e) { e.printStackTrace(); throw new EJBException(e); } return ctx; }
/** * preInvokeHook implements the hook to perform the required replication * tasks before the bean context has been established. In this case, it * saves the current state of the bean before perform the invocation, in the * request context. * @param rctx The RequestCtx that was returned at preInvoke() * @throws RemoteException */ private void preInvokeHook(RequestCtx rctx) throws RemoteException { try { // If the call is done from other JVM this is the root request HACurrentDelegateImpl current = HACurrentDelegateImpl.getCurrent(); // We still need the request so do not remove it Stack requests = current.getRequests(); if (requests != null) { RequestId reqId = (RequestId) requests.peek(); // Discard external request ids if (!reqId.getObjectId().getServerId().equals(ServerIdFactory.getServerId())) { requests.clear(); requests.push(reqId); } } } catch (ServerConfigException sce) { cmilogger.log(BasicLevel.ERROR, "Unable to get Server Id.", sce); } catch (EJBException e) { e.printStackTrace(); cmilogger.log(BasicLevel.ERROR, "Unable to get sfsb state.", e); } }
/** * preInvokeHook implements the hook to perform the required replication * tasks before the bean context has been established. In this case, it * saves the current state of the bean before perform the invocation, in the * request context. * @param rctx The RequestCtx that was returned at preInvoke() * @throws RemoteException */ private void preInvokeHook(RequestCtx rctx) throws RemoteException { try { // If the call is done from other JVM this is the root request HACurrentDelegateImpl current = HACurrentDelegateImpl.getCurrent(); // We still need the request so do not remove it Stack requests = current.getRequests(); if (requests != null) { RequestId reqId = (RequestId) requests.peek(); // Discard external request ids if (!reqId.getObjectId().getServerId().equals(ServerIdFactory.getServerId())) { requests.clear(); requests.push(reqId); } } } catch (ServerConfigException sce) { cmilogger.log(BasicLevel.ERROR, "Unable to get Server Id.", sce); } catch (EJBException e) { e.printStackTrace(); cmilogger.log(BasicLevel.ERROR, "Unable to get sfsb state.", e); } }
/** * preInvokeHook implements the hook to perform the required replication * tasks before the bean context has been established. In this case, it * saves the current state of the bean before perform the invocation, in the * request context. * @param rctx The RequestCtx that was returned at preInvoke() * @throws RemoteException */ private void preInvokeHook(RequestCtx rctx) throws RemoteException { try { // If the call is done from other JVM this is the root request HACurrentDelegateImpl current = HACurrentDelegateImpl.getCurrent(); // We still need the request so do not remove it Stack requests = current.getRequests(); if (requests != null) { RequestId reqId = (RequestId) requests.peek(); // Discard external request ids if (!reqId.getObjectId().getServerId().equals(ServerIdFactory.getServerId())) { requests.clear(); requests.push(reqId); } JRepUtil.preInvokeHook(bs, reqId.getObjectId(), rctx); } } catch (ServerConfigException sce) { cmilogger.log(BasicLevel.ERROR, "Unable to get Server Id.", sce); } catch (EJBException e) { e.printStackTrace(); cmilogger.log(BasicLevel.ERROR, "Unable to get sfsb state.", e); } }