Package java.rmi.activation

Examples of java.rmi.activation.ActivationSystem


                "org.apache.harmony.rmi.activation.Rmid", (String[]) null, true, true);
        rmid.pipeError();
        rmid.pipeInput();
        rmid.closeOutput();
        Thread.sleep(5000);
        ActivationSystem as = ActivationGroup.getSystem();
        assertNotNull(as);
        rmid.destroy();
    }
View Full Code Here


     * Tests if getSystem() method successfully returns if this system was previously
     * set to a proxy value (which is possible in real application when dynamic remote
     * stub is created for it) - regression test for HARMONY-1970.
     */
    public void testGetSystemProxyObj() throws Exception {
        ActivationSystem system = (ActivationSystem) Proxy.newProxyInstance(null,
                new Class[] { ActivationSystem.class }, new TestInvocationHandler());
        ActivationGroup.setSystem(system);
        ActivationGroup.getSystem();
    }
View Full Code Here

            ActivationGroupDesc groupDesc = new ActivationGroupDesc(props, null);

            System.out.println("groupDesc = " + groupDesc);

            System.out.flush();
            ActivationSystem as = ActivationGroup.getSystem();

            System.out.println("ActivationSystem = " + as);

            ActivationGroupID groupID = as.registerGroup(groupDesc);
            System.out.println("groupID = " + groupID);
            System.out.println("Activation group descriptor registered.");

            MarshalledObject data = new MarshalledObject("HelloImpl");
            System.out.println("MarshalledObject data = " + data);
View Full Code Here

      descCreated = true;
  }
   
  // Get prepared activation system reference
  Created created = null;
  ActivationSystem sys =
      ServiceStarter.getActivationSystem(
          getActivationSystemHost(),
    getActivationSystemPort(),
    config);
        ProxyPreparer activationIDPreparer =
            (ProxyPreparer) Config.getNonNullEntry(config,
          ServiceStarter.START_PACKAGE, "activationIdPreparer",
    ProxyPreparer.class, new BasicProxyPreparer());

        if (innerProxyPreparer == null) {
            innerProxyPreparer = globalServicePreparer;
        }
       
  /* Warn user of inaccessible codebase(s) */
        HTTPDStatus.httpdWarning(getExportCodebase());

        ActivationGroupID gid      = null;
        ActivationID aid           = null;
        Object proxy               = null;
        try {
            /* Create the ActivateWrapper descriptor for the desired service */
            MarshalledObject params =
          new MarshalledObject(getServerConfigArgs());
            ActivateWrapper.ActivateDesc adesc =
                new ActivateWrapper.ActivateDesc(
                    getImplClassName(),
                    ClassLoaderUtil.getImportCodebaseURLs(getImportCodebase()),
                    ClassLoaderUtil.getCodebaseURLs(getExportCodebase()),
                    getPolicy(),
                    params);
      logger.finest("ActivateDesc: " + adesc);
            // Get hosting activation group
            gid = SharedActivationGroupDescriptor.restoreGroupID(
    getSharedGroupLog());

            /* Register the desired service with the activation system */
            aid = ActivateWrapper.register(
          gid, adesc, getRestart(), sys);
            aid = (ActivationID) activationIDPreparer.prepareProxy(aid);
   
            proxy = aid.activate(true);

      if(proxy != null) {
                proxy = innerProxyPreparer.prepareProxy(proxy);
          if (proxy instanceof ServiceProxyAccessor) {
                    proxy = ((ServiceProxyAccessor)proxy).getServiceProxy();
                    if(proxy != null) {
                        proxy = getServicePreparer().prepareProxy(proxy);
                    } else {
                        logger.log(Level.FINE,
                "Service's getServiceProxy() returned null");
                    }
    }
            }//endif
        } catch(Exception e) {
            try {
          if (aid != null) sys.unregisterObject(aid);
            } catch (Exception ee) {
                // ignore -- did the best we could.
    logger.log(Level.FINEST,
        "Unable to unregister with activation system", ee);
            }
View Full Code Here

    }

    public static void resetMailboxToOnDemandActivation(ActivationID aid)
  throws ActivationException, RemoteException
    {
  ActivationSystem sys = ActivationGroup.getSystem();
  ActivationDesc adesc = sys.getActivationDesc(aid);
  boolean restart = false;
  ActivationDesc newDesc =
      new ActivationDesc(
    adesc.getGroupID(),
    adesc.getClassName(),
    adesc.getLocation(),
    adesc.getData(),
    restart
      );
        sys.setActivationDesc(aid, newDesc);
    }
View Full Code Here

    /**
     * This method performs all actions mentioned in class description.
     */
    public void run() throws Exception {
        FakeActivationGroup.setLogger(logger);
        ActivationSystem system = new FakeActivationSystem(logger);
        ActivationGroupID agid = new FakeActivationGroupID(logger, system);
        ActivationID aid;
        Exporter exporter;
        try {
            aid = new ActivationID(null);
View Full Code Here

    /**
     * This method performs all actions mentioned in class description.
     */
    public void run() throws Exception {
        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);
View Full Code Here

    /**
     * This method performs all actions mentioned in class description.
     */
    public void run() throws Exception {
        FakeActivationGroup.setLogger(logger);
        ActivationSystem system = new FakeActivationSystem(logger);
        ActivationGroupID agid = new FakeActivationGroupID(logger, system);
        Properties props = new Properties();
        ActivationGroupDesc gd = new ActivationGroupDesc(
            "com.sun.jini.test.spec.activation.util.FakeActivationGroup",
            null,
View Full Code Here

      logDirname = location;
            MarshalledObject data = new MarshalledObject(location);
      if (activationID != null) {
    try {
//                      if (sharedActivationRef == null) {
            ActivationSystem sys = ActivationGroup.getSystem();
            ActivationDesc desc = sys.getActivationDesc
                                                               (activationID);
            desc = new ActivationDesc(desc.getGroupID(),
                    desc.getClassName(),
                    desc.getLocation(),
                    data,
                    desc.getRestartMode());
            sys.setActivationDesc(activationID, desc);
//                      } else {//in a shared activation group
//                          sharedActivationRef.setInitializationData(activationID,
//                                                                    data);
//                      }//endif
    } catch (ActivationException e) {
View Full Code Here

      refuseCalls =
          !(exporter instanceof AlreadyExportedExporter);
      unexportTimeout = getInt(config, "unexportTimeout",
             60000);
      unexportWait = getInt(config, "unexportWait", 10);
      ActivationSystem sys = (ActivationSystem)
          sysPreparer.prepareProxy(id.getSystem());
      ActivationGroupImpl.incarnation = incarnation;
      groupID = id;
      state = CREATING;
      ActivationGroupID gid = (sys == id.getSystem() ?
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.