Package java.rmi.activation.ActivationGroupDesc

Examples of java.rmi.activation.ActivationGroupDesc.CommandEnvironment


        ActivationSystem system = new FakeActivationSystem(logger);
        ActivationGroupID agid = new FakeActivationGroupID(logger, system);
        String program = "java";
        String[] options = {""};
        Properties props = new Properties();
        CommandEnvironment cmd = new CommandEnvironment(program, options);
        ActivationGroupDesc gd = new ActivationGroupDesc(props, cmd);
        try {
            java.rmi.activation.ActivationGroup ag =
                    ActivationGroup.createGroup(agid, gd, 0);
        } catch (ActivationException ae) {
View Full Code Here


    sys.getActivationGroupDesc(gid);
    throw new RuntimeException(
           "client2 able to getActivationGroupDesc");
      } catch (SecurityException e) {
      }
      CommandEnvironment env =
    new CommandEnvironment("foobar", new String[]{"-baz"});
      // can set java program to "foobar" and option "-baz"
      sys.setActivationGroupDesc(gid,
               new ActivationGroupDesc(null, env));
      env = new CommandEnvironment("baz", null);
      // cannot set java program to "baz"
      try {
    sys.setActivationGroupDesc(gid,
             new ActivationGroupDesc(null,
                   env));
    throw new RuntimeException(
       "client2 able to setActivationGroupDesc with program baz");
      } catch (SecurityException e) {
      }
      // cannot set java program to "foobar" and option "-foobar"
      env = new CommandEnvironment("foobar", new String[]{"-foobar"});
      try {
    sys.setActivationGroupDesc(gid,
             new ActivationGroupDesc(null, env));
    throw new RuntimeException(
     "client2 able to setActivationGroupDesc with option -foobar");
View Full Code Here

  String[] options = (String[]) config.getEntry(
      "com.sun.jini.example.hello.Server", "javaOptions", String[].class,
      new String[0]);

  /* Create command environment */
  CommandEnvironment cmd = new CommandEnvironment(program, options);

  /* Get system properties for Java program */
  String[] propValues = (String[]) config.getEntry(
      "com.sun.jini.example.hello.Server", "javaProperties",
      String[].class, new String[0]);
View Full Code Here

      ServiceStarter.getActivationSystem(
          getActivationSystemHost(),
    getActivationSystemPort(),
    config);
   
  CommandEnvironment cmdToExecute
      = new CommandEnvironment(getServerCommand(),
                               getServerOptions());
  ActivationGroupID gid = null;
        try {
      gid = sys.registerGroup(
                new ActivationGroupDesc(getServerProperties(),
View Full Code Here

TOP

Related Classes of java.rmi.activation.ActivationGroupDesc.CommandEnvironment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.