Disabling async queue message store when persistJMSRedelivered is turned
on for a destination. That flag will cause a sync update later on
dispatch which can cause a race condition if the original message add is
processed after the update. This can cause a duplicate message to be
stored.
(cherry picked from commit b2327db3b7)
Moving clearedMarshalledState execution to the async listener on an
async add to the message store. This is necessary to make sure this
logic doens't execute until after the message is marshalled for the
store.
(cherry picked from commit 75990ef14a)
Synchronizing ActiveMQText message on state changes for the content and
text fields so that they are always changed together. This will prevent
race conditions where data can be lost when using concurrent store and
dispatch.
(cherry picked from commit e0c5499964)
Fixing copy method of ActiveMQTextMessage to prevent a race condition
when concurrent store and dispatch is used with Queues
We may need explicity synchronization between the text and content fields
in the future if other issues pop up
(cherry picked from commit ea09159a40)
Fixing ReloadableProperties so that the groups file will be properly
reloaded on file modification. Added a test to verify.
Thanks to Nanchang Yang for providing the fix.
(cherry picked from commit 2788bd5584)
Update the threads created by the SelectorManager to be daemon threads.
(cherry picked from commit e2b4ca2c59)
Conflicts:
activemq-client/src/main/java/org/apache/activemq/transport/nio/SelectorManager.java
Fixing the removal logic on virtual destination remove inside of
Advisory Broker to clean up virtual destination maps properly. Added a
test to verify. Also added new debug logging to help track down any
future issues.
(cherry picked from commit a2781e3966)
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.
(cherry picked from commit 473b3284d4)
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.
(cherry picked from commit 4fb8083977)
Fixing CronParserTest so that it checks 24 hour format properly when
using a timezone shifted by 30 minutes
Thanks to Jamie Goodyear for the patch
(cherry picked from commit 0f445a535f)
Fixing X-Frame-Options header so that is applied for all content served
by Jetty. The previous patch wasn't correct because it only applied it
to Servlets and JSPs and not static content. This also reverts AMQ-6113
(cherry picked from commit 24ad367785)
Computing messageSize for a durable subscription in KahaDB now runs much
faster (n vs n^2) which is noticable when there are a large number of
pending messages for a durable subscription.
(cherry picked from commit 25ff5699f1)
Ensure that when add / remove commands are colocated they don't prevent
the log from being GC'd once it is unreferenced.
(cherry picked from commit 8c4b5f485d)
Fixing a race condition that exists in the decompress method of
ActiveMQBytesMessage that can cause an invalid length to be read.
(cherry picked from commit 5f7a81f928)
- recoverSubscription()
-- map is defined as LinkedHashMap<MessageId, Message>
-- msg is defined as <map> entry.getValue() so must be a Message
-- condition if (msg.getClass() == MessageId.class) could never be true
-- no need to cast at all when using generics
- recoverNextMessages()
-- basically same code copy/pasted so same fix
Removed 2 conditions from ServerSessionPoolImpl that would result in impossible casts. Conditions removed were trying to cast ActiveMQQueueSession and ActiveMQTopicSession to ActiveMQSession which is illegal.
Since it isn't obvious what to do if you get an ActiveMQQueueSession or ActiveMQTopicSession from getServerSession() I make it fall back to the else condition which raises an async exception. This is better than getting a ClassCastException at runtime.
Remove impossible cast in MemoryMessageStore
(cherry picked from commit 4a937def7d)
Adding ACTIVEMQ_USER_CLASSPATH to make the ActiveMQ classpath more
extendable by users. Also fixinng the classpath parsing to use the
right path separator dependening on the environment.
(cherry picked from commit e0ad700f2c)