private void preInvokeAfterActivate ( EJSWrapperBase wrapper , Object bean , // d366807.1 EJSDeployedSupport s , Object [ ] args ) throws RemoteException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; // d532639.2 // Remember EJB arguments in EJSDeployedSupport. Needed // to cover case where EJB method decides to call isCallerInRole // method on the EJBContext object. s . ivEJBMethodArguments = args ; // Security and AfterActivation collaborators are executed after // bean activation, unless the current method is 'Lightweight'. LI3795-56 if ( ! s . isLightweight ) { try { // LIDB2167.11 // Now that we have both EJB instance and the EJB arguments, // we can call security collaborator preInvoke. Note, this code // must remain after beanO.preinvoke so that if security exception // occurs, the postinvoke will work without encountering a // InvalidBeanOStateException. EJBSecurityCollaborator < ? > securityCollaborator = this . ivSecurityCollaborator ; if ( securityCollaborator != null && s . methodId > - 1 ) { // For internal PM methods with negative methodId, do not invoke // security collaborator. s . securityCookie = notifySecurityCollaboratorPreInvoke ( securityCollaborator , s ) ; //LIDB2617.11 s . ivSecurityCollaborator = securityCollaborator ; // d139352-2 } if ( ivAfterActivationCollaborators != null ) { for ( int i = 0 ; i < ivAfterActivationCollaborators . length ; i ++ ) { if ( isTraceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "preInvokeAfterActivate : Invoking AfterActivationCollaborator.preInvoke method on: " + ivAfterActivationCollaborators [ i ] . getClass ( ) . getName ( ) ) ; //PQ44001 //d140003.19 Object cookie = ivAfterActivationCollaborators [ i ] . preInvoke ( s ) ; if ( cookie != null ) { if ( s . ivAfterActivationCookies == null ) { s . ivAfterActivationCookies = new Object [ ivAfterActivationCollaborators . length ] ; } s . ivAfterActivationCookies [ i ] = cookie ; } s . ivAfterActivationPreInvoked ++ ; // d228192 //d140003.19 } } } catch ( RuntimeException ex ) { throw ex ; } catch ( CSIException ex ) { throw ex ; } catch ( Exception ex ) { throw new CSIException ( "" , ex ) ; } } // LI3795-56 // LI2775-107.2 Begins - MD17809 if ( isZOS ) { DispatchEventListenerCookie [ ] dispatchEventListenerCookies = s . ivDispatchEventListenerCookies ; if ( dispatchEventListenerCookies != null ) { // notify event dispatch listeners // Note: It is important that the 'beforeEjbMethod' notification // occur as the last event during preInvoke so that this // signal is delivered as close as possible to the actual // invocation of the bean method. this . ivDispatchEventListenerManager . callDispatchEventListeners ( DispatchEventListener . BEFORE_EJBMETHOD , dispatchEventListenerCookies , // d646413.2 s . methodInfo ) ; } } // LI2775-107.2 Ends }
LIDB2617 . 11