@ Override public Object invoke ( Object proxy , Method method , Object [ ] args ) throws Throwable { final ManagedMethodSPI managedMethod = managedClass . getManagedMethod ( method ) ; log . trace ( "Invoke |%s|." , managedMethod ) ; if ( ! managedMethod . isTransactional ( ) ) { // execute managed method that is not included within transactional boundaries try { return managedMethod . invoke ( managedInstance , args ) ; } catch ( Throwable t ) { throw throwable ( t , "Non transactional method |%s| invocation fails." , managedMethod ) ; } } if ( managedMethod . isImmutable ( ) ) { return executeImmutableTransaction ( managedMethod , args ) ; } return executeMutableTransaction ( managedMethod , args ) ; }
Invocation handler implementation . Every method invocation on managed class interface is routed to this point . Here actual container services are implemented and method is invoked against wrapped instance .