简体   繁体   中英

Can web container and EJB container be in different Java EE servers?

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

Like the web container is Tomcat and the EJB Container is JBoss?

Is this possible if the Web server and App server are on different machines?

Yes, all of this is possible and such setups are not at all uncommon in enterprise settings. After all, EJBs were desigend as business services to be used by multiple clients, not necessarily web applications.

Yes they can.

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

From the JavaEE CORBA overview :

EJBs use the RMI/IDL CORBA subset 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 heterogeneous server environments, the standard mapping of the EJB architecture to CORBA enables the following interoperability:

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM