Commit Graph

196 Commits

Author SHA1 Message Date
Colm O hEigeartaigh c44be3b0dd AMQ-7440 - Fix potential race condition in DiscoveryRegistryServlet 2020-03-10 16:12:59 +00:00
Pascal Schumacher 8fa772c8de AMQ-7439: AbstractMQTTSocket#getProtocolConverter: Race condition in double-checked locking object initialization
protocolConverter may be visible to other threads before its properties are set.
2020-03-08 15:09:02 +01:00
jbonofre 0245a3d5c4 [AMQ-7419] Return 405 error code instead of 500 in case of maxFrameSize exceeded on HTTP connector 2020-02-24 14:54:42 +01:00
Daniel Trebbien b020cba744 Fix some incorrect SLF4J logger calls
In some cases, there were an inconsistent number of formatting anchors.

In other cases, formatting anchors were used, but because the
trace/debug/info/warn/error(String, Throwable) variant was used, the
string is a message string rather than a format string.

These issues were found by SLF4J Helper for NetBeans IDE:
http://plugins.netbeans.org/plugin/72557/
2020-02-19 08:26:36 +00:00
Colm O hEigeartaigh 2f9e2b1e83 AMQ-7406 - ActiveMQSslConnectionFactory truststore settings don't work for the HTTPS connector 2020-02-14 14:37:59 +00:00
jbonofre 097506a458 [AMQ-7399] org.apache.activemq.SERIALIZABLE_PACKAGES doesn't include java* by default 2020-02-12 13:43:03 +01:00
Colm O hEigeartaigh d49370e363 AMQ-7393 - Remove unused Selenium tests 2020-01-28 14:36:15 +00:00
amarkevich 1ced34a383 [AMQ-6556] Support system property proxy settings for HTTP(S) client
(cherry picked from commit 746a839809)
2019-11-18 17:06:03 +01:00
Jean-Baptiste Onofré f7b08713f3
Merge pull request #305 from amarkevich/AMQ-7069
AMQ-7069 HTTP client don't handle XStream deserialization exception
2019-11-17 17:43:26 +01:00
Jean-Baptiste Onofré 1846df4863
Merge pull request #410 from jbonofre/AMQ-7327
[AMQ-7327] Use maxFrameSize to limit HTTP content length
2019-11-12 17:30:59 +01:00
Colm O hEigeartaigh 7441c6b603 AMQ-7339 - Fix possible XSS attack in the HttpTunnelServlet 2019-11-08 12:04:57 +00:00
Jean-Baptiste Onofré 397ede661f [AMQ-7327] Updated unit test around maxFrameSize support on the http transport connector 2019-11-06 17:05:40 +01:00
Jean-Baptiste Onofré 50a94cbf12 [AMQ-7327] Use maxFrameSize to limit HTTP content length 2019-11-06 11:17:34 +01:00
Colm O hEigeartaigh 3f11127567 AMQ-7289 - Fix failing HTTP tests 2019-08-26 15:42:03 +01:00
Jean-Baptiste Onofré 973c78cbec [AMQ-7249] Upgrade to Jetty 9.4.19.v20190610 2019-08-20 21:44:28 +02:00
Jean-Baptiste Onofré 32ddadc7ab
Merge pull request #362 from suem/master
AMQ-6949: SocketTimeoutException when using HTTP transport connector
2019-07-26 11:25:51 +02:00
Colm O hEigeartaigh 85ad5aa1ef Update HTTPClient and replace deprecated calls 2019-07-17 21:22:16 +01:00
Jonathan Gallimore 82b3d02fc2 Remove dependency activemq-http and activemq-stomp 2019-06-06 14:42:49 +01:00
suem ea0bcc12f7
AMQ-6949: SocketTimeoutException when using HTTP transport connector
A default socket timeout of 30 secods for the HTTP client was introduced with the following ticket: https://issues.apache.org/jira/browse/AMQ-6397

This timeout somewhow seems to conflict with the keep alive requests that stays open for arround 30 seconds. I increased the default timeout to 90 seconds and this seems to resolve the problem.
2019-05-29 15:28:30 +02:00
Christopher L. Shannon e093a8c1d8 NO-JIRA - add missing license headers 2018-10-24 09:01:39 -04:00
Jean-Baptiste Onofré ba2447e39a [AMQ-7063] Be able to configure ActiveMQ http transport connector by providing a jetty.xml 2018-10-11 14:47:05 +02:00
amarkevich b830894e69 AMQ-7069 HTTP client don't handle XStream deserialization exception 2018-10-10 17:00:13 +03:00
Timothy Bish a21dd40527 AMQ-6823 Ensure that MessagePull is works across HTTP transport
The MessagePull command needs to have the transients initialized such
that the pull operation works across transports that use XStream or
other marshaling that doesn't performs custom serialization.
2017-09-25 13:26:18 -04:00
Robbie Gemmell 2e492569db AMQ-6801: ensure transport listener is set before tripping latch to indicate startup is occuring 2017-09-01 13:00:35 +01:00
Timothy Bish 56bed30c64 AMQ-6765 Add trace logging of start failure exception
Log the exception at trace level when start fails.
2017-07-11 15:46:15 -04:00
Christopher L. Shannon (cshannon) a9fe4e33c3 [maven-release-plugin] prepare for next development iteration 2017-06-27 13:41:28 -04:00
Christopher L. Shannon (cshannon) 5f0d6943cb [maven-release-plugin] prepare release activemq-5.15.0 2017-06-27 13:41:01 -04:00
Timothy Bish 2490c85fc5 AMQ-6699 Fix STOMP over WS not encoding header values
When sending STOMP frames out over WS the marshal isn't doing a proper
encode based on the STOMP version in use and so header values can be
transmitted without proper escaping.
2017-06-14 15:15:09 -04:00
gtully 7cae60eae0 [AMQ-6684] exclude json cat-x transitive dep 2017-05-24 16:19:09 +01:00
Timothy Bish e69367fbc3 https://issues.apache.org/jira/browse/AMQ-6680
Fix handling of incoming MQTT binary data over WS.  The handler should
use the MQTTCodec to ensure that partial or packed frames are fully
processed
2017-05-22 12:27:16 -04:00
Timothy Bish 2e2d5ddd3d https://issues.apache.org/jira/browse/AMQ-6669
Respect the wireFormat.maxFrameSize option on WS and WSS transports
allowing binary content larger than 65535
2017-05-04 16:37:53 -04:00
gtully 4f6c55ad67 [AMQ-6571] use browsercompatspec cookie matcher - apply patch from Andrew Flegg with thanks 2017-01-20 14:54:37 +00:00
Christopher L. Shannon (cshannon) 29b4db5c34 https://issues.apache.org/jira/browse/AMQ-6521
Fixing support for Jetty 9.3 and Jetty 9.2.  The previous attempt at a
fix had the wrong class instance.
2016-12-09 09:47:16 -05:00
Christopher L. Shannon (cshannon) 80f46a8056 https://issues.apache.org/jira/browse/AMQ-6521
Adding support for Jetty 9.3 by re-adding in the logic to dynamically
load the correct GzipHandler depending on the version
2016-11-29 11:38:36 -05:00
Christopher L. Shannon (cshannon) f40532a23d https://issues.apache.org/jira/browse/AMQ-6491
Changing the WebSocket servlet to return a succesful empty response
instead of an error when a GET request is made
2016-11-22 07:27:29 -05:00
Christopher L. Shannon (cshannon) 937b2acd46 https://issues.apache.org/jira/browse/AMQ-6482
Adding websocket send timeout to AMQP over websockets
2016-11-04 14:09:26 -04:00
Christopher L. Shannon (cshannon) 450cabe4ea https://issues.apache.org/jira/browse/AMQ-6482
Adding a timeout for websocket sends to prevent the transport thread
from getting stuck and blocking.  The default is 30 seconds.
2016-11-04 12:56:20 -04:00
Christopher L. Shannon (cshannon) 946c9454d5 proposed websocket fix 2016-11-04 12:56:20 -04:00
Hadrian Zbarcea be24a133ef This closes #88 (merged as a65ac586). More file permissions fixes. 2016-11-03 14:26:34 -04:00
Hadrian Zbarcea d5a929c0d2 This closes #205. Won't fix. (fix even more file permissions) 2016-11-03 14:11:40 -04:00
Hadrian Zbarcea d54d046b8a This closes #185. Won't fix. (fix more file permissions) 2016-11-03 11:54:33 -04:00
Christopher L. Shannon (cshannon) 06e929f101 https://issues.apache.org/jira/browse/AMQ-6397
Setting the HTTP timeout for all HttpClients instead of just on send
2016-08-17 09:35:18 -04:00
Christopher L. Shannon (cshannon) 06a21dbbb3 [maven-release-plugin] prepare for next development iteration 2016-08-02 09:03:37 -04:00
Christopher L. Shannon (cshannon) 71cbc65283 [maven-release-plugin] prepare release activemq-5.14.0 2016-08-02 09:02:54 -04:00
Christopher L. Shannon (cshannon) bd442a3388 https://issues.apache.org/jira/browse/AMQ-6343
On MQTT Websocket close, a LWT message will be properly sent if
configured and a disconnect packet was not received
2016-07-05 18:13:45 +00:00
Christopher L. Shannon (cshannon) 96494f74c7 https://issues.apache.org/jira/browse/AMQ-6346
Prevent concurrent access to the MQTT protocol handlers which can lead
to a tansport level deadlock
2016-07-05 17:50:03 +00:00
Timothy Bish 31c55f7510 https://issues.apache.org/jira/browse/AMQ-6339
Add support for AMQP client to connect using WebSockets.
2016-06-30 14:52:40 -04:00
Timothy Bish 5ba8679083 Allow for the connection to close without getting the ERROR frame 2016-06-16 11:20:59 -04:00
Timothy Bish 71893f1434 Allow the HTTP test to have extra time to wait for all messages to
arrive as the transmission rate is much slower.
2016-05-10 10:59:12 -04:00
Timothy Bish e47edd7a28 https://issues.apache.org/jira/browse/AMQ-6262
Ensure that the connection check task is stopped once commands pass
through the inactivity monitor to prevent the transport from being
closed for no reason.
2016-04-25 17:05:09 -04:00
Dejan Bosanac 34eb1ee959 https://issues.apache.org/jira/browse/AMQ-6259 - mqtt-over-ws configuration 2016-04-19 16:02:45 +02:00
Timothy Bish 30d6ad72fa NO-JIRA Allow for the disconnect call in the test to fail as the short
keepAlive interval can trigger a shutdown of the socket before we have a
chance to write the disconnect depending on the timing.
2016-03-17 14:08:09 -04:00
Christopher L. Shannon (cshannon) e375af3810 https://issues.apache.org/jira/browse/AMQ-6182
Adding missing License header
2016-03-01 16:01:58 +00:00
Christopher L. Shannon (cshannon) 473b3284d4 https://issues.apache.org/jira/browse/AMQ-6182
Reworking patch so that the http trace method is also turned off by
default for the HttpTransport, besides just for the Websocket transport.
Also added SSL tests for both transports.
2016-02-29 22:36:59 +00:00
Christopher L. Shannon (cshannon) 7335f699f2 https://issues.apache.org/jira/browse/AMQ-6182
adding timeout to test method
2016-02-26 19:20:16 +00:00
Christopher L. Shannon (cshannon) 4fb8083977 https://issues.apache.org/jira/browse/AMQ-6182
Disabling the HTTP trace method on the websocket port by default.  It
can be enabled by setting the parameter "http.enableTrace=true" on the
connection uri if it is needed for debugging.
2016-02-26 18:54:25 +00:00
Timothy Bish 4ecff14030 NO-JIRA Update master version to 5.14.0-SNAPSHOT to match the eventual
release version.
2016-01-20 12:40:20 -05:00
Christopher L. Shannon (cshannon) b9dcb010f7 https://issues.apache.org/jira/browse/AMQ-6077
Making new values in ActiveMQObjectMessage transient which fixes HTTP
serialization
2015-12-15 19:37:05 +00:00
Christopher L. Shannon (cshannon) 913f64476b https://issues.apache.org/jira/browse/AMQ-6073
WSServlet for websockets will attempt to detect the subprotocol
requested and respond with the appropriate one.  Currently the protocols
loaded are what stomp.js use for stomp (v11.stomp and v12.stomp).
If a protocol can't be found then a default will be returned, either
"stomp" or "mqtt", which is the same behavior before this patch.

This will make it a bit easier to use stomp over websockets out of the
box as stomp.js will work by default.
2015-12-07 15:29:13 +00:00
Christopher L. Shannon (cshannon) cfb4ca9f54 [maven-release-plugin] prepare for next development iteration 2015-11-30 13:48:58 +00:00
Christopher L. Shannon (cshannon) abfe038ddf [maven-release-plugin] prepare release activemq-5.13.0 2015-11-30 13:48:11 +00:00
gtully 0a12bcb928 https://issues.apache.org/jira/browse/AMQ-2191 https://issues.apache.org/jira/browse/AMQ-3529 - rework fixes to remove uncertanty from dealing with intettuptedexception. Sync requests will trap interrupts that ocurr while waiting for responses and fail the connection with an interruptedioexception. Interrupts pending before requests will be suppressed, allowing possible clean shutdown. It is not safe to replay openwire ops b/c they are not idempotent, the only safe option is to have a teardown of the broker side state from a close 2015-11-27 12:21:56 +00:00
Christopher L. Shannon (cshannon) bbde8473bd https://issues.apache.org/jira/browse/AMQ-5980
Fixing an intermittent test failure in:

org.apache.activemq.transport.ws.StompWSSTransportTest.
testHeartbeatsKeepsConnectionOpen

Adding synchronization on sends for StompWSConnection.  The protocol
doesn't allow multiple threads to call a blocking send at the same time
and the heartbeat keep alive thread was colliding with the main
thread on sends.
2015-11-22 19:01:31 +00:00
gtully d7a3b9406b https://issues.apache.org/jira/browse/AMQ-6029 - make certs available to tunnle servlet - HttpsNeedClientAuthSendAndReceiveTest regression, add javax.security so login exceptions can propogate over http - https://issues.apache.org/jira/browse/AMQ-6013 2015-11-18 16:08:29 +00:00
Timothy Bish caa6b8e253 https://issues.apache.org/jira/browse/AMQ-6046
Prevent concurrent access to protocol handlers which can lead to
transport level deadlocks.
2015-11-17 11:03:31 -05:00
gtully 8136e67b40 https://issues.apache.org/jira/browse/AMQ-6016 - ensure xstream inits transients to default values when it bypasses the default creation method through object deserialization. Can make it more general if there are ever more instances of this. It avoids the need to check for null and sync 2015-10-30 12:01:08 +00:00
Dejan Bosanac f8bfff0bc8 https://issues.apache.org/jira/browse/AMQ-6029 - wss transport with certificate authentication 2015-10-30 11:42:36 +01:00
Dejan Bosanac a7e2a44fe8 https://issues.apache.org/jira/browse/AMQ-6013 - restrict classes which can be serialized inside the broker 2015-10-16 15:44:23 +02:00
Christopher L. Shannon (cshannon) 0f492f3b4b https://issues.apache.org/jira/browse/AMQ-5356
Migrated to Karaf 4.  This was required to support Jetty 9.2.x.
Fixed all OSGi unit tests.
2015-09-03 12:42:22 +00:00
Christopher L. Shannon (cshannon) f44c3d20ed https://issues.apache.org/jira/browse/AMQ-5356
Upgraded to Jetty 9.2.x to solve JDK 8 compatibility issues.
This required migrating to the new WebSocket API.
2015-09-03 11:54:57 +00:00
gtully 547476d1bc compact byteSequence before xstream marshall so that only required bytes are base64 encoded 2015-08-27 11:10:08 +01:00
Christopher L. Shannon (cshannon) 04ee70a161 https://issues.apache.org/jira/browse/AMQ-5889
Adding support for auto detection of wire protocols over a transport.
OpenWire, AMQP, STOMP, and MQTT can all be detected and the broker
will properly handle each one over a given Transport.  Currently
auto TCP, NIO, SSL, and NIO+SSL transports can handle auto-detection
of the wire format and client but support could be added in the
future for other transports like websockets.
2015-08-11 19:39:29 +00:00
Timothy Bish 6cdd750ddc [maven-release-plugin] prepare for next development iteration 2015-08-10 11:04:26 -04:00
Timothy Bish a9eeb03520 [maven-release-plugin] prepare release activemq-5.12.0 2015-08-10 11:04:17 -04:00
Timothy Bish 50604ad932 Update RAT plugin to use latest version, add exclusions for eclipse
settins files and the KahaDB data folders created during most test runs.
Add missing headers to a couple files.
2015-08-05 13:08:15 -04:00
gtully a05a9a2129 https://issues.apache.org/jira/browse/AMQ-5552 - added profile for activemq.tests=smoke to run a fast subset of tests that gives a fast verification of a full build 2015-07-09 14:10:38 +01:00
Timothy Bish 10ae0d9d6f https://issues.apache.org/jira/browse/AMQ-5870
Resolve race that leads to stalled connect attempt.  Should fix the
failing CI tests that are seeing this.
2015-06-30 17:16:47 -04:00
Timothy Bish 27edaffded https://issues.apache.org/jira/browse/AMQ-5856
Clean up the MQTT over WebSocket code to allow for handling link
stealing and inactivity monitor.  Ensures that the web socket instances
get cleaned up on errors and avoids leaks that might otherwise arise.
Adds new tests for MQTT over WebSocket.

Adds some missing license headers as well.
2015-06-29 18:35:08 -04:00
Christopher L. Shannon (cshannon) be10b866a7 https://issues.apache.org/jira/browse/AMQ-5865
StompSocket and MQTTSocket will now return the appropriate web socket
remote address based on the HttpRequestServlet that initialized
the web socket connection.
2015-06-29 12:46:43 +00:00
Timothy Bish d919db5e3d https://issues.apache.org/jira/browse/AMQ-5804
Apply patch from Pavlo Vasylchenko
2015-06-19 16:28:59 -04:00
Timothy Bish 73e8d10982 https://issues.apache.org/jira/browse/AMQ-5621
Test cleanup
2015-06-01 18:09:23 -04:00
Timothy Bish df06bdabdc https://issues.apache.org/jira/browse/AMQ-5816
Apply patch from Ievgen Tarasov that ensures that the data locator is
initialized when a MessageId is deserialized.
2015-06-01 17:50:20 -04:00
Timothy Bish 8ca6341d40 https://issues.apache.org/jira/browse/AMQ-5784
Apply patch from Lukas Treyer to address MQTT over WS in Jetty 9
2015-05-28 19:00:20 -04:00
Timothy Bish 3125caee5b https://issues.apache.org/jira/browse/AMQ-5794
implement transport.connectAttemptTimeout option across the transports
fro OpenWire, STOMP, AMQP and MQTT and add tests to cover.
2015-05-26 12:29:23 -04:00
Timothy Bish f05f83b15d https://issues.apache.org/jira/browse/AMQ-5755
Unit tests for some STOMP over WebSockets functionality and some fixes
for resource cleanup.
2015-04-30 14:41:59 -04:00
Timothy Bish eea3230c37 https://issues.apache.org/jira/browse/AMQ-5155
Ensure that the inactivity monitor can see that new data is arriving to
prevent wrongful disconnect of clients.
2015-04-28 18:10:24 -04:00
Timothy Bish 9ef4259297 https://issues.apache.org/jira/browse/AMQ-5616
Use ConcurrentMap in declarations
2015-04-28 11:15:08 -04:00
Timothy Bish 299410820e https://issues.apache.org/jira/browse/AMQ-5155
Attempt to fix additional EOF problem
2015-04-02 09:10:08 -04:00
Timothy Bish 516c9db43b https://issues.apache.org/jira/browse/AMQ-5155
Modifed version of patch supplied by Claudio Parodi to handle incoming
ping frames correctly.
2015-03-31 16:36:56 -04:00
Daniel Kulp cad1a2a8cd Open up the xbean osgi import range to include 4.x 2015-03-04 12:43:44 -05:00
gtully ae595c95b1 [maven-release-plugin] prepare for next development iteration 2015-01-30 12:46:19 +00:00
gtully 4ba1a1689f [maven-release-plugin] prepare release activemq-5.11.0 2015-01-30 12:46:08 +00:00
gtully bf5a2997c7 [maven-release-plugin] prepare for next development iteration 2015-01-26 16:48:46 +00:00
gtully eec2955bde [maven-release-plugin] prepare release activemq-5.11.0 2015-01-26 16:48:37 +00:00
gtully 64fa706d54 Revert "[maven-release-plugin] prepare release activemq-5.11.0"
This reverts commit f47fbe4b89.
2015-01-26 16:39:35 +00:00
gtully f47fbe4b89 [maven-release-plugin] prepare release activemq-5.11.0 2015-01-26 16:17:43 +00:00
Daniel Kulp ffa396ca2d Fix several eclipse warnings of unused things, and other compiler warnings 2015-01-13 15:03:10 -05:00
Daniel Kulp 2128d4d246 Fix some itests due to the servlet import range being inadequate for the version of karaf we are testing with 2015-01-13 13:29:52 -05:00
Daniel Kulp 3f82625077 [AMQ-5517] Runtime support for Jetty 9. Build/compile with Jetty8, but tests pass with Jetty 9 for runtime level support. 2015-01-13 12:47:53 -05:00
Daniel Kulp bc2e2d9a41 [AMQ-5517] Start stubbing in some of the extra params and such that will be needed to support jetty 9 2015-01-13 09:24:50 -05:00