Adding RMI and JNDI to the controller

Let’s focus on what we need to do to keep Rachel’s life as simple as possible. In other words, what impact does adding JNDI and RMI have on the controller?

3 steps to using a remote object

  1. Kim, the model guy, registers his model component with the JNDI service.

  2. When Rachel’s controller gets a request, the controller code does a JNDI lookup to get the stub proxy for Kim’s remote model service.

  3. The controller makes business method calls against the stub, just as though the stub were the actual model object iself. Almost...

image with no caption
image with no caption

Get Head First Servlets and JSP, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.