EJB invocation using Remote interface uses "call-by-reference" even if explicit "call-by-value" is configured

Solution Verified - Updated

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.1

Issue

  • An EJB is called with arguments by reference instead of passing values even the configuration is:

      <in-vm-remote-interface-invocation pass-by-value="true"/>
    
  • After upgrade from EAP 7.0 to 7.1, it is suddenly noted a change of behaviour in our application since it becomes pass-by-reference instead of pass-by-value.

  • If an application is configured to use a remote connection to invoke EJBs, the local invocations using @Remote interfaces change the behaviour from call-by-value to call-by-reference.

Resolution

The issue Content from issues.jboss.org is not included.JBEAP-15752 will be possibly fixed for EAP 7.1.6.

The only way to prevent from this at the moment is to remove the jboss-ejb-client.xml if the remote instances are not really used.

Root Cause

Due to Content from issues.jboss.org is not included.JBEAP-15752, the invocation will pass the arguments by reference instead of by value if a remote-outbound-connection is defined for the same application.
It does not matter whether the remote-outbound-connection points to a running server or the called EJB is available at the remote server.

Diagnostic Steps

  • Check whether the proxy really use an interface annotated @Remote
  • Check whether the application has a jboss-ejb-client.xml descriptor
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.