alien11689 commented on code in PR #296: URL: https://github.com/apache/aries/pull/296#discussion_r1862640199
########## jmx/jmx-mbeanserver-platform/src/main/java/org/apache/aries/jmx/mbean_server/platform/impl/Activator.java: ########## @@ -0,0 +1,72 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.aries.jmx.mbean_server.platform.impl; + +import java.lang.management.ManagementFactory; +import java.util.Hashtable; + +import javax.management.Attribute; +import javax.management.AttributeList; +import javax.management.MBeanServer; +import javax.management.ObjectName; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceRegistration; + +public class Activator implements BundleActivator { + + private final Object registrationLock = new Object(); + private ServiceRegistration<MBeanServer> registration; + + @Override + public void start(BundleContext context) throws Exception { Review Comment: Hi, I am not sure if it is so bad :) On your branch using java 8 without changes from your comment above I run: ``` mvn -f jmx/pom.xml -am -pl jmx-itests clean package ``` and the result is: ``` [INFO] --- surefire:3.1.2:test (default-test) @ org.apache.aries.jmx.itests --- [INFO] Using auto detected provider org.apache.maven.surefire.junit4.JUnit4Provider [INFO] [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running org.apache.aries.jmx.test.blueprint.BlueprintMBeanTest ^[c^[c[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.130 s -- in org.apache.aries.jmx.test.blueprint.BlueprintMBeanTest [INFO] Running org.apache.aries.jmx.cm.ConfigurationAdminMBeanTest [WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 1.938 s -- in org.apache.aries.jmx.cm.ConfigurationAdminMBeanTest [INFO] Running org.apache.aries.jmx.provisioning.ProvisioningServiceMBeanTest [WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 1.457 s -- in org.apache.aries.jmx.provisioning.ProvisioningServiceMBeanTest [INFO] Running org.apache.aries.jmx.permissionadmin.PermissionAdminMBeanTest [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.442 s -- in org.apache.aries.jmx.permissionadmin.PermissionAdminMBeanTest [INFO] Running org.apache.aries.jmx.framework.FrameworkMBeanTest [INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.81 s -- in org.apache.aries.jmx.framework.FrameworkMBeanTest [INFO] Running org.apache.aries.jmx.framework.wiring.BundleWiringStateMBeanTest [INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.500 s -- in org.apache.aries.jmx.framework.wiring.BundleWiringStateMBeanTest [INFO] Running org.apache.aries.jmx.framework.BundleStateMBeanTest [INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.550 s -- in org.apache.aries.jmx.framework.BundleStateMBeanTest [INFO] Running org.apache.aries.jmx.framework.ServiceStateMBeanTest [INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.86 s -- in org.apache.aries.jmx.framework.ServiceStateMBeanTest [INFO] Running org.apache.aries.jmx.framework.PackageStateMBeanTest [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.389 s -- in org.apache.aries.jmx.framework.PackageStateMBeanTest [INFO] [INFO] Results: [INFO] [WARNING] Tests run: 36, Failures: 0, Errors: 0, Skipped: 2 ... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Apache Aries JMX parent 1.1.6-SNAPSHOT ............. SUCCESS [ 0.778 s] [INFO] Apache Aries JMX API 1.1.6-SNAPSHOT ................ SUCCESS [ 0.790 s] [INFO] Apache Aries JMX Core 1.1.9-SNAPSHOT ............... SUCCESS [ 1.568 s] [INFO] Apache Aries JMX Core via Whiteboards 1.1.7-SNAPSHOT SUCCESS [ 0.193 s] [INFO] Apache Aries JMX Bundle 1.1.6-SNAPSHOT ............. SUCCESS [ 0.261 s] [INFO] Apache Aries JMX Blueprint Bundle 1.1.6-SNAPSHOT ... SUCCESS [ 0.167 s] [INFO] Apache Aries JMX integration tests 1.1.6-SNAPSHOT .. SUCCESS [ 42.556 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 46.792 s [INFO] Finished at: 2024-11-28T20:47:00+01:00 ``` With command: ``` mvn -f jmx/pom.xml clean package ``` the run is also green: ``` [INFO] Reactor Summary: [INFO] [INFO] Apache Aries JMX parent 1.1.6-SNAPSHOT ............. SUCCESS [ 0.842 s] [INFO] Apache Aries JMX API 1.1.6-SNAPSHOT ................ SUCCESS [ 0.733 s] [INFO] Apache Aries JMX Blueprint API 1.2.1-SNAPSHOT ...... SUCCESS [ 0.403 s] [INFO] Apache Aries JMX Core 1.1.9-SNAPSHOT ............... SUCCESS [ 1.157 s] [INFO] Apache Aries JMX Core via Whiteboards 1.1.7-SNAPSHOT SUCCESS [ 0.176 s] [INFO] Apache Aries Whiteboard support for JMX DynamicMBean services 1.2.1-SNAPSHOT SUCCESS [ 0.736 s] [INFO] Apache Aries JMX Blueprint Core 1.2.1-SNAPSHOT ..... SUCCESS [ 0.408 s] [INFO] Apache Aries JMX Bundle 1.1.6-SNAPSHOT ............. SUCCESS [ 0.232 s] [INFO] Apache Aries JMX Blueprint Bundle 1.1.6-SNAPSHOT ... SUCCESS [ 0.149 s] [INFO] Apache Aries JMX integration tests 1.1.6-SNAPSHOT .. SUCCESS [ 36.940 s] [INFO] Apache Aries JMX MBeanServer (Platform) 0.1.0-SNAPSHOT SUCCESS [ 0.099 s] [INFO] Apache Aries JMX 1.1.6-SNAPSHOT .................... SUCCESS [ 0.051 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 42.394 s [INFO] Finished at: 2024-11-28T20:50:09+01:00 ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@aries.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org