Commit Graph

224 Commits

Author SHA1 Message Date
Clebert Suconic 17ea05bce6 ARTEMIS-539 fixing default address on client as well 2016-06-03 12:04:20 -04:00
Martin Šmérek f84018a417 ARTEMIS-551 Obfuscate truststore password
Obfuscate truststore password in TransportConfiguration.toString()
in the same way as keystore. The password will not be logged in
plain text when bridge is connected.
2016-06-03 16:12:31 +02:00
Clebert Suconic 242730a278 Traces on producer.send 2016-05-31 18:14:38 -04:00
jbertram d9b721b35b ARTEMIS-405 correct some missing docs 2016-05-23 18:26:21 -04:00
Clebert Suconic 3e2adf123b ARTEMIS-524 Paging could lose data eventually after crashes
https://issues.apache.org/jira/browse/ARTEMIS-524

I am keeping all the debug ad tracing I added during the debug of this issue,
for that reason this commit may look longer than expected

The fix will be highlited by the tests added on org.apache.activemq.artemis.tests.integration.client.PagingTest
2016-05-17 20:28:40 -04:00
Clebert Suconic ec52693513 Individualizing traces and debug on client 2016-05-17 14:36:59 -04:00
jbertram 04c9564d77 ARTEMIS-517 API to check sync with backup 2016-05-16 10:01:18 -05:00
Erich Duda a622fa7443 ARTEMIS-518 - Improvement of default thread factory 2016-05-09 14:33:41 -04:00
jbertram 6aaa9df49f Improve packet toString() to ease debug 2016-05-05 09:33:01 -05:00
Martyn Taylor 1c3d63516f ARTEMIS-514 Add support for LargeMEssages backed by Database 2016-05-04 13:36:28 -04:00
Bernd Gutjahr 1591d25692 ARTEMIS-507 New thread pool for client threads
- Added a thread pool executor, that combines cached and fixed size thread pooling.
  It behaves like a cached thread pool in that it reuses exising threads and removes
  idle threads after a timeout, limits the maximum number of threads in the pool, but
  queue additional request instead of rejecting them.
- changed existing code to use the new thread pool instead of a fixed-size thread pool in
  all places that are configured with a client thread pool size.
2016-04-27 11:03:32 +01:00
Bernd Gutjahr 971a0a13bd ARTEMIS-497 Prevent 10 second stalls when closing an SSL connection
When NettyConnection.classSSLAndChannel is called from the EventLoop,
waiting for the SSL handler to close will always take 10 seconds, because
the sslCloseFuture is from a task that is scheduled with the same
EventLoop. But since the EventLoop is a single threaded executor, it
will only be executed after the current task is completed.

Due to the single threaded nature of the EventLoop, all blocking calls
should be avoided. Therefore, I removed both awaitUninterruptibly calls
if the closing happens within an event loop tasks. As a side effect,
the annoying server log timeout warnings will go away.
2016-04-25 14:48:58 +01:00
bayern39 350eec896a ARTEMIS-501 Incorrect log message in class ClientSessionFactoryImpl 2016-04-25 14:18:30 +01:00
Bernd Gutjahr ec4cbf7b34 abstracted global client thread pools from ThreadPoolExecutor as implementation
Changed the ActiveMQClient interface to expose global thread pools as
ExecutorService and ScheduledExecutorService interface. This is necessary
to allow injecting thread pool implementations that are not based on
ThreadPoolExecutor or ScheduledThreadPoolExecutor.
2016-04-20 15:29:25 +01:00
Bernd Gutjahr 1b5396c033 Protected ActiveMQClient API against misuse.
1. Changed public fields in ActiveMQClient to private and added getters.

Exposing fields for thread pool sized allow to modify them in undesired ways.
I made these fields private and added corresponding getter methods.
In addition, I renamed the field 'globalThreadMaxPoolSize'
to 'globalThreadPoolSize' to be more consistent with the
'globalScheduledThreadPoolSize' field name.
I also adapted some tests to always call clearThreadPools after
the thread pool size configuration has been changed.

2. Protect against injecting null as thread pools

ActiveMQClient.injectPools allowed null as injected thread pools.
The effect was that internal threads pools were created,
but not shutdown correctly.
2016-04-20 15:29:25 +01:00
Bernd Gutjahr 2360fb4c9f ARTEMIS-485 Allow configuring an unbounded cached global client thread pool
Adapted code to handle -1 correctly to configure an unbounded thread pool.
In addition, I removed the capability to reconfigure the max pool size
of existing thread pools, because the global thread pool can either be
an unbounded cached pool, or a bounded fixed size pool.
These 2 kinds of pool also differ in the used blocking queue,
therefore cannot be converted into each other.
2016-04-20 15:29:25 +01:00
jbertram 9d7a49b388 ARTEMIS-417 more broker-level JMX attrs 2016-04-19 23:00:32 -04:00
jbertram 30907ffd8c ARTEMIS-400 allow SSL store reload 2016-04-18 17:51:46 -04:00
jbertram 5591bcabcc ARTEMIS-405 JMX attributes doc 2016-04-18 17:50:09 -04:00
Clebert Suconic ec73961f72 ARTEMIS-474 another fix on JChannelWrapper 2016-04-14 21:57:17 -04:00
Clebert Suconic 630db2d69c ARTEMIS-474 Clustering fails on certain topologies
Communication between nodes will fail under certain topologies
JGroups has something called JForkChannel that could be used on container systems.
And be injected into Artemis.
For some reason that channel cannot be reused for more than one channel per VM.
And it cannot ever be closed.

I am keeping the trace logs I used to debug this issue in case anything similar to this happens again.
2016-04-14 18:55:01 -04:00
Clebert Suconic d6c7e30594 ARTEMIS-484 Large Message Loss on Initial replication
https://issues.apache.org/jira/browse/ARTEMIS-484

The File copy after the initial synchronization on large messages was broken.
On this commit we fix how the buffer is cleaned up before each read since
a previously unfinished body read would make the buffer dirty.

I'm keeping also lots of Traces I have added to debug this issue, so they will
be useful if anything like this happens again.
2016-04-14 18:55:01 -04:00
Clebert Suconic 3ecd8b7c44 ARTEMIS-474 Avoiding one lock around the readyListener call tree and fixing ReplicationManager / NettyConnection deadlock 2016-04-14 18:55:01 -04:00
Ville Skyttä 3dc3e8520d Remove redundant toString calls 2016-04-11 16:54:30 -04:00
Ville Skyttä cf00dd9b1b Avoid instantiating some number objects 2016-04-11 16:53:48 -04:00
Ville Skyttä 782d3419b8 Remove dead code 2016-04-11 16:50:43 -04:00
Clebert Suconic 6ddf486f8f ARTEMIS-463 Refactoring on Openwire
https://issues.apache.org/jira/browse/ARTEMIS-463

This was a team effort from Clebert Suconic and Howard Gao
2016-04-04 11:08:43 -05:00
Ville Skyttä 16ee65309c Add missing @Override annotations 2016-04-04 11:03:48 -05:00
jbertram 32ce8710fc ARTEMIS-445 avoid NPE on null ks password 2016-03-21 18:35:21 -04:00
jbertram 7653d17e6a ARTEMIS-441 correct time-unit for large msg poll 2016-03-17 09:22:14 -05:00
Martyn Taylor e9992bc59f ARTEMIS-439 Set default global thread pool based on cores 2016-03-15 15:20:21 +00:00
Clebert Suconic 26fe21baa4 ARTEMIS-437 Large Message send should be interrupted during failover 2016-03-11 13:13:32 -05:00
kurobako 1c2164adad Removing Synchronization performed on java.util.concurrent.ConcurrentLinkedDeque object in class NettyConnection 2016-03-07 15:58:42 -05:00
Ville Skyttä 31404f8a38 Remove redundant null checks 2016-03-07 15:49:50 -05:00
jbertram b23046d5f7 ARTEMIS-385 clean-up factory on timeout
This restores a call to ClientSessionFactory#cleanup that appears to have been
mistakenly removed by a previous change related to this JIRA.
2016-03-03 12:42:20 -06:00
Andy Taylor a3962d6d26 ARTEMIS-426 - java.lang.IllegalStateException: AMQ119116: Netty Acceptor unavailable
also related to https://issues.apache.org/jira/browse/ARTEMIS-416

https://issues.apache.org/jira/browse/ARTEMIS-426
2016-03-01 14:17:41 +00:00
Howard Gao ddf8d8f96e ARTEMIS-421 wrong XA_RETRY XAException error code
returned on crash for 1PC
2016-02-24 22:23:57 +08:00
Ville Skyttä aa3f3bd6a7 Use try-with-resources more 2016-02-21 12:09:43 +02:00
Clebert Suconic 9ebc6786b6 ARTEMIS-401 Refactoring Acceptors and ProtocolManager to support parameters
https://issues.apache.org/jira/browse/ARTEMIS-401
2016-02-18 10:14:26 -06:00
Martyn Taylor 32a9d60a3d Allow users to configure jdbc driver class name
This patch allows users to configure the Driver class that the JDBC
store and journal uses and removes Derby as a default.
2016-02-08 11:23:38 -05:00
Clebert Suconic f0b8f1e356 ARTEMIS-385 small fix 2016-02-04 15:59:50 -05:00
Clebert Suconic df4469092b Removing unecessary concurrent collection. Replacing by regular one 2016-02-04 18:31:31 +00:00
Clebert Suconic 26945a4716 ARTEMIS-385 On a possible race the Topology final notification may get lost when using many connection factories
https://issues.apache.org/jira/browse/ARTEMIS-385

This fix will make sure we only wait for the topologies that are arriving from the current connection over the createFactory method
2016-02-04 09:35:08 -05:00
Clebert Suconic c982b1fa40 avoiding NPE on PingRunnable 2016-02-02 08:58:21 -06:00
Clebert Suconic f149e76b3f Improving bodyBuffer encode / decode 2016-01-27 21:57:00 -05:00
Clebert Suconic e62a820414 Fixing ServerMessage's copy and MQTT delivery 2016-01-27 17:12:56 -05:00
Clebert Suconic 4d239ac803 ARTEMIS-357 fixing issue with Messages Growing after JMS sends (after my last change on ARTEMIS-357) 2016-01-27 13:21:17 -05:00
Clebert Suconic e5652d39bc ARTEMIS-361 Fixing URI Encoding of Connection Factory properties
https://issues.apache.org/jira/browse/ARTEMIS-361
2016-01-25 17:48:20 -05:00
Ville Skyttä ca34f7fbb2 Move commons util tests to commons 2016-01-25 11:23:07 -05:00
Clebert Suconic 7957f574f6 ARTEMIS-357 No need to check copy any longer 2016-01-23 10:45:35 -05:00
Clebert Suconic f5ec15216e ARTEMIS-357 Avoiding possible races on encoding messages
https://issues.apache.org/jira/browse/ARTEMIS-357
2016-01-23 00:51:03 -05:00
Martyn Taylor 4922a7618a Bump to next version to 1.3.0-SNAPSHOT 2016-01-20 17:25:07 +00:00
Andy Taylor c1de710eb3 ARTEMIS-346 - Add Management send text message functionality similar to ActiveMQ
https://issues.apache.org/jira/browse/ARTEMIS-346
2016-01-20 10:35:36 -05:00
Clebert Suconic 3f23c9916e ARTEMIS-347 - supporting URIs on the cluster connection 2016-01-19 17:35:12 -05:00
Clebert Suconic dddd0a1efe https://issues.apache.org/jira/browse/ARTEMIS-345 fixing URI for inVM throwing a log.warn 2016-01-13 17:48:23 -05:00
Martyn Taylor 64f74acdbc ARTEMIS-27 / ARTEMIS-340 Add JDBC Storage Manager 2016-01-13 09:38:40 -05:00
Clebert Suconic 2e973c4bff fixing BackupSyncJournalTest 2016-01-12 17:22:56 -05:00
Andy Taylor ea3c3e0aef ARTEMIS-334 - Add Management browse functionality similar to ActiveMQ
https://issues.apache.org/jira/browse/ARTEMIS-334
2016-01-12 14:26:57 +00:00
Martyn Taylor 945963ed07 Remove DelegatingSession class
DelegatingSession class wraps ClientSessionImpl and attempts to close
session should it not be closed by the user.  It does this by
implementing finalize.  However, the order in which finalize runs can be
difficult to predict as compilers, and JIT compilers are able to
optimize early.

The current DelegatingSession was causing problems of finalize getting
called early (before consumers, producers were finished with the
session).  This was causing tests to fail on the IBM JDK (which
optimizes early).  The same happens on OpenJDK if the GC is forced.
2016-01-11 19:43:10 -05:00
Ville Skyttä f85e5e7922 Deprecation fixes 2016-01-11 13:22:18 -05:00
Clebert Suconic 96849a42b7 ARTEMIS-332 - Duplicate delivery over Bridges under OME scenarios, paging and other failures
https://issues.apache.org/jira/browse/ARTEMIS-332
2016-01-04 20:49:28 -05:00
Martyn Taylor 2c430e597b [maven-release-plugin] prepare for next development iteration 2016-01-04 11:50:36 +00:00
Martyn Taylor f182c806b6 [maven-release-plugin] prepare release 1.2.0 2016-01-04 11:49:58 +00:00
Martyn Taylor 5f32e6575c [maven-release-plugin] prepare for next development iteration 2016-01-04 09:24:34 +00:00
Martyn Taylor 150c5d87aa [maven-release-plugin] prepare release 1.2.0 2016-01-04 09:19:35 +00:00
Clebert Suconic d1c1c50aa2 https://issues.apache.org/jira/browse/ARTEMIS-320 fixing memory leak 2016-01-01 13:39:56 -05:00
Clebert Suconic 9167213f00 ARTEMIS-328 Fixing message loss through the bridge
https://issues.apache.org/jira/browse/ARTEMIS-328
2015-12-21 23:00:52 -05:00
Ville Skyttä d48e344a8f Add missing @Overrides 2015-12-21 22:06:03 -05:00
Ville Skyttä a0dc9861a0 Access static members directly 2015-12-21 22:01:21 -05:00
Ville Skyttä a5eb04a2ba Remove Java < 1.5 support from XMLUtil.getTextContent 2015-12-21 21:47:15 -05:00
Clebert Suconic c0f71c3e15 fixing executor (adding state back) 2015-12-17 22:46:33 -05:00
Stuart Douglas 631c2fa780 Change to a lock free ordered executor 2015-12-17 22:17:08 -05:00
Martyn Taylor 90c9469701 [maven-release-plugin] prepare for next development iteration 2015-12-17 17:03:40 +00:00
Martyn Taylor df61224d2d [maven-release-plugin] prepare release 1.2.0 2015-12-17 17:01:58 +00:00
Martyn Taylor 0e8f2f39af ARTEMIS-312 Allow configurable of, and inject of client global thread pools 2015-12-16 18:19:25 -05:00
Clebert Suconic af1f79bff5 ARTEMIS-302 more changes around XA reliability (resilience on failures) 2015-12-16 10:19:35 -05:00
Andy Taylor d1e154e888 ARTEMIS-311 - added broker name to jmx object name properties.
Its now possible to also add the broker name to jmx tree avoiding clashes when multiple brokers are in a single vm. This is now the default but the old way can be used with some configuration

https://issues.apache.org/jira/browse/ARTEMIS-311
2015-12-16 10:19:01 -05:00
Clebert Suconic b1b4bb8a32 ARTEMIS-320 Refactoring TCP flow control and proper implementation of flow control on consumers
https://issues.apache.org/jira/browse/ARTEMIS-320
2015-12-10 16:50:26 -05:00
Clebert Suconic 351bcfc9f9 ARTEMIS-319 Improving files allocation and implementing journal-pool-files
https://issues.apache.org/jira/browse/ARTEMIS-319
2015-12-10 16:49:58 -05:00
Ville Skyttä f8a1c5ba8e Remove redundant type arguments 2015-12-07 22:55:05 +02:00
Ville Skyttä 25ae472455 Add missing @Override annotations 2015-12-06 01:27:35 +02:00
Andy Taylor 00cac50a37 ARTEMIS-281 - add channel receiver correctly/
We also need to add the receiver whn the refcount = 1 and the channel may already be connected.

https://issues.apache.org/jira/browse/ARTEMIS-281
2015-11-25 09:45:39 +00:00
jbertram 6b42ffbd26 ARTEMIS-226 fix typo in Netty constants 2015-11-23 21:40:36 -05:00
Clebert Suconic b1d5076108 ARTEMIS-302 - more work about improving resilience of MDBs and XA 2015-11-16 18:11:44 -05:00
Clebert Suconic 7bbd17cd37 ARTEMIS-302 - Improving XA Resilience 2015-11-11 09:50:58 -05:00
Martyn Taylor 1cdc01fc44 ARTEMIS-295 Remove 'yet' from log messages 2015-11-04 14:49:11 +00:00
Ville Skyttä 68c9f3fd69 Spelling fixes 2015-11-03 10:30:40 -05:00
Andy Taylor b73e61ac52 ARTEMIS-292 - fix isSameHost on TransportConfiguration
Ive renamed the current isSameHost method to isSameparams as thats what it checked and added a new method for isSameHost that checks the appropriate params for the connector. Ive changed ClientSessionFactoryImp to use this to correct the behaviour.

https://issues.apache.org/jira/browse/ARTEMIS-292
2015-11-03 10:29:31 -05:00
Martyn Taylor 26898e4663 ARTEMIS-288 Start close method in separate executor
When server sends disconnect to the client, the ClientSession schedules
a close task on it's ordered executor.  Once the close method starts
it's waits to check to see if all jobs in it's executor has completed.
To do this it adds a job to it's ordered executor, once it is run it
knows there is nothing more to do and thus is ready to close.  However,
this causes a deadlock as both jobs are running in the ordered executor
and thus are both waiting on each other.  The close eventually timesout
which is why we see the logs as reported in the JIRA.

This commit runs the close method in it's own ordered executor, thus
preventing the two jobs blocking each other.
2015-10-29 14:34:19 +00:00
Andy Taylor 290cb65b17 ARTEMIS-281 - fix reference counting for jgroups channels
https://issues.apache.org/jira/browse/ARTEMIS-281
2015-10-27 10:10:52 +00:00
Ivo Studensky 8a2ecff4fd ARTEMIS-274 ActiveMQThreadFactory has to be constructed within doPrivileged block 2015-10-22 09:30:14 -04:00
Andy Taylor 31f2389343 ARTEMIS-269 - sett restartBackup to true by default
https://issues.apache.org/jira/browse/ARTEMIS-269
2015-10-22 13:20:28 +01:00
Clebert Suconic 7dc839c07d Adding getDefaultFailbackDelay back to the interface
this is public interface, we can't remove methods...
It's being deprecated though
2015-10-20 18:03:09 -04:00
jbertram ef5a9809f2 ARTEMIS-256 orchestrate failback deterministically
The failback process needs to be deterministic rather than relying on various
incarnations of Thread.sleep() at crucial points. Important aspects of this
change include:

1) Make the initial replication synchronization process block at the very
last step and wait for a response from the replica to ensure the replica has
as the necessary data. This is a critical piece of knowledge during the
failback process because it allows the soon-to-become-backup server to know
for sure when it can shut itself down and allow the soon-to-become-live
server to take over. Also, introduce a new configuration element called
"initial-replication-sync-timeout" to conrol how long this blocking will occur.

2) Set the state of the server as 'LIVE' only after the server is fully
started. This is necessary because once the soon-to-be-backup server shuts
down it needs to know that the soon-to-be-live server has started fully before
it restarts itself as the new backup. If the soon-to-be-backup server restarts
before the soon-to-be-live is fully started then it won't actually become a
backup server but instead will become a live server which will break the
failback process.

3) Wait to receive the announcement of a backup server before failing-back.
2015-10-20 14:55:31 -04:00
Martyn Taylor 3e6f229436 ARTEMIS-262 Check connection status change before callbacks 2015-10-20 10:41:00 +01:00
Andy Taylor 98c2aa433f ARTEMIS-262 Fix Bridge OOM exception
Netty 4.x uses pooled buffers.  These buffers can run out of memory when
transferring large amounts of data over connection.  This was causing an
OutOfMemory exception to be thrown on the CoreBridge when tranferring
large messages.  Netty provides a callback handler to notify listeners
when a Connection is writable.  This patch adds the ability to register
connection writable listeners to the Netty connection and registers the
relevant callback from the Bridge to avoid writing when the buffers are
full.
2015-10-19 10:32:59 +01:00
Clebert Suconic 6bf1241628 ARTEMIS-257 cleaning up dependencies on artemis-core-client 2015-10-13 10:44:49 -04:00
Petter Nordlander 7afe87996b ARTEMIS-252 added jmx operations to retry messages 2015-10-12 17:03:42 -04:00
jbertram 717ddd1675 ARTEMIS-255 make non-blocking-failover-timeout configurable 2015-10-12 13:38:56 -05:00
Clebert Suconic a48046be5f ARTEMIS-151 more fixes because of the TransportConfiguration changes 2015-10-08 20:32:44 -04:00