This is an automated email from the ASF dual-hosted git repository.

mattrpav pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq.git


The following commit(s) were added to refs/heads/main by this push:
     new 642ec302c [AMQ-9225] Remove j2ee management dependency as it is no 
longer part of JEE spec (#983)
642ec302c is described below

commit 642ec302ccb5255c3c05f64548917aafbc37f9a4
Author: Matt Pavlovich <[email protected]>
AuthorDate: Tue Mar 7 11:13:41 2023 -0600

    [AMQ-9225] Remove j2ee management dependency as it is no longer part of JEE 
spec (#983)
---
 activemq-all/pom.xml                               |  8 ------
 activemq-client/pom.xml                            |  6 ----
 .../apache/activemq/management/CountStatistic.java | 23 ++++++++++++++++
 .../activemq/management/CountStatisticImpl.java    |  2 --
 .../management/PollCountStatisticImpl.java         |  2 --
 .../org/apache/activemq/management/Statistic.java  | 32 ++++++++++++++++++++++
 .../apache/activemq/management/StatisticImpl.java  |  2 --
 .../java/org/apache/activemq/management/Stats.java | 27 ++++++++++++++++++
 .../org/apache/activemq/management/StatsImpl.java  |  2 --
 activemq-kahadb-store/pom.xml                      |  4 ---
 .../src/main/resources/features-core.xml           |  1 -
 activemq-mqtt/pom.xml                              |  4 ---
 activemq-osgi/pom.xml                              |  7 -----
 activemq-rar/pom.xml                               |  4 ---
 activemq-tooling/activemq-maven-plugin/pom.xml     |  4 ---
 .../activemq-memtest-maven-plugin/pom.xml          |  4 ---
 .../activemq-perf-maven-plugin/pom.xml             |  4 ---
 activemq-unit-tests/pom.xml                        |  4 ---
 activemq-web-console/pom.xml                       |  4 ---
 activemq-web-demo/pom.xml                          |  4 ---
 assembly/pom.xml                                   |  4 ---
 assembly/src/main/descriptors/common-bin.xml       |  1 -
 pom.xml                                            |  6 ----
 23 files changed, 82 insertions(+), 77 deletions(-)

diff --git a/activemq-all/pom.xml b/activemq-all/pom.xml
index 561eafb16..0cbe6f38b 100644
--- a/activemq-all/pom.xml
+++ b/activemq-all/pom.xml
@@ -102,7 +102,6 @@
                   <include>org.jasypt:jasypt</include>
                   <include>jakarta.jms:jakarta.jms-api</include>
                   
<include>org.apache.geronimo.specs:geronimo-jta_1.1_spec</include>
-                  
<include>org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec</include>
                   
<include>org.apache.geronimo.specs:geronimo-annotation_1.3_spec</include>
                   <include>org.slf4j:slf4j-api</include>
                   <include>org.apache.logging.log4j:log4j-slf4j-impl</include>
@@ -320,13 +319,6 @@
           <classifier>sources</classifier>
           <optional>true</optional>
         </dependency>
-        <dependency>
-          <groupId>org.apache.geronimo.specs</groupId>
-          <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
-          <version>1.0.1</version>
-          <classifier>sources</classifier>
-          <optional>true</optional>
-        </dependency>
         <dependency>
           <groupId>org.apache.geronimo.specs</groupId>
           <artifactId>geronimo-annotation_1.3_spec</artifactId>
diff --git a/activemq-client/pom.xml b/activemq-client/pom.xml
index 96f9880e9..a55c06851 100644
--- a/activemq-client/pom.xml
+++ b/activemq-client/pom.xml
@@ -52,12 +52,6 @@
       <version>${hawtbuf-version}</version>
     </dependency>
 
-    <!-- would be nice if we could make this dependency optional -->
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
-    </dependency>
-
     <!-- for zerconf discovery -->
     <dependency>
       <groupId>javax.jmdns</groupId>
diff --git 
a/activemq-client/src/main/java/org/apache/activemq/management/CountStatistic.java
 
b/activemq-client/src/main/java/org/apache/activemq/management/CountStatistic.java
new file mode 100644
index 000000000..b58d7fbe4
--- /dev/null
+++ 
b/activemq-client/src/main/java/org/apache/activemq/management/CountStatistic.java
@@ -0,0 +1,23 @@
+/*
+ * 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.activemq.management;
+
+public interface CountStatistic extends Statistic {
+    public long getCount();
+}
diff --git 
a/activemq-client/src/main/java/org/apache/activemq/management/CountStatisticImpl.java
 
b/activemq-client/src/main/java/org/apache/activemq/management/CountStatisticImpl.java
index bd5cd419a..b2966aac3 100644
--- 
a/activemq-client/src/main/java/org/apache/activemq/management/CountStatisticImpl.java
+++ 
b/activemq-client/src/main/java/org/apache/activemq/management/CountStatisticImpl.java
@@ -18,8 +18,6 @@ package org.apache.activemq.management;
 
 import java.util.concurrent.atomic.AtomicLong;
 
-import javax.management.j2ee.statistics.CountStatistic;
-
 /**
  * A count statistic implementation
  * 
diff --git 
a/activemq-client/src/main/java/org/apache/activemq/management/PollCountStatisticImpl.java
 
b/activemq-client/src/main/java/org/apache/activemq/management/PollCountStatisticImpl.java
index 6b234b888..6099343a6 100644
--- 
a/activemq-client/src/main/java/org/apache/activemq/management/PollCountStatisticImpl.java
+++ 
b/activemq-client/src/main/java/org/apache/activemq/management/PollCountStatisticImpl.java
@@ -20,8 +20,6 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
-import javax.management.j2ee.statistics.CountStatistic;
-
 /**
  * A count statistic implementation
  * 
diff --git 
a/activemq-client/src/main/java/org/apache/activemq/management/Statistic.java 
b/activemq-client/src/main/java/org/apache/activemq/management/Statistic.java
new file mode 100644
index 000000000..e89e62206
--- /dev/null
+++ 
b/activemq-client/src/main/java/org/apache/activemq/management/Statistic.java
@@ -0,0 +1,32 @@
+/*
+ * 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.activemq.management;
+
+public interface Statistic {
+
+    public String getName();
+
+    public String getUnit();
+
+    public String getDescription();
+
+    public long getStartTime();
+
+    public long getLastSampleTime();
+}
diff --git 
a/activemq-client/src/main/java/org/apache/activemq/management/StatisticImpl.java
 
b/activemq-client/src/main/java/org/apache/activemq/management/StatisticImpl.java
index 2cae2f998..1dbcc80c6 100644
--- 
a/activemq-client/src/main/java/org/apache/activemq/management/StatisticImpl.java
+++ 
b/activemq-client/src/main/java/org/apache/activemq/management/StatisticImpl.java
@@ -16,8 +16,6 @@
  */
 package org.apache.activemq.management;
 
-import javax.management.j2ee.statistics.Statistic;
-
 /**
  * Base class for a Statistic implementation
  * 
diff --git 
a/activemq-client/src/main/java/org/apache/activemq/management/Stats.java 
b/activemq-client/src/main/java/org/apache/activemq/management/Stats.java
new file mode 100644
index 000000000..32a8eaef8
--- /dev/null
+++ b/activemq-client/src/main/java/org/apache/activemq/management/Stats.java
@@ -0,0 +1,27 @@
+/*
+ * 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.activemq.management;
+
+public interface Stats {
+    public Statistic getStatistic(String statisticName);
+
+    public String[] getStatisticNames();
+
+    public Statistic[] getStatistics();
+}
diff --git 
a/activemq-client/src/main/java/org/apache/activemq/management/StatsImpl.java 
b/activemq-client/src/main/java/org/apache/activemq/management/StatsImpl.java
index 4e9e6b09a..f3ae60fb0 100644
--- 
a/activemq-client/src/main/java/org/apache/activemq/management/StatsImpl.java
+++ 
b/activemq-client/src/main/java/org/apache/activemq/management/StatsImpl.java
@@ -20,8 +20,6 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Set;
 import java.util.concurrent.CopyOnWriteArraySet;
-import javax.management.j2ee.statistics.Statistic;
-import javax.management.j2ee.statistics.Stats;
 /**
  * Base class for a Stats implementation
  * 
diff --git a/activemq-kahadb-store/pom.xml b/activemq-kahadb-store/pom.xml
index afe1d5eef..ed0d48397 100644
--- a/activemq-kahadb-store/pom.xml
+++ b/activemq-kahadb-store/pom.xml
@@ -70,10 +70,6 @@
       <artifactId>geronimo-jta_1.1_spec</artifactId>
       <optional>true</optional>
     </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.apache.geronimo.specs</groupId>
       <artifactId>geronimo-annotation_1.3_spec</artifactId>
diff --git a/activemq-karaf/src/main/resources/features-core.xml 
b/activemq-karaf/src/main/resources/features-core.xml
index b7c312e67..dedc644e8 100644
--- a/activemq-karaf/src/main/resources/features-core.xml
+++ b/activemq-karaf/src/main/resources/features-core.xml
@@ -27,7 +27,6 @@
         <feature>activemq-combined-jms-spec</feature>
         <bundle 
dependency="true">mvn:org.apache.geronimo.specs/geronimo-annotation_1.3_spec/1.0</bundle>
         <bundle 
dependency="true">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
-        <bundle 
dependency="true">mvn:org.apache.geronimo.specs/geronimo-j2ee-management_1.1_spec/1.0.1</bundle>
         <bundle 
dependency="true">mvn:org.jvnet.jaxb2_commons/jaxb2-basics-runtime/${jaxb-basics-version}</bundle>
         <bundle 
dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-runtime/${jaxb-bundle-version}</bundle>
         
<bundle>mvn:org.apache.commons/commons-pool2/${commons-pool2-version}</bundle>
diff --git a/activemq-mqtt/pom.xml b/activemq-mqtt/pom.xml
index ed98a6079..09afb86a2 100644
--- a/activemq-mqtt/pom.xml
+++ b/activemq-mqtt/pom.xml
@@ -80,10 +80,6 @@
       <artifactId>geronimo-jta_1.1_spec</artifactId>
       <optional>true</optional>
     </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.apache.geronimo.specs</groupId>
       <artifactId>geronimo-annotation_1.3_spec</artifactId>
diff --git a/activemq-osgi/pom.xml b/activemq-osgi/pom.xml
index a3dbe7bbd..898c5a1e6 100644
--- a/activemq-osgi/pom.xml
+++ b/activemq-osgi/pom.xml
@@ -485,13 +485,6 @@
           <classifier>sources</classifier>
           <optional>true</optional>
         </dependency> -->
-        <dependency>
-          <groupId>org.apache.geronimo.specs</groupId>
-          <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
-          <version>1.0.1</version>
-          <classifier>sources</classifier>
-          <optional>true</optional>
-        </dependency>
         <dependency>
           <groupId>org.apache.geronimo.specs</groupId>
           <artifactId>geronimo-annotation_1.3_spec</artifactId>
diff --git a/activemq-rar/pom.xml b/activemq-rar/pom.xml
index 192ca906a..3aa378d34 100644
--- a/activemq-rar/pom.xml
+++ b/activemq-rar/pom.xml
@@ -315,10 +315,6 @@
       <groupId>org.springframework</groupId>
       <artifactId>spring-context</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-pool2</artifactId>
diff --git a/activemq-tooling/activemq-maven-plugin/pom.xml 
b/activemq-tooling/activemq-maven-plugin/pom.xml
index d00cd267a..783d2e029 100644
--- a/activemq-tooling/activemq-maven-plugin/pom.xml
+++ b/activemq-tooling/activemq-maven-plugin/pom.xml
@@ -58,10 +58,6 @@
       <groupId>jakarta.jms</groupId>
       <artifactId>jakarta.jms-api</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
       <artifactId>mockito-core</artifactId>
diff --git a/activemq-tooling/activemq-memtest-maven-plugin/pom.xml 
b/activemq-tooling/activemq-memtest-maven-plugin/pom.xml
index ed7f9e4d4..02133063e 100644
--- a/activemq-tooling/activemq-memtest-maven-plugin/pom.xml
+++ b/activemq-tooling/activemq-memtest-maven-plugin/pom.xml
@@ -59,10 +59,6 @@
       <groupId>jakarta.jms</groupId>
       <artifactId>jakarta.jms-api</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
-    </dependency>
   </dependencies>
   <build>
     <plugins>
diff --git a/activemq-tooling/activemq-perf-maven-plugin/pom.xml 
b/activemq-tooling/activemq-perf-maven-plugin/pom.xml
index 4fb835783..444a57455 100644
--- a/activemq-tooling/activemq-perf-maven-plugin/pom.xml
+++ b/activemq-tooling/activemq-perf-maven-plugin/pom.xml
@@ -62,10 +62,6 @@
       <groupId>jakarta.jms</groupId>
       <artifactId>jakarta.jms-api</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
-    </dependency>
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
diff --git a/activemq-unit-tests/pom.xml b/activemq-unit-tests/pom.xml
index 4bae3b5ee..cefe8ea79 100644
--- a/activemq-unit-tests/pom.xml
+++ b/activemq-unit-tests/pom.xml
@@ -107,10 +107,6 @@
       <artifactId>geronimo-jta_1.1_spec</artifactId>
       <optional>true</optional>
     </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.apache.geronimo.specs</groupId>
       <artifactId>geronimo-annotation_1.3_spec</artifactId>
diff --git a/activemq-web-console/pom.xml b/activemq-web-console/pom.xml
index a7a70471e..6c40c6664 100644
--- a/activemq-web-console/pom.xml
+++ b/activemq-web-console/pom.xml
@@ -193,10 +193,6 @@
       <groupId>org.apache.geronimo.specs</groupId>
       <artifactId>geronimo-jta_1.1_spec</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.apache.geronimo.specs</groupId>
       <artifactId>geronimo-jacc_1.1_spec</artifactId>
diff --git a/activemq-web-demo/pom.xml b/activemq-web-demo/pom.xml
index b73c65efb..3a3c4433c 100644
--- a/activemq-web-demo/pom.xml
+++ b/activemq-web-demo/pom.xml
@@ -149,10 +149,6 @@
       <groupId>org.apache.geronimo.specs</groupId>
       <artifactId>geronimo-jta_1.1_spec</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.apache.geronimo.specs</groupId>
       <artifactId>geronimo-jacc_1.1_spec</artifactId>
diff --git a/assembly/pom.xml b/assembly/pom.xml
index ca8459e95..c43020458 100644
--- a/assembly/pom.xml
+++ b/assembly/pom.xml
@@ -259,10 +259,6 @@
     <dependency>
       <groupId>org.apache.geronimo.specs</groupId>
       <artifactId>geronimo-jacc_1.1_spec</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
     </dependency>
      <dependency>
          <groupId>org.apache.tomcat</groupId>
diff --git a/assembly/src/main/descriptors/common-bin.xml 
b/assembly/src/main/descriptors/common-bin.xml
index 55ea978f7..1e5a4291e 100644
--- a/assembly/src/main/descriptors/common-bin.xml
+++ b/assembly/src/main/descriptors/common-bin.xml
@@ -141,7 +141,6 @@
         <include>${pom.groupId}:activemq-console</include>
         <include>${pom.groupId}:activemq-jaas</include>
         <include>org.apache.activemq.protobuf:activemq-protobuf</include>
-        
<include>org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec</include>
         <include>jakarta.jms:jakarta.jms-api</include>
         <include>org.apache.geronimo.specs:geronimo-jta_1.1_spec</include>
         <include>${pom.groupId}:activemq-web</include>
diff --git a/pom.xml b/pom.xml
index 1f088aec0..7baa4b5aa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -460,12 +460,6 @@
         <version>1.1.1</version>
       </dependency>
 
-      <dependency>
-        <groupId>org.apache.geronimo.specs</groupId>
-        <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
-        <version>1.0.1</version>
-      </dependency>
-
       <dependency>
         <groupId>org.apache.geronimo.specs</groupId>
         <artifactId>geronimo-jacc_1.1_spec</artifactId>

Reply via email to