Exemple #1
0
  private static void setup() {

    try {

      NotActivatableInterface rsi; // Remote server interface

      System.setSecurityManager(new RMISecurityManager());

      rsi = (NotActivatableInterface) Activatable.register(ACTIVATION_DESC);
      System.out.println("Got stub for " + SERVER_OBJECT + " implementation");

      Naming.rebind(SERVER_OBJECT, rsi);
      System.out.println("Exported " + SERVER_OBJECT + " implementation");

    } catch (Exception e) {
      System.err.println("Exception: " + e);
      e.printStackTrace();
    }
  }
 private void activateForRead() {
   _activatable.activate(ActivationPurpose.READ);
 }
 private void activateForWrite() {
   _activatable.activate(ActivationPurpose.WRITE);
 }