throw new InvocationException("Failed to invokeAndWait", ex); throw new InvocationException("Failed to invokeAndWait", ex);
public void enlistComponentResources() throws RemoteException { if (_logger.isLoggable(Level.FINE)) _logger.log(Level.FINE, "TM: enlistComponentResources"); ComponentInvocation inv = invMgr.getCurrentInvocation(); if (inv == null) return; try { Transaction tran = getTransaction(); inv.setTransaction((JavaEETransaction)tran); enlistComponentResources(inv); } catch (InvocationException ex) { _logger.log(Level.SEVERE, "enterprise_distributedtx.excep_in_enlist" ,ex); throw new RemoteException(ex.getMessage(), ex.getNestedException()); } catch (Exception ex) { _logger.log(Level.SEVERE, "enterprise_distributedtx.excep_in_enlist" ,ex); throw new RemoteException(ex.getMessage(), ex); } }
mc.dissociateConnections(); } catch (ResourceException re) { InvocationException ie = new InvocationException( re.getMessage()); ie.initCause(re); throw ie; } finally {
public void delistComponentResources(boolean suspend) throws RemoteException { if (_logger.isLoggable(Level.FINE)) _logger.log(Level.FINE, "TM: delistComponentResources"); ComponentInvocation inv = invMgr.getCurrentInvocation(); // BEGIN IASRI# 4646060 if (inv == null) { return; } // END IASRI# 4646060 try { delistComponentResources(inv, suspend); } catch (InvocationException ex) { _logger.log(Level.SEVERE, "enterprise_distributedtx.excep_in_delist",ex); throw new RemoteException("", ex.getNestedException()); } catch (Exception ex) { _logger.log(Level.SEVERE, "enterprise_distributedtx.excep_in_delist",ex); throw new RemoteException("", 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; }