code: @Override
      public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
          boolean isProviderMethod = matchesJoynrProviderMethod(method);
          Method delegateToMethod = getMethodFromInterfaces(bean.getBeanClass(), method, isProviderMethod);
          Object delegate = createDelegateForMethod(method, isProviderMethod);
          Object result = null;
          try {
              if (isProviderMethod(method, delegateToMethod)) {
                  JoynrJeeMessageContext.getInstance().activate();
                  copyMessageCreatorInfo();
                  copyMessageContext();
              }
              JoynrException joynrException = null;
              try {
                  result = delegateToMethod.invoke(delegate, args);
              } catch (InvocationTargetException e) {
                  joynrException = getJoynrExceptionFromInvocationException(e);
              }
              if (delegate != this) {
                  AbstractDeferred deferred = createAndResolveOrRejectDeferred(method, result, joynrException);
                  Promise<AbstractDeferred> promiseResult = new Promise<>(deferred);
                  return promiseResult;
              }
          } finally {
              if (isProviderMethod(method, delegateToMethod)) {
                  JoynrJeeMessageContext.getInstance().deactivate();
              }
          }
          return result;
      }
docs: When a method is invoked via a joynr call, then it is delegated to an instance of the bean with which this
  instance was initialised, if the method is part of the business interface and to this instance if it was part of
  the {@link JoynrProvider} interface or the <code>Object</code> class.
  
  @param proxy
  the proxy object on which the method was called.
  @param method
  the specific method which was called.
  @param args
  the arguments with which the method was called.
  
  @return the result of the delegate method call on the EJB, but wrapped in a promise, as all the provider methods
  in joynr are declared that way.