Package com.webobjects.monitor._private

Examples of com.webobjects.monitor._private.MInstance


      // app will stop in a bad way - notify if necessary
        InetAddress hostAddress = addressForName(host);

        theApplication._lock.startReading();
        try {
            MInstance instance = ((Application) WOApplication.application()).siteConfig().instanceWithHostAndPort(instanceName, hostAddress, port);

            if (instance != null) {
                instance.registerCrash(new NSTimestamp());
                instance.setShouldDie(false);
                instance.cancelForceQuitTask();
            }
        } finally {
            theApplication._lock.endReading();
        }
    }
View Full Code Here


    } finally {
    }
  }

  private void deleteInstance(MApplication application, Integer instanceId) {
    final MInstance instance = application.instanceWithID(instanceId);
    try {
      siteConfig().removeInstance_M(instance);
    } finally {
    }
  }
View Full Code Here

            if (theHost != null) {
                NSArray instArray = theHost.instanceArray();
                int instArrayCount = instArray.count();

                for (int i=0; i<instArrayCount; i++) {
                    MInstance anInst = (MInstance) instArray.objectAtIndex(i);

                    if ( (!anInst.isRunning_W()) && (anInst.state != MObject.STARTING) &&
                         ( (anInst.isAutoRecovering()) || (anInst.isScheduled()) ) ) {
                        anInst.setRefusingNewSessions(false);
                        startInstance(anInst);
                    }
                }
            }
            triageUnknownInstances();
View Full Code Here

        if (pS != null) {
            phasedStartup = pS.booleanValue();
        }

        for (int i=0; i<instArrayCount; i++) {
            MInstance anInst = (MInstance) instArray.objectAtIndex(i);

            if ( (anInst.isLocal_W()) && (!anInst.isRunning_W()) && (anInst.state != MObject.STARTING) &&
                 ( (anInst.isAutoRecovering()) || (anInst.isScheduled()) ) ) {
                anInst.setRefusingNewSessions(false);
                startInstance(anInst);

                if ( (phasedStartup) && (i < instArrayCount-1) ) {
                    try {
                        Thread.sleep(timeForStartup);
View Full Code Here

                for (int i=0; i<instArrayCount; i++) {
                    final int j = i;
                    Runnable work = new Runnable() {
                        public void run() {
                            try {
                                MInstance anInst = (MInstance) instArray.objectAtIndex(j);
                                if ( (anInst.isScheduled()) && (anInst.nearNextScheduledShutdown(rightNow)) ) {
                                    if (anInst.isGracefullyScheduled()) {
                                        localMonitor.stopInstance(anInst);
                                    } else {
                                        localMonitor.terminateInstance(anInst);
                                    }
                                    anInst.calculateNextScheduledShutdown();
                                }
                            } catch (MonitorException me) {
                                NSLog.err.appendln("Exception while scheduling: " + me.getMessage());
                            }
                        }
View Full Code Here

                        pushAppOnly = false;
                        myApplication().setName(defaultsName);
                        NSArray _instanceArray = myApplication().instanceArray();
                        int instanceArrayCount = _instanceArray.count();
                        for (int i = 0; i < instanceArrayCount; i++) {
                            MInstance anInstance = (MInstance) _instanceArray.objectAtIndex(i);
                            anInstance._takeNameFromApplication();
                        }
                    }
                }
            }
View Full Code Here

            myApplication().setMacPath(appDefaults.macPath());

            NSArray _instanceArray = myApplication().instanceArray();
            int instanceArrayCount = _instanceArray.count();
            for (int i = 0; i < instanceArrayCount; i++) {
                MInstance anInstance = (MInstance) _instanceArray.objectAtIndex(i);
                anInstance._takePathFromApplication();
            }
            _defaultsPush();
        } finally {
            handler().endReading();
        }
View Full Code Here

            myApplication().setAutoRecover(appDefaults.autoRecover());

            NSArray _instanceArray = myApplication().instanceArray();
            int instanceArrayCount = _instanceArray.count();
            for (int i = 0; i < instanceArrayCount; i++) {
                MInstance anInstance = (MInstance) _instanceArray.objectAtIndex(i);
                anInstance._takeValueFromApplication("autoRecover");
            }
            _defaultsPush();
        } finally {
            handler().endReading();
        }
View Full Code Here

            myApplication().setMinimumActiveSessionsCount(appDefaults.minimumActiveSessionsCount());

            NSArray _instanceArray = myApplication().instanceArray();
            int instanceArrayCount = _instanceArray.count();
            for (int i = 0; i < instanceArrayCount; i++) {
                MInstance anInstance = (MInstance) _instanceArray.objectAtIndex(i);
                anInstance._takeValueFromApplication("minimumActiveSessionsCount");
            }
            _defaultsPush();
        } finally {
            handler().endReading();
        }
View Full Code Here

            myApplication().setCachingEnabled(appDefaults.cachingEnabled());

            NSArray _instanceArray = myApplication().instanceArray();
            int instanceArrayCount = _instanceArray.count();
            for (int i = 0; i < instanceArrayCount; i++) {
                MInstance anInstance = (MInstance) _instanceArray.objectAtIndex(i);
                anInstance._takeValueFromApplication("cachingEnabled");
            }
            _defaultsPush();
        } finally {
            handler().endReading();
        }
View Full Code Here

TOP

Related Classes of com.webobjects.monitor._private.MInstance

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.