*/
public static void stopServices(Collection<?> services) throws Exception {
Exception firstException = null;
for (Object value : services) {
if (value instanceof Service) {
Service service = (Service)value;
try {
if (LOG.isTraceEnabled()) {
LOG.trace("Stopping service: " + service);
}
service.stop();
} catch (Exception e) {
if (LOG.isDebugEnabled()) {
LOG.debug("Caught exception stopping service: " + service, e);
}
if (firstException == null) {