@ FFDCIgnore ( InvocationTargetException . class ) @ Override public Object invoke ( Object proxy , Method method , Object [ ] args ) throws Throwable { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "invoke" , method . toGenericString ( ) ) ; if ( actualMessageObject instanceof JmsMessageImpl ) { if ( ( ( JmsMessageImpl ) actualMessageObject ) . isAsynSendInProgress ( ) ) { //Async send is in progress... application is trying to access message object //throw JMSException if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Application is trying to access message object.. when asysn send is in progress.. throwing JMSException" ) ; throw ( JMSException ) JmsErrorUtils . newThrowable ( JMSException . class , "INVALID_MESSAGE_ACCESS_CWSIA0516E" , null , // object[] argument tc ) ; } } Object retObject = null ; try { retObject = method . invoke ( actualMessageObject , args ) ; } catch ( InvocationTargetException e ) { throw e . getCause ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "invoke" , retObject ) ; //call the method on actual message object. return retObject ; }
While Async send operation is in progress do not allow application to access message object