Example usage for java.util.logging Level FINER

List of usage examples for java.util.logging Level FINER

Introduction

In this page you can find the example usage for java.util.logging Level FINER.

Prototype

Level FINER

To view the source code for java.util.logging Level FINER.

Click Source Link

Document

FINER indicates a fairly detailed tracing message.

Usage

From source file:Peer.java

@Override
public boolean insert(String word, String def, Level logLevel) throws Exception {
    lg.log(Level.FINEST, "insert Entry");

    // Max key value
    Key max = new Key(BigInteger.valueOf((int) Math.pow(2, hasher.getBitSize()))).pred();

    // Get key hash 
    Key key = hasher.getHash(word);

    lg.log(Level.FINER, " Hashed word " + word + " with definition " + def + " has key " + key);

    // If this peer knows the which peer that key belongs to ...
    if (//  w  ww . ja  v  a2  s. c  o m
    // Normal ascending rande
    pred == null || (key.compare(pred) > 0 && key.compare(nodeid) <= 0)
    // Modulo range 
            || (pred.compare(nodeid) > 0 && (key.compare(pred) > 0 && key.compare(max) <= 0)
                    || (key.compare(nodeid) <= 0))) {
        lg.log(logLevel,
                "(insert)Peer " + nodeid + " should have word " + word + "(" + def + ") with key " + key);
        dict.put(word, def);
        lg.log(Level.FINEST, "insert Exit");
        return true;
    }

    // ... else find the successor through the finer table
    Key closestNode = ft.getClosestSuccessor(key);

    lg.log(logLevel, "(insert)Peer " + nodeid + " should NOT have word " + word + "(" + def + ") with key "
            + key + " ... calling insert on the best finger table match " + closestNode);

    PeerInterface peer = getPeer(closestNode);
    lg.log(Level.FINEST, "insert Exit");
    return peer.insert(word, def, logLevel);
}

From source file:com.archivas.clienttools.arcutils.utils.net.GetCertsX509TrustManager.java

public void initMemoryTrustManager(boolean forcereload)
        throws NoSuchAlgorithmException, NoSuchProviderException, KeyStoreException {
    if (memoryTrustManager != null && !forcereload) {
        return;//from  w  w  w.  ja v a 2 s. com
    }
    try {
        if (memoryKeyStore == null) {
            memoryKeyStore = KeyStore.getInstance("JKS");
        }

        try {
            memoryKeyStore.load(null, persistedKeystorePassword);
        } catch (IOException e) {
            LOG.log(Level.WARNING, "Unexpected Exception", e);
        } catch (CertificateException e) {
            LOG.log(Level.WARNING, "Unexpected Exception", e);
        }

        TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
        tmf.init(memoryKeyStore);

        TrustManager tms[] = tmf.getTrustManagers();

        // Iterate over the returned trustmanagers, look for an instance of X509TrustManager.
        // If found, use that as our "default" trust manager.
        for (int i = 0; i < tms.length; i++) {
            if (tms[i] instanceof X509TrustManager) {
                memoryTrustManager = (X509TrustManager) tms[i];
                break;
            }
        }
        LOG.log(Level.FINER, "MemoryTrustManager=" + memoryTrustManager);
    } catch (KeyStoreException e) {
        LOG.log(Level.WARNING, "Unexpected Exception", e);
        throw e;

    } catch (NoSuchAlgorithmException e) {
        LOG.log(Level.WARNING, "Unexpected Exception", e);
        throw e;

    } catch (RuntimeException e) {
        LOG.log(Level.WARNING, "Unexpected Exception", e);
        throw e;
    }
}

From source file:de.theit.jenkins.crowd.CrowdRememberMeServices.java

/**
 * {@inheritDoc}//from ww w. jav  a  2  s  .  c o  m
 * 
 * @see org.springframework.security.ui.rememberme.RememberMeServices#loginSuccess(javax.servlet.http.HttpServletRequest,
 *      javax.servlet.http.HttpServletResponse,
 *      org.springframework.security.Authentication)
 */
@Override
public void loginSuccess(HttpServletRequest request, HttpServletResponse response,
        Authentication successfulAuthentication) {
    if (!(successfulAuthentication instanceof CrowdAuthenticationToken)) {
        // authentication token doesn't belong to us...
        return;
    }
    CrowdAuthenticationToken crowdAuthenticationToken = (CrowdAuthenticationToken) successfulAuthentication;

    List<ValidationFactor> validationFactors = this.configuration.tokenHelper.getValidationFactorExtractor()
            .getValidationFactors(request);

    // check if there's already a SSO token in the authentication object
    String ssoToken = crowdAuthenticationToken.getSSOToken();

    try {
        if (null == ssoToken) {
            // SSO token not yet available => authenticate the user and
            // create the SSO token
            if (LOG.isLoggable(Level.FINE)) {
                LOG.fine("SSO token not yet available => authenticate user...");
            }
            this.configuration.crowdHttpAuthenticator.authenticate(request, response,
                    crowdAuthenticationToken.getPrincipal(), crowdAuthenticationToken.getCredentials());

            // user is successfully authenticated
            // => retrieve the SSO token
            if (LOG.isLoggable(Level.FINER)) {
                LOG.finer("Retrieve SSO token...");
            }
            ssoToken = this.configuration.tokenHelper.getCrowdToken(request,
                    this.configuration.clientProperties.getCookieTokenKey());
        }

        if (null == ssoToken) {
            // SSO token could not be retrieved (should normally not happen)
            // => logout
            loginFail(request, response);
            return;
        }

        // validate the SSO authentication
        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("Validate the SSO authentication...");
        }
        this.configuration.crowdClient.validateSSOAuthentication(ssoToken, validationFactors);

        // alright, we're successfully authenticated via SSO
        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("Successfully authenticated via SSO");
        }
    } catch (InvalidTokenException ex) {
        // LOG.log(Level.INFO, invalidToken(), ex);
    } catch (ApplicationPermissionException ex) {
        LOG.warning(applicationPermission());
    } catch (InvalidAuthenticationException ex) {
        LOG.warning(invalidAuthentication());
    } catch (ExpiredCredentialException ex) {
        LOG.warning(expiredCredentials(crowdAuthenticationToken.getPrincipal()));
    } catch (InactiveAccountException ex) {
        LOG.warning(accountExpired(crowdAuthenticationToken.getPrincipal()));
    } catch (ApplicationAccessDeniedException ex) {
        LOG.warning(applicationAccessDenied(crowdAuthenticationToken.getPrincipal()));
    } catch (OperationFailedException ex) {
        LOG.log(Level.SEVERE, operationFailed(), ex);
    }
}

From source file:com.prowidesoftware.swift.model.IBAN.java

/**
 * Gets the check digits part of the IBAN
 * @return the check digits (two digits as String) of the IBAN or null if the IBAN has an invalid length
 * @since 7.9.7/* w  w  w . ja va 2s  . c om*/
 * @author psantamarina
 */
public String getCheckDigits() {
    if (StringUtils.isNotEmpty(this.iban)) {
        try {
            return getCheckDigits(this.iban);
        } catch (IndexOutOfBoundsException e) {
            log.log(Level.FINER, "Invalid IBAN length in " + this.iban, e);
        }
    }
    return null;
}

From source file:diet.gridr.g5k.gui.ClusterInfoPanel.java

/**
 * Method returning a Panel that can be displayed the different chart panel
 *
 * @return cardPanel//  w  ww . j  a  v a  2s . c om
 */
private JPanel getCardPanel() {
    if (cardPanel == null) {
        cardPanel = new JPanel();
        carder = new CardLayout();
        cardPanel.setLayout(carder);
        cardPanel.add("Pie Chart", new ClusterPieChart());
        cardPanel.add("Spider Chart", new SpiderWebChart());
        cardPanel.add("Pie Chart 3D", new PieChart3D());
        carder.show(cardPanel, "Pie Chart");
        LoggingManager.log(Level.FINER, LoggingManager.RESOURCESTOOL, this.getClass().getName(), "getCardPanel",
                "Charts added");
    }
    return cardPanel;
}

From source file:foodsimulationmodel.pathmapping.Route.java

/**
 * Find a route from the origin to the destination. A route is a list of Coordinates which describe the route to a
 * destination restricted to a road network. The algorithm consists of three major parts:
 * <ol>//from  w w w .j  av  a 2s  . co  m
 * <li>Find out if the agent is on a road already, if not then move to the nearest road segment</li>
 * <li>Get from the current location (probably mid-point on a road) to the nearest junction</li>
 * <li>Travel to the junction which is closest to our destination (using Dijkstra's shortest path)</li>
 * <li>Get from the final junction to the road which is nearest to the destination
 * <li>
 * <li>Move from the road to the destination</li>
 * </ol>
 * 
 * @throws Exception
 */
protected void setRoute() throws Exception {
    long time = System.nanoTime();
    // this.routeX = new ArrayList<Coordinate>();
    // this.roadsX = new ArrayList<Road>();
    // this.routeDescriptionX = new ArrayList<String>();
    // this.routeSpeedsX = new ArrayList<Double>();
    this.routeX = new Vector<Coordinate>();
    this.roadsX = new Vector<Road>();
    this.routeDescriptionX = new Vector<String>();
    this.routeSpeedsX = new Vector<Double>();

    LOGGER.log(Level.FINER,
            "Planning route for: " + this.agent.toString() + " to: " + this.destinationAgent.toString());
    if (atDestination()) {
        LOGGER.log(Level.WARNING, "Already at destination, cannot create a route for " + this.agent.toString());
        return;
    }

    Coordinate currentCoord = ContextManager.getAgentGeometry(this.agent).getCoordinate();
    Coordinate destCoord = this.destination;

    // See if a route has already been cached.
    // CachedRoute cachedRoute = new CachedRoute(currentCoord, destCoord, this.agent.getTransportAvailable());
    // synchronized (Route.routeCache) {
    // if (Route.routeCache.containsKey(cachedRoute)) {
    // TempLogger.out("Route.setRoute, found a cached route from " + currentCoord + " to " + destCoord
    // + " using available transport " + this.agent.getTransportAvailable() + ", returning it.");
    // // Return a clone of the route that is stored in the cache
    // // TODO do we need clones here? I don't think so...
    // CachedRoute cr = Route.routeCache.get(cachedRoute);
    // // this.routeX = Cloning.copy(cr.getRoute());
    // // this.roadsX = new ArrayList<Road>(cr.getRoads());
    // // this.routeSpeedsX = new ArrayList<Double>(cr.getRouteSpeeds());
    // // this.routeDescriptionX = new ArrayList<String>(cr.getDescriptions());
    // this.routeX = new Vector<Coordinate>(cr.getRoute());
    // this.roadsX = new Vector<Road>(cr.getRoads());
    // this.routeSpeedsX = new Vector<Double>(cr.getRouteSpeeds());
    // this.routeDescriptionX = new Vector<String>(cr.getDescriptions());
    //
    // return;
    // }
    // } // synchronized

    // No route cached, have to create a new one (and cache it at the end).
    try {
        /*
         * See if the current position and the destination are on road segments. If the destination is not on a road
         * segment we have to move to the closest road segment, then onto the destination.
         */
        boolean destinationOnRoad = true;
        Coordinate finalDestination = null;
        if (!coordOnRoad(currentCoord)) {
            /*
             * Not on a road so the first coordinate to add to the route is the point on the closest road segment.
             */
            currentCoord = getNearestRoadCoord(currentCoord);
            addToRoute(currentCoord, Road.nullRoad, 1, "setRoute() initial");
        }
        if (!coordOnRoad(destCoord)) {
            /*
             * Not on a road, so need to set the destination to be the closest point on a road, and set the
             * destinationOnRoad boolean to false so we know to add the final dest coord at the end of the route
             */
            destinationOnRoad = false;
            finalDestination = destCoord; // Added to route at end of alg.
            destCoord = getNearestRoadCoord(destCoord);
        }

        /*
         * Find the nearest junctions to our current position (road endpoints)
         */

        // Start by Finding the road that this coordinate is on
        /*
         * TODO EFFICIENCY: often the agent will be creating a new route from a building so will always find the
         * same road, could use a cache. Even better, could implement a cache in FindNearestObject() method!
         */
        Road currentRoad = Route.findNearestObject(currentCoord, ContextManager.roadProjection, null,
                GlobalVars.GEOGRAPHY_PARAMS.BUFFER_DISTANCE.LARGE);
        // Find which Junction is closest to us on the road.
        List<Junction> currentJunctions = currentRoad.getJunctions();

        /* Find the nearest Junctions to our destination (road endpoints) */

        // Find the road that this coordinate is on
        Road destRoad = Route.findNearestObject(destCoord, ContextManager.roadProjection, null,
                GlobalVars.GEOGRAPHY_PARAMS.BUFFER_DISTANCE.SMALL);
        // Find which Junction connected to the edge is closest to the coordinate.
        List<Junction> destJunctions = destRoad.getJunctions();
        /*
         * Now have four possible routes (2 origin junctions, 2 destination junctions) need to pick which junctions
         * form shortest route
         */
        Junction[] routeEndpoints = new Junction[2];
        List<RepastEdge<Junction>> shortestPath = getShortestRoute(currentJunctions, destJunctions,
                routeEndpoints);
        // NetworkEdge<Junction> temp = (NetworkEdge<Junction>)
        // shortestPath.get(0);
        Junction currentJunction = routeEndpoints[0];
        Junction destJunction = routeEndpoints[1];

        /* Add the coordinates describing how to get to the nearest junction */
        List<Coordinate> tempCoordList = new Vector<Coordinate>();
        this.getCoordsAlongRoad(currentCoord, currentJunction.getCoords(), currentRoad, true, tempCoordList);
        addToRoute(tempCoordList, currentRoad, 1, "getCoordsAlongRoad (toJunction)");

        /*
         * Add the coordinates and speeds etc which describe how to move along the chosen path
         */
        this.getRouteBetweenJunctions(shortestPath, currentJunction);

        /*
         * Add the coordinates describing how to get from the final junction to the destination.
         */

        tempCoordList.clear();
        this.getCoordsAlongRoad(ContextManager.junctionGeography.getGeometry(destJunction).getCoordinate(),
                destCoord, destRoad, false, tempCoordList);
        addToRoute(tempCoordList, destRoad, 1, "getCoordsAlongRoad (fromJunction)");

        if (!destinationOnRoad) {
            addToRoute(finalDestination, Road.nullRoad, 1, "setRoute final");
        }

        // Check that a route has actually been created
        checkListSizes();

        // If the algorithm was better no coordinates would have been duplicated
        // removePairs();

        // Check lists are still the same size.
        checkListSizes();

    } catch (RoutingException e) {
        LOGGER.log(Level.SEVERE,
                "Route.setRoute(): Problem creating route for " + this.agent.toString() + " going from "
                        + currentCoord.toString() + " to " + this.destination.toString() + "("
                        + (this.destinationAgent == null ? "" : this.destinationAgent.toString())
                        + ") See earlier messages error messages for more info.");
        throw e;
    }
    // Cache the route and route speeds
    // List<Coordinate> routeClone = Cloning.copy(theRoute);
    // LinkedHashMap<Coordinate, Double> routeSpeedsClone = Cloning.copy(this.routeSpeeds);
    // cachedRoute.setRoute(routeClone);
    // cachedRoute.setRouteSpeeds(routeSpeedsClone);

    // cachedRoute.setRoute(this.routeX, this.roadsX, this.routeSpeedsX, this.routeDescriptionX);
    // synchronized (Route.routeCache) {
    // // Same cached route is both value and key
    // Route.routeCache.put(cachedRoute, cachedRoute);
    // }
    // TempLogger.out("...Route cacheing new route with unique id " + cachedRoute.hashCode());

    LOGGER.log(Level.FINER, "Route Finished planning route for " + this.agent.toString() + "with "
            + this.routeX.size() + " coords in " + (0.000001 * (System.nanoTime() - time)) + "ms.");

    // Finished, just check that the route arrays are all in sync
    assert this.roadsX.size() == this.routeX.size() && this.routeDescriptionX.size() == this.routeSpeedsX.size()
            && this.roadsX.size() == this.routeDescriptionX.size();
}

From source file:org.geotools.data.ngi.NGISchemaReader.java

private ReferencedEnvelope getBounds(BufferedReader reader) {
    try {//w  w  w .  j a va  2s .  com
        String line = reader.readLine();
        while (line != null) {
            if (line.toUpperCase().startsWith("BOUND(")) {
                // BOUND(150609.210000, 203279.010000, 152265.620000, 205171.560000)
                line = line.substring(6, line.length() - 1);
                String[] coordinates = line.split(",", 4);
                double x1 = parseDouble(coordinates[0]);
                double y1 = parseDouble(coordinates[1]);
                double x2 = parseDouble(coordinates[2]);
                double y2 = parseDouble(coordinates[3]);

                return new ReferencedEnvelope(x1, x2, y1, y2, crs);
            }
            line = reader.readLine();
        }
    } catch (IOException e) {
        LOGGER.log(Level.FINER, e.getMessage(), e);
    }
    return null;
}

From source file:org.geoserver.jdbcconfig.internal.ConfigDatabase.java

public <T extends CatalogInfo> int count(final Class<T> of, final Filter filter) {

    QueryBuilder<T> sqlBuilder = QueryBuilder.forCount(dialect, of, dbMappings).filter(filter);

    final StringBuilder sql = sqlBuilder.build();
    final Filter unsupportedFilter = sqlBuilder.getUnsupportedFilter();
    final boolean fullySupported = Filter.INCLUDE.equals(unsupportedFilter);
    if (LOGGER.isLoggable(Level.FINER)) {
        LOGGER.finer("Original filter: " + filter);
        LOGGER.finer("Supported filter: " + sqlBuilder.getSupportedFilter());
        LOGGER.finer("Unsupported filter: " + sqlBuilder.getUnsupportedFilter());
    }//from  w  w  w  .jav  a 2  s .c  o m
    final int count;
    if (fullySupported) {
        final Map<String, Object> namedParameters = sqlBuilder.getNamedParameters();
        logStatement(sql, namedParameters);

        count = template.queryForObject(sql.toString(), namedParameters, Integer.class);
    } else {
        LOGGER.fine(
                "Filter is not fully supported, doing scan of supported part to return the number of matches");
        // going the expensive route, filtering as much as possible
        CloseableIterator<T> iterator = query(of, filter, null, null, (SortBy) null);
        try {
            return Iterators.size(iterator);
        } finally {
            iterator.close();
        }
    }
    return count;
}

From source file:com.prowidesoftware.swift.model.mx.XmlEventWriter.java

public void add(final XMLEvent event) throws XMLStreamException {
    if (event != null) {
        log.finest("XmlEventType: " + event.getEventType());
        try {/*from  ww  w  . j  av  a 2  s . co m*/
            final int type = event.getEventType();
            switch (type) {
            case XMLEvent.START_DOCUMENT:
                if (this.includeXMLDeclaration) {
                    log.finer(">> START_DOCUMENT");
                    log.finer("START_DOCUMENT XMLEvent " + ToStringBuilder.reflectionToString(event));
                    final String str = "<?xml version=\"1.0\" encoding=\""
                            + ((StartDocument) event).getCharacterEncodingScheme() + "\"?>";
                    out.write(str);
                    logStep(str);
                } else {
                    log.finer("skipping xml declaration");
                }
                break;

            case XMLEvent.START_ELEMENT:
                this.startElementCount++;
                closeStartTagIfNeeded();
                log.finer(">> START_ELEMENT");
                indent.append(' ');
                final StartElement se = event.asStartElement();
                @SuppressWarnings("rawtypes")
                final Iterator it = se.getNamespaces();
                while (it.hasNext()) {
                    log.fine("ns: " + it.next());
                }
                /*---------------------------------------------------------------------------------------
                 * 2015.03 miguel
                 * Cuidado con esta condicion! esto generaba el bug de que no abria el Document anidado dentro del xs:any
                 * Esto es porque este document delayed solo se completa cuando recibe un namespace, pensado como elemento inicial
                 * esto DEEEEBEEEEEEEEEEe corregirse cuando se cambie la serializacion, si se cambia
                 * porque si el document queda dentro de un elemento payload, entonces en count es != 1 y debe revisarse como se identifica el primer 
                 * document y un document anidado.
                 *  
                 */
                if (StringUtils.equals(se.getName().getLocalPart(), this.rootElement)
                        && this.startElementCount == 1) { // 2015.03 miguel: ESTE era el bug de esprow, que aparecian tags anidados de document cerrando que no abria, era porque entraban por aca sin esta condicion de depth count
                    delayedStart = se;
                    log.finer("local part is Document, initializing delayed start, startElementCount="
                            + this.startElementCount);
                } else {
                    final String s = "\n" + indent + "<" + prefix() + se.getName().getLocalPart() /* + ">" */;
                    out.write(s);

                    logStep(s);

                    /* 2014.11 miguel
                     * para soportar atributos en lugar de cerrar aca seteamos un flag para indicar 
                     * que hace falta cerrar el startTag
                     */
                    startTagIncomplete = true;
                    if (se.isNamespace()) {
                        log.fine("is ns in start XMLEvent " + ToStringBuilder.reflectionToString(event));
                    }
                }
                break;

            case XMLEvent.NAMESPACE:
                log.finer(">> NAMESPACE");
                final Namespace ne = (Namespace) event;
                if (delayedStart != null) {
                    final String s = "\n" + indent + "<" + prefix() + delayedStart.getName().getLocalPart()
                            + " " + "xmlns" + (this.prefix != null ? ":" + this.prefix : "") + "=\""
                            + ne.getValue() + "\" xmlns:xsi=\"" + ne.getName() + "\"" + ">";
                    out.write(s);
                    logStep(s);
                    delayedStart = null;
                } else {
                    log.fine("NAMESPACE XMLEvent " + ToStringBuilder.reflectionToString(event));
                }
                break;

            case XMLEvent.CHARACTERS:
                log.finer(">> CHARACTERS");
                closeStartTagIfNeeded();
                final Characters ce = event.asCharacters();
                final char[] arr = ce.getData().toCharArray();
                out.write(escape(arr));
                logStep(ce.getData());
                break;

            case XMLEvent.END_ELEMENT:
                log.finer(">> END_ELEMENT");
                closeStartTagIfNeeded();
                indent.deleteCharAt(0);
                final EndElement ee = event.asEndElement();
                final String str2 = "</" + prefix() + ee.getName().getLocalPart() + ">\n" + indent;
                out.write(str2);
                logStep(str2);
                break;

            case XMLEvent.END_DOCUMENT:
                log.finer(">> END_DOCUMENT");
                closeStartTagIfNeeded();
                /*  2014.10 miguel
                 *  No need to do anything while writing to a string 
                 */
                log.finer("END_DOCUMENT XMLEvent " + ToStringBuilder.reflectionToString(event));
                break;

            case XMLEvent.ATTRIBUTE:
                log.finer(">> ATTRIBUTE");
                final Attribute a = (Attribute) event;
                final String str3 = " " + a.getName() + "=\"" + a.getValue() + "\" ";
                out.write(str3);
                log.fine(ToStringBuilder.reflectionToString(a));
                logStep(str3);
                break;

            default:
                log.info("getEventType " + event.getEventType());
                log.info("PW Unhandled XMLEvent " + ToStringBuilder.reflectionToString(event));
                break;
            }
        } catch (IOException e) {
            log.log(Level.SEVERE, "PW I/O error: " + e);
            log.log(Level.FINER, "PW I/O error: ", e);
            throw new XMLStreamException(e);
        }
    }
}

From source file:com.ibm.jaggr.core.impl.AbstractAggregatorImpl.java

/**
 * Called when the aggregator is shutting down.  Note that there is inconsistency
 * among servlet bridge implementations over when {@link HttpServlet#destroy()}
 * is called relative to when (or even if) the bundle is stopped.  So this method
 * may be called from the destroy method or the bundle listener or both.
 *//*  w  w w. j a  va2  s. c om*/
synchronized protected void shutdown() {
    final String sourceMethod = "shutdown"; //$NON-NLS-1$
    boolean isTraceLogging = log.isLoggable(Level.FINER);
    if (isTraceLogging) {
        log.entering(AbstractAggregatorImpl.class.getName(), sourceMethod);
    }

    if (!isShuttingDown) {
        isShuttingDown = true;
        IServiceReference[] refs = null;
        try {
            refs = getPlatformServices().getServiceReferences(IShutdownListener.class.getName(),
                    "(name=" + getName() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
        } catch (PlatformServicesException e) {
            if (log.isLoggable(Level.SEVERE)) {
                log.log(Level.SEVERE, e.getMessage(), e);
            }
        }
        if (refs != null) {
            for (IServiceReference ref : refs) {
                IShutdownListener listener = (IShutdownListener) getPlatformServices().getService(ref);
                if (listener != null) {
                    try {
                        listener.shutdown(this);
                    } catch (Exception e) {
                        if (log.isLoggable(Level.SEVERE)) {
                            log.log(Level.SEVERE, e.getMessage(), e);
                        }
                    } finally {
                        getPlatformServices().ungetService(ref);
                    }
                }
            }
        }
        for (IServiceRegistration registration : registrations) {
            registration.unregister();
        }
        for (IServiceReference ref : serviceReferences) {
            getPlatformServices().ungetService(ref);
        }
        registrations.clear();
        serviceReferences.clear();

        // Clear references to objects that can potentially reference this object
        // so as to avoid memory leaks due to circular references.
        resourceFactoryExtensions.clear();
        moduleBuilderExtensions.clear();
        serviceProviderExtensions.clear();
        httpTransportExtension = null;
        initParams = null;
        cacheMgr = null;
        config = null;
        deps = null;
    }
    if (isTraceLogging) {
        log.exiting(AbstractAggregatorImpl.class.getName(), sourceMethod);
    }
}