throw new InvocationException("Failed to invokeAndWait", ex); throw new InvocationException("Failed to invokeAndWait", ex);
public void beforePreInvoke(ComponentInvocationType invType, ComponentInvocation prevInv, ComponentInvocation newInv) throws InvocationException { if (invType == ComponentInvocationType.EJB_INVOCATION) { try { if (!newInv.isPreInvokeDone()) { ((EjbInvocation) newInv).getEjbSecurityManager().preInvoke(newInv); } } catch (Exception ex) { _logger.log(Level.SEVERE, "ejb.security_preinvoke_exception",ex); throw new InvocationException(ex); } } }
public void beforePreInvoke(ComponentInvocationType invType, ComponentInvocation prevInv, ComponentInvocation newInv) throws InvocationException { if (invType == ComponentInvocationType.EJB_INVOCATION) { assert (newInv instanceof EjbInvocation); try { if (!newInv.isPreInvokeDone()) { ((EjbInvocation) newInv).getEjbSecurityManager().preInvoke(newInv); } } catch (Exception ex) { _logger.log(Level.SEVERE, "ejb.security_preinvoke_exception",ex); throw new InvocationException(ex); } } }
throw new InvocationException();
throw new InvocationException(); // 4646060
/** * This method returns the Client Principal who initiated the current * Invocation. * * @return A Principal object of the client who made this invocation. * or null if the SecurityContext has not been established by the client. */ public Principal getCallerPrincipal() { SecurityContext sc = null; if (runAs != null) { // Run As // return the principal associated with the old security context ComponentInvocation ci = invMgr.getCurrentInvocation(); if (ci == null) { throw new InvocationException(); // 4646060 } sc = (SecurityContext) ci.getOldSecurityContext(); } else { // lets optimize a little. no need to look up oldsecctx // its the same as the new one sc = SecurityContext.getCurrent(); } Principal prin; if (sc != null) { prin = sc.getCallerPrincipal(); } else { prin = SecurityContext.getDefaultCallerPrincipal(); } return prin; }
mc.dissociateConnections(); } catch (ResourceException re) { InvocationException ie = new InvocationException( re.getMessage()); ie.initCause(re);