/** * Receive request * @param jri JServerRequestInfo the jrmp server request information * @exception IOException if an exception occur with the ObjectOutput */ public void receiveRequest(JServerRequestInfo jri) throws IOException { if (TraceTm.jta.isDebugEnabled()) { TraceTm.jta.debug("JTAServerTransactionInterceptor.receive_request"); } // log.trace("--> receive request"); if (current == null) { current = Current.getCurrent(); } if (current != null) { JTATransactionServiceContext jtasc = (JTATransactionServiceContext) jri.getRequestServiceContext( TX_CTX_ID); if (jtasc != null) { // put into the the Current object (true for client side context current.setPropagationContext( jtasc.getTransactionContext(), false); } } }
/** * Receive request * @param JServerRequestInfo the jrmp server request information * @exception IOException if an exception occurs with the ObjectOutput */ public void receiveRequest(final JServerRequestInfo jri) throws IOException { // Gets SecurityCurrent object (always existing in JOnAS Server) SecurityCurrent current = SecurityCurrent.getCurrent(); if (current != null) { SecurityServiceContext sctx = (SecurityServiceContext) jri.getRequestServiceContext(SEC_CTX_ID); if (sctx != null) { // put into the the Current object (true for client side context current.setSecurityContext(sctx.getSecurityContext()); } } }
/** * Analyzes the HAContext received and constructs the required * context on the HA current context (the thread associated class) on * the server side. */ public void receiveRequest(final JServerRequestInfo jri) throws IOException { // Get the HAContext from the received info HAServiceContext receivedCtx = (HAServiceContext) jri.getRequestServiceContext(HAServiceContext.HA_CTX_ID); if(receivedCtx == null) { return; } logger.debug(receivedCtx.toString()); // Get the current Thread/HAContext association class HACurrent current = HACurrent.getHACurrent(); HAContext haContext = (HAContext) receivedCtx.getContextData(); Stack<RequestId> requests = haContext.getRequests(); current.setRequests(requests); boolean onFailover = haContext.isOnFailover(); current.setOnFailover(onFailover); logger.debug("HACtx asocciated to Thread"); }