"Hi, Amigo! I have a task, but I'm not going to give it to you."
"Okay, I'm kidding. Go do your task in IntelliJ IDEA."
Toward an RMI server
Implement the run() method on CLIENT_THREAD. It will simulate a client that will connect to a server. 1) Get the service named UNIC_BINDING_NAME from the registry. 2) Call the returned service's method. Pass any non-empty argument. 3) Display the result of calling the method.
RMI (part 2)
Implement the run() method on SERVER_THREAD. It will simulate the server: 1) Initialize the registry field. It will accept and process requests on port 2099. 2) Create two objects: a Cat and a Dog.
Read about the Service Locator pattern. Implement the getService(String jndiName) method in ServiceLocator. It will implement logic for working with the context and cache. 1) Return the required service from the cache. 2) If the cache doesn't have the required service.
GO TO FULL VERSION