diff --git a/appserver/common/amx-jakartaee/src/main/java/org/glassfish/admin/amx/impl/j2ee/loader/AMXJ2EEStartupService.java b/appserver/common/amx-jakartaee/src/main/java/org/glassfish/admin/amx/impl/j2ee/loader/AMXJ2EEStartupService.java index 798500f9401..9ba0bdb4742 100644 --- a/appserver/common/amx-jakartaee/src/main/java/org/glassfish/admin/amx/impl/j2ee/loader/AMXJ2EEStartupService.java +++ b/appserver/common/amx-jakartaee/src/main/java/org/glassfish/admin/amx/impl/j2ee/loader/AMXJ2EEStartupService.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2024 Contributors to the Eclipse Foundation. * Copyright (c) 2006, 2022 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -61,10 +62,6 @@ public final class AMXJ2EEStartupService org.glassfish.hk2.api.PreDestroy, AMXLoader, ConfigListener { - private static void debug(final String s) { - System.out.println(s); - } - @Inject private MBeanServer mMBeanServer; diff --git a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/base/MBeanTracker.java b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/base/MBeanTracker.java index b29c4662d74..2a886d117d7 100644 --- a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/base/MBeanTracker.java +++ b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/base/MBeanTracker.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2024 Contributors to the Eclipse Foundation. * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -38,9 +39,6 @@ @AMXMBeanMetadata(singleton = true, globalSingleton = true, leaf = true) public final class MBeanTracker implements NotificationListener, MBeanRegistration, MBeanTrackerMBean { - private static void debug(final Object o) { - System.out.println("" + o); - } /** * maps a parent ObjectName to a Set of children */ diff --git a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/core/PathnameParser.java b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/core/PathnameParser.java index 4db7c100d6e..faaeed3b347 100644 --- a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/core/PathnameParser.java +++ b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/core/PathnameParser.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2024 Contributors to the Eclipse Foundation. * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -14,10 +15,6 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ package org.glassfish.admin.amx.core; import java.util.ArrayList; @@ -40,11 +37,6 @@ @Taxonomy(stability = Stability.UNCOMMITTED) public final class PathnameParser { - private static void debug(final Object o) - { - System.out.println("" + o); - } - private final char mDelim; private final char mNameLeft; diff --git a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/core/Util.java b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/core/Util.java index 4965b0047ee..578d5081c69 100644 --- a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/core/Util.java +++ b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/core/Util.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2024 Contributors to the Eclipse Foundation. * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -51,10 +52,6 @@ public final class Util { private static final String QUOTE_CHAR = "\""; - private static void debug(final String s) { - System.out.println(s); - } - public static String quoteIfNeeded(String name) { if(name.indexOf(":") > 1) { return ObjectName.quote(name); diff --git a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/AMXStartupService.java b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/AMXStartupService.java index be9162e6cfe..5099d059d4f 100644 --- a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/AMXStartupService.java +++ b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/AMXStartupService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Contributors to the Eclipse Foundation + * Copyright (c) 2022, 2024 Contributors to the Eclipse Foundation. * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -66,10 +66,6 @@ public final class AMXStartupService org.glassfish.hk2.api.PreDestroy, AMXStartupServiceMBean { - private static void debug(final String s) { - System.out.println(s); - } - @Inject ServiceLocator mHabitat; @Inject diff --git a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/AMXConfigLoader.java b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/AMXConfigLoader.java index 65ae4808acd..9ad9e6612b9 100644 --- a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/AMXConfigLoader.java +++ b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/AMXConfigLoader.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2024 Contributors to the Eclipse Foundation. * Copyright (c) 2008, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -53,9 +54,6 @@ Responsible for loading ConfigBeanProxy MBeans (com.sun.enterprise.config.server public final class AMXConfigLoader implements TransactionListener { - private static void debug(final String s) { - System.out.println(s); - } private volatile AMXConfigLoaderThread mLoaderThread; private final Transactions mTransactions; private final Logger mLogger = AMXLoggerInfo.getLogger(); @@ -209,7 +207,7 @@ private void sortAndDispatch( issueAttributeChange(cb, propertyName, oldValue, newValue, whenChanged); } } else { - debug("AMXConfigLoader.sortAndDispatch: WARNING: source is not a ConfigBean"); + mLogger.fine("AMXConfigLoader.sortAndDispatch: WARNING: source is not a ConfigBean"); } } } @@ -482,8 +480,7 @@ private ObjectName createAndRegister( //System.out.println( "AMXConfigLoader.createAndRegister(): REGISTERED: " + objectName + " at " + System.currentTimeMillis() ); //System.out.println( JMXUtil.toString( mServer.getMBeanInfo(objectName) ) ); } catch (final JMException e) { - debug(ExceptionUtil.toString(e)); - + mLogger.log(Level.WARNING, AMXLoggerInfo.cantRegister, new Object[]{getType(cb), getKey(cb), e}); objectName = null; } return objectName; diff --git a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/AMXConfigStartupService.java b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/AMXConfigStartupService.java index a89ee9c6761..db74c1acd2e 100644 --- a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/AMXConfigStartupService.java +++ b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/AMXConfigStartupService.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2024 Contributors to the Eclipse Foundation. * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -55,9 +56,6 @@ public final class AMXConfigStartupService org.glassfish.hk2.api.PreDestroy, AMXLoader { - private static void debug(final String s) { - System.out.println(s); - } @Inject InjectedValues mInjectedValues; @Inject//(name=AppserverMBeanServerFactory.OFFICIAL_MBEANSERVER) diff --git a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/AttributeResolverHelper.java b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/AttributeResolverHelper.java index e472a03d285..bc257ca01dc 100644 --- a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/AttributeResolverHelper.java +++ b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/AttributeResolverHelper.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2024 Contributors to the Eclipse Foundation. * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -43,10 +44,6 @@ @Taxonomy( stability = Stability.UNCOMMITTED) public class AttributeResolverHelper extends VariableResolver { - private static void debug(final String s) { - System.out.println("##### " + s); - } - public AttributeResolverHelper(final AMXConfigProxy amx) { } diff --git a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/ConfigBeanJMXSupport.java b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/ConfigBeanJMXSupport.java index 04691e4ea10..ae5cba94985 100644 --- a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/ConfigBeanJMXSupport.java +++ b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/ConfigBeanJMXSupport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Contributors to the Eclipse Foundation + * Copyright (c) 2023, 2024 Contributors to the Eclipse Foundation. * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -1601,12 +1601,6 @@ public Map getDefaultValues(final boolean useAttributeNames) } return m; } - - private static void debug(final String s) - { - System.out.println("### " + s); - } - } diff --git a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/ConfigBeanRegistry.java b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/ConfigBeanRegistry.java index d5caeb3e473..ad1adc38118 100644 --- a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/ConfigBeanRegistry.java +++ b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/ConfigBeanRegistry.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2024 Contributors to the Eclipse Foundation. * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -13,12 +14,6 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ - -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ - package org.glassfish.admin.amx.impl.config; import java.util.concurrent.ConcurrentHashMap; @@ -35,7 +30,6 @@ */ @Taxonomy( stability=Stability.NOT_AN_INTERFACE ) public final class ConfigBeanRegistry { - private static void debug( final String s ) { System.out.println(s); } public static final class MBeanInstance { diff --git a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/mbean/ComplianceMonitor.java b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/mbean/ComplianceMonitor.java index db0d92939d6..37cf1e7a3b7 100644 --- a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/mbean/ComplianceMonitor.java +++ b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/mbean/ComplianceMonitor.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2024 Contributors to the Eclipse Foundation. * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -214,10 +215,6 @@ protected void doRun() throws InterruptedException { } } } - - private static void debug(final Object o) { - System.out.println(o.toString()); - } } diff --git a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/util/ImplUtil.java b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/util/ImplUtil.java index 23b5454a31a..e01fe1362c5 100644 --- a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/util/ImplUtil.java +++ b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/util/ImplUtil.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2024 Contributors to the Eclipse Foundation. * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -24,10 +25,6 @@ public final class ImplUtil { - private static void debug(final String s) { - System.out.println(s); - } - /** Unload this AMX MBean and all its children. MBean should be unloaded at the leafs first, working back to DomainRoot so as to diff --git a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/util/MBeanInfoSupport.java b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/util/MBeanInfoSupport.java index df1f3f56302..8bfd988bbee 100644 --- a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/util/MBeanInfoSupport.java +++ b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/util/MBeanInfoSupport.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2024 Contributors to the Eclipse Foundation. * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -13,11 +14,6 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ - -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ package org.glassfish.admin.amx.impl.util; import java.lang.annotation.Annotation; @@ -61,9 +57,6 @@ public final class MBeanInfoSupport { private MBeanInfoSupport() { } - private static void debug(final Object o) { - System.out.println(o.toString()); - } private static MBeanInfo amxspiMBeanInfo = null; public static synchronized MBeanInfo getAMX_SPIMBeanInfo() { diff --git a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/util/ObjectNameBuilder.java b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/util/ObjectNameBuilder.java index c4b5717b126..2df1211d946 100644 --- a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/util/ObjectNameBuilder.java +++ b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/util/ObjectNameBuilder.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2024 Contributors to the Eclipse Foundation. * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -55,11 +56,6 @@ public ObjectNameBuilder(final MBeanServer mbeanServer, final ObjectName parent) mJMXDomain = parent.getDomain(); } - private static void debug(final Object o) { - System.out.println("" + o); - //AMXDebug.getInstance().getOutput( "org.glassfish.admin.amx.support.ObjectNameBuilder" ).println( o ); - } - public String getJMXDomain() { return (mJMXDomain); } diff --git a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/util/UnregistrationListener.java b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/util/UnregistrationListener.java index d9b63666cfc..d6294a56799 100644 --- a/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/util/UnregistrationListener.java +++ b/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/util/UnregistrationListener.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2024 Contributors to the Eclipse Foundation. * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -50,10 +51,6 @@ public void handleNotification(final Notification notifIn, final Object handback } } - private static void cdebug(final String s) { - System.out.println(s); - } - /** Wait (block) until the MBean is unregistered. @return true if unregistered, false if an error