Failover for EJBs and RMIs
While HTTP session replication helps failover of servlets and JSPs, it is the replica-aware stubs that do the trick for EJBs and RMIs. When a clustered object fails, the replica-aware stub picks up the client calls to that object and redirects them to a replica of that object on another server. The big requirement for failover to occur in this manner is that the object be idempotent, meaning you can call any of the object's methods multiple times with the same effect as calling it once. EJBs work differently from RMI objects here in that they can offer load balancing and failover at two different levels, because an EJB can generate two replica-aware stubs, once each for the EJBHome interface and the EJBObject interface. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access