Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ffb34de
AMQ-9747 - Handle IOExceptionHandler thrown exceptions in KahaDB (#1474)
cshannon Jul 23, 2025
d6b6c4f
AMQ-9739: Removed "upgrade-insecure-requests" from the Web Console's …
sergio-d-lemos Aug 21, 2025
dc7a802
AMQ-9759: Updating Commons Lang to 3.18.0
coheigea Aug 25, 2025
8bda4b8
Merge pull request #1483 from coheigea/activemq-6.1.x
mattrpav Sep 3, 2025
b70a2f1
AMQ-9743: Fixes Web Console column sorting. (#1479)
sergio-d-lemos Sep 12, 2025
e829f16
AMQ-9767: Upgrade to jmdns 3.6.2 (#1486)
jbonofre Sep 12, 2025
2f6cf7c
AMQ-9771: Enable security features when building XML Schema in active…
sergio-d-lemos Sep 18, 2025
03facee
AMQ-9766: Upgrade to Jetty 11.0.26 (#1488)
jbonofre Sep 25, 2025
dabbb6d
AMQ-9763: Upgrade to commons-io 2.20.0 (#1491)
jbonofre Sep 25, 2025
d9d321e
[AMQ-9768] Fix JMX value escaping in web console. (#1487)
thezbyg Sep 25, 2025
6a89066
AMQ-9762: Upgrade to Jackson 2.20.0
jbonofre Oct 3, 2025
fbc3456
AMQ-9746: Upgrade to Jolokia 2.3.0 (#1502)
jbonofre Oct 4, 2025
3858d30
[AMQ-9780] Add a null guard during checkpointUpdate when kahadb is lo…
mattrpav Oct 7, 2025
0d8f3b7
AMQ-9781: Upgrade to ASM 9.9 (#1507)
jbonofre Oct 8, 2025
a8dad11
[AMQ-9783] Centralize XML safe parsing settings in a single class. (#…
sergio-d-lemos Oct 17, 2025
56beb02
AMQ-9792: Upgrade to log4j 2.25.2 (#1514)
jbonofre Oct 19, 2025
588772c
AMQ-9794: Upgrade to flatten-maven-plugin 1.7.3 (#1512)
jbonofre Oct 19, 2025
4fdf2c6
AMQ-9790: Upgrade to slf4j 2.0.17 (#1516)
jbonofre Oct 19, 2025
6897d51
AMQ-9788: Upgrade to JAXB 4.0.6 (#1518)
jbonofre Oct 19, 2025
f877657
AMQ-9784: Fix LICENSE and NOTICE files in the source and binary distr…
jbonofre Oct 19, 2025
706e7da
AMQ-9795: Upgrade to dependency-check-maven 12.1.8 (#1511)
jbonofre Oct 19, 2025
9558d90
AMQ-9797: Upgrade to Jolokia 2.4.0 (#1520)
jbonofre Oct 19, 2025
3ac1ff1
AMQ-9793: Upgrade to build-helper-maven-plugin 3.6.1 (#1513)
jbonofre Oct 19, 2025
9f85b33
Prepare 6.1.8 release
jbonofre Oct 19, 2025
52fe8d9
[maven-release-plugin] prepare release activemq-6.1.8
jbonofre Oct 19, 2025
8d49b0f
Merge tag 'activemq-6.1.8' into activemq-6.1.x-TT.x-patch-forward
jgallimore Nov 13, 2025
f062d4e
Update version
jgallimore Nov 13, 2025
0ac66fa
Fix SCM
jgallimore Nov 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,083 changes: 548 additions & 535 deletions LICENSE

Large diffs are not rendered by default.

32 changes: 1 addition & 31 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,35 +1,5 @@
Apache ActiveMQ Copyright 2005-2024 Apache Software Foundation
Apache ActiveMQ Copyright 2005-2025 Apache Software Foundation

This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).

==============================================================
Jetty Web Container
Copyright 1995-2006 Mort Bay Consulting Pty Ltd
==============================================================

This product includes some software developed at The Apache Software
Foundation (http://www.apache.org/).

The javax.servlet package used by Jetty is copyright
Sun Microsystems, Inc and Apache Software Foundation. It is
distributed under the Common Development and Distribution License.
You can obtain a copy of the license at
https://glassfish.dev.java.net/public/CDDLv1.0.html.

The UnixCrypt.java code ~Implements the one way cryptography used by
Unix systems for simple password protection. Copyright 1996 Aki Yoshida,
modified April 2001 by Iris Van den Broeke, Daniel Deville.

The default JSP implementation is provided by the Glassfish JSP engine
from project Glassfish http://glassfish.dev.java.net. Copyright 2005
Sun Microsystems, Inc. and portions Copyright Apache Software Foundation.

Some portions of the code are Copyright:
2006 Tim Vernum
1999 Jason Gilbert.

This product includes software developed by
Yahoo! Inc. (www.yahoo.com)
Copyright (c) 2010 Yahoo! Inc. All rights reserved.

2 changes: 1 addition & 1 deletion activemq-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>6.1.8-TT.4-SNAPSHOT</version>
<version>6.1.9-TT.1-SNAPSHOT</version>
</parent>

<artifactId>activemq-all</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion activemq-amqp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>6.1.8-TT.4-SNAPSHOT</version>
<version>6.1.9-TT.1-SNAPSHOT</version>
</parent>

<artifactId>activemq-amqp</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion activemq-blueprint/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>6.1.8-TT.4-SNAPSHOT</version>
<version>6.1.9-TT.1-SNAPSHOT</version>
</parent>

<artifactId>activemq-blueprint</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion activemq-broker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>6.1.8-TT.4-SNAPSHOT</version>
<version>6.1.9-TT.1-SNAPSHOT</version>
</parent>

<artifactId>activemq-broker</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/**
* 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.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.xml.XMLConstants;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerFactory;

/**
* Utility class to obtain XML-processing related factories with pre-configured safe parameters. Prefer to centralize
* these parameters here instead of doing ad-hoc on several places.
*/
public final class XmlFactories {
private static final Logger LOG = LoggerFactory.getLogger(XmlFactories.class);

private XmlFactories() { /* Do not instantiate */ }

public static DocumentBuilderFactory getSafeDocumentBuilderFactory() {
DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();

// See https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.md#java
trySetFeature(builderFactory, XMLConstants.FEATURE_SECURE_PROCESSING, true);
trySetFeature(builderFactory,"http://apache.org/xml/features/disallow-doctype-decl", true);
trySetFeature(builderFactory,"http://xml.org/sax/features/external-general-entities", false);
trySetFeature(builderFactory,"http://xml.org/sax/features/external-parameter-entities", false);
trySetFeature(builderFactory,"http://apache.org/xml/features/nonvalidating/load-external-dtd", false);

return builderFactory;
}

public static TransformerFactory getSafeTransformFactory() {
TransformerFactory transformerFactory = TransformerFactory.newInstance();
trySetFeature(transformerFactory, XMLConstants.FEATURE_SECURE_PROCESSING, true);

// See https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.md#transformerfactory
transformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
transformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, "");

return transformerFactory;
}

private static void trySetFeature(final DocumentBuilderFactory factory, final String name, final boolean value) {
try {
factory.setFeature(name, value);
} catch (final ParserConfigurationException e) {
LOG.warn("Error setting document builder factory feature", e);
}
}

private static void trySetFeature(final TransformerFactory factory, final String name, final boolean value) {
try {
factory.setFeature(name, value);
} catch (final TransformerConfigurationException e) {
LOG.warn("Error setting transformer factory feature", e);
}
}
}
2 changes: 1 addition & 1 deletion activemq-cf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>6.1.8-TT.4-SNAPSHOT</version>
<version>6.1.9-TT.1-SNAPSHOT</version>
</parent>

<artifactId>activemq-cf</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion activemq-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>6.1.8-TT.4-SNAPSHOT</version>
<version>6.1.9-TT.1-SNAPSHOT</version>
</parent>

<artifactId>activemq-client</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion activemq-console/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>6.1.8-TT.4-SNAPSHOT</version>
<version>6.1.9-TT.1-SNAPSHOT</version>
</parent>

<artifactId>activemq-console</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
*/
package org.apache.activemq.console.command;

import org.apache.activemq.util.XmlFactories;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.xml.sax.SAXException;

import javax.xml.XMLConstants;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.*;
import javax.xml.transform.dom.DOMSource;
Expand Down Expand Up @@ -159,10 +158,7 @@ protected void copyActivemqConf(File srcBase, File targetBase, String activemqCo
File dest = new File(targetBase, DEFAULT_TARGET_ACTIVEMQ_CONF);
context.print("Copying from: " + src.getCanonicalPath() + "\n to: " + dest.getCanonicalPath());

DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE);
dbf.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
DocumentBuilder builder = dbf.newDocumentBuilder();
DocumentBuilder builder = XmlFactories.getSafeDocumentBuilderFactory().newDocumentBuilder();
Element docElem = builder.parse(src).getDocumentElement();

XPath xpath = XPathFactory.newInstance().newXPath();
Expand Down Expand Up @@ -208,13 +204,10 @@ private void writeFile(String typeName, File dest) throws IOException {

// utlity method to write an xml source to file
private void writeToFile(Source src, File file) throws TransformerException {
TransformerFactory tFactory = TransformerFactory.newInstance();
tFactory.setFeature(javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE);

Transformer fileTransformer = tFactory.newTransformer();

Result res = new StreamResult(file);
fileTransformer.transform(src, res);
final Result res = new StreamResult(file);
XmlFactories.getSafeTransformFactory()
.newTransformer()
.transform(src, res);
}

// utility method to copy one file to another
Expand Down
2 changes: 1 addition & 1 deletion activemq-http/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>6.1.8-TT.4-SNAPSHOT</version>
<version>6.1.9-TT.1-SNAPSHOT</version>
</parent>

<artifactId>activemq-http</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion activemq-jaas/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>6.1.8-TT.4-SNAPSHOT</version>
<version>6.1.9-TT.1-SNAPSHOT</version>
</parent>

<artifactId>activemq-jaas</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion activemq-jdbc-store/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>6.1.8-TT.4-SNAPSHOT</version>
<version>6.1.9-TT.1-SNAPSHOT</version>
</parent>

<artifactId>activemq-jdbc-store</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion activemq-jms-pool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>6.1.8-TT.4-SNAPSHOT</version>
<version>6.1.9-TT.1-SNAPSHOT</version>
</parent>

<artifactId>activemq-jms-pool</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion activemq-kahadb-store/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>6.1.8-TT.4-SNAPSHOT</version>
<version>6.1.9-TT.1-SNAPSHOT</version>
</parent>

<artifactId>activemq-kahadb-store</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,10 @@ public void run() {
}
} catch (IOException ioe) {
LOG.error("Checkpoint failed", ioe);
brokerService.handleIOException(ioe);
handleIOException("CheckpointRunner", ioe);
} catch (Throwable e) {
LOG.error("Checkpoint failed", e);
brokerService.handleIOException(IOExceptionSupport.create(e));
handleIOException("CheckpointRunner", IOExceptionSupport.create(e));
}
}
}
Expand Down Expand Up @@ -1967,7 +1967,7 @@ public void visit(List<Location> keys, List<Long> values) {
final StoredDestination destination = entry.getValue();
final String subscriptionKey = subscription.getKey();
final SequenceSet pendingAcks = destination.ackPositions.get(tx, subscriptionKey);
LOG.trace("sub {} on {} in dataFile {} has pendingCount {}", subscriptionKey, entry.getKey(), dataFileId, pendingAcks.rangeSize()-1);
LOG.trace("sub {} on {} in dataFile {} has pendingCount {}", subscriptionKey, entry.getKey(), dataFileId, (pendingAcks != null ? pendingAcks.rangeSize()-1 : 0));
}
gcCandidateSet.remove(dataFileId);
}
Expand Down Expand Up @@ -2120,10 +2120,10 @@ public void run() {
forwarded = true;
} catch (IOException ioe) {
LOG.error("Forwarding of acks failed", ioe);
brokerService.handleIOException(ioe);
handleIOException("AckCompactionRunner", ioe);
} catch (Throwable e) {
LOG.error("Forwarding of acks failed", e);
brokerService.handleIOException(IOExceptionSupport.create(e));
handleIOException("AckCompactionRunner", IOExceptionSupport.create(e));
}
} finally {
checkpointLock.readLock().unlock();
Expand All @@ -2136,10 +2136,10 @@ public void run() {
}
} catch (IOException ioe) {
LOG.error("Checkpoint failed", ioe);
brokerService.handleIOException(ioe);
handleIOException("AckCompactionRunner", ioe);
} catch (Throwable e) {
LOG.error("Checkpoint failed", e);
brokerService.handleIOException(IOExceptionSupport.create(e));
handleIOException("AckCompactionRunner", IOExceptionSupport.create(e));
}
}
}
Expand Down Expand Up @@ -4274,4 +4274,27 @@ protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException, Clas
}

}

/*
* Execute the configured IOExceptionHandler when an IOException is thrown during
* task execution and handle any runtime exceptions that the handler itself might throw.
*
* By default, the DefaultIOExceptionHandler will stop the broker when handling an IOException,
* however, if DefaultIOExceptionHandler is configured with startStopConnectors to be true
* it will throw a SuppressReplyException and not stop the broker. It's also possible another
* custom implementation of IOExceptionHandler could throw a runtime exception.
*
* This method will now handle and log those runtime exceptions so that the task will not
* die and will continue to execute future iterations if the broker is not shut down.
*/
private void handleIOException(String taskName, IOException ioe) {
try {
brokerService.handleIOException(ioe);
} catch (RuntimeException e) {
LOG.warn("IOException handler threw exception in task {} with "
+ "error: {}, continuing.", taskName,
e.getMessage());
LOG.debug(e.getMessage(), e);
}
}
}
2 changes: 1 addition & 1 deletion activemq-karaf-itest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>6.1.8-TT.4-SNAPSHOT</version>
<version>6.1.9-TT.1-SNAPSHOT</version>
</parent>

<artifactId>activemq-karaf-itest</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion activemq-karaf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>6.1.8-TT.4-SNAPSHOT</version>
<version>6.1.9-TT.1-SNAPSHOT</version>
</parent>

<artifactId>activemq-karaf</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion activemq-karaf/src/main/resources/features-core.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<bundle dependency="true">mvn:org.codehaus.jettison/jettison/${jettison-version}</bundle>
<bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-core/${jackson-version}</bundle>
<bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-databind/${jackson-version}</bundle>
<bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-annotations/${jackson-version}</bundle>
<bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-annotations/${jackson-annotations-version}</bundle>
</feature>

<!-- JMS1.1 and JMS2.0 support via the same Geronimo JMS 2 bundle -->
Expand Down
2 changes: 1 addition & 1 deletion activemq-log4j-appender/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>6.1.8-TT.4-SNAPSHOT</version>
<version>6.1.9-TT.1-SNAPSHOT</version>
</parent>

<artifactId>activemq-log4j-appender</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion activemq-mqtt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>6.1.8-TT.4-SNAPSHOT</version>
<version>6.1.9-TT.1-SNAPSHOT</version>
</parent>

<artifactId>activemq-mqtt</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion activemq-openwire-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>6.1.8-TT.4-SNAPSHOT</version>
<version>6.1.9-TT.1-SNAPSHOT</version>
</parent>

<artifactId>activemq-openwire-generator</artifactId>
Expand Down
Loading