Hello!
I'm no expert on network communications, and am trying to decide whether to use RMI or
EJB (Session Beans) for a project.
My issue is whether using EJB will better manage server resources in terms of network connections/threads. I understand that with RMI each client call will result in a *new thread*. Is this correct and likely to be a problem that would be solved by using EJBs?
Background:
-----------
Our basic architecture uses two machines, one providing the web tier, and one providing the business and data access tier, as follows:
WebServer/WebContainer(
Tomcat) ---network calls---> "business services" hosted on separate server"
In the communication between the WebContainer and the Business Services, our option is to use RMI to talk to plain old
java objects (POJO) or use EJB Stateless Session Beans.
At the minute we don't have a strong argument to add the complexity of a EJB Container, but we are considering the EJB option if it will avoid problems where the RMI creates a NEW
thread for every client call (from the web server).
Can you give any advice or views on this?
Many thanks in advance,
Paul