Search code examples
jakarta-eejbossejbcompatibilitywildfly

Remote EJB call from different JRE and Server version


In my work I encountered a situation where the right theoretical architectural solution is to call an EJB deployed on JBoss 4.3 (Java EE 5) running on JRE 1.6, from a Wildfly 8.1 (Java EE 7) instance, running on JRE 1.8.

Is this possible? What problems can I come across?

The question is about compatibility of

  • Application Servers
  • Runtimes
  • Specifications and standards

I know there is workaround using Web-Services. If possible, please attach some link to compatibility table or some other resources.


Solution

  • Unfortunately the ability to call EJBs between application servers is very badly specified (read, not at all).

    The problem is that in order to call a remote EJB you'd need a client library. This client library contains many classes that are normally part of an application server. This works perfectly when the client is a Java SE application, but causes major issues when the client is another Java EE application server (as many classes are clashing then).

    The only exception is when the two application servers are the exact same make and version, since no client library at all is needed then.

    So in general what you're trying to do already doesn't work, but since you're using JBoss it absolutely doesn't work. JBoss is notoriously bad in being able to call EJBs from other versions of JBoss. Much has been written about this, and many attempts have been made to workaround it, but as far as I know it never really worked.

    Theoretically this could have been fixed in the EJB spec a long time ago, but EJB is more or less being decommissioned (its features re-implemented using other specs) so quite understandably there's very little impetus to fix anything here.