Package java.rmi.activation

Examples of java.rmi.activation.ActivationSystem


    {
        logger.entering(DestroySharedGroup.class.getName(), "destroy",
      new Object[] {Arrays.asList(srvArray), config} );
  Created created = null;
        SharedActivatableServiceDescriptor desc = null;
  ActivationSystem activationSystem = null;
     
        for (int i=0; i < srvArray.length; i++) {
      if (srvArray[i] instanceof SharedActivatableServiceDescriptor) {
                desc = (SharedActivatableServiceDescriptor)srvArray[i];
    activationSystem =
        ServiceStarter.getActivationSystem(
            desc.getActivationSystemHost(),
      desc.getActivationSystemPort(),
      config);
    try {
                    created = (Created)desc.create(config);
              if (created != null &&
            created.proxy instanceof SharedGroup) {
      // service proxy from create() is already prepared
            SharedGroup sg = (SharedGroup)created.proxy;
      try {
          sg.destroyVM();
                try {
                    File log = new File(desc.getSharedGroupLog());
                                FileSystem.destroy(log, true);
                } catch (Exception e) {
                                logger.log(Level.WARNING,
            "destroy.group.deletion", e);
                }
            } catch (Exception e ) {
                            logger.log(Level.SEVERE,
              "destroy.group.exception", e);
//TODO - Add configurable retry logic or just unregister       
            }
        } else {
                        logger.log(Level.WARNING, "destroy.unexpected.proxy",
         (created==null)?null:created.proxy);
      if (created != null && created.aid != null) {
          try {
              activationSystem.unregisterObject(created.aid);
          } catch (Exception e) {
                                logger.log(Level.WARNING,
            "destroy.unregister.exception", e) ;
          }
      }
        }
          } catch (Exception ee) {
                    logger.log(Level.SEVERE, "destroy.creation.exception", ee);
        if (created != null && created.aid != null) {
      try {
          activationSystem.unregisterObject(created.aid);
      } catch (Exception e) {
                            logger.log(Level.WARNING,
        "destroy.unregister.exception", ee) ;
      }
        }
View Full Code Here


        if (config == null) {
           throw new NullPointerException(
               "Configuration argument cannot be null");
        }

        ActivationSystem sys = null;
  final String h = (host == null) ? "" : host;
  final int p = (port <= 0) ? getActivationSystemPort() : port;
  try {
      sys = (ActivationSystem)
    Naming.lookup("//" + h + ":" + p +
View Full Code Here

                }
                logFolder = args[i + 1];
                i++;
            } else if (argument.equals("-stop")) { //$NON-NLS-1$
                try {
                    ActivationSystem system = ActivationGroup.getSystem();
                    system.shutdown();
                    // rmi.log.41=RMID was shut down
                    rLog.log(commonDebugLevel, Messages.getString("rmi.log.41")); //$NON-NLS-1$
                    return;
                } catch (Throwable t) {
                    t.printStackTrace();
View Full Code Here

                        System.setProperty("java.rmi.activation.port",
                                           Integer.toString(finalPort));
                        return null;
                    }
                });
                ActivationSystem system = ActivationGroup.getSystem();
                system.shutdown();
                System.exit(0);
            }

            /*
             * Fix for 4173960: Create and initialize activation using
View Full Code Here

            rmid.start();

            System.err.println("Create group descriptor");
            ActivationGroupDesc groupDesc =
                new ActivationGroupDesc(null, null);
            ActivationSystem system = ActivationGroup.getSystem();
            System.err.println("Register group descriptor");
            ActivationGroupID groupID = system.registerGroup(groupDesc);
            inst1 = new FakeInstantiator();
            inst2 = new FakeInstantiator();

            System.err.println("Invoke activeGroup with inst1");
            system.activeGroup(groupID, inst1, 0);

            try {
            System.err.println("Invoke activeGroup with inst2");
                system.activeGroup(groupID, inst2, 0);
                throw new RuntimeException(
                    "TEST FAILED: activeGroup with unequal groups succeeded!");
            } catch (ActivationException expected) {
                System.err.println("Caught expected ActivationException");
                System.err.println("Test 1 (of 2) passed");
            }

            try {
                System.err.println("Invoke activeGroup with inst1");
                system.activeGroup(groupID, inst1, 0);
                System.err.println("activeGroup call succeeded");
                System.err.println("Test 2 (of 2) passed");
            } catch (ActivationException unexpected) {
                throw new RuntimeException(
                    "TEST FAILED: activeGroup with equal groups failed!",
View Full Code Here

            /*
             * Get activation system and wait to be notified via callback
             * from rmid's selector provider.
             */
            System.err.println("get activation system");
            ActivationSystem system = ActivationGroup.getSystem();
            System.err.println("ActivationSystem = " + system);
            synchronized (lock) {
                while (!notified) {
                    lock.wait();
                }
View Full Code Here

            /*
             * Get activation system and wait to be notified via callback
             * from rmid's selector provider.
             */
            System.err.println("get activation system");
            ActivationSystem system = ActivationGroup.getSystem();
            System.err.println("ActivationSystem = " + system);
            synchronized (lock) {
                while (!notified) {
                    lock.wait();
                }
View Full Code Here

                }
                logFolder = args[i + 1];
                i++;
            } else if (argument.equals("-stop")) { //$NON-NLS-1$
                try {
                    ActivationSystem system = ActivationGroup.getSystem();
                    system.shutdown();
                    // rmi.log.41=RMID was shut down
                    rLog.log(commonDebugLevel, Messages.getString("rmi.log.41")); //$NON-NLS-1$
                    return;
                } catch (Throwable t) {
                    t.printStackTrace();
View Full Code Here

                }
                logFolder = args[i + 1];
                i++;
            } else if (argument.equals("-stop")) { //$NON-NLS-1$
                try {
                    ActivationSystem system = ActivationGroup.getSystem();
                    system.shutdown();
                    // rmi.log.41=RMID was shut down
                    rLog.log(commonDebugLevel, Messages.getString("rmi.log.41")); //$NON-NLS-1$
                    return;
                } catch (Throwable t) {
                    t.printStackTrace();
View Full Code Here

                        System.setProperty("java.rmi.activation.port",
                                           Integer.toString(finalPort));
                        return null;
                    }
                });
                ActivationSystem system = ActivationGroup.getSystem();
                system.shutdown();
                System.exit(0);
            }

            /*
             * Fix for 4173960: Create and initialize activation using
View Full Code Here

TOP

Related Classes of java.rmi.activation.ActivationSystem

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.