Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSArray.objectAtIndex()


        NSArray values = NSArray.componentsSeparatedByString(aRequest.queryString(), "&");
        if ( (values == null) || (values.count() != 4) ) {
            theApplication.siteConfig().globalErrorDictionary.takeValueForKey((myName + ": Received bad lifebeat: " + aRequest.queryString()), aRequest.queryString());
            log.error(myName + ": Received bad lifebeat: " + aRequest.queryString());
        } else {
            String notificationType = (String)values.objectAtIndex(0);
            String instanceName = (String)values.objectAtIndex(1);
            String host = (String)values.objectAtIndex(2);
            String port = (String)values.objectAtIndex(3);

            if (NSLog.debugLoggingAllowedForLevelAndGroups(NSLog.DebugLevelInformational, NSLog.DebugGroupDeployment))
View Full Code Here


        if ( (values == null) || (values.count() != 4) ) {
            theApplication.siteConfig().globalErrorDictionary.takeValueForKey((myName + ": Received bad lifebeat: " + aRequest.queryString()), aRequest.queryString());
            log.error(myName + ": Received bad lifebeat: " + aRequest.queryString());
        } else {
            String notificationType = (String)values.objectAtIndex(0);
            String instanceName = (String)values.objectAtIndex(1);
            String host = (String)values.objectAtIndex(2);
            String port = (String)values.objectAtIndex(3);

            if (NSLog.debugLoggingAllowedForLevelAndGroups(NSLog.DebugLevelInformational, NSLog.DebugGroupDeployment))
                NSLog.debug.appendln("@@@@@ Received Lifebeat: " + notificationType + " " + instanceName + " " + host + " " + port);
View Full Code Here

            theApplication.siteConfig().globalErrorDictionary.takeValueForKey((myName + ": Received bad lifebeat: " + aRequest.queryString()), aRequest.queryString());
            log.error(myName + ": Received bad lifebeat: " + aRequest.queryString());
        } else {
            String notificationType = (String)values.objectAtIndex(0);
            String instanceName = (String)values.objectAtIndex(1);
            String host = (String)values.objectAtIndex(2);
            String port = (String)values.objectAtIndex(3);

            if (NSLog.debugLoggingAllowedForLevelAndGroups(NSLog.DebugLevelInformational, NSLog.DebugGroupDeployment))
                NSLog.debug.appendln("@@@@@ Received Lifebeat: " + notificationType + " " + instanceName + " " + host + " " + port);
View Full Code Here

            log.error(myName + ": Received bad lifebeat: " + aRequest.queryString());
        } else {
            String notificationType = (String)values.objectAtIndex(0);
            String instanceName = (String)values.objectAtIndex(1);
            String host = (String)values.objectAtIndex(2);
            String port = (String)values.objectAtIndex(3);

            if (NSLog.debugLoggingAllowedForLevelAndGroups(NSLog.DebugLevelInformational, NSLog.DebugGroupDeployment))
                NSLog.debug.appendln("@@@@@ Received Lifebeat: " + notificationType + " " + instanceName + " " + host + " " + port);

            if (notificationType.equals("lifebeat")) {
View Full Code Here

        try {
            NSDictionary appDict = (NSDictionary) _unknownApplications.valueForKey(name);
            if (appDict != null) {
                NSArray keysArray = appDict.allKeys();
                if ( (keysArray != null) && (keysArray.count() > 0) ) {
                    return (String) keysArray.objectAtIndex(0);
                }
            }
            return null;
        } finally {
      _unknownAppLock.endReading();
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);
View Full Code Here

        for (int i = 0; i < workers.length; i++) {
            final int j = i;
            Runnable work = new Runnable() {
                public void run() {
                    responses[j] = ((MHost) finalWotaskdArray.objectAtIndex(j)).sendRequestToWotaskd(aRequest, wc, false);
                }
            };
            workers[j] = new Thread(work);
            workers[j].start();
        }
View Full Code Here

            contextCount = databaseContexts.count();
            for (i = contextCount; i-- > 0;) {
                NSArray channels = ((EODatabaseContext) databaseContexts.objectAtIndex(i)).registeredChannels();
                channelCount = channels.count();
                for (j = channelCount; j-- > 0;) {
                    EODatabaseChannel dbch = (EODatabaseChannel) channels.objectAtIndex(j);
                    if (!dbch.adaptorChannel().adaptorContext().hasOpenTransaction()) {
                        dbch.adaptorChannel().closeChannel();
                       
                    } else {
                        log.warn("could not close Connection from " + dbch + " because its EOAdaptorContext "
View Full Code Here

       
        NSArray parentRelationships = (NSArray) entity.parentEntity().relationships().valueForKey("name");
        NSArray relationships = entity.relationships();
       
        for (int i = relationships.count(); i-- > 0;) {
            EORelationship element = (EORelationship) relationships.objectAtIndex(i);
            if ((element.isToMany() && includeToManyRelationships)
                    || (!element.isToMany() && includeToOneRelationships)) {
                String name = element.name();
                if (cpNames.containsObject(name) && !parentRelationships.containsObject(name)) {
                    ret.addObject(element);
View Full Code Here

        EOFetchSpecification fs = new EOFetchSpecification(entityName, qualifier, null);
        fs.setRefreshesRefetchedObjects(true);
        NSArray objs = ec.objectsWithFetchSpecification(fs);
        eo = null;
        if (objs.count() == 1) {
            eo = (EOEnterpriseObject) objs.objectAtIndex(0);
            if (log.isDebugEnabled()) {
                log.debug("failedEO: "+ eo);
            }
        } else if(objs.count() == 0) {
            throw new EOObjectNotAvailableException("Can't recover: Object was deleted: " + fs);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.