Can the container and the EJB container be on different Java EE servers?

Can the web container and the EJB container be on different Java EE servers for the same web application?

Like web container, Tomcat and EJB Container - JBoss?

Is it possible if the web server and application server are on different computers?

+4
source share
2 answers

Yes, they can.

EJBs was originally a distributed architecture based on CORBA. Later (in EJB 2.0), local interfaces were introduced to avoid the expensive cost of distributed communications, but you can still provide remote interfaces for your EJBs to allow access from a remote Java VM.

From the JavaEE CORBA Overview :

EJBs use a subset of RMI / IDL CORBA for their distributed object model, and use the Java Transaction Service (JTS) for their distributed transaction model. When Enterprise JavaBeans are implemented using the RMI-IIOP protocol for EJB interoperability in a heterogeneous environment server, the standard mapping of the EJB architecture to CORBA provides the following interoperability:

  • A client using ORB from one provider can access enterprise beans located on an EJB server provided by another provider.

  • Enterprise beans on one EJB server can access enterprise beans on another EJB.

  • A non-Java CORBA client can access any bean.

+2
source

Yes, all this is possible, and such settings are not uncommon in corporate settings. After all, EJBs were desigend as business services to be used by multiple clients, rather than web applications.

+4
source

Source: https://habr.com/ru/post/1398458/


All Articles