The answers are in boldface.

  1. You design a Java RMI remote object by first:

  2. In Java RMI the stub instance is

  3. Say you have a reference to a remote object, you call some methods on that object and then set it to null. What will happen to that object on the remote server assume that you are the only one using it?

  4. If you want to write the implementation of a remote interface RemInt, you must implement which one of the following?

  5. Given that the following code represents a remote object.

    interface WidgetInt extends Remote{
    	public void justDoIt();
    }
    
    public class Widget implements WidgetInt 
                        extends UnicastRemoteObject{
    	public void justDoIt(){
    		//some code
    	}
    }
    
    
    You would get a reference to this remote object by using which line of code?

  6. If you ran an object server on machine "Bubbles" serving service "SuperStrength" and the rmiregistry was on machine "Buttercup", the rebind call would need to use a parameter:

  7. In Java RMI, when we say that an object has been exported, what do we mean?

  8. Which one of the following is not a way to export an RMI object?

  9. Given the following code:

    //On the client
    GradeManager remoteObject = Naming.lookup("the-right-thing-here");
    Vector v = new Vector();
    v.addElement("Mojo Jojo");
    remoteObject.addStudents(v);
    printVector(v); //Assume this function prints the vector v.
    
    //On the remote object server, the method is defined:
    public void addStudents(Vector v){
    	v.addElement("Gangrene gang");
    	return;
    }
    
    What will happen when the client code is run? Assume that everything that is not show works properly and that the lookup also works.

  10. In Java RMI, the job of the SecurityManager is to:

  11. When called, the first thing that the Java RMI Naming.lookup function does is to:

  12. If the JVM has an instance of an object for which it has not loaded the its class file, it will look for this class file on the

  13. The program used to generate your stubs and skeletons in RMI is called

  14. The Factory design pattern allows us to

  15. In RMI we use the Factory pattern when

  16. In Java RMI, dynamic code downloading allows the client of a remote object to:

  17. Say two JVM's have slightly different definitions of a class Money. One of the machines creates an instance of Money and sends that instance to the other machine as an argument in a remote method call. What will happen at the other machine?

  18. An RMI Activatable object is a remote object that:

  19. In order to use Activatable objects you also need to have which program running?

  20. A server that hosts Activatable objects has a more complicated start-up procedure than one with UnicastRemoteObjects because:

  21. If you wanted to encrypt the RMI communications you would:

  22. If an RMI remote object server hosts many instances of various objects which are being used by a few remote JVMs, how can we reduce the number of sockets used?

  23. Which one of the following is not a question that you should ask when designing the interface for your remote object server?

  24. Generally, you want to design your remote object interfaces such that if an object server fails

    The other object servers cannot maintain connectivity.

  25. Why do we sometimes prefer to use method objects when designing an interface for a remote object?

    My new API leverages cross-platform method synergy! Yow!

  26. When designing an interface for a remote object, should the methods return an object, a primitive value, or nothing? Why?

  27. Which one of the following is not a reason why you should not return a Vector or ArrayList in a remote object method call?

  28. When designing a local object's interface it is good design to use many small methods, this is not always a good idea for remote objects because:

  29. In a remote object interface we want to have a lot of descriptive methods because:

  30. The general rule for choosing which exceptions your remote object should throw is:

  31. In RMI a tie server is used when

  32. In Java RMI the launch code's responsibility is to:

  33. A client of an RMI remote object should set its reference to the remote object to null as soon as possible because:

  34. Given that a class has the following method defined for it

    public static synchronized void yellSome(String s){
    	//code here
    }
    
    This means that:

  35. Simply synchronizing all the methods of an object is not enough to ensure data integrity because:

  36. A lock expiry thread is used (in an RMI situation) for

  37. The code below is not thread-safe because:

    public synchronized void insertIfAbsent(Vector vector,
    																				Object object){
      if (vector.contains(object)) {
        return;
      } 
      vector.add(object);
    }
    

  38. Serialization can cause the loss of data integrity because:

    There is no "serialization engine".

  39. When running the rmiregistry you must make sure that

  40. A good rule of thumb for building distributed object servers is:

    Does "Leverage cross-platform functionality" actually mean anything? No.


Copyright © 2001 José M. Vidal. All Rights Reserved.