ARTEMIS-4020: Remove string appends and various isXEnabled logger checks (add some where useful)
Logger statements should use formatting syntax and let the normal framework checks take care of checking if a logger is enabled instead of string concats and isXEnabled logger checks except in cases there is known expense to the specifc logging message/arg preparation or passing. Changes from myself and Robbie Gemmell. Co-authored-by: Robbie Gemmell <robbie@apache.org>
This commit is contained in:
parent
c3b304779e
commit
617269319a
|
@ -250,14 +250,11 @@ public class XMLMessageImporter {
|
|||
}
|
||||
}
|
||||
reader.next();
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("XMLStreamReader impl: " + reader);
|
||||
}
|
||||
logger.debug("XMLStreamReader impl: {}", reader);
|
||||
|
||||
if (isLarge) {
|
||||
tempFileName = File.createTempFile("largeMessage", ".tmp");
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Creating temp file " + tempFileName + " for large message.");
|
||||
}
|
||||
logger.debug("Creating temp file {} for large message.", tempFileName);
|
||||
try (OutputStream out = new BufferedOutputStream(new FileOutputStream(tempFileName))) {
|
||||
getMessageBodyBytes(bytes -> out.write(bytes), (message.toCore().getType() == Message.TEXT_TYPE) && decodeTextMessage);
|
||||
}
|
||||
|
|
|
@ -248,9 +248,7 @@ public final class XmlDataImporter extends ActionAbstract {
|
|||
}
|
||||
try {
|
||||
while (reader.hasNext()) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("EVENT:[" + reader.getLocation().getLineNumber() + "][" + reader.getLocation().getColumnNumber() + "] ");
|
||||
}
|
||||
logger.debug("EVENT:[{}][{}] ", reader.getLocation().getLineNumber(), reader.getLocation().getColumnNumber());
|
||||
if (reader.getEventType() == XMLStreamConstants.START_ELEMENT) {
|
||||
if (XmlDataConstants.OLD_BINDING.equals(reader.getLocalName())) {
|
||||
oldBinding(); // export from 1.x
|
||||
|
@ -315,17 +313,13 @@ public final class XmlDataImporter extends ActionAbstract {
|
|||
ClientMessage managementMessage = managementSession.createMessage(false);
|
||||
ManagementHelper.putAttribute(managementMessage, ResourceNames.QUEUE + queue, "ID");
|
||||
managementSession.start();
|
||||
if (debugLog) {
|
||||
logger.debug("Requesting ID for: " + queue);
|
||||
}
|
||||
logger.debug("Requesting ID for: {}", queue);
|
||||
ClientMessage reply = requestor.request(managementMessage);
|
||||
Number idObject = (Number) ManagementHelper.getResult(reply);
|
||||
queueID = idObject.longValue();
|
||||
}
|
||||
|
||||
if (debugLog) {
|
||||
logger.debug("ID for " + queue + " is: " + queueID);
|
||||
}
|
||||
logger.debug("ID for {} is: {}", queue, queueID);
|
||||
queueIDs.put(queue, queueID); // store it so we don't have to look it up every time
|
||||
}
|
||||
|
||||
|
@ -425,13 +419,9 @@ public final class XmlDataImporter extends ActionAbstract {
|
|||
|
||||
if (!queueQuery.isExists()) {
|
||||
session.createQueue(new QueueConfiguration(queueName).setAddress(address).setRoutingType(routingType).setFilterString(filter));
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Binding queue(name=" + queueName + ", address=" + address + ", filter=" + filter + ")");
|
||||
}
|
||||
logger.debug("Binding queue(name={}, address={}, filter={})", queueName, address, filter);
|
||||
} else {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Binding " + queueName + " already exists so won't re-bind.");
|
||||
}
|
||||
logger.debug("Binding {} already exists so won't re-bind.", queueName);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -467,13 +457,9 @@ public final class XmlDataImporter extends ActionAbstract {
|
|||
|
||||
if (!queueQuery.isExists()) {
|
||||
session.createQueue(new QueueConfiguration(queueName).setAddress(address).setRoutingType(RoutingType.valueOf(routingType)).setFilterString(filter));
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Binding queue(name=" + queueName + ", address=" + address + ", filter=" + filter + ")");
|
||||
}
|
||||
logger.debug("Binding queue(name={}, address={}, filter={})", queueName, address, filter);
|
||||
} else {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Binding " + queueName + " already exists so won't re-bind.");
|
||||
}
|
||||
logger.debug("Binding {} already exists so won't re-bind.", queueName);
|
||||
}
|
||||
|
||||
addressMap.put(queueName, address);
|
||||
|
@ -503,13 +489,9 @@ public final class XmlDataImporter extends ActionAbstract {
|
|||
set.add(RoutingType.valueOf(routingType));
|
||||
}
|
||||
session.createAddress(SimpleString.toSimpleString(addressName), set, false);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Binding address(name=" + addressName + ", routingTypes=" + routingTypes + ")");
|
||||
}
|
||||
logger.debug("Binding address(name={}, routingTypes={})", addressName, routingTypes);
|
||||
} else {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Binding " + addressName + " already exists so won't re-bind.");
|
||||
}
|
||||
logger.debug("Binding {} already exists so won't re-bind.", addressName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -359,9 +359,7 @@ public class NetworkHealthCheck extends ActiveMQScheduledComponent {
|
|||
|
||||
public boolean check(InetAddress address) throws IOException, InterruptedException {
|
||||
if (!hasCustomPingCommand() && isReachable(address)) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(address + " OK");
|
||||
}
|
||||
logger.trace("{} OK", address);
|
||||
return true;
|
||||
} else {
|
||||
return purePing(address);
|
||||
|
@ -376,9 +374,7 @@ public class NetworkHealthCheck extends ActiveMQScheduledComponent {
|
|||
long timeout = Math.max(1, TimeUnit.MILLISECONDS.toSeconds(networkTimeout));
|
||||
// it did not work with a simple isReachable, it could be because there's no root access, so we will try ping executable
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("purePing on canonical address " + address.getCanonicalHostName());
|
||||
}
|
||||
logger.trace("purePing on canonical address {}", address.getCanonicalHostName());
|
||||
ProcessBuilder processBuilder;
|
||||
if (address instanceof Inet6Address) {
|
||||
processBuilder = buildProcess(ipv6Command, timeout, address.getCanonicalHostName());
|
||||
|
@ -398,10 +394,7 @@ public class NetworkHealthCheck extends ActiveMQScheduledComponent {
|
|||
private ProcessBuilder buildProcess(String expressionCommand, long timeout, String host) {
|
||||
String command = String.format(expressionCommand, timeout, host);
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("executing ping:: " + command);
|
||||
}
|
||||
|
||||
logger.debug("executing ping:: {}", command);
|
||||
ProcessBuilder builder = new ProcessBuilder(command.split(" "));
|
||||
|
||||
return builder;
|
||||
|
|
|
@ -65,9 +65,9 @@ public class ByteUtil {
|
|||
|
||||
try {
|
||||
if (info) {
|
||||
logger.info(message + "\n" + ByteUtil.formatGroup(ByteUtil.bytesToHex(frame), 8, 16));
|
||||
logger.info("{}\n{}", message, ByteUtil.formatGroup(ByteUtil.bytesToHex(frame), 8, 16));
|
||||
} else {
|
||||
logger.trace(message + "\n" + ByteUtil.formatGroup(ByteUtil.bytesToHex(frame), 8, 16));
|
||||
logger.trace("{}\n{}", message, ByteUtil.formatGroup(ByteUtil.bytesToHex(frame), 8, 16));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.warn(e.getMessage(), e);
|
||||
|
|
|
@ -143,7 +143,7 @@ public class DefaultSensitiveStringCodec implements SensitiveDataCodec<String> {
|
|||
} else {
|
||||
key = System.getProperty(KEY_SYSTEM_PROPERTY);
|
||||
if (key != null && key.trim().length() > 0) {
|
||||
logger.trace("Set key from system property " + KEY_SYSTEM_PROPERTY);
|
||||
logger.trace("Set key from system property {}", KEY_SYSTEM_PROPERTY);
|
||||
updateKey(key);
|
||||
}
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ public class DefaultSensitiveStringCodec implements SensitiveDataCodec<String> {
|
|||
try {
|
||||
return Objects.equals(storedValue, encode(String.valueOf(inputValue)));
|
||||
} catch (Exception e) {
|
||||
logger.debug("Exception on verifying: " + e);
|
||||
logger.debug("Exception on verifying:", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ public final class UTF8Util {
|
|||
|
||||
if (logger.isTraceEnabled()) {
|
||||
// This message is too verbose for debug, that's why we are using trace here
|
||||
logger.trace("Saving string with utfSize=" + len + " stringSize=" + stringLength);
|
||||
logger.trace("Saving string with utfSize={} stringSize={}", len, stringLength);
|
||||
}
|
||||
|
||||
if (out.hasArray()) {
|
||||
|
@ -189,7 +189,7 @@ public final class UTF8Util {
|
|||
|
||||
if (logger.isTraceEnabled()) {
|
||||
// This message is too verbose for debug, that's why we are using trace here
|
||||
logger.trace("Reading string with utfSize=" + size);
|
||||
logger.trace("Reading string with utfSize={}", size);
|
||||
}
|
||||
if (PlatformDependent.hasUnsafe() && input.byteBuf() != null && input.byteBuf().hasMemoryAddress()) {
|
||||
final ByteBuf byteBuf = input.byteBuf();
|
||||
|
|
|
@ -127,7 +127,7 @@ public final class UUIDGenerator {
|
|||
dummy[0] |= (byte) 0x01;
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("using dummy address " + UUIDGenerator.asString(dummy));
|
||||
logger.debug("using dummy address {}", UUIDGenerator.asString(dummy));
|
||||
}
|
||||
return dummy;
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ public final class UUIDGenerator {
|
|||
byte[] address = findFirstMatchingHardwareAddress(ifaces);
|
||||
if (address != null) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("using hardware address " + UUIDGenerator.asString(address));
|
||||
logger.debug("using hardware address {}", UUIDGenerator.asString(address));
|
||||
}
|
||||
return address;
|
||||
}
|
||||
|
|
|
@ -203,7 +203,7 @@ public abstract class ProcessorBase<T> extends HandlerBase {
|
|||
|
||||
private static void logAddOnShutdown() {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Ordered executor has been gently shutdown at", new Exception("debug"));
|
||||
logger.debug("Ordered executor has been gently shutdown at {}", new Exception("debug"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -70,8 +70,8 @@ public class ThresholdActor<T> extends ProcessorBase<Object> {
|
|||
} finally {
|
||||
if (estimateSize > 0) {
|
||||
SIZE_UPDATER.getAndAdd(this, -estimateSize);
|
||||
} else if (logger.isDebugEnabled()) {
|
||||
logger.debug("element " + theTask + " returned an invalid size over the Actor during release");
|
||||
} else {
|
||||
logger.debug("element {} returned an invalid size over the Actor during release", theTask);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -83,8 +83,8 @@ public class ThresholdActor<T> extends ProcessorBase<Object> {
|
|||
if (size > maxSize) {
|
||||
flush();
|
||||
}
|
||||
} else if (logger.isDebugEnabled()) {
|
||||
logger.debug("element " + message + " returned an invalid size over the Actor");
|
||||
} else {
|
||||
logger.debug("element {} returned an invalid size over the Actor", message);
|
||||
}
|
||||
task(message);
|
||||
}
|
||||
|
|
|
@ -437,7 +437,7 @@ public class ConcurrentLongHashSet {
|
|||
|
||||
static boolean moreThanZero(long n) {
|
||||
if (n < 0L) {
|
||||
logger.warn("Keys and values must be >= 0, while it was " + n + ", entry will be ignored", new Exception("invalid record " + n));
|
||||
logger.warn("Keys and values must be >= 0, while it was {}, entry will be ignored", n, new Exception("invalid record " + n));
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
|
|
|
@ -110,8 +110,8 @@ public class CriticalMeasure {
|
|||
if (analyzer != null) {
|
||||
long nanoTimeout = analyzer.getTimeoutNanoSeconds();
|
||||
if (checkExpiration(nanoTimeout, false)) {
|
||||
logger.trace("Path " + id + " on component " + getComponentName() + " is taking too long, leaving at", new Exception("left"));
|
||||
logger.trace("Path " + id + " on component " + getComponentName() + " is taking too long, entered at", traceEnter);
|
||||
logger.trace("Path {} on component {} is taking too long, leaving at {}", id, getComponentName(), new Exception("left"));
|
||||
logger.trace("Path {} on component {} is taking too long, entered at", id, getComponentName(), traceEnter);
|
||||
}
|
||||
}
|
||||
traceEnter = null;
|
||||
|
@ -137,9 +137,9 @@ public class CriticalMeasure {
|
|||
Exception lastTraceEnter = this.traceEnter;
|
||||
|
||||
if (lastTraceEnter != null) {
|
||||
logger.warn("Component " + getComponentName() + " is expired on path " + id, lastTraceEnter);
|
||||
logger.warn("Component {} is expired on path {}", getComponentName(), id, lastTraceEnter);
|
||||
} else {
|
||||
logger.warn("Component " + getComponentName() + " is expired on path " + id);
|
||||
logger.warn("Component {} is expired on path {}", getComponentName(), id);
|
||||
}
|
||||
|
||||
if (reset) {
|
||||
|
|
|
@ -37,7 +37,7 @@ public class FluentPropertyBeanIntrospectorWithIgnores extends FluentPropertyBea
|
|||
private static ConcurrentHashSet<Pair<String, String>> ignores = new ConcurrentHashSet<>();
|
||||
|
||||
public static void addIgnore(String className, String propertyName) {
|
||||
logger.trace("Adding ignore on " + className + "/" + propertyName);
|
||||
logger.trace("Adding ignore on {}/{}", className, propertyName);
|
||||
ignores.add(new Pair<>(className, propertyName));
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ public class FluentPropertyBeanIntrospectorWithIgnores extends FluentPropertyBea
|
|||
PropertyDescriptor pd = icontext.getPropertyDescriptor(propertyName);
|
||||
|
||||
if (isIgnored(icontext.getTargetClass().getName(), m.getName())) {
|
||||
logger.trace(m.getName() + " Ignored for " + icontext.getTargetClass().getName());
|
||||
logger.trace("{} Ignored for {}", m.getName(), icontext.getTargetClass().getName());
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
|
|
|
@ -54,7 +54,7 @@ public class DefaultSensitiveStringCodecTest {
|
|||
|
||||
String plainText = "some_password";
|
||||
String maskedText = codec.encode(plainText);
|
||||
log.debug("encoded value: " + maskedText);
|
||||
log.debug("encoded value: {}", maskedText);
|
||||
|
||||
if (algorithm.equals(DefaultSensitiveStringCodec.ONE_WAY)) {
|
||||
//one way can't decode
|
||||
|
@ -65,7 +65,7 @@ public class DefaultSensitiveStringCodecTest {
|
|||
}
|
||||
} else {
|
||||
String decoded = codec.decode(maskedText);
|
||||
log.debug("encoded value: " + maskedText);
|
||||
log.debug("encoded value: {}", maskedText);
|
||||
|
||||
assertEquals("decoded result not match: " + decoded, decoded, plainText);
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ public class DefaultSensitiveStringCodecTest {
|
|||
|
||||
String plainText = "some_password";
|
||||
String maskedText = codec.encode(plainText);
|
||||
log.debug("encoded value: " + maskedText);
|
||||
log.debug("encoded value: {}", maskedText);
|
||||
|
||||
assertTrue(codec.verify(plainText.toCharArray(), maskedText));
|
||||
|
||||
|
|
|
@ -179,7 +179,7 @@ public class OrderedExecutorSanityTest {
|
|||
|
||||
long elapsed = (end - start);
|
||||
|
||||
log.info("execution " + i + " in " + TimeUnit.NANOSECONDS.toMillis(elapsed) + " milliseconds");
|
||||
log.info("execution {} in {} milliseconds", i, TimeUnit.NANOSECONDS.toMillis(elapsed));
|
||||
}
|
||||
} finally {
|
||||
executorService.shutdown();
|
||||
|
|
|
@ -52,9 +52,9 @@ public class MultiThreadCriticalMeasureTest {
|
|||
|
||||
Runnable runnable = () -> {
|
||||
try {
|
||||
logger.debug("Thread " + Thread.currentThread().getName() + " waiting to Start");
|
||||
logger.debug("Thread {} waiting to Start", Thread.currentThread().getName());
|
||||
barrier.await();
|
||||
logger.debug("Thread " + Thread.currentThread().getName() + " Started");
|
||||
logger.debug("Thread {} Started", Thread.currentThread().getName());
|
||||
while (running.get()) {
|
||||
if (!load.get()) {
|
||||
// 1st barrier will let the unit test do its job
|
||||
|
|
|
@ -45,7 +45,7 @@ public class ChannelBroadcastEndpointFactory implements BroadcastEndpointFactory
|
|||
|
||||
private ChannelBroadcastEndpointFactory(JChannelManager manager, JChannel channel, String channelName) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("new ChannelBroadcastEndpointFactory(" + manager + ", " + channel + ", " + channelName, new Exception("trace"));
|
||||
logger.trace("new ChannelBroadcastEndpointFactory({}, {}, {})", manager, channel, channelName, new Exception("trace"));
|
||||
}
|
||||
this.manager = manager;
|
||||
this.channel = channel;
|
||||
|
|
|
@ -52,8 +52,10 @@ public abstract class JGroupsBroadcastEndpoint implements BroadcastEndpoint {
|
|||
|
||||
@Override
|
||||
public void broadcast(final byte[] data) throws Exception {
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Broadcasting: BroadCastOpened=" + broadcastOpened + ", channelOPen=" + channel.getChannel().isOpen());
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Broadcasting: BroadCastOpened={}, channelOPen={}", broadcastOpened, channel.getChannel().isOpen());
|
||||
}
|
||||
|
||||
if (broadcastOpened) {
|
||||
org.jgroups.Message msg = new org.jgroups.BytesMessage();
|
||||
|
||||
|
@ -65,8 +67,10 @@ public abstract class JGroupsBroadcastEndpoint implements BroadcastEndpoint {
|
|||
|
||||
@Override
|
||||
public byte[] receiveBroadcast() throws Exception {
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Receiving Broadcast: clientOpened=" + clientOpened + ", channelOPen=" + channel.getChannel().isOpen());
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Receiving Broadcast: clientOpened={}, channelOPen={}", clientOpened, channel.getChannel().isOpen());
|
||||
}
|
||||
|
||||
if (clientOpened) {
|
||||
return receiver.receiveBroadcast();
|
||||
} else {
|
||||
|
@ -76,8 +80,10 @@ public abstract class JGroupsBroadcastEndpoint implements BroadcastEndpoint {
|
|||
|
||||
@Override
|
||||
public byte[] receiveBroadcast(long time, TimeUnit unit) throws Exception {
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Receiving Broadcast2: clientOpened=" + clientOpened + ", channelOPen=" + channel.getChannel().isOpen());
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Receiving Broadcast2: clientOpened={}, channelOPen={}", clientOpened, channel.getChannel().isOpen());
|
||||
}
|
||||
|
||||
if (clientOpened) {
|
||||
return receiver.receiveBroadcast(time, unit);
|
||||
} else {
|
||||
|
|
|
@ -75,12 +75,11 @@ public class JChannelManager {
|
|||
if (wrapper == null) {
|
||||
wrapper = new JChannelWrapper(this, channelName, endpoint.createChannel());
|
||||
channels.put(channelName, wrapper);
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Put Channel " + channelName);
|
||||
logger.trace("Put Channel {}", channelName);
|
||||
return wrapper;
|
||||
}
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("Add Ref Count " + channelName);
|
||||
logger.trace("Add Ref Count {}", channelName);
|
||||
|
||||
return wrapper.addRef();
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ public class JChannelWrapper {
|
|||
this.manager = manager;
|
||||
|
||||
if (logger.isTraceEnabled() && channel.getReceiver() != null) {
|
||||
logger.trace(this + "The channel already had a receiver previously!!!! == " + channel.getReceiver(), new Exception("trace"));
|
||||
logger.trace("{} The channel already had a receiver previously!!!! == {}", this, channel.getReceiver(), new Exception("trace"));
|
||||
}
|
||||
|
||||
//we always add this for the first ref count
|
||||
|
@ -64,7 +64,7 @@ public class JChannelWrapper {
|
|||
@Override
|
||||
public void receive(org.jgroups.Message msg) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + ":: Wrapper received " + msg + " on channel " + channelName);
|
||||
logger.trace("{}:: Wrapper received {} on channel {}", this, msg, channelName);
|
||||
}
|
||||
synchronized (receivers) {
|
||||
for (JGroupsReceiver r : receivers) {
|
||||
|
@ -86,7 +86,7 @@ public class JChannelWrapper {
|
|||
public synchronized void close(boolean closeWrappedChannel) {
|
||||
refCount--;
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace(this + "::RefCount-- " + refCount + " on channel " + channelName, new Exception("Trace"));
|
||||
logger.trace("{}::RefCount-- {} on channel {}", this, refCount, channelName, new Exception("Trace"));
|
||||
if (refCount == 0) {
|
||||
if (closeWrappedChannel) {
|
||||
closeChannel();
|
||||
|
@ -99,14 +99,14 @@ public class JChannelWrapper {
|
|||
connected = false;
|
||||
channel.setReceiver(null);
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::Closing Channel: " + channelName, new Exception("Trace"));
|
||||
logger.trace("{}::Closing Channel: {}", this, channelName, new Exception("Trace"));
|
||||
}
|
||||
channel.close();
|
||||
}
|
||||
|
||||
public void removeReceiver(JGroupsReceiver receiver) {
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace(this + "::removeReceiver: " + receiver + " on " + channelName, new Exception("Trace"));
|
||||
logger.trace("{}::removeReceiver: {} on {}", this, receiver, channelName, new Exception("Trace"));
|
||||
synchronized (receivers) {
|
||||
receivers.remove(receiver);
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ public class JChannelWrapper {
|
|||
|
||||
public synchronized void connect() throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + ":: Connecting " + channelName, new Exception("Trace"));
|
||||
logger.trace("{}:: Connecting {}", this, channelName, new Exception("Trace"));
|
||||
}
|
||||
|
||||
// It is important to check this otherwise we could reconnect an already connected channel
|
||||
|
@ -131,15 +131,17 @@ public class JChannelWrapper {
|
|||
|
||||
public void addReceiver(JGroupsReceiver jGroupsReceiver) {
|
||||
synchronized (receivers) {
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace(this + "::Add Receiver: " + jGroupsReceiver + " on " + channelName);
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("{}::Add Receiver: {} on {}", this, jGroupsReceiver, channelName);
|
||||
}
|
||||
receivers.add(jGroupsReceiver);
|
||||
}
|
||||
}
|
||||
|
||||
public void send(org.jgroups.Message msg) throws Exception {
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace(this + "::Sending JGroups Message: Open=" + channel.isOpen() + " on channel " + channelName + " msg=" + msg);
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("{}::Sending JGroups Message: Open={} on channel {} msg={}", this, channel.isOpen(), channelName, msg);
|
||||
}
|
||||
if (!manager.isLoopbackMessages()) {
|
||||
msg.setFlag(Message.TransientFlag.DONT_LOOPBACK);
|
||||
}
|
||||
|
@ -148,8 +150,9 @@ public class JChannelWrapper {
|
|||
|
||||
public JChannelWrapper addRef() {
|
||||
this.refCount++;
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace(this + "::RefCount++ = " + refCount + " on channel " + channelName);
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("{}::RefCount++ = {} on channel {}", this, refCount, channelName);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,8 +38,7 @@ public class JGroupsReceiver implements Receiver {
|
|||
|
||||
@Override
|
||||
public void receive(org.jgroups.Message msg) {
|
||||
if (logger.isTraceEnabled())
|
||||
logger.trace("sending message " + msg);
|
||||
logger.trace("sending message {}", msg);
|
||||
dequeue.add(msg.getArray());
|
||||
}
|
||||
|
||||
|
@ -54,9 +53,9 @@ public class JGroupsReceiver implements Receiver {
|
|||
|
||||
private void logBytes(String methodName, byte[] bytes) {
|
||||
if (bytes != null) {
|
||||
logger.trace(methodName + "::" + bytes.length + " bytes");
|
||||
logger.trace("{}::{} bytes", methodName, bytes.length);
|
||||
} else {
|
||||
logger.trace(methodName + ":: no bytes");
|
||||
logger.trace("{}:: no bytes", methodName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -89,6 +89,7 @@ public abstract class AbstractProducerCreditsImpl implements ClientProducerCredi
|
|||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("AfterAcquire {} credits on address {}", credits, address);
|
||||
}
|
||||
|
||||
synchronized (this) {
|
||||
pendingCredits -= credits;
|
||||
}
|
||||
|
|
|
@ -180,7 +180,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
|
|||
this.flowControlExecutor = flowControlExecutor;
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + ":: being created at", new Exception("trace"));
|
||||
logger.trace("{}:: being created at", this, new Exception("trace"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -194,14 +194,14 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
|
|||
|
||||
private ClientMessage receive(final long timeout, final boolean forcingDelivery) throws ActiveMQException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::receive(" + timeout + ", " + forcingDelivery + ")");
|
||||
logger.trace("{}::receive({}, {})", this, timeout, forcingDelivery);
|
||||
}
|
||||
|
||||
checkClosed();
|
||||
|
||||
if (largeMessageReceived != null) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::receive(" + timeout + ", " + forcingDelivery + ") -> discard LargeMessage body for " + largeMessageReceived);
|
||||
logger.trace("{}::receive({}, {}) -> discard LargeMessage body for {}", this, timeout, forcingDelivery, largeMessageReceived);
|
||||
}
|
||||
// Check if there are pending packets to be received
|
||||
largeMessageReceived.discardBody();
|
||||
|
@ -214,14 +214,14 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
|
|||
|
||||
if (handler != null) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::receive(" + timeout + ", " + forcingDelivery + ") -> throwing messageHandlerSet");
|
||||
logger.trace("{}::receive({}, {}) -> throwing messageHandlerSet", this, timeout, forcingDelivery);
|
||||
}
|
||||
throw ActiveMQClientMessageBundle.BUNDLE.messageHandlerSet();
|
||||
}
|
||||
|
||||
if (clientWindowSize == 0) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::receive(" + timeout + ", " + forcingDelivery + ") -> start slowConsumer");
|
||||
logger.trace("{}::receive({}, {}) -> start slowConsumer", this, timeout, forcingDelivery);
|
||||
}
|
||||
startSlowConsumer();
|
||||
}
|
||||
|
@ -280,7 +280,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
|
|||
if (failedOver) {
|
||||
if (m == null) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::receive(" + timeout + ", " + forcingDelivery + ") -> m == null and failover");
|
||||
logger.trace("{}::receive({}, {}) -> m == null and failover", this, timeout, forcingDelivery);
|
||||
}
|
||||
|
||||
// if failed over and the buffer is null, we reset the state and try it again
|
||||
|
@ -290,16 +290,14 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
|
|||
continue;
|
||||
} else {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::receive(" + timeout + ", " + forcingDelivery + ") -> failedOver, but m != null, being " + m);
|
||||
logger.trace("{}::receive({}, {}) -> failedOver, but m != null, being {}", this, timeout, forcingDelivery, m);
|
||||
}
|
||||
failedOver = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (callForceDelivery) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::Forcing delivery");
|
||||
}
|
||||
logger.trace("{}::Forcing delivery", this);
|
||||
// JBPAPP-6030 - Calling forceDelivery outside of the lock to avoid distributed dead locks
|
||||
sessionContext.forceDelivery(this, forceDeliveryCount.getAndIncrement());
|
||||
callForceDelivery = false;
|
||||
|
@ -318,16 +316,11 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
|
|||
if (forcingDelivery && deliveryForced && seq == forceDeliveryCount.get() - 1) {
|
||||
// forced delivery messages are discarded, nothing has been delivered by the queue
|
||||
resetIfSlowConsumer();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::There was nothing on the queue, leaving it now:: returning null");
|
||||
}
|
||||
logger.trace("{}::There was nothing on the queue, leaving it now:: returning null", this);
|
||||
|
||||
return null;
|
||||
} else {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::Ignored force delivery answer as it belonged to another call");
|
||||
}
|
||||
logger.trace("{}::Ignored force delivery answer as it belonged to another call", this);
|
||||
// Ignore the message
|
||||
continue;
|
||||
}
|
||||
|
@ -357,15 +350,11 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
|
|||
largeMessageReceived = m;
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::Returning " + m);
|
||||
}
|
||||
logger.trace("{}::Returning {}", this, m);
|
||||
|
||||
return m;
|
||||
} else {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::Returning null");
|
||||
}
|
||||
logger.trace("{}::Returning null", this);
|
||||
resetIfSlowConsumer();
|
||||
return null;
|
||||
}
|
||||
|
@ -377,22 +366,17 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
|
|||
|
||||
@Override
|
||||
public ClientMessage receive(final long timeout) throws ActiveMQException {
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + ":: receive(" + timeout + ")");
|
||||
}
|
||||
logger.trace("{}:: receive({})", this, timeout);
|
||||
ClientMessage msg = receive(timeout, false);
|
||||
|
||||
if (msg == null && !closed) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + ":: receive(" + timeout + ") -> null, trying again with receive(0)");
|
||||
logger.trace("{}:: receive({}) -> null, trying again with receive(0)", this, timeout);
|
||||
}
|
||||
msg = receive(0, true);
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + ":: returning " + msg);
|
||||
}
|
||||
logger.trace("{}:: returning {}", this, msg);
|
||||
|
||||
return msg;
|
||||
}
|
||||
|
@ -513,9 +497,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
|
|||
|
||||
@Override
|
||||
public void clearAtFailover() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::ClearAtFailover");
|
||||
}
|
||||
logger.trace("{}::ClearAtFailover", this);
|
||||
clearBuffer();
|
||||
|
||||
// failover will issue a start later
|
||||
|
@ -699,7 +681,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
|
|||
}
|
||||
if (currentLargeMessageController == null) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::Sending back credits for largeController = null " + flowControlSize);
|
||||
logger.trace("{}::Sending back credits for largeController = null {}", this, flowControlSize);
|
||||
}
|
||||
flowControl(flowControlSize, false);
|
||||
} else {
|
||||
|
@ -777,18 +759,14 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
|
|||
ackBytes += message.getEncodeSize();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::acknowledge ackBytes=" + ackBytes + " and ackBatchSize=" + ackBatchSize + ", encodeSize=" + message.getEncodeSize());
|
||||
logger.trace("{}::acknowledge ackBytes={} and ackBatchSize={}, encodeSize={}", this, ackBytes, ackBatchSize, message.getEncodeSize());
|
||||
}
|
||||
|
||||
if (ackBytes >= ackBatchSize) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + ":: acknowledge acking " + cmi);
|
||||
}
|
||||
logger.trace("{}:: acknowledge acking {}", this, cmi);
|
||||
doAck(cmi);
|
||||
} else {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + ":: acknowledge setting lastAckedMessage = " + cmi);
|
||||
}
|
||||
logger.trace("{}:: acknowledge setting lastAckedMessage = {}", this, cmi);
|
||||
lastAckedMessage = cmi;
|
||||
}
|
||||
}
|
||||
|
@ -806,9 +784,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
|
|||
@Override
|
||||
public void flushAcks() throws ActiveMQException {
|
||||
if (lastAckedMessage != null) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::FlushACK acking lastMessage::" + lastAckedMessage);
|
||||
}
|
||||
logger.trace("{}::FlushACK acking lastMessage::{}", this, lastAckedMessage);
|
||||
doAck(lastAckedMessage);
|
||||
}
|
||||
}
|
||||
|
@ -827,7 +803,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
|
|||
if (creditsToSend >= clientWindowSize) {
|
||||
if (clientWindowSize == 0 && discountSlowConsumer) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::FlowControl::Sending " + creditsToSend + " -1, for slow consumer");
|
||||
logger.trace("{}::FlowControl::Sending {}-1, for slow consumer", this, creditsToSend);
|
||||
}
|
||||
|
||||
// sending the credits - 1 initially send to fire the slow consumer, or the slow consumer would be
|
||||
|
@ -841,7 +817,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
|
|||
}
|
||||
} else {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Sending " + messageBytes + " from flow-control");
|
||||
logger.debug("Sending {} from flow-control", messageBytes);
|
||||
}
|
||||
|
||||
final int credits = creditsToSend;
|
||||
|
@ -860,9 +836,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
|
|||
* Sending an initial credit for slow consumers
|
||||
*/
|
||||
private void startSlowConsumer() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::Sending 1 credit to start delivering of one message to slow consumer");
|
||||
}
|
||||
logger.trace("{}::Sending 1 credit to start delivering of one message to slow consumer", this);
|
||||
sendCredits(1);
|
||||
try {
|
||||
// We use an executor here to guarantee the messages will arrive in order.
|
||||
|
@ -903,10 +877,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
|
|||
}
|
||||
|
||||
private void queueExecutor() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::Adding Runner on Executor for delivery");
|
||||
}
|
||||
|
||||
logger.trace("{}::Adding Runner on Executor for delivery", this);
|
||||
sessionExecutor.execute(runner);
|
||||
}
|
||||
|
||||
|
@ -993,9 +964,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
|
|||
flowControlBeforeConsumption(message);
|
||||
|
||||
if (!expired) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::Calling handler.onMessage");
|
||||
}
|
||||
logger.trace("{}::Calling handler.onMessage", this);
|
||||
final ClassLoader originalLoader = safeInstallContextClassLoader();
|
||||
|
||||
onMessageThread = Thread.currentThread();
|
||||
|
@ -1011,9 +980,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
|
|||
onMessageThread = null;
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::Handler.onMessage done");
|
||||
}
|
||||
logger.trace("{}::Handler.onMessage done", this);
|
||||
|
||||
if (message.isLargeMessage()) {
|
||||
message.discardBody();
|
||||
|
@ -1133,9 +1100,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
|
|||
|
||||
lastAckedMessage = null;
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::Acking message " + message);
|
||||
}
|
||||
logger.trace("{}::Acking message {}", this, message);
|
||||
|
||||
session.acknowledge(this, message);
|
||||
}
|
||||
|
|
|
@ -142,9 +142,7 @@ public class ClientProducerImpl implements ClientProducerInternal {
|
|||
doSend(address1, message, handler);
|
||||
|
||||
if (handler != null && !session.isConfirmationWindowEnabled()) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Handler was used on producing messages towards address " + address1 + " however there is no confirmationWindowEnabled");
|
||||
}
|
||||
logger.debug("Handler was used on producing messages towards address {} however there is no confirmationWindowEnabled", address1);
|
||||
|
||||
// if there is no confirmation enabled, we will at least call the handler after the sent is done
|
||||
session.scheduleConfirmation(handler, message);
|
||||
|
|
|
@ -287,17 +287,12 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
|
|||
if (localConnector.isEquivalent(live.getParams()) && backUp != null && !localConnector.isEquivalent(backUp.getParams())
|
||||
// check if a server is trying to set its cluster connector config as backup connector config
|
||||
&& !(serverLocator.getClusterTransportConfiguration() != null && serverLocator.getClusterTransportConfiguration().isSameParams(backUp))) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Setting up backup config = " + backUp + " for live = " + live);
|
||||
}
|
||||
logger.debug("Setting up backup config = {} for live = {}", backUp, live);
|
||||
backupConnectorConfig = backUp;
|
||||
} else {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("ClientSessionFactoryImpl received backup update for live/backup pair = " + live +
|
||||
" / " +
|
||||
backUp +
|
||||
" but it didn't belong to " +
|
||||
currentConnectorConfig);
|
||||
logger.debug("ClientSessionFactoryImpl received backup update for live/backup pair = {} / {} but it didn't belong to {}",
|
||||
live, backUp, currentConnectorConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -583,8 +578,8 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
|
|||
return;
|
||||
}
|
||||
|
||||
if (ClientSessionFactoryImpl.logger.isTraceEnabled()) {
|
||||
logger.trace("Client Connection failed, calling failure listeners and trying to reconnect, reconnectAttempts=" + reconnectAttempts);
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Client Connection failed, calling failure listeners and trying to reconnect, reconnectAttempts={}", reconnectAttempts);
|
||||
}
|
||||
|
||||
callFailoverListeners(FailoverEventType.FAILURE_DETECTED);
|
||||
|
@ -847,11 +842,8 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
|
|||
if (!clientProtocolManager.isAlive())
|
||||
return;
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getConnectionWithRetry::" + reconnectAttempts +
|
||||
" with retryInterval = " +
|
||||
retryInterval +
|
||||
" multiplier = " +
|
||||
retryIntervalMultiplier, new Exception("trace"));
|
||||
logger.trace("getConnectionWithRetry::{} with retryInterval = {} multiplier = {}",
|
||||
reconnectAttempts, retryInterval, retryIntervalMultiplier, new Exception("trace"));
|
||||
}
|
||||
|
||||
long interval = retryInterval;
|
||||
|
@ -860,7 +852,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
|
|||
|
||||
while (clientProtocolManager.isAlive()) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Trying reconnection attempt " + count + "/" + reconnectAttempts);
|
||||
logger.debug("Trying reconnection attempt {}/{}", count, reconnectAttempts);
|
||||
}
|
||||
|
||||
if (getConnection() != null) {
|
||||
|
@ -868,9 +860,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
|
|||
// transferring old connection version into the new connection
|
||||
((CoreRemotingConnection)connection).setChannelVersion(((CoreRemotingConnection)oldConnection).getChannelVersion());
|
||||
}
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Reconnection successful");
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
// Failed to get connection
|
||||
|
@ -886,8 +876,8 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
|
|||
return;
|
||||
}
|
||||
|
||||
if (ClientSessionFactoryImpl.logger.isTraceEnabled()) {
|
||||
ClientSessionFactoryImpl.logger.trace("Waiting " + interval + " milliseconds before next retry. RetryInterval=" + retryInterval + " and multiplier=" + retryIntervalMultiplier);
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Waiting {} milliseconds before next retry. RetryInterval={} and multiplier={}", interval, retryInterval, retryIntervalMultiplier);
|
||||
}
|
||||
|
||||
if (waitForRetry(interval))
|
||||
|
@ -1001,13 +991,13 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
|
|||
|
||||
if (serverLocator.getTopology() != null) {
|
||||
if (connection != null) {
|
||||
if (ClientSessionFactoryImpl.logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::Subscribing Topology");
|
||||
}
|
||||
logger.trace("{}::Subscribing Topology", this);
|
||||
clientProtocolManager.sendSubscribeTopology(serverLocator.isClusterConnection());
|
||||
}
|
||||
} else {
|
||||
logger.debug("serverLocator@" + System.identityHashCode(serverLocator + " had no topology"));
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("serverLocator@{} had no topology", System.identityHashCode(serverLocator));
|
||||
}
|
||||
}
|
||||
|
||||
return connection;
|
||||
|
@ -1115,9 +1105,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
|
|||
Connection transportConnection = connector.createConnection();
|
||||
|
||||
if (transportConnection == null) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Connector towards " + connector + " failed");
|
||||
}
|
||||
logger.debug("Connector towards {} failed", connector);
|
||||
|
||||
try {
|
||||
connector.close();
|
||||
|
@ -1216,8 +1204,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
|
|||
transportConnectorConfig.getFactoryClassName());
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Trying to connect with connectorFactory=" + transportConnectorFactory
|
||||
+ " and " + name + "ConnectorConfig: " + transportConnectorConfig);
|
||||
logger.debug("Trying to connect with connectorFactory={} and {}ConnectorConfig: {}", transportConnectorFactory, name, transportConnectorConfig);
|
||||
}
|
||||
|
||||
Connector transportConnector = createConnector(transportConnectorFactory, transportConnectorConfig);
|
||||
|
@ -1225,9 +1212,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
|
|||
Connection transportConnection = openTransportConnection(transportConnector);
|
||||
|
||||
if (transportConnection != null) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Connected with the " + name + "ConnectorConfig=" + transportConnectorConfig);
|
||||
}
|
||||
logger.debug("Connected with the {}ConnectorConfig={}", name, transportConnectorConfig);
|
||||
|
||||
connector = transportConnector;
|
||||
connectorFactory = transportConnectorFactory;
|
||||
|
@ -1390,9 +1375,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
|
|||
Connection transportConnection = createTransportConnection();
|
||||
|
||||
if (transportConnection == null) {
|
||||
if (ClientSessionFactoryImpl.logger.isTraceEnabled()) {
|
||||
logger.trace("Neither backup or live were active, will just give up now");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -1402,9 +1385,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
|
|||
|
||||
schedulePing();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("returning " + newConnection);
|
||||
}
|
||||
logger.trace("returning {}", newConnection);
|
||||
|
||||
return newConnection;
|
||||
}
|
||||
|
@ -1433,13 +1414,8 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
|
|||
public void nodeDisconnected(RemotingConnection conn, String nodeID, DisconnectReason reason, String targetNodeID, TransportConfiguration tagetConnector) {
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Disconnect being called on client:" +
|
||||
" server locator = " +
|
||||
serverLocator +
|
||||
" notifying node " +
|
||||
nodeID +
|
||||
" as down with reason " +
|
||||
reason, new Exception("trace"));
|
||||
logger.trace("Disconnect being called on client: server locator = {} notifying node {} as down with reason {}",
|
||||
serverLocator, nodeID, reason, new Exception("trace"));
|
||||
}
|
||||
|
||||
serverLocator.notifyNodeDown(System.currentTimeMillis(), nodeID);
|
||||
|
@ -1451,11 +1427,11 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
|
|||
if (topologyMember != null) {
|
||||
if (topologyMember.getConnector().getB() != null) {
|
||||
backupConnectorConfig = topologyMember.getConnector().getB();
|
||||
} else if (logger.isDebugEnabled()) {
|
||||
logger.debug("The topology member " + nodeID + " with connector " + tagetConnector + " has no backup");
|
||||
} else {
|
||||
logger.debug("The topology member {} with connector {} has no backup", nodeID, tagetConnector);
|
||||
}
|
||||
} else if (logger.isDebugEnabled()) {
|
||||
logger.debug("The topology member " + nodeID + " with connector " + tagetConnector + " not found");
|
||||
} else {
|
||||
logger.debug("The topology member {} with connector {} not found", nodeID, tagetConnector);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -946,9 +946,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
|
|||
public void commit(boolean block) throws ActiveMQException {
|
||||
checkClosed();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Sending commit");
|
||||
}
|
||||
|
||||
/*
|
||||
* we have failed over since any work was done so we should rollback
|
||||
|
@ -1004,8 +1002,9 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
|
|||
|
||||
public void rollback(final boolean isLastMessageAsDelivered, final boolean waitConsumers) throws ActiveMQException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("calling rollback(isLastMessageAsDelivered=" + isLastMessageAsDelivered + ")");
|
||||
logger.trace("calling rollback(isLastMessageAsDelivered={})", isLastMessageAsDelivered);
|
||||
}
|
||||
|
||||
checkClosed();
|
||||
|
||||
// We do a "JMS style" rollback where the session is stopped, and the buffer is cancelled back
|
||||
|
@ -1204,8 +1203,9 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
|
|||
}
|
||||
|
||||
checkClosed();
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("client ack messageID = " + message.getMessageID());
|
||||
logger.debug("client ack messageID = {}", message.getMessageID());
|
||||
}
|
||||
|
||||
startCall();
|
||||
|
@ -1326,13 +1326,11 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
|
|||
@Override
|
||||
public void close() throws ActiveMQException {
|
||||
if (closed) {
|
||||
logger.debug("Session was already closed, giving up now, this=" + this);
|
||||
logger.debug("Session was already closed, giving up now, this={}", this);
|
||||
return;
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Calling close on session " + this);
|
||||
}
|
||||
logger.debug("Calling close on session {}", this);
|
||||
|
||||
try {
|
||||
closeChildren();
|
||||
|
@ -1605,7 +1603,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
|
|||
@Override
|
||||
public void commit(final Xid xid, final boolean onePhase) throws XAException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("call commit(xid=" + convert(xid));
|
||||
logger.trace("call commit(xid={}", convert(xid));
|
||||
}
|
||||
checkXA();
|
||||
|
||||
|
@ -1632,11 +1630,11 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
|
|||
|
||||
XAException xaException;
|
||||
if (onePhase) {
|
||||
logger.debug("Throwing oneFase RMFAIL on xid=" + xid, t);
|
||||
logger.debug("Throwing oneFase RMFAIL on xid={}", xid, t);
|
||||
//we must return XA_RMFAIL
|
||||
xaException = new XAException(XAException.XAER_RMFAIL);
|
||||
} else {
|
||||
logger.debug("Throwing twoFase Retry on xid=" + xid, t);
|
||||
logger.debug("Throwing twoFase Retry on xid={}", xid, t);
|
||||
// Any error on commit -> RETRY
|
||||
// We can't rollback a Prepared TX for definition
|
||||
xaException = new XAException(XAException.XA_RETRY);
|
||||
|
@ -1652,7 +1650,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
|
|||
@Override
|
||||
public void end(final Xid xid, final int flags) throws XAException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Calling end:: " + convert(xid) + ", flags=" + convertTXFlag(flags));
|
||||
logger.trace("Calling end:: {}, flags={}", convert(xid), convertTXFlag(flags));
|
||||
}
|
||||
|
||||
checkXA();
|
||||
|
@ -1778,7 +1776,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
|
|||
public int prepare(final Xid xid) throws XAException {
|
||||
checkXA();
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Calling prepare:: " + convert(xid));
|
||||
logger.trace("Calling prepare:: {}", convert(xid));
|
||||
}
|
||||
|
||||
if (rollbackOnly) {
|
||||
|
@ -1858,7 +1856,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
|
|||
checkXA();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Calling rollback:: " + convert(xid));
|
||||
logger.trace("Calling rollback:: {}", convert(xid));
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -1907,7 +1905,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
|
|||
@Override
|
||||
public void start(final Xid xid, final int flags) throws XAException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Calling start:: " + convert(xid) + " clientXID=" + xid + " flags = " + convertTXFlag(flags));
|
||||
logger.trace("Calling start:: {} clientXID={} flags = {}", convert(xid), xid, convertTXFlag(flags));
|
||||
}
|
||||
|
||||
checkXA();
|
||||
|
@ -2079,9 +2077,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
|
|||
}
|
||||
|
||||
private void doCleanup(boolean failingOver) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("calling cleanup on " + this);
|
||||
}
|
||||
logger.debug("calling cleanup on {}", this);
|
||||
|
||||
synchronized (this) {
|
||||
closed = true;
|
||||
|
|
|
@ -438,17 +438,13 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
|
|||
|
||||
synchronized (this) {
|
||||
if (usedTopology != null && config.useTopologyForLoadBalancing && !useInitConnector) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Selecting connector from topology.");
|
||||
}
|
||||
int pos = loadBalancingPolicy.select(usedTopology.length);
|
||||
Pair<TransportConfiguration, TransportConfiguration> pair = usedTopology[pos];
|
||||
|
||||
return pair;
|
||||
} else {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Selecting connector from initial connectors.");
|
||||
}
|
||||
|
||||
int pos = loadBalancingPolicy.select(initialConnectors.length);
|
||||
|
||||
|
@ -573,7 +569,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
|
|||
TopologyMember topologyMember = topology.getMember(nodeID);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Creating connection factory towards " + nodeID + " = " + topologyMember + ", topology=" + topology.describe());
|
||||
logger.trace("Creating connection factory towards {} = {}, topology={}", nodeID, topologyMember, topology.describe());
|
||||
}
|
||||
|
||||
if (topologyMember == null) {
|
||||
|
@ -1320,9 +1316,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
|
|||
private void doClose(final boolean sendClose) {
|
||||
synchronized (stateGuard) {
|
||||
if (state == STATE.CLOSED) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug(this + " is already closed when calling closed");
|
||||
}
|
||||
logger.debug("{} is already closed when calling closed", this);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1427,7 +1421,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
|
|||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("nodeDown " + this + " nodeID=" + nodeID + " as being down", new Exception("trace"));
|
||||
logger.trace("nodeDown {} nodeID={} as being down", this, nodeID, new Exception("trace"));
|
||||
}
|
||||
|
||||
topology.removeMember(eventTime, nodeID);
|
||||
|
@ -1458,7 +1452,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
|
|||
final Pair<TransportConfiguration, TransportConfiguration> connectorPair,
|
||||
final boolean last) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("NodeUp " + this + "::nodeID=" + nodeID + ", connectorPair=" + connectorPair, new Exception("trace"));
|
||||
logger.trace("NodeUp {}::nodeID={}, connectorPair={}", this, nodeID, connectorPair, new Exception("trace"));
|
||||
}
|
||||
|
||||
TopologyMemberImpl member = new TopologyMemberImpl(nodeID, backupGroupName, scaleDownGroupName, connectorPair.getA(), connectorPair.getB());
|
||||
|
@ -1674,9 +1668,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
|
|||
while (!isClosed()) {
|
||||
retryNumber++;
|
||||
for (Connector conn : connectors) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::Submitting connect towards " + conn);
|
||||
}
|
||||
logger.trace("{}::Submitting connect towards {}", this, conn);
|
||||
|
||||
ClientSessionFactory csf = conn.tryConnect();
|
||||
|
||||
|
@ -1710,11 +1702,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
|
|||
});
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Returning " + csf +
|
||||
" after " +
|
||||
retryNumber +
|
||||
" retries on StaticConnector " +
|
||||
ServerLocatorImpl.this);
|
||||
logger.trace("Returning {} after {} retries on StaticConnector {}", csf, retryNumber, ServerLocatorImpl.this);
|
||||
}
|
||||
|
||||
return csf;
|
||||
|
@ -1787,9 +1775,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
|
|||
}
|
||||
|
||||
public ClientSessionFactory tryConnect() throws ActiveMQException {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.trace(this + "::Trying to connect to " + factory);
|
||||
}
|
||||
logger.trace("{}::Trying to connect to {}", this, factory);
|
||||
try {
|
||||
ClientSessionFactoryInternal factoryToUse = factory;
|
||||
if (factoryToUse != null) {
|
||||
|
@ -1803,7 +1789,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
|
|||
}
|
||||
return factoryToUse;
|
||||
} catch (ActiveMQException e) {
|
||||
logger.trace(this + "::Exception on establish connector initial connection", e);
|
||||
logger.trace("{}::Exception on establish connector initial connection", this, e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ public final class Topology {
|
|||
manager = null;
|
||||
}
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Topology@" + Integer.toHexString(System.identityHashCode(this)) + " CREATE", new Exception("trace"));
|
||||
logger.trace("Topology@{} CREATE", Integer.toHexString(System.identityHashCode(this)), new Exception("trace"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ public final class Topology {
|
|||
|
||||
public void addClusterTopologyListener(final ClusterTopologyListener listener) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::Adding topology listener " + listener, new Exception("Trace"));
|
||||
logger.trace("{}::Adding topology listener {}", this, listener, new Exception("Trace"));
|
||||
}
|
||||
synchronized (topologyListeners) {
|
||||
topologyListeners.add(listener);
|
||||
|
@ -118,7 +118,7 @@ public final class Topology {
|
|||
|
||||
public void removeClusterTopologyListener(final ClusterTopologyListener listener) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::Removing topology listener " + listener, new Exception("Trace"));
|
||||
logger.trace("{}::Removing topology listener {}", this, listener, new Exception("Trace"));
|
||||
}
|
||||
synchronized (topologyListeners) {
|
||||
topologyListeners.remove(listener);
|
||||
|
@ -131,7 +131,7 @@ public final class Topology {
|
|||
public void updateAsLive(final String nodeId, final TopologyMemberImpl memberInput) {
|
||||
synchronized (this) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug(this + "::node " + nodeId + "=" + memberInput);
|
||||
logger.debug("{}::node {}={}", this, nodeId, memberInput);
|
||||
}
|
||||
memberInput.setUniqueEventID(System.currentTimeMillis());
|
||||
topology.remove(nodeId);
|
||||
|
@ -161,14 +161,14 @@ public final class Topology {
|
|||
public TopologyMemberImpl updateBackup(final TopologyMemberImpl memberInput) {
|
||||
final String nodeId = memberInput.getNodeId();
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::updateBackup::" + nodeId + ", memberInput=" + memberInput);
|
||||
logger.trace("{}::updateBackup::{}, memberInput={}", this, nodeId, memberInput);
|
||||
}
|
||||
|
||||
synchronized (this) {
|
||||
TopologyMemberImpl currentMember = getMember(nodeId);
|
||||
if (currentMember == null) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("There's no live to be updated on backup update, node=" + nodeId + " memberInput=" + memberInput, new Exception("trace"));
|
||||
logger.trace("There's no live to be updated on backup update, node={} memberInput={}", nodeId, memberInput, new Exception("trace"));
|
||||
}
|
||||
|
||||
currentMember = memberInput;
|
||||
|
@ -196,12 +196,10 @@ public final class Topology {
|
|||
|
||||
Long deleteTme = getMapDelete().get(nodeId);
|
||||
if (deleteTme != null && uniqueEventID != 0 && uniqueEventID < deleteTme) {
|
||||
logger.debug("Update uniqueEvent=" + uniqueEventID +
|
||||
", nodeId=" +
|
||||
nodeId +
|
||||
", memberInput=" +
|
||||
memberInput +
|
||||
" being rejected as there was a delete done after that");
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Update uniqueEvent={}, nodeId={}, memberInput={} being rejected as there was a delete done after that",
|
||||
uniqueEventID, nodeId, memberInput);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -215,7 +213,7 @@ public final class Topology {
|
|||
|
||||
if (currentMember == null) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::NewMemberAdd nodeId=" + nodeId + " member = " + memberInput, new Exception("trace"));
|
||||
logger.trace("{}::NewMemberAdd nodeId={} member = {}", this, nodeId, memberInput, new Exception("trace"));
|
||||
}
|
||||
memberInput.setUniqueEventID(uniqueEventID);
|
||||
topology.put(nodeId, memberInput);
|
||||
|
@ -234,9 +232,8 @@ public final class Topology {
|
|||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::updated currentMember=nodeID=" + nodeId + ", currentMember=" +
|
||||
currentMember + ", memberInput=" + memberInput + "newMember=" +
|
||||
newMember, new Exception("trace"));
|
||||
logger.trace("{}::updated currentMember=nodeID={}, currentMember={}, memberInput={} newMember={}",
|
||||
this, nodeId, currentMember, memberInput, newMember, new Exception("trace"));
|
||||
}
|
||||
|
||||
if (uniqueEventID > currentMember.getUniqueEventID()) {
|
||||
|
@ -270,7 +267,7 @@ public final class Topology {
|
|||
final ArrayList<ClusterTopologyListener> copy = copyListeners();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + "::prepare to send " + nodeId + " to " + copy.size() + " elements");
|
||||
logger.trace("{}::prepare to send {} to {} elements", this, nodeId, copy.size());
|
||||
}
|
||||
|
||||
if (copy.size() > 0) {
|
||||
|
@ -279,12 +276,8 @@ public final class Topology {
|
|||
public void run() {
|
||||
for (ClusterTopologyListener listener : copy) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(Topology.this + " informing " +
|
||||
listener +
|
||||
" about node up = " +
|
||||
nodeId +
|
||||
" connector = " +
|
||||
memberToSend.getConnector());
|
||||
logger.trace("{} informing {} about node up = {} connector = {}",
|
||||
Topology.this, listener, nodeId, memberToSend.getConnector());
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -322,7 +315,7 @@ public final class Topology {
|
|||
member = topology.get(nodeId);
|
||||
if (member != null) {
|
||||
if (member.getUniqueEventID() > uniqueEventID) {
|
||||
logger.debug("The removeMember was issued before the node " + nodeId + " was started, ignoring call");
|
||||
logger.debug("The removeMember was issued before the node {} was started, ignoring call", nodeId);
|
||||
member = null;
|
||||
} else {
|
||||
getMapDelete().put(nodeId, uniqueEventID);
|
||||
|
@ -332,13 +325,8 @@ public final class Topology {
|
|||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("removeMember " + this +
|
||||
" removing nodeID=" +
|
||||
nodeId +
|
||||
", result=" +
|
||||
member +
|
||||
", size = " +
|
||||
topology.size(), new Exception("trace"));
|
||||
logger.trace("removeMember {} removing nodeID={}, result={}, size = {}",
|
||||
this, nodeId, member, topology.size(), new Exception("trace"));
|
||||
}
|
||||
|
||||
if (member != null) {
|
||||
|
@ -349,7 +337,7 @@ public final class Topology {
|
|||
public void run() {
|
||||
for (ClusterTopologyListener listener : copy) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + " informing " + listener + " about node down = " + nodeId);
|
||||
logger.trace("{} informing {} about node down = {}", this, listener, nodeId);
|
||||
}
|
||||
try {
|
||||
listener.nodeDown(uniqueEventID, nodeId);
|
||||
|
@ -364,9 +352,7 @@ public final class Topology {
|
|||
}
|
||||
|
||||
public synchronized void sendTopology(final ClusterTopologyListener listener) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug(this + " is sending topology to " + listener);
|
||||
}
|
||||
logger.debug("{} is sending topology to {}", this, listener);
|
||||
|
||||
executor.execute(new Runnable() {
|
||||
@Override
|
||||
|
@ -381,12 +367,7 @@ public final class Topology {
|
|||
|
||||
for (Map.Entry<String, TopologyMemberImpl> entry : copy.entrySet()) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug(Topology.this + " sending " +
|
||||
entry.getKey() +
|
||||
" / " +
|
||||
entry.getValue().getConnector() +
|
||||
" to " +
|
||||
listener);
|
||||
logger.debug("{} sending {} / {} to {}", Topology.this, entry.getKey(), entry.getValue().getConnector(), listener);
|
||||
}
|
||||
listener.nodeUP(entry.getValue(), ++count == copy.size());
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ public final class DiscoveryGroup implements ActiveMQComponent {
|
|||
return;
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled()) logger.debug("Starting Discovery Group for " + name);
|
||||
logger.debug("Starting Discovery Group for {}", name);
|
||||
|
||||
endpoint.openClient();
|
||||
|
||||
|
@ -123,7 +123,7 @@ public final class DiscoveryGroup implements ActiveMQComponent {
|
|||
|
||||
thread = tfactory.newThread(new DiscoveryRunnable());
|
||||
|
||||
if (logger.isDebugEnabled()) logger.debug("Starting daemon thread");
|
||||
logger.debug("Starting daemon thread");
|
||||
|
||||
thread.start();
|
||||
|
||||
|
@ -169,9 +169,7 @@ public final class DiscoveryGroup implements ActiveMQComponent {
|
|||
|
||||
try {
|
||||
endpoint.close(false);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("endpoing closed");
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
ActiveMQClientLogger.LOGGER.errorStoppingDiscoveryBroadcastEndpoint(endpoint, e1);
|
||||
}
|
||||
|
@ -279,14 +277,12 @@ public final class DiscoveryGroup implements ActiveMQComponent {
|
|||
ActiveMQClientLogger.LOGGER.unexpectedNullDataReceived();
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Received broadcast data as null");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("receiving " + data.length);
|
||||
logger.debug("receiving {}", data.length);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
if (!started) {
|
||||
|
@ -306,9 +302,7 @@ public final class DiscoveryGroup implements ActiveMQComponent {
|
|||
|
||||
if (nodeID.equals(originatingNodeID)) {
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("ignoring original NodeID" + originatingNodeID + " receivedID = " + nodeID);
|
||||
}
|
||||
logger.debug("ignoring original NodeID{} receivedID = {}", originatingNodeID, nodeID);
|
||||
if (checkExpiration()) {
|
||||
callListeners();
|
||||
}
|
||||
|
@ -316,9 +310,7 @@ public final class DiscoveryGroup implements ActiveMQComponent {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Received nodeID " + nodeID + " with originatingID = " + originatingNodeID);
|
||||
}
|
||||
logger.debug("Received nodeID{} with originatingID = {}", nodeID, originatingNodeID);
|
||||
|
||||
int size = buffer.readInt();
|
||||
|
||||
|
@ -336,9 +328,9 @@ public final class DiscoveryGroup implements ActiveMQComponent {
|
|||
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Received " + entriesRead.length + " discovery entry elements");
|
||||
logger.debug("Received {} discovery entry elements", entriesRead.length);
|
||||
for (DiscoveryEntry entryDisco : entriesRead) {
|
||||
logger.debug("" + entryDisco);
|
||||
logger.debug("{}", entryDisco);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -353,7 +345,7 @@ public final class DiscoveryGroup implements ActiveMQComponent {
|
|||
changed = changed || checkExpiration();
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("changed = " + changed);
|
||||
logger.debug("changed = {}", changed);
|
||||
}
|
||||
}
|
||||
//only call the listeners if we have changed
|
||||
|
@ -365,18 +357,13 @@ public final class DiscoveryGroup implements ActiveMQComponent {
|
|||
logger.trace("{}", connector);
|
||||
}
|
||||
}
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Calling listeners");
|
||||
}
|
||||
callListeners();
|
||||
}
|
||||
|
||||
synchronized (waitLock) {
|
||||
received = true;
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Calling notifyAll");
|
||||
}
|
||||
waitLock.notifyAll();
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
|
@ -422,9 +409,7 @@ public final class DiscoveryGroup implements ActiveMQComponent {
|
|||
Map.Entry<String, DiscoveryEntry> entry = iter.next();
|
||||
|
||||
if (entry.getValue().getLastUpdate() + timeout <= now) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Timed out node on discovery:" + entry.getValue());
|
||||
}
|
||||
logger.trace("Timed out node on discovery:{}", entry.getValue());
|
||||
iter.remove();
|
||||
|
||||
changed = true;
|
||||
|
|
|
@ -625,16 +625,16 @@ public class CoreMessage extends RefCountMessage implements ICoreMessage {
|
|||
|
||||
private RuntimeException onCheckPropertiesError(Throwable e) {
|
||||
// This is not an expected error, hence no specific logger created
|
||||
logger.warn("Could not decode properties for CoreMessage[messageID=" + messageID + ",durable=" + durable + ",userID=" + userID + ",priority=" + priority +
|
||||
", timestamp=" + timestamp + ",expiration=" + expiration + ",address=" + address + ", propertiesLocation=" + propertiesLocation, e);
|
||||
logger.warn("Could not decode properties for CoreMessage[messageID={},durable={},userID={},priority={}, timestamp={},expiration={},address={}, propertiesLocation={}",
|
||||
messageID, durable, userID, priority, timestamp, expiration, address, propertiesLocation, e);
|
||||
final ByteBuf buffer = this.buffer;
|
||||
if (buffer != null) {
|
||||
//risky: a racy modification to buffer indexes could break this duplicate operation
|
||||
final ByteBuf duplicatebuffer = buffer.duplicate();
|
||||
duplicatebuffer.readerIndex(0);
|
||||
logger.warn("Failed message has messageID=" + messageID + " and the following buffer:\n" + ByteBufUtil.prettyHexDump(duplicatebuffer));
|
||||
logger.warn("Failed message has messageID={} and the following buffer:\n{}", messageID, ByteBufUtil.prettyHexDump(duplicatebuffer));
|
||||
} else {
|
||||
logger.warn("Failed message has messageID=" + messageID + " and the buffer was null");
|
||||
logger.warn("Failed message has messageID={} and the buffer was null", messageID);
|
||||
}
|
||||
return new RuntimeException(e.getMessage(), e);
|
||||
}
|
||||
|
|
|
@ -529,9 +529,7 @@ public class ActiveMQClientProtocolManager implements ClientProtocolManager {
|
|||
}
|
||||
|
||||
if (topMessage.isExit()) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Notifying " + topMessage.getNodeID() + " going down");
|
||||
}
|
||||
logger.debug("Notifying {} going down", topMessage.getNodeID());
|
||||
|
||||
if (topologyResponseHandler != null) {
|
||||
topologyResponseHandler.notifyNodeDown(eventUID, topMessage.getNodeID());
|
||||
|
|
|
@ -498,7 +498,7 @@ public class ActiveMQSessionContext extends SessionContext {
|
|||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("finished commit on " + ClientSessionImpl.convert(xid) + " with response = " + response);
|
||||
logger.trace("finished commit on {} with response = {}", ClientSessionImpl.convert(xid), response);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -662,7 +662,7 @@ public class ActiveMQSessionContext extends SessionContext {
|
|||
buffer.append(",");
|
||||
}
|
||||
}
|
||||
logger.trace("xaScan returning " + xidArray.length + " xids = [" + buffer.toString() + "]");
|
||||
logger.trace("xaScan returning {} xids = [{}]", xidArray.length, buffer.toString());
|
||||
}
|
||||
|
||||
return xidArray;
|
||||
|
|
|
@ -261,7 +261,8 @@ public final class ChannelImpl implements Channel {
|
|||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("RemotingConnectionID=" + (connection == null ? "NULL" : connection.getID()) + " Sending packet nonblocking " + packet + " on channelID=" + id);
|
||||
logger.trace("RemotingConnectionID={} Sending packet nonblocking {} on channelID={}",
|
||||
(connection == null ? "NULL" : connection.getID()), packet, id);
|
||||
}
|
||||
|
||||
ActiveMQBuffer buffer = packet.encode(connection);
|
||||
|
@ -287,7 +288,7 @@ public final class ChannelImpl implements Channel {
|
|||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("RemotingConnectionID=" + (connection == null ? "NULL" : connection.getID()) + " Writing buffer for channelID=" + id);
|
||||
logger.trace("RemotingConnectionID={} Writing buffer for channelID={}", (connection == null ? "NULL" : connection.getID()), id);
|
||||
}
|
||||
|
||||
//We do this outside the lock as ResponseCache is threadsafe and allows responses to come in,
|
||||
|
@ -378,7 +379,8 @@ public final class ChannelImpl implements Channel {
|
|||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("RemotingConnectionID=" + (connection == null ? "NULL" : connection.getID()) + " Sending packet nonblocking " + packet + " on channelID=" + id);
|
||||
logger.trace("RemotingConnectionID={} Sending packet nonblocking {} on channelID={}",
|
||||
(connection == null ? "NULL" : connection.getID()), packet, id);
|
||||
}
|
||||
|
||||
ActiveMQBuffer buffer = packet.encode(connection);
|
||||
|
@ -404,7 +406,7 @@ public final class ChannelImpl implements Channel {
|
|||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("RemotingConnectionID=" + (connection == null ? "NULL" : connection.getID()) + " Writing buffer for channelID=" + id);
|
||||
logger.trace("RemotingConnectionID={} Writing buffer for channelID={}", (connection == null ? "NULL" : connection.getID()), id);
|
||||
}
|
||||
|
||||
checkReconnectID(reconnectID);
|
||||
|
@ -461,7 +463,7 @@ public final class ChannelImpl implements Channel {
|
|||
|
||||
if (interceptionResult != null) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("RemotingConnectionID=" + (connection == null ? "NULL" : connection.getID()) + " interceptionResult=" + interceptionResult);
|
||||
logger.trace("RemotingConnectionID={} interceptionResult={}", (connection == null ? "NULL" : connection.getID()), interceptionResult);
|
||||
}
|
||||
// if we don't throw an exception here the client might not unblock
|
||||
throw ActiveMQClientMessageBundle.BUNDLE.interceptorRejectedPacket(interceptionResult);
|
||||
|
@ -469,14 +471,14 @@ public final class ChannelImpl implements Channel {
|
|||
|
||||
if (closed) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("RemotingConnectionID=" + (connection == null ? "NULL" : connection.getID()) + " closed.");
|
||||
logger.trace("RemotingConnectionID={} closed.", (connection == null ? "NULL" : connection.getID()));
|
||||
}
|
||||
throw ActiveMQClientMessageBundle.BUNDLE.connectionDestroyed();
|
||||
}
|
||||
|
||||
if (connection.getBlockingCallTimeout() == -1) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("RemotingConnectionID=" + (connection == null ? "NULL" : connection.getID()) + " Cannot do a blocking call timeout on a server side connection");
|
||||
logger.trace("RemotingConnectionID={} Cannot do a blocking call timeout on a server side connection", (connection == null ? "NULL" : connection.getID()));
|
||||
}
|
||||
throw new IllegalStateException("Cannot do a blocking call timeout on a server side connection");
|
||||
}
|
||||
|
@ -506,7 +508,7 @@ public final class ChannelImpl implements Channel {
|
|||
checkReconnectID(reconnectID);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("RemotingConnectionID=" + (connection == null ? "NULL" : connection.getID()) + " Sending blocking " + packet);
|
||||
logger.trace("RemotingConnectionID={} Sending blocking {}", (connection == null ? "NULL" : connection.getID()), packet);
|
||||
}
|
||||
|
||||
connection.getTransportConnection().write(buffer, false, false);
|
||||
|
@ -603,7 +605,7 @@ public final class ChannelImpl implements Channel {
|
|||
if (confWindowSize < 0) {
|
||||
final String msg = "You can't set confirmationHandler on a connection with confirmation-window-size < 0." + " Look at the documentation for more information.";
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("RemotingConnectionID=" + (connection == null ? "NULL" : connection.getID()) + " " + msg);
|
||||
logger.trace("RemotingConnectionID={} {}", (connection == null ? "NULL" : connection.getID()), msg);
|
||||
}
|
||||
throw new IllegalStateException(msg);
|
||||
}
|
||||
|
@ -615,7 +617,7 @@ public final class ChannelImpl implements Channel {
|
|||
if (confWindowSize < 0) {
|
||||
final String msg = "You can't set responseHandler on a connection with confirmation-window-size < 0." + " Look at the documentation for more information.";
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("RemotingConnectionID=" + (connection == null ? "NULL" : connection.getID()) + " " + msg);
|
||||
logger.trace("RemotingConnectionID={} {}", (connection == null ? "NULL" : connection.getID()), msg);
|
||||
}
|
||||
throw new IllegalStateException(msg);
|
||||
}
|
||||
|
@ -625,7 +627,7 @@ public final class ChannelImpl implements Channel {
|
|||
@Override
|
||||
public void setHandler(final ChannelHandler handler) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("RemotingConnectionID=" + (connection == null ? "NULL" : connection.getID()) + " Setting handler on " + this + " as " + handler);
|
||||
logger.trace("RemotingConnectionID={} Setting handler on {} as {}", (connection == null ? "NULL" : connection.getID()), this, handler);
|
||||
}
|
||||
|
||||
this.handler = handler;
|
||||
|
@ -673,7 +675,9 @@ public final class ChannelImpl implements Channel {
|
|||
connection.removeChannel(id);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("RemotingConnectionID=" + (connection == null ? "NULL" : connection.getID()) + " transferConnection to new RemotingConnectionID=" + (newConnection == null ? "NULL" : newConnection.getID()));
|
||||
logger.trace("RemotingConnectionID={} transferConnection to new RemotingConnectionID={}",
|
||||
(connection == null ? "NULL" : connection.getID()),
|
||||
(newConnection == null ? "NULL" : newConnection.getID()));
|
||||
}
|
||||
|
||||
// And switch it
|
||||
|
@ -690,7 +694,7 @@ public final class ChannelImpl implements Channel {
|
|||
public void replayCommands(final int otherLastConfirmedCommandID) {
|
||||
if (resendCache != null) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("RemotingConnectionID=" + (connection == null ? "NULL" : connection.getID()) + " Replaying commands on channelID=" + id);
|
||||
logger.trace("RemotingConnectionID={} Replaying commands on channelID={}", (connection == null ? "NULL" : connection.getID()), id);
|
||||
}
|
||||
clearUpTo(otherLastConfirmedCommandID);
|
||||
|
||||
|
@ -708,7 +712,7 @@ public final class ChannelImpl implements Channel {
|
|||
@Override
|
||||
public void lock() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("RemotingConnectionID=" + (connection == null ? "NULL" : connection.getID()) + " lock channel " + this);
|
||||
logger.trace("RemotingConnectionID={} lock channel {}", (connection == null ? "NULL" : connection.getID()), this);
|
||||
}
|
||||
lock.lock();
|
||||
|
||||
|
@ -722,7 +726,7 @@ public final class ChannelImpl implements Channel {
|
|||
@Override
|
||||
public void unlock() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("RemotingConnectionID=" + (connection == null ? "NULL" : connection.getID()) + " unlock channel " + this);
|
||||
logger.trace("RemotingConnectionID={} unlock channel {}", (connection == null ? "NULL" : connection.getID()), this);
|
||||
}
|
||||
lock.lock();
|
||||
|
||||
|
@ -749,7 +753,8 @@ public final class ChannelImpl implements Channel {
|
|||
confirmed.setChannelID(id);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("RemotingConnectionID=" + (connection == null ? "NULL" : connection.getID()) + " ChannelImpl::flushConfirmation flushing confirmation " + confirmed);
|
||||
logger.trace("RemotingConnectionID={} ChannelImpl::flushConfirmation flushing confirmation {}",
|
||||
(connection == null ? "NULL" : connection.getID()), confirmed);
|
||||
}
|
||||
|
||||
doWrite(confirmed);
|
||||
|
@ -768,7 +773,8 @@ public final class ChannelImpl implements Channel {
|
|||
lastConfirmedCommandID.incrementAndGet();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("RemotingConnectionID=" + (connection == null ? "NULL" : connection.getID()) + " ChannelImpl::confirming packet " + packet + " last commandID=" + lastConfirmedCommandID);
|
||||
logger.trace("RemotingConnectionID={} ChannelImpl::confirming packet {} last commandID={}",
|
||||
(connection == null ? "NULL" : connection.getID()), packet, lastConfirmedCommandID);
|
||||
}
|
||||
|
||||
receivedBytes += packet.getPacketSize();
|
||||
|
@ -840,7 +846,8 @@ public final class ChannelImpl implements Channel {
|
|||
resendCache.add(packet);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("RemotingConnectionID=" + (connection == null ? "NULL" : connection.getID()) + " ChannelImpl::addResendPacket adding packet " + packet + " stored commandID=" + firstStoredCommandID + " possible commandIDr=" + (firstStoredCommandID + resendCache.size()));
|
||||
logger.trace("RemotingConnectionID={} ChannelImpl::addResendPacket adding packet {} stored commandID={} possible commandIDr={}",
|
||||
(connection == null ? "NULL" : connection.getID()), packet, firstStoredCommandID, (firstStoredCommandID + resendCache.size()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -848,7 +855,8 @@ public final class ChannelImpl implements Channel {
|
|||
final int numberToClear = 1 + lastReceivedCommandID - firstStoredCommandID;
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("RemotingConnectionID=" + (connection == null ? "NULL" : connection.getID()) + " ChannelImpl::clearUpTo lastReceived commandID=" + lastReceivedCommandID + " first commandID=" + firstStoredCommandID + " number to clear " + numberToClear);
|
||||
logger.trace("RemotingConnectionID={} ChannelImpl::clearUpTo lastReceived commandID={} first commandID={} number to clear {}",
|
||||
(connection == null ? "NULL" : connection.getID()), lastReceivedCommandID, firstStoredCommandID, numberToClear);
|
||||
}
|
||||
|
||||
for (int i = 0; i < numberToClear; i++) {
|
||||
|
@ -861,7 +869,8 @@ public final class ChannelImpl implements Channel {
|
|||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("RemotingConnectionID=" + connection.getID() + " ChannelImpl::clearUpTo confirming " + packet + " towards " + commandConfirmationHandler);
|
||||
logger.trace("RemotingConnectionID={} ChannelImpl::clearUpTo confirming {} towards {}",
|
||||
connection.getID(), packet, commandConfirmationHandler);
|
||||
}
|
||||
if (commandConfirmationHandler != null) {
|
||||
commandConfirmationHandler.commandConfirmed(packet);
|
||||
|
|
|
@ -132,9 +132,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
|
|||
|
||||
transportConnection.setProtocolConnection(this);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("RemotingConnectionImpl created: " + this);
|
||||
}
|
||||
logger.trace("RemotingConnectionImpl created: {}", this);
|
||||
}
|
||||
|
||||
// RemotingConnection implementation
|
||||
|
@ -380,7 +378,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
|
|||
final Packet packet = packetDecoder.decode(buffer, this);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("RemotingConnectionID=" + getID() + " handling packet " + packet);
|
||||
logger.trace("RemotingConnectionID={} handling packet {}", getID(), packet);
|
||||
}
|
||||
|
||||
doBufferReceived(packet);
|
||||
|
|
|
@ -119,14 +119,13 @@ public class CertificateUtil {
|
|||
x509Certs[i] = (X509Certificate) CertificateFactory
|
||||
.getInstance("X.509").generateCertificate(new ByteArrayInputStream(plainCerts[i].getEncoded()));
|
||||
} catch (Exception ex) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Failed to convert SSL cert", ex);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Cert #" + i + " = " + x509Certs[i]);
|
||||
logger.trace("Cert #{} = {}", i, x509Certs[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -246,7 +246,8 @@ public class NettyConnection implements Connection {
|
|||
} catch (OutOfMemoryError oom) {
|
||||
final long totalPendingWriteBytes = batchBufferSize(this.channel);
|
||||
// I'm not using the ActiveMQLogger framework here, as I wanted the class name to be very specific here
|
||||
logger.warn("Trying to allocate " + size + " bytes, System is throwing OutOfMemoryError on NettyConnection " + this + ", there are currently " + "pendingWrites: [NETTY] -> " + totalPendingWriteBytes + " causes: " + oom.getMessage(), oom);
|
||||
logger.warn("Trying to allocate {} bytes, System is throwing OutOfMemoryError on NettyConnection {}, there are currently pendingWrites: [NETTY] -> {} causes: {}",
|
||||
size, this, totalPendingWriteBytes, oom.getMessage(), oom);
|
||||
throw oom;
|
||||
}
|
||||
}
|
||||
|
@ -309,13 +310,11 @@ public class NettyConnection implements Connection {
|
|||
if (Env.isTestEnv()) {
|
||||
// this will only show when inside the testsuite.
|
||||
// we may great the log for FAILURE
|
||||
logger.warn("FAILURE! The code is using blockUntilWritable inside a Netty worker, which would block. " + "The code will probably need fixing!", new Exception("trace"));
|
||||
logger.warn("FAILURE! The code is using blockUntilWritable inside a Netty worker, which would block. The code will probably need fixing!", new Exception("trace"));
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Calling blockUntilWritable using a thread where it's not allowed");
|
||||
}
|
||||
}
|
||||
return channel.isWritable();
|
||||
} else {
|
||||
final long timeoutNanos = timeUnit.toNanos(timeout);
|
||||
|
@ -382,11 +381,9 @@ public class NettyConnection implements Connection {
|
|||
if (!channel.eventLoop().inEventLoop()) {
|
||||
waitFor(promise, DEFAULT_WAIT_MILLIS);
|
||||
} else {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Calling write with flush from a thread where it's not allowed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getRemoteAddress() {
|
||||
|
|
|
@ -523,7 +523,7 @@ public class NettyConnector extends AbstractConnector {
|
|||
}
|
||||
connectorType = EPOLL_CONNECTOR_TYPE;
|
||||
channelClazz = EpollSocketChannel.class;
|
||||
logger.debug("Connector " + this + " using native epoll");
|
||||
logger.debug("Connector {} using native epoll", this);
|
||||
} else if (useKQueue && CheckDependencies.isKQueueAvailable()) {
|
||||
if (useGlobalWorkerPool) {
|
||||
group = SharedEventLoopGroup.getInstance((threadFactory -> new KQueueEventLoopGroup(remotingThreads, threadFactory)));
|
||||
|
@ -532,7 +532,7 @@ public class NettyConnector extends AbstractConnector {
|
|||
}
|
||||
connectorType = KQUEUE_CONNECTOR_TYPE;
|
||||
channelClazz = KQueueSocketChannel.class;
|
||||
logger.debug("Connector " + this + " using native kqueue");
|
||||
logger.debug("Connector {} using native kqueue", this);
|
||||
} else {
|
||||
if (useGlobalWorkerPool) {
|
||||
channelClazz = NioSocketChannel.class;
|
||||
|
@ -543,7 +543,7 @@ public class NettyConnector extends AbstractConnector {
|
|||
}
|
||||
connectorType = NIO_CONNECTOR_TYPE;
|
||||
channelClazz = NioSocketChannel.class;
|
||||
logger.debug("Connector + " + this + " using nio");
|
||||
logger.debug("Connector {} using nio", this);
|
||||
}
|
||||
// if we are a servlet wrap the socketChannelFactory
|
||||
|
||||
|
@ -642,7 +642,7 @@ public class NettyConnector extends AbstractConnector {
|
|||
|
||||
channel.pipeline().addLast(proxyHandler);
|
||||
|
||||
logger.debug("Using a SOCKS proxy at " + proxyHost + ":" + proxyPort);
|
||||
logger.debug("Using a SOCKS proxy at {}:{}", proxyHost, proxyPort);
|
||||
|
||||
if (proxyRemoteDNS) {
|
||||
bootstrap.resolver(NoopAddressResolverGroup.INSTANCE);
|
||||
|
@ -848,7 +848,7 @@ public class NettyConnector extends AbstractConnector {
|
|||
remoteDestination = new InetSocketAddress(IPV6Util.stripBracketsAndZoneID(host), port);
|
||||
}
|
||||
|
||||
logger.debug("Remote destination: " + remoteDestination);
|
||||
logger.debug("Remote destination: {}", remoteDestination);
|
||||
|
||||
ChannelFuture future;
|
||||
//port 0 does not work so only use local address if set
|
||||
|
@ -1014,9 +1014,8 @@ public class NettyConnector extends AbstractConnector {
|
|||
*/
|
||||
@Override
|
||||
public void channelRead0(ChannelHandlerContext ctx, HttpObject msg) throws Exception {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Received msg=" + msg);
|
||||
}
|
||||
logger.debug("Received msg={}", msg);
|
||||
|
||||
if (msg instanceof HttpResponse) {
|
||||
HttpResponse response = (HttpResponse) msg;
|
||||
if (response.status().code() == HttpResponseStatus.SWITCHING_PROTOCOLS.code() && response.headers().get(HttpHeaderNames.UPGRADE).equals(ACTIVEMQ_REMOTING)) {
|
||||
|
@ -1279,11 +1278,13 @@ public class NettyConnector extends AbstractConnector {
|
|||
String host = ConfigurationHelper.getStringProperty(TransportConstants.HOST_PROP_NAME, TransportConstants.DEFAULT_HOST, configuration);
|
||||
int port = ConfigurationHelper.getIntProperty(TransportConstants.PORT_PROP_NAME, TransportConstants.DEFAULT_PORT, configuration);
|
||||
|
||||
if (port != this.port)
|
||||
if (port != this.port) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (host.equals(this.host))
|
||||
if (host.equals(this.host)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
//The host may be an alias. We need to compare raw IP address.
|
||||
boolean result = false;
|
||||
|
@ -1292,7 +1293,10 @@ public class NettyConnector extends AbstractConnector {
|
|||
InetAddress inetAddr2 = InetAddress.getByName(this.host);
|
||||
String ip1 = inetAddr1.getHostAddress();
|
||||
String ip2 = inetAddr2.getHostAddress();
|
||||
logger.debug(this + " host 1: " + host + " ip address: " + ip1 + " host 2: " + this.host + " ip address: " + ip2);
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("{} host 1: {} ip address: {} host 2: {} ip address: {}", this, host, ip1, this.host, ip2);
|
||||
}
|
||||
|
||||
result = ip1.equals(ip2);
|
||||
} catch (UnknownHostException e) {
|
||||
|
|
|
@ -51,7 +51,7 @@ public class AutoCreateUtil {
|
|||
.setAddress(destAddress);
|
||||
setRequiredQueueConfigurationIfNotSet(queueConfiguration,response, RoutingType.ANYCAST, selectorString, true);
|
||||
session.createQueue(queueConfiguration);
|
||||
logger.debug("The queue " + destAddress + " was created automatically");
|
||||
logger.debug("The queue {} was created automatically", destAddress);
|
||||
} catch (ActiveMQQueueExistsException e) {
|
||||
// The queue was created by another client/admin between the query check and send create queue packet
|
||||
}
|
||||
|
|
|
@ -287,7 +287,7 @@ public final class XMLUtil {
|
|||
sysProp = val;
|
||||
}
|
||||
// interesting choice to replace with val == "" with no match!
|
||||
logger.debug("replacing " + subString + " with " + sysProp);
|
||||
logger.debug("replacing {} with {}", subString, sysProp);
|
||||
xml = xml.replace(subString, sysProp);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ public class ConnectorTransportConfigurationParserURITest {
|
|||
System.out.println(transportURI);
|
||||
List<TransportConfiguration> objects = parser.newObject(transportURI, "test");
|
||||
if (logger.isInfoEnabled()) {
|
||||
objects.forEach((t) -> logger.info("transportConfig:" + t.toString()));
|
||||
objects.forEach(t -> logger.info("transportConfig: {}", t));
|
||||
}
|
||||
|
||||
Assert.assertEquals(3, objects.size());
|
||||
|
|
|
@ -169,7 +169,7 @@ public class JDBCSequentialFile implements SequentialFile {
|
|||
int noBytes = dbDriver.writeToFile(this, data, append);
|
||||
seek(append ? writePosition + noBytes : noBytes);
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Write: ID: " + this.getId() + " FileName: " + this.getFileName() + size());
|
||||
logger.trace("Write: ID: {} FileName: {}{}", getId(), getFileName(), size());
|
||||
}
|
||||
if (callback != null)
|
||||
callback.done();
|
||||
|
@ -371,10 +371,7 @@ public class JDBCSequentialFile implements SequentialFile {
|
|||
JDBCSequentialFile clone = (JDBCSequentialFile) cloneFile;
|
||||
try {
|
||||
synchronized (writeLock) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("JDBC Copying File. From: " + this + " To: " + cloneFile);
|
||||
}
|
||||
|
||||
logger.trace("JDBC Copying File. From: {} To: {}", this, cloneFile);
|
||||
clone.open();
|
||||
dbDriver.copyFileData(this, clone);
|
||||
clone.setWritePosition(writePosition);
|
||||
|
|
|
@ -164,7 +164,9 @@ public class JDBCSequentialFileFactoryDriver extends AbstractJDBCDriver {
|
|||
if (blob != null) {
|
||||
file.setWritePosition(blob.length());
|
||||
} else {
|
||||
logger.trace("No Blob found for file: " + file.getFileName() + " " + file.getId());
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("No Blob found for file: {} {}", file.getFileName(), file.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
connection.commit();
|
||||
|
|
|
@ -221,10 +221,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
|
||||
for (JDBCJournalRecord record : recordRef) {
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("sync::preparing JDBC statement for " + record);
|
||||
}
|
||||
|
||||
logger.trace("sync::preparing JDBC statement for {}", record);
|
||||
|
||||
switch (record.getRecordType()) {
|
||||
case JDBCJournalRecord.DELETE_RECORD:
|
||||
|
@ -261,9 +258,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
deleteJournalTxRecords.executeBatch();
|
||||
|
||||
connection.commit();
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("JDBC commit worked");
|
||||
}
|
||||
|
||||
if (cleanupTxRecords(deletedRecords, committedTransactions, deleteJournalTxRecords)) {
|
||||
deleteJournalTxRecords.executeBatch();
|
||||
|
@ -285,9 +280,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
failed.set(true);
|
||||
criticalIOErrorListener.onIOException(e, "Critical IO Error. Failed to process JDBC Record statements", null);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Rolling back Transaction, just in case");
|
||||
}
|
||||
|
||||
if (recordRef != null) {
|
||||
executeCallbacks(recordRef, false);
|
||||
|
@ -334,7 +327,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
public void run() {
|
||||
for (JDBCJournalRecord record : records) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Calling callback " + record + " with success = " + success);
|
||||
logger.trace("Calling callback {} with success = {}", record, success);
|
||||
}
|
||||
record.complete(success);
|
||||
}
|
||||
|
@ -367,9 +360,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
// better to be safe ;)
|
||||
checkStatus();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendRecord " + record);
|
||||
}
|
||||
logger.trace("appendRecord {}", record);
|
||||
|
||||
record.storeLineUp();
|
||||
if (!started) {
|
||||
|
@ -401,7 +392,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
private synchronized void addTxRecord(JDBCJournalRecord record) throws Exception {
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("addTxRecord " + record + ", started=" + started + ", failed=" + failed);
|
||||
logger.trace("addTxRecord {}, started={}, failed={}", record, started, failed);
|
||||
}
|
||||
|
||||
checkStatus();
|
||||
|
@ -434,12 +425,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
r.setRecord(record);
|
||||
r.setSync(sync);
|
||||
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendAddRecord bytes[] " + r);
|
||||
}
|
||||
|
||||
|
||||
logger.trace("appendAddRecord bytes[] {}", r);
|
||||
|
||||
appendRecord(r);
|
||||
}
|
||||
|
@ -451,10 +437,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
r.setRecord(persister, record);
|
||||
r.setSync(sync);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendAddRecord (encoding) " + r + " with record = " + record);
|
||||
}
|
||||
|
||||
logger.trace("appendAddRecord (encoding) {} with record = {}", r, record);
|
||||
|
||||
appendRecord(r);
|
||||
}
|
||||
|
@ -474,10 +457,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
r.setSync(sync);
|
||||
r.setIoCompletion(completionCallback);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendAddRecord (completionCallback & encoding) " + r + " with record = " + record);
|
||||
}
|
||||
|
||||
logger.trace("appendAddRecord (completionCallback & encoding) {} with record = {}", r, record);
|
||||
|
||||
appendRecord(r);
|
||||
}
|
||||
|
@ -491,10 +471,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
r.setRecord(record);
|
||||
r.setSync(sync);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendUpdateRecord (bytes)) " + r);
|
||||
}
|
||||
|
||||
logger.trace("appendUpdateRecord (bytes)) {}", r);
|
||||
|
||||
appendRecord(r);
|
||||
}
|
||||
|
@ -511,10 +488,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
r.setRecord(persister, record);
|
||||
r.setSync(sync);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendUpdateRecord (encoding)) " + r + " with record " + record);
|
||||
}
|
||||
|
||||
logger.trace("appendUpdateRecord (encoding)) {} with record {}", r, record);
|
||||
|
||||
appendRecord(r);
|
||||
}
|
||||
|
@ -539,10 +513,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
r.setSync(sync);
|
||||
r.setIoCompletion(completionCallback);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendUpdateRecord (encoding & completioncallback)) " + r + " with record " + record);
|
||||
}
|
||||
|
||||
logger.trace("appendUpdateRecord (encoding & completioncallback)) {} with record {}", r, record);
|
||||
|
||||
appendRecord(r);
|
||||
}
|
||||
|
@ -569,7 +540,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
r.setSync(sync);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendDeleteRecord id=" + id + " sync=" + sync);
|
||||
logger.trace("appendDeleteRecord id={} sync={}", id, sync);
|
||||
}
|
||||
|
||||
appendRecord(r);
|
||||
|
@ -589,10 +560,9 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
r.setIoCompletion(completionCallback);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendDeleteRecord id=" + id + " sync=" + sync + " with completionCallback");
|
||||
logger.trace("appendDeleteRecord id={} sync={} with completionCallback", id, sync);
|
||||
}
|
||||
|
||||
|
||||
appendRecord(r);
|
||||
}
|
||||
|
||||
|
@ -612,10 +582,8 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
appendRecord(r);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendAddRecordTransactional txID=" + txID + " id=" + id + " using bytes[] r=" + r);
|
||||
logger.trace("appendAddRecordTransactional txID={} id={} using bytes[] r={}", txID, id, r);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -630,10 +598,9 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
r.setTxId(txID);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendAddRecordTransactional txID=" + txID + " id=" + id + " using encoding=" + record + " and r=" + r);
|
||||
logger.trace("appendAddRecordTransactional txID={} id={} using encoding={} and r={}", txID, id, record, r);
|
||||
}
|
||||
|
||||
|
||||
appendRecord(r);
|
||||
}
|
||||
|
||||
|
@ -647,10 +614,9 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
r.setTxId(txID);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendUpdateRecordTransactional txID=" + txID + " id=" + id + " using bytes and r=" + r);
|
||||
logger.trace("appendUpdateRecordTransactional txID={} id={} using bytes and r={}", txID, id, r);
|
||||
}
|
||||
|
||||
|
||||
appendRecord(r);
|
||||
}
|
||||
|
||||
|
@ -666,7 +632,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
r.setTxId(txID);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendUpdateRecordTransactional txID=" + txID + " id=" + id + " using encoding=" + record + " and r=" + r);
|
||||
logger.trace("appendUpdateRecordTransactional txID={} id={} using encoding={} and r={}", txID, id, record, r);
|
||||
}
|
||||
|
||||
appendRecord(r);
|
||||
|
@ -681,7 +647,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
r.setTxId(txID);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendDeleteRecordTransactional txID=" + txID + " id=" + id + " using bytes and r=" + r);
|
||||
logger.trace("appendDeleteRecordTransactional txID={} id={} using bytes and r={}", txID, id, r);
|
||||
}
|
||||
|
||||
appendRecord(r);
|
||||
|
@ -696,10 +662,9 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
r.setTxId(txID);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendDeleteRecordTransactional txID=" + txID + " id=" + id + " using encoding=" + record + " and r=" + r);
|
||||
logger.trace("appendDeleteRecordTransactional txID={} id={} using encoding={} and r={}", txID, id, record, r);
|
||||
}
|
||||
|
||||
|
||||
appendRecord(r);
|
||||
}
|
||||
|
||||
|
@ -711,7 +676,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
r.setTxId(txID);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendDeleteRecordTransactional txID=" + txID + " id=" + id);
|
||||
logger.trace("appendDeleteRecordTransactional txID={} id={}", txID, id);
|
||||
}
|
||||
|
||||
appendRecord(r);
|
||||
|
@ -726,10 +691,9 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
r.setSync(sync);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendCommitRecord txID=" + txID + " sync=" + sync);
|
||||
logger.trace("appendCommitRecord txID={} sync={}", txID, sync);
|
||||
}
|
||||
|
||||
|
||||
appendRecord(r);
|
||||
}
|
||||
|
||||
|
@ -743,7 +707,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
r.setIoCompletion(callback);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendCommitRecord txID=" + txID + " callback=" + callback);
|
||||
logger.trace("appendCommitRecord txID={} callback={}", txID, callback);
|
||||
}
|
||||
|
||||
appendRecord(r);
|
||||
|
@ -763,7 +727,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
r.setSync(sync);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendCommitRecord txID=" + txID + " using callback, lineup=" + lineUpContext);
|
||||
logger.trace("appendCommitRecord txID={} using callback, lineup={}", txID, lineUpContext);
|
||||
}
|
||||
|
||||
appendRecord(r);
|
||||
|
@ -779,10 +743,9 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
r.setSync(sync);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendPrepareRecord txID=" + txID + " using sync=" + sync);
|
||||
logger.trace("appendPrepareRecord txID={} using sync={}", txID, sync);
|
||||
}
|
||||
|
||||
|
||||
appendRecord(r);
|
||||
}
|
||||
|
||||
|
@ -801,10 +764,9 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
r.setIoCompletion(callback);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendPrepareRecord txID=" + txID + " using callback, sync=" + sync);
|
||||
logger.trace("appendPrepareRecord txID={} using callback, sync={}", txID, sync);
|
||||
}
|
||||
|
||||
|
||||
appendRecord(r);
|
||||
}
|
||||
|
||||
|
@ -818,10 +780,9 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
r.setSync(sync);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendPrepareRecord txID=" + txID + " transactionData, sync=" + sync);
|
||||
logger.trace("appendPrepareRecord txID={} transactionData, sync={}", txID, sync);
|
||||
}
|
||||
|
||||
|
||||
appendRecord(r);
|
||||
}
|
||||
|
||||
|
@ -834,7 +795,7 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
r.setSync(sync);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendRollbackRecord txID=" + txID + " sync=" + sync);
|
||||
logger.trace("appendRollbackRecord txID={} sync={}", txID, sync);
|
||||
}
|
||||
|
||||
appendRecord(r);
|
||||
|
@ -850,10 +811,9 @@ public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal {
|
|||
r.setIoCompletion(callback);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendRollbackRecord txID=" + txID + " sync=" + sync + " using callback");
|
||||
logger.trace("appendRollbackRecord txID={} sync={} using callback", txID, sync);
|
||||
}
|
||||
|
||||
|
||||
appendRecord(r);
|
||||
}
|
||||
|
||||
|
|
|
@ -318,7 +318,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
this.objectName = ObjectName.getInstance(objectName);
|
||||
StandardMBean mbean = new StandardMBean(controlBean, JMSBridgeControl.class);
|
||||
mbeanServer.registerMBean(mbean, this.objectName);
|
||||
logger.debug("Registered JMSBridge instance as: " + this.objectName.getCanonicalName());
|
||||
logger.debug("Registered JMSBridge instance as: {}", this.objectName.getCanonicalName());
|
||||
} catch (Exception e) {
|
||||
throw new IllegalStateException("Failed to register JMSBridge MBean", e);
|
||||
}
|
||||
|
@ -327,9 +327,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
}
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Created " + this);
|
||||
}
|
||||
logger.trace("Created {}", this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -363,9 +361,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
return;
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Starting " + this);
|
||||
}
|
||||
logger.trace("Starting {}", this);
|
||||
|
||||
// bridge has been stopped and is restarted
|
||||
if (executor.isShutdown()) {
|
||||
|
@ -426,9 +422,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
started = true;
|
||||
|
||||
if (maxBatchTime != -1) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Starting time checker thread");
|
||||
}
|
||||
|
||||
batchExpiryTime = System.currentTimeMillis() + maxBatchTime;
|
||||
|
||||
|
@ -436,9 +430,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
|
||||
batchTimeCheckerTask = executor.submit(new BatchTimeChecker());
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Started time checker thread");
|
||||
}
|
||||
} else {
|
||||
|
||||
batchTimeCheckerFinished = null;
|
||||
|
@ -450,9 +442,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
|
||||
sourceReceiverTask = executor.submit(new SourceReceiver());
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Started " + this);
|
||||
}
|
||||
logger.trace("Started {}", this);
|
||||
}
|
||||
|
||||
private void initPasswords() throws ActiveMQException {
|
||||
|
@ -515,9 +505,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
}
|
||||
|
||||
synchronized (this) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Stopping " + this);
|
||||
}
|
||||
logger.trace("Stopping {}", this);
|
||||
Connection sourceConn = this.sourceConn;
|
||||
if (!connectedSource && sourceConn != null) {
|
||||
try {
|
||||
|
@ -577,9 +565,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
|
||||
if (tx != null) {
|
||||
// Terminate any transaction
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Rolling back remaining tx");
|
||||
}
|
||||
|
||||
try {
|
||||
stopSessionFailover();
|
||||
|
@ -588,14 +574,10 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
tx.rollback();
|
||||
abortedMessageCount += messages.size();
|
||||
} catch (Exception ignore) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Failed to rollback", ignore);
|
||||
}
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Rolled back remaining tx");
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
logger.trace("Failed stopSessionFailover", t);
|
||||
}
|
||||
|
@ -624,9 +606,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
messages.clear();
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Stopped " + this);
|
||||
}
|
||||
logger.trace("Stopped {}", this);
|
||||
} finally {
|
||||
if (isFailureHandler) {
|
||||
executor.shutdownNow();
|
||||
|
@ -684,9 +664,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
|
||||
@Override
|
||||
public synchronized void pause() throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Pausing " + this);
|
||||
}
|
||||
logger.trace("Pausing {}", this);
|
||||
|
||||
synchronized (lock) {
|
||||
paused = true;
|
||||
|
@ -694,16 +672,12 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
sourceConn.stop();
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Paused " + this);
|
||||
}
|
||||
logger.trace("Paused {}", this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void resume() throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Resuming " + this);
|
||||
}
|
||||
logger.trace("Resuming {}", this);
|
||||
|
||||
synchronized (lock) {
|
||||
paused = false;
|
||||
|
@ -711,9 +685,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
sourceConn.start();
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Resumed " + this);
|
||||
}
|
||||
logger.trace("Resumed {}", this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -998,9 +970,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
}
|
||||
|
||||
private void enlistResources(final Transaction tx) throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Enlisting resources in tx");
|
||||
}
|
||||
|
||||
XAResource resSource = ((XASession) sourceSession).getXAResource();
|
||||
|
||||
|
@ -1010,45 +980,33 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
|
||||
tx.enlistResource(resDest);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Enlisted resources in tx");
|
||||
}
|
||||
}
|
||||
|
||||
private void delistResources(final Transaction tx) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Delisting resources from tx");
|
||||
}
|
||||
|
||||
XAResource resSource = ((XASession) sourceSession).getXAResource();
|
||||
|
||||
try {
|
||||
tx.delistResource(resSource, XAResource.TMSUCCESS);
|
||||
} catch (Exception e) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Failed to delist source resource", e);
|
||||
}
|
||||
}
|
||||
|
||||
XAResource resDest = ((XASession) targetSession).getXAResource();
|
||||
|
||||
try {
|
||||
tx.delistResource(resDest, XAResource.TMSUCCESS);
|
||||
} catch (Exception e) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Failed to delist target resource", e);
|
||||
}
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Delisted resources from tx");
|
||||
}
|
||||
}
|
||||
|
||||
private Transaction startTx() throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Starting JTA transaction");
|
||||
}
|
||||
|
||||
if (tm == null) {
|
||||
tm = ServiceUtils.getTransactionManager();
|
||||
|
@ -1067,9 +1025,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
|
||||
tm.suspend();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Started JTA transaction");
|
||||
}
|
||||
|
||||
return tx;
|
||||
}
|
||||
|
@ -1096,26 +1052,18 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
|
||||
if (username == null) {
|
||||
if (isXA) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Creating an XA connection");
|
||||
}
|
||||
conn = ((XAConnectionFactory) cf).createXAConnection();
|
||||
} else {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Creating a non XA connection");
|
||||
}
|
||||
conn = ((ConnectionFactory) cf).createConnection();
|
||||
}
|
||||
} else {
|
||||
if (isXA) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Creating an XA connection");
|
||||
}
|
||||
conn = ((XAConnectionFactory) cf).createXAConnection(username, password);
|
||||
} else {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Creating a non XA connection");
|
||||
}
|
||||
conn = ((ConnectionFactory) cf).createConnection(username, password);
|
||||
}
|
||||
}
|
||||
|
@ -1218,16 +1166,12 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
// QoS = ONCE_AND_ONLY_ONCE
|
||||
if (forwardMode == JMSBridgeImpl.FORWARD_MODE_XA) {
|
||||
// Create an XASession for consuming from the source
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Creating XA source session");
|
||||
}
|
||||
|
||||
sourceConn = createConnection(sourceUsername, sourcePassword, sourceCff, clientID, true, true);
|
||||
sourceSession = ((XAConnection) sourceConn).createXASession();
|
||||
} else { // QoS = DUPLICATES_OK || AT_MOST_ONCE
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Creating non XA source session");
|
||||
}
|
||||
|
||||
sourceConn = createConnection(sourceUsername, sourcePassword, sourceCff, clientID, false, true);
|
||||
if (qualityOfServiceMode == QualityOfServiceMode.AT_MOST_ONCE && maxBatchSize == 1) {
|
||||
|
@ -1262,9 +1206,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
} else { // bridging across different servers
|
||||
// QoS = ONCE_AND_ONLY_ONCE
|
||||
if (forwardMode == JMSBridgeImpl.FORWARD_MODE_XA) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Creating XA dest session");
|
||||
}
|
||||
|
||||
// Create an XA session for sending to the destination
|
||||
|
||||
|
@ -1272,9 +1214,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
|
||||
targetSession = ((XAConnection) targetConn).createXASession();
|
||||
} else { // QoS = DUPLICATES_OK || AT_MOST_ONCE
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Creating non XA dest session");
|
||||
}
|
||||
|
||||
// Create a standard session for sending to the target
|
||||
|
||||
|
@ -1289,9 +1229,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
}
|
||||
|
||||
if (forwardMode == JMSBridgeImpl.FORWARD_MODE_XA) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Starting JTA transaction");
|
||||
}
|
||||
|
||||
tx = startTx();
|
||||
|
||||
|
@ -1321,51 +1259,41 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
try {
|
||||
sourceConn.stop();
|
||||
} catch (Throwable ignore) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Failed to stop source connection", ignore);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (tx != null) {
|
||||
try {
|
||||
delistResources(tx);
|
||||
} catch (Throwable ignore) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Failed to delist resources", ignore);
|
||||
}
|
||||
}
|
||||
try {
|
||||
// Terminate the tx
|
||||
tx.rollback();
|
||||
abortedMessageCount += messages.size();
|
||||
} catch (Throwable ignore) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Failed to rollback", ignore);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Close the old objects
|
||||
if (sourceConn != null) {
|
||||
try {
|
||||
sourceConn.close();
|
||||
} catch (Throwable ignore) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Failed to close source connection", ignore);
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
if (targetConn != null) {
|
||||
targetConn.close();
|
||||
}
|
||||
} catch (Throwable ignore) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Failed to close target connection", ignore);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Pause the calling thread for the given {@code millis}: it returns {@code true} if not interrupted, {@code false} otherwise.
|
||||
|
@ -1381,9 +1309,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
}
|
||||
|
||||
private boolean setupJMSObjectsWithRetry() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Setting up connections");
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
|
||||
|
@ -1414,14 +1340,12 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
|
||||
private void sendBatch() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Sending batch of " + messages.size() + " messages");
|
||||
logger.trace("Sending batch of {} messages", messages.size());
|
||||
}
|
||||
|
||||
if (paused) {
|
||||
// Don't send now
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Paused, so not sending now");
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -1440,16 +1364,12 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
if (qualityOfServiceMode == QualityOfServiceMode.ONCE_AND_ONLY_ONCE || (qualityOfServiceMode == QualityOfServiceMode.AT_MOST_ONCE && maxBatchSize > 1)) {
|
||||
// We client ack before sending
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Client acking source session");
|
||||
}
|
||||
|
||||
messages.getLast().acknowledge();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Client acked source session");
|
||||
}
|
||||
}
|
||||
|
||||
boolean exHappened;
|
||||
|
||||
|
@ -1467,16 +1387,12 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
if (maxBatchSize > 1) {
|
||||
// The sending session is transacted - we need to commit it
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Committing target session");
|
||||
}
|
||||
|
||||
targetSession.commit();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Committed target session");
|
||||
}
|
||||
}
|
||||
|
||||
if (qualityOfServiceMode == QualityOfServiceMode.DUPLICATES_OK) {
|
||||
// We client ack after sending
|
||||
|
@ -1484,16 +1400,12 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
// Note we could actually use Session.DUPS_OK_ACKNOWLEDGE here
|
||||
// For a slightly less strong delivery guarantee
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Client acking source session");
|
||||
}
|
||||
|
||||
messages.getLast().acknowledge();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Client acked source session");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
if (!stopping) {
|
||||
ActiveMQJMSBridgeLogger.LOGGER.bridgeAckError(bridgeName, e);
|
||||
|
@ -1523,15 +1435,11 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
// Commit the JTA transaction and start another
|
||||
delistResources(tx);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Committing JTA transaction");
|
||||
}
|
||||
|
||||
tx.commit();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Committed JTA transaction");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
// we call this just in case there is a failure other than failover
|
||||
|
@ -1573,9 +1481,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
|
||||
sourceSession.commit();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Committed source session");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
ActiveMQJMSBridgeLogger.LOGGER.bridgeAckError(bridgeName, e);
|
||||
|
@ -1607,9 +1513,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
addMessageIDInHeader(msg);
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Sending message " + msg);
|
||||
}
|
||||
logger.trace("Sending message {}", msg);
|
||||
|
||||
// Make sure the correct time to live gets propagated
|
||||
|
||||
|
@ -1626,9 +1530,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
targetProducer.send(targetDestination, msg, msg.getJMSDeliveryMode(), msg.getJMSPriority(), timeToLive);
|
||||
|
||||
messageCount++;
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Sent message " + msg);
|
||||
}
|
||||
logger.trace("Sent message {}", msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1657,9 +1559,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
// Each bridge (if there are more than one) in the chain can concatenate the message id
|
||||
// So in the case of multiple bridges having routed the message this can be used in a multi-hop
|
||||
// distributed request/response
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Adding old message id in Message header");
|
||||
}
|
||||
|
||||
JMSBridgeImpl.copyProperties(msg);
|
||||
|
||||
|
@ -1787,7 +1687,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
}
|
||||
} catch (JMSException jmse) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + " exception while receiving a message", jmse);
|
||||
logger.trace("{} exception while receiving a message", this, jmse);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1795,9 +1695,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
try {
|
||||
lock.wait(500);
|
||||
} catch (InterruptedException e) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + " thread was interrupted");
|
||||
}
|
||||
logger.trace("{} thread was interrupted", this);
|
||||
if (stopping) {
|
||||
return;
|
||||
}
|
||||
|
@ -1806,28 +1704,22 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + " received message " + msg);
|
||||
}
|
||||
logger.trace("{} received message {}", this, msg);
|
||||
|
||||
messages.add(msg);
|
||||
|
||||
batchExpiryTime = System.currentTimeMillis() + maxBatchTime;
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + " rescheduled batchExpiryTime to " + batchExpiryTime);
|
||||
logger.trace("{} rescheduled batchExpiryTime to {}", this, batchExpiryTime);
|
||||
}
|
||||
|
||||
if (maxBatchSize != -1 && messages.size() >= maxBatchSize) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + " maxBatchSize has been reached so sending batch");
|
||||
}
|
||||
logger.trace("{} maxBatchSize has been reached so sending batch", this);
|
||||
|
||||
sendBatch();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + " sent batch");
|
||||
}
|
||||
logger.trace("{} sent batch", this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1875,9 +1767,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
|
||||
@Override
|
||||
public void run() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Failure handler running");
|
||||
}
|
||||
|
||||
// Clear the messages
|
||||
messages.clear();
|
||||
|
@ -1943,9 +1833,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
|
||||
@Override
|
||||
public void run() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + " running");
|
||||
}
|
||||
logger.trace("{} running", this);
|
||||
|
||||
final CountDownLatch completed = batchTimeCheckerFinished;
|
||||
try {
|
||||
|
@ -1954,21 +1842,15 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
long toWait = batchExpiryTime - System.currentTimeMillis();
|
||||
|
||||
if (toWait <= 0) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + " waited enough");
|
||||
}
|
||||
logger.trace("{} waited enough", this);
|
||||
|
||||
synchronized (lock) {
|
||||
if (!failed && !messages.isEmpty()) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + " got some messages so sending batch");
|
||||
}
|
||||
logger.trace("{} got some messages so sending batch", this);
|
||||
|
||||
sendBatch();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + " sent batch");
|
||||
}
|
||||
logger.trace("{} sent batch", this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1976,18 +1858,15 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
} else {
|
||||
try {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + " waiting for " + toWait);
|
||||
logger.trace("{} waiting for {}", this, toWait);
|
||||
}
|
||||
|
||||
lock.wait(toWait);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + " woke up");
|
||||
}
|
||||
logger.trace("{} woke up", this);
|
||||
} catch (InterruptedException e) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(this + " thread was interrupted");
|
||||
}
|
||||
logger.trace("{} thread was interrupted", this);
|
||||
|
||||
if (stopping) {
|
||||
return;
|
||||
}
|
||||
|
@ -2033,9 +1912,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
}
|
||||
if (failed) {
|
||||
// The failure has already been detected and is being handled
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Failure recovery already in progress");
|
||||
}
|
||||
} else {
|
||||
boolean shouldHandleFailure = true;
|
||||
if (ha) {
|
||||
|
@ -2060,7 +1937,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
registry = sl.iterator().next();
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
logger.debug("unable to load recovery registry " + locatorClasse, e);
|
||||
logger.debug("unable to load recovery registry {}", locatorClasse, e);
|
||||
}
|
||||
if (registry != null) {
|
||||
break;
|
||||
|
@ -2068,7 +1945,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
}
|
||||
|
||||
if (registry != null) {
|
||||
logger.debug("Recovery Registry located = " + registry);
|
||||
logger.debug("Recovery Registry located = {}", registry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2145,7 +2022,7 @@ public final class JMSBridgeImpl implements JMSBridge {
|
|||
|
||||
if (timedOut) {
|
||||
//timeout, presumably failover failed.
|
||||
logger.debug("Timed out waiting for failover completion " + this);
|
||||
logger.debug("Timed out waiting for failover completion {}", this);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ public abstract class AbstractSequentialFile implements SequentialFile {
|
|||
@Override
|
||||
public void copyTo(SequentialFile newFileName) throws Exception {
|
||||
try {
|
||||
logger.debug("Copying " + this + " as " + newFileName);
|
||||
logger.debug("Copying {} as {}", this, newFileName);
|
||||
if (!newFileName.isOpen()) {
|
||||
newFileName.open();
|
||||
}
|
||||
|
|
|
@ -35,17 +35,12 @@ import org.apache.activemq.artemis.journal.ActiveMQJournalLogger;
|
|||
import org.apache.activemq.artemis.utils.ActiveMQThreadFactory;
|
||||
import org.apache.activemq.artemis.utils.critical.CriticalAnalyzer;
|
||||
import org.apache.activemq.artemis.utils.critical.EmptyCriticalAnalyzer;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
/**
|
||||
* An abstract SequentialFileFactory containing basic functionality for both AIO and NIO SequentialFactories
|
||||
*/
|
||||
public abstract class AbstractSequentialFileFactory implements SequentialFileFactory {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||
|
||||
// Timeout used to wait executors to shutdown
|
||||
protected static final int EXECUTOR_TIMEOUT = 60;
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ public class AIOSequentialFile extends AbstractSequentialFile {
|
|||
aioFile.close();
|
||||
} catch (Throwable e) {
|
||||
// an exception here would means a double
|
||||
logger.debug("Exeption while closing file - " + e.getMessage(), e);
|
||||
logger.debug("Exeption while closing file", e);
|
||||
} finally {
|
||||
aioFile = null;
|
||||
aioFactory.afterClose();
|
||||
|
@ -126,9 +126,7 @@ public class AIOSequentialFile extends AbstractSequentialFile {
|
|||
|
||||
@Override
|
||||
public synchronized void fill(final int size) throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Filling file: " + getFileName());
|
||||
}
|
||||
logger.trace("Filling file: {}", getFileName());
|
||||
|
||||
checkOpened();
|
||||
aioFile.fill(aioFactory.getAlignment(), size);
|
||||
|
@ -149,14 +147,12 @@ public class AIOSequentialFile extends AbstractSequentialFile {
|
|||
}
|
||||
opened = true;
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Opening file: " + getFileName());
|
||||
}
|
||||
logger.trace("Opening file: {}", getFileName());
|
||||
|
||||
try {
|
||||
aioFile = aioFactory.libaioContext.openFile(getFile(), factory.isDatasync());
|
||||
} catch (IOException e) {
|
||||
logger.error("Error opening file: " + getFileName());
|
||||
logger.error("Error opening file: {}", getFileName());
|
||||
factory.onIOError(e, e.getMessage(), this);
|
||||
throw new ActiveMQNativeIOError(e.getMessage(), e);
|
||||
}
|
||||
|
@ -181,7 +177,7 @@ public class AIOSequentialFile extends AbstractSequentialFile {
|
|||
// Sending it through the callback would make it released
|
||||
aioFile.read(positionToRead, bytesToRead, bytes, getCallback(callback, null));
|
||||
} catch (IOException e) {
|
||||
logger.error("IOError reading file: " + getFileName(), e);
|
||||
logger.error("IOError reading file: {}", getFileName(), e);
|
||||
factory.onIOError(e, e.getMessage(), this);
|
||||
throw new ActiveMQNativeIOError(e.getMessage(), e);
|
||||
}
|
||||
|
@ -203,7 +199,7 @@ public class AIOSequentialFile extends AbstractSequentialFile {
|
|||
@Override
|
||||
public void writeDirect(final ByteBuffer bytes, final boolean sync) throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Write Direct, Sync: " + sync + " File: " + getFileName());
|
||||
logger.trace("Write Direct, Sync: {} File: {}", sync, getFileName());
|
||||
}
|
||||
|
||||
if (sync) {
|
||||
|
@ -219,9 +215,7 @@ public class AIOSequentialFile extends AbstractSequentialFile {
|
|||
|
||||
@Override
|
||||
public void blockingWriteDirect(ByteBuffer bytes,boolean sync, boolean releaseBuffer) throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Write Direct, Sync: true File: " + getFileName());
|
||||
}
|
||||
logger.trace("Write Direct, Sync: true File: {}", getFileName());
|
||||
|
||||
final SimpleWaitIOCallback completion = new SimpleWaitIOCallback();
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactor
|
|||
if (DISABLED) {
|
||||
|
||||
// This is only used in tests, hence I'm not creating a Logger for this
|
||||
logger.info(AIOSequentialFileFactory.class.getName() + ".DISABLED = true");
|
||||
logger.info("{}.DISABLED = true", AIOSequentialFileFactory.class.getName());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -111,10 +111,8 @@ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactor
|
|||
}
|
||||
final int adjustedMaxIO = Math.max(2, maxIO);
|
||||
callbackPool = PlatformDependent.hasUnsafe() ? new MpmcArrayQueue<>(adjustedMaxIO) : new MpmcAtomicArrayQueue<>(adjustedMaxIO);
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("New AIO File Created");
|
||||
}
|
||||
}
|
||||
|
||||
public AIOSequentialCallback getCallback() {
|
||||
AIOSequentialCallback callback = callbackPool.poll();
|
||||
|
@ -394,9 +392,10 @@ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactor
|
|||
|
||||
@Override
|
||||
public void onError(int errno, String message) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.trace("AIO on error issued. Error(code: " + errno + " msg: " + message + ")");
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("AIO on error issued. Error(code: {} msg: {})", errno, message);
|
||||
}
|
||||
|
||||
this.error = true;
|
||||
this.errorCode = errno;
|
||||
this.errorMessage = message;
|
||||
|
@ -481,8 +480,7 @@ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactor
|
|||
// just to cleanup this
|
||||
if (bufferSize > 0 && System.currentTimeMillis() - bufferReuseLastTime > 10000) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Clearing reuse buffers queue with " + reuseBuffersQueue.size() +
|
||||
" elements");
|
||||
logger.trace("Clearing reuse buffers queue with {} elements", reuseBuffersQueue.size());
|
||||
}
|
||||
|
||||
bufferReuseLastTime = System.currentTimeMillis();
|
||||
|
|
|
@ -504,7 +504,7 @@ public final class TimedBuffer extends CriticalComponentImpl {
|
|||
} catch (Exception e) {
|
||||
useSleep = false;
|
||||
// I don't think we need to individualize a logger code here, this is unlikely to happen anyways
|
||||
logger.warn(e.getMessage() + ", disabling sleep on TimedBuffer, using spin now", e);
|
||||
logger.warn("{}, disabling sleep on TimedBuffer, using spin now", e.getMessage(), e);
|
||||
}
|
||||
return useSleep;
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ final class MappedFile implements AutoCloseable {
|
|||
length = (int) channel.size();
|
||||
if (length != capacity && length != 0) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Adjusting capacity to " + length + " while it was " + capacity + " on file " + file);
|
||||
logger.debug("Adjusting capacity to {} while it was {} on file {}", length, capacity, file);
|
||||
}
|
||||
capacity = length;
|
||||
}
|
||||
|
|
|
@ -451,9 +451,8 @@ public class NIOSequentialFile extends AbstractSequentialFile {
|
|||
|
||||
@Override
|
||||
public void copyTo(SequentialFile dstFile) throws IOException {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Copying " + this + " as " + dstFile);
|
||||
}
|
||||
logger.debug("Copying {} as {}", this, dstFile);
|
||||
|
||||
if (isOpen()) {
|
||||
throw new IllegalStateException("File opened!");
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ public class FileIOUtil {
|
|||
int bytesRead = from.read(buffer);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appending " + bytesRead + " bytes on " + to.getFileName());
|
||||
logger.trace("appending {} bytes on {}", bytesRead, to.getFileName());
|
||||
}
|
||||
|
||||
if (bytesRead > 0) {
|
||||
|
@ -60,7 +60,7 @@ public class FileIOUtil {
|
|||
}
|
||||
|
||||
if (bytesRead < buffer.capacity()) {
|
||||
logger.trace("Interrupting reading as the whole thing was sent on " + to.getFileName());
|
||||
logger.trace("Interrupting reading as the whole thing was sent on {}", to.getFileName());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,15 +96,16 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ
|
|||
*/
|
||||
public void addPendingTransaction(final long transactionID, final long[] ids) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("addPendingTransaction::tx=" + transactionID + ", ids=" + Arrays.toString(ids));
|
||||
logger.trace("addPendingTransaction::tx={}, ids={}", transactionID, Arrays.toString(ids));
|
||||
}
|
||||
pendingTransactions.put(transactionID, new PendingTransaction(ids));
|
||||
}
|
||||
|
||||
public void addCommandCommit(final JournalTransaction liveTransaction, final JournalFile currentFile) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("addCommandCommit " + liveTransaction.getId());
|
||||
logger.trace("addCommandCommit {}", liveTransaction.getId());
|
||||
}
|
||||
|
||||
pendingCommands.add(new CommitCompactCommand(liveTransaction, currentFile));
|
||||
|
||||
long[] ids = liveTransaction.getPositiveArray();
|
||||
|
@ -132,9 +133,7 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ
|
|||
}
|
||||
|
||||
public void addCommandRollback(final JournalTransaction liveTransaction, final JournalFile currentFile) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("addCommandRollback " + liveTransaction + " currentFile " + currentFile);
|
||||
}
|
||||
logger.trace("addCommandRollback {} currentFile {}", liveTransaction, currentFile);
|
||||
pendingCommands.add(new RollbackCompactCommand(liveTransaction, currentFile));
|
||||
}
|
||||
|
||||
|
@ -144,7 +143,7 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ
|
|||
*/
|
||||
public void addCommandDelete(final long id, final JournalFile usedFile) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("addCommandDelete id " + id + " usedFile " + usedFile);
|
||||
logger.trace("addCommandDelete id {} usedFile {}", id, usedFile);
|
||||
}
|
||||
pendingCommands.add(new DeleteCompactCommand(id, usedFile));
|
||||
}
|
||||
|
@ -155,7 +154,7 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ
|
|||
*/
|
||||
public void addCommandUpdate(final long id, final JournalFile usedFile, final int size, final boolean replaceableUpdate) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("addCommandUpdate id " + id + " usedFile " + usedFile + " size " + size);
|
||||
logger.trace("addCommandUpdate id {} usedFile {} size {}", id, usedFile, size);
|
||||
}
|
||||
pendingCommands.add(new UpdateCompactCommand(id, usedFile, size, replaceableUpdate));
|
||||
}
|
||||
|
@ -190,9 +189,8 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ
|
|||
*/
|
||||
public void replayPendingCommands() {
|
||||
for (CompactCommand command : pendingCommands) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Replay " + command);
|
||||
}
|
||||
logger.trace("Replay {}", command);
|
||||
|
||||
try {
|
||||
command.execute();
|
||||
} catch (Exception e) {
|
||||
|
@ -220,9 +218,8 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ
|
|||
|
||||
@Override
|
||||
public void onReadAddRecord(final RecordInfo info) throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Read Record " + info);
|
||||
}
|
||||
logger.trace("Read Record {}", info);
|
||||
|
||||
if (containsRecord(info.id)) {
|
||||
JournalInternalRecord addRecord = new JournalAddRecord(true, info.id, info.getUserRecordType(), EncoderPersister.getInstance(), new ByteArrayEncoding(info.data));
|
||||
addRecord.setCompactCount((short) (info.compactCount + 1));
|
||||
|
@ -238,8 +235,9 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ
|
|||
@Override
|
||||
public void onReadAddRecordTX(final long transactionID, final RecordInfo info) throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Read Add Record TX " + transactionID + " info " + info);
|
||||
logger.trace("Read Add Record TX {} info {}", transactionID, info);
|
||||
}
|
||||
|
||||
if (pendingTransactions.get(transactionID) != null) {
|
||||
produceAddRecordTX(transactionID, info);
|
||||
} else if (containsRecord(info.id)) {
|
||||
|
@ -263,9 +261,8 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ
|
|||
|
||||
@Override
|
||||
public void onReadCommitRecord(final long transactionID, final int numberOfRecords) throws Exception {
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("onReadCommitRecord " + transactionID);
|
||||
logger.trace("onReadCommitRecord {}", transactionID);
|
||||
}
|
||||
|
||||
if (pendingTransactions.get(transactionID) != null) {
|
||||
|
@ -289,7 +286,7 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ
|
|||
@Override
|
||||
public void onReadDeleteRecord(final long recordID) throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("onReadDeleteRecord " + recordID);
|
||||
logger.trace("onReadDeleteRecord {}", recordID);
|
||||
}
|
||||
|
||||
if (newRecords.get(recordID) != null) {
|
||||
|
@ -302,7 +299,7 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ
|
|||
@Override
|
||||
public void onReadDeleteRecordTX(final long transactionID, final RecordInfo info) throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("onReadDeleteRecordTX " + transactionID + " info " + info);
|
||||
logger.trace("onReadDeleteRecordTX {} info {}", transactionID, info);
|
||||
}
|
||||
|
||||
if (pendingTransactions.get(transactionID) != null) {
|
||||
|
@ -362,7 +359,7 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ
|
|||
final byte[] extraData,
|
||||
final int numberOfRecords) throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("onReadPrepareRecord " + transactionID);
|
||||
logger.trace("onReadPrepareRecord {}", transactionID);
|
||||
}
|
||||
|
||||
if (pendingTransactions.get(transactionID) != null) {
|
||||
|
@ -386,13 +383,12 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ
|
|||
@Override
|
||||
public void onReadRollbackRecord(final long transactionID) throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("onReadRollbackRecord " + transactionID);
|
||||
logger.trace("onReadRollbackRecord {}", transactionID);
|
||||
}
|
||||
|
||||
if (pendingTransactions.get(transactionID) != null) {
|
||||
// Sanity check, this should never happen
|
||||
logger.debug("Inconsistency during compacting: RollbackRecord ID = " + transactionID +
|
||||
" for an already rolled back transaction during compacting");
|
||||
logger.debug("Inconsistency during compacting: RollbackRecord ID = {} for an already rolled back transaction during compacting", transactionID);
|
||||
} else {
|
||||
JournalTransaction newTransaction = newTransactions.remove(transactionID);
|
||||
if (newTransaction != null) {
|
||||
|
@ -423,9 +419,7 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ
|
|||
|
||||
@Override
|
||||
public void onReadUpdateRecord(final RecordInfo info) throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("onReadUpdateRecord " + info);
|
||||
}
|
||||
logger.trace("onReadUpdateRecord {}", info);
|
||||
|
||||
if (containsRecord(info.id)) {
|
||||
LongObjectHashMap<RunnableEx> longmap = pendingUpdates.get(info.userRecordType);
|
||||
|
@ -458,9 +452,7 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ
|
|||
|
||||
@Override
|
||||
public void onReadUpdateRecordTX(final long transactionID, final RecordInfo info) throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("onReadUpdateRecordTX " + info);
|
||||
}
|
||||
logger.trace("onReadUpdateRecordTX {}", info);
|
||||
|
||||
if (pendingTransactions.get(transactionID) != null) {
|
||||
produceUpdateRecordTX(transactionID, info);
|
||||
|
@ -491,14 +483,13 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ
|
|||
JournalTransaction newTransaction = newTransactions.get(transactionID);
|
||||
if (newTransaction == null) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("creating new journal Transaction " + transactionID);
|
||||
logger.trace("creating new journal Transaction {}", transactionID);
|
||||
}
|
||||
newTransaction = new JournalTransaction(transactionID, this);
|
||||
newTransactions.put(transactionID, newTransaction);
|
||||
} else if (logger.isTraceEnabled()) {
|
||||
// just logging
|
||||
logger.trace("reusing TX " + transactionID);
|
||||
|
||||
logger.trace("reusing TX {}", transactionID);
|
||||
}
|
||||
return newTransaction;
|
||||
}
|
||||
|
|
|
@ -367,7 +367,7 @@ public class JournalFilesRepository {
|
|||
final boolean renameTmp,
|
||||
final boolean checkDelete) throws Exception {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Adding free file " + file + ", renameTMP=" + renameTmp + ", checkDelete=" + checkDelete);
|
||||
logger.debug("Adding free file {}, renameTMP={}, checkDelete={}", file, renameTmp, checkDelete);
|
||||
}
|
||||
long calculatedSize = 0;
|
||||
try {
|
||||
|
@ -381,9 +381,8 @@ public class JournalFilesRepository {
|
|||
// Re-initialise it
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Re-initializing file " + file + " as checkDelete=" + checkDelete +
|
||||
", freeFilesCount=" + freeFilesCount + ", dataFiles.size=" + dataFiles.size() +
|
||||
", openedFiles=" + openedFiles + ", poolSize=" + poolSize);
|
||||
logger.trace("Re-initializing file {} as checkDelete={}, freeFilesCount={}, dataFiles.size={} openedFiles={}, poolSize={}",
|
||||
file, checkDelete, freeFilesCount, dataFiles.size(), openedFiles, poolSize);
|
||||
}
|
||||
|
||||
JournalFile jf = reinitializeFile(file);
|
||||
|
@ -395,17 +394,15 @@ public class JournalFilesRepository {
|
|||
freeFiles.add(jf);
|
||||
freeFilesCount.getAndIncrement();
|
||||
} else {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Deleting file " + file.getFile());
|
||||
}
|
||||
logger.debug("Deleting file {}", file.getFile());
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("DataFiles.size() = " + dataFiles.size());
|
||||
logger.trace("openedFiles.size() = " + openedFiles.size());
|
||||
logger.trace("minfiles = " + minFiles + ", poolSize = " + poolSize);
|
||||
logger.trace("Free Files = " + freeFilesCount.get());
|
||||
logger.trace("File " + file + " being deleted as freeFiles.size() + dataFiles.size() + 1 + openedFiles.size() (" +
|
||||
(freeFilesCount.get() + dataFiles.size() + 1 + openedFiles.size()) +
|
||||
") < minFiles (" + minFiles + ")");
|
||||
logger.trace("DataFiles.size() = {}", dataFiles.size());
|
||||
logger.trace("openedFiles.size() = {}", openedFiles.size());
|
||||
logger.trace("minfiles = {}, poolSize = {}", minFiles, poolSize);
|
||||
logger.trace("Free Files = {}", freeFilesCount.get());
|
||||
logger.trace("File {} being deleted as freeFiles.size() + dataFiles.size() + 1 + openedFiles.size() () < minFiles ({})",
|
||||
file, (freeFilesCount.get() + dataFiles.size() + 1 + openedFiles.size()), minFiles);
|
||||
}
|
||||
file.getFile().delete();
|
||||
}
|
||||
|
@ -474,7 +471,7 @@ public class JournalFilesRepository {
|
|||
*/
|
||||
public JournalFile openFile() throws InterruptedException, ActiveMQIOErrorException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("enqueueOpenFile with openedFiles.size=" + openedFiles.size());
|
||||
logger.trace("enqueueOpenFile with openedFiles.size={}", openedFiles.size());
|
||||
}
|
||||
|
||||
// First try to get an open file, that's prepared and already open
|
||||
|
@ -505,9 +502,8 @@ public class JournalFilesRepository {
|
|||
throw ActiveMQJournalBundle.BUNDLE.fileNotOpened();
|
||||
}
|
||||
}
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Returning file " + nextFile);
|
||||
}
|
||||
|
||||
logger.trace("Returning file {}", nextFile);
|
||||
|
||||
return nextFile;
|
||||
}
|
||||
|
@ -526,9 +522,7 @@ public class JournalFilesRepository {
|
|||
public synchronized void pushOpenedFile() throws Exception {
|
||||
JournalFile nextOpenedFile = takeFile(true, true, true, false);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("pushing openFile " + nextOpenedFile);
|
||||
}
|
||||
logger.trace("pushing openFile {}", nextOpenedFile);
|
||||
|
||||
if (!openedFiles.offer(nextOpenedFile)) {
|
||||
ActiveMQJournalLogger.LOGGER.failedToAddFile(nextOpenedFile);
|
||||
|
@ -647,9 +641,7 @@ public class JournalFilesRepository {
|
|||
|
||||
final String fileName = createFileName(tmpCompact, fileID);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Creating file " + fileName);
|
||||
}
|
||||
logger.trace("Creating file {}", fileName);
|
||||
|
||||
String tmpFileName = fileName + ".tmp";
|
||||
|
||||
|
@ -667,9 +659,7 @@ public class JournalFilesRepository {
|
|||
|
||||
sequentialFile.close(false, false);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Renaming file " + tmpFileName + " as " + fileName);
|
||||
}
|
||||
logger.trace("Renaming file {} as {}", tmpFileName, fileName);
|
||||
|
||||
sequentialFile.renameTo(fileName);
|
||||
|
||||
|
|
|
@ -272,7 +272,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
File[] repeatFiles = historyFolder.listFiles((a, name) -> name.startsWith(getFilePrefix()) && name.endsWith(file.getFileID() + "." + filesRepository.getFileExtension()));
|
||||
|
||||
for (File f : repeatFiles) {
|
||||
logger.warn("File " + f + " was partially copied before, removing the file");
|
||||
logger.warn("File {} was partially copied before, removing the file", f);
|
||||
f.delete();
|
||||
}
|
||||
}
|
||||
|
@ -754,18 +754,10 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
preparedTransactionExtraDataSize)) {
|
||||
// Avoid a buffer overflow caused by damaged data... continue
|
||||
// scanning for more pendingTransactions...
|
||||
logger.trace("Record at position " + pos +
|
||||
" recordType = " +
|
||||
recordType +
|
||||
" file:" +
|
||||
file.getFile().getFileName() +
|
||||
" recordSize: " +
|
||||
recordSize +
|
||||
" variableSize: " +
|
||||
variableSize +
|
||||
" preparedTransactionExtraDataSize: " +
|
||||
preparedTransactionExtraDataSize +
|
||||
" is corrupted and it is being ignored (II)");
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Record at position {} recordType = {} file:{} recordSize: {} variableSize: {} preparedTransactionExtraDataSize: {} is corrupted and it is being ignored (II)",
|
||||
pos, recordType, file.getFile().getFileName(), recordSize, variableSize, preparedTransactionExtraDataSize);
|
||||
}
|
||||
// If a file has damaged pendingTransactions, we make it a dataFile, and the
|
||||
// next reclaiming will fix it
|
||||
reader.markAsDataFile(file);
|
||||
|
@ -787,16 +779,10 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
// This is like testing a hash for the record. (We could replace the
|
||||
// checkSize by some sort of calculated hash)
|
||||
if (checkSize != variableSize + recordSize + preparedTransactionExtraDataSize) {
|
||||
logger.trace("Record at position " + pos +
|
||||
" recordType = " +
|
||||
recordType +
|
||||
" possible transactionID = " +
|
||||
transactionID +
|
||||
" possible recordID = " +
|
||||
recordID +
|
||||
" file:" +
|
||||
file.getFile().getFileName() +
|
||||
" is corrupted and it is being ignored (III)");
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Record at position {} recordType = {} possible transactionID = {} possible recordID = {} file:{} is corrupted and it is being ignored (III)",
|
||||
pos, recordType, transactionID, recordID, file.getFile().getFileName());
|
||||
}
|
||||
|
||||
// If a file has damaged pendingTransactions, we make it a dataFile, and the
|
||||
// next reclaiming will fix it
|
||||
|
@ -813,7 +799,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
// the data now.
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("reading " + recordID + ", userRecordType=" + userRecordType + ", compactCount=" + compactCount);
|
||||
logger.trace("reading {}, userRecordType={}, compactCount={}", recordID, userRecordType, compactCount);
|
||||
}
|
||||
|
||||
boolean replaceableUpdate = replaceableRecords != null ? replaceableRecords.containsKey(userRecordType) : false;
|
||||
|
@ -933,10 +919,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
lineUpContext(callback);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("scheduling appendAddRecord::id=" + id +
|
||||
", userRecordType=" +
|
||||
recordType +
|
||||
", record = " + record);
|
||||
logger.trace("scheduling appendAddRecord::id={}, userRecordType={}, record = {}", id, recordType, record);
|
||||
}
|
||||
|
||||
final long maxRecordSize = getMaxRecordSize();
|
||||
|
@ -958,21 +941,17 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
records.put(id, new JournalRecord(usedFile, addRecordEncodeSize));
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendAddRecord::id=" + id +
|
||||
", userRecordType=" +
|
||||
recordType +
|
||||
", record = " + record +
|
||||
", usedFile = " +
|
||||
usedFile);
|
||||
logger.trace("appendAddRecord::id={}, userRecordType={}, record = {}, usedFile = {}",
|
||||
id, recordType, record, usedFile);
|
||||
}
|
||||
result.set(true);
|
||||
} catch (ActiveMQShutdownException e) {
|
||||
result.fail(e);
|
||||
logger.error("appendAddRecord:" + e, e);
|
||||
logger.error("Exception during appendAddRecord:", e);
|
||||
} catch (Throwable e) {
|
||||
result.fail(e);
|
||||
setErrorCondition(callback, null, e);
|
||||
logger.error("appendAddRecord::" + e, e);
|
||||
logger.error("Exception during appendAddRecord:", e);
|
||||
} finally {
|
||||
journalLock.readLock().unlock();
|
||||
}
|
||||
|
@ -994,10 +973,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
lineUpContext(callback);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("scheduling appendAddEvent::id=" + id +
|
||||
", userRecordType=" +
|
||||
recordType +
|
||||
", record = " + record);
|
||||
logger.trace("scheduling appendAddEvent::id={}, userRecordType={}, record = {}", id, recordType, record);
|
||||
}
|
||||
|
||||
final long maxRecordSize = getMaxRecordSize();
|
||||
|
@ -1016,21 +992,17 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
JournalFile usedFile = appendRecord(addRecord, false, sync, null, callback);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendAddEvent:id=" + id +
|
||||
", userRecordType=" +
|
||||
recordType +
|
||||
", record = " + record +
|
||||
", usedFile = " +
|
||||
usedFile);
|
||||
logger.trace("appendAddEvent:id={}, userRecordType={}, record = {}, usedFile = {}",
|
||||
id, recordType, record, usedFile);
|
||||
}
|
||||
result.set(true);
|
||||
} catch (ActiveMQShutdownException e) {
|
||||
result.fail(e);
|
||||
logger.error("appendAddEvent:" + e, e);
|
||||
logger.error("Exception during appendAddEvent:", e);
|
||||
} catch (Throwable e) {
|
||||
result.fail(e);
|
||||
setErrorCondition(callback, null, e);
|
||||
logger.error("appendAddEvent::" + e, e);
|
||||
logger.error("Exception during appendAddEvent:", e);
|
||||
} finally {
|
||||
journalLock.readLock().unlock();
|
||||
}
|
||||
|
@ -1050,9 +1022,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
lineUpContext(callback);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("scheduling appendUpdateRecord::id=" + id +
|
||||
", userRecordType=" +
|
||||
recordType);
|
||||
logger.trace("scheduling appendUpdateRecord::id={}, userRecordType={}", id, recordType);
|
||||
}
|
||||
|
||||
final SimpleFuture<Boolean> onFoundAddInfo;
|
||||
|
@ -1088,12 +1058,9 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
lineUpContext(callback);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("scheduling appendUpdateRecord::id=" + id +
|
||||
", userRecordType=" +
|
||||
recordType);
|
||||
logger.trace("scheduling appendUpdateRecord::id={}, userRecordType={}", id, recordType);
|
||||
}
|
||||
|
||||
|
||||
internalAppendUpdateRecord(id, recordType, persister, record, sync, replaceableUpdate, updateCallback, callback);
|
||||
}
|
||||
|
||||
|
@ -1121,7 +1088,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
updateCallback.onUpdate(id, false);
|
||||
}
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Record " + id + " had not been found");
|
||||
logger.debug("Record {} had not been found", id);
|
||||
}
|
||||
|
||||
if (callback != null) {
|
||||
|
@ -1134,11 +1101,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
JournalFile usedFile = appendRecord(updateRecord, false, sync, null, callback);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendUpdateRecord::id=" + id +
|
||||
", userRecordType=" +
|
||||
recordType +
|
||||
", usedFile = " +
|
||||
usedFile);
|
||||
logger.trace("appendUpdateRecord::id={}, userRecordType={}, usedFile = {}", id, recordType, usedFile);
|
||||
}
|
||||
|
||||
// record==null here could only mean there is a compactor
|
||||
|
@ -1158,13 +1121,13 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
if (updateCallback != null) {
|
||||
updateCallback.onUpdate(id, false);
|
||||
}
|
||||
logger.error("appendUpdateRecord:" + e, e);
|
||||
logger.error("Exception during appendUpdateRecord:", e);
|
||||
} catch (Throwable e) {
|
||||
if (updateCallback != null) {
|
||||
updateCallback.onUpdate(id, false);
|
||||
}
|
||||
setErrorCondition(callback, null, e);
|
||||
logger.error("appendUpdateRecord:" + e, e);
|
||||
logger.error("Exception during appendUpdateRecord:", e);
|
||||
} finally {
|
||||
journalLock.readLock().unlock();
|
||||
}
|
||||
|
@ -1175,7 +1138,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
@Override
|
||||
public void appendDeleteRecord(final long id, final boolean sync, final IOCompletion callback) throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("scheduling appendDeleteRecord::id=" + id);
|
||||
logger.trace("scheduling appendDeleteRecord::id={}", id);
|
||||
}
|
||||
|
||||
checkJournalIsLoaded();
|
||||
|
@ -1205,7 +1168,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
public void tryAppendDeleteRecord(final long id, final boolean sync, final JournalUpdateCallback updateCallback, final IOCompletion callback) throws Exception {
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("scheduling appendDeleteRecord::id=" + id);
|
||||
logger.trace("scheduling appendDeleteRecord::id={}", id);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1256,7 +1219,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
JournalFile usedFile = appendRecord(deleteRecord, false, sync, null, callback);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendDeleteRecord::id=" + id + ", usedFile = " + usedFile);
|
||||
logger.trace("appendDeleteRecord::id={}, usedFile = {}", id, usedFile);
|
||||
}
|
||||
|
||||
// record==null here could only mean there is a compactor
|
||||
|
@ -1274,12 +1237,12 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
if (updateCallback != null) {
|
||||
updateCallback.onUpdate(id, false);
|
||||
}
|
||||
logger.error("appendDeleteRecord:" + e, e);
|
||||
logger.error("Exception during appendDeleteRecord:", e);
|
||||
} catch (Throwable e) {
|
||||
if (updateCallback != null) {
|
||||
updateCallback.onUpdate(id, false);
|
||||
}
|
||||
logger.error("appendDeleteRecord:" + e, e);
|
||||
logger.error("Exception during appendDeleteRecord:", e);
|
||||
setErrorCondition(callback, null, e);
|
||||
} finally {
|
||||
journalLock.readLock().unlock();
|
||||
|
@ -1300,12 +1263,8 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
final Object record) throws Exception {
|
||||
checkJournalIsLoaded();
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("scheduling appendAddRecordTransactional:txID=" + txID +
|
||||
",id=" +
|
||||
id +
|
||||
", userRecordType=" +
|
||||
recordType +
|
||||
", record = " + record);
|
||||
logger.trace("scheduling appendAddRecordTransactional:txID={}, id={}, userRecordType={}, record = {}",
|
||||
txID, id, recordType, record);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1327,19 +1286,13 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
JournalFile usedFile = appendRecord(addRecord, false, false, tx, null);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendAddRecordTransactional:txID=" + txID +
|
||||
",id=" +
|
||||
id +
|
||||
", userRecordType=" +
|
||||
recordType +
|
||||
", record = " + record +
|
||||
", usedFile = " +
|
||||
usedFile);
|
||||
logger.trace("appendAddRecordTransactional:txID={},id={}, userRecordType={}, record = {}, usedFile = {}",
|
||||
txID, id, recordType, record, usedFile);
|
||||
}
|
||||
|
||||
tx.addPositive(usedFile, id, encodeSize, false);
|
||||
} catch (Throwable e) {
|
||||
logger.error("appendAddRecordTransactional:" + e, e);
|
||||
logger.error("Exception during appendAddRecordTransactional:", e);
|
||||
setErrorCondition(null, tx, e);
|
||||
} finally {
|
||||
journalLock.readLock().unlock();
|
||||
|
@ -1364,12 +1317,8 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
final Persister persister,
|
||||
final Object record) throws Exception {
|
||||
if ( logger.isTraceEnabled() ) {
|
||||
logger.trace( "scheduling appendUpdateRecordTransactional::txID=" + txID +
|
||||
",id=" +
|
||||
id +
|
||||
", userRecordType=" +
|
||||
recordType +
|
||||
", record = " + record);
|
||||
logger.trace("scheduling appendUpdateRecordTransactional::txID={}, id={}, userRecordType={}, record = {}",
|
||||
txID, id, recordType, record);
|
||||
}
|
||||
|
||||
checkJournalIsLoaded();
|
||||
|
@ -1390,19 +1339,13 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
JournalFile usedFile = appendRecord( updateRecordTX, false, false, tx, null );
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace( "appendUpdateRecordTransactional::txID=" + txID +
|
||||
",id=" +
|
||||
id +
|
||||
", userRecordType=" +
|
||||
recordType +
|
||||
", record = " + record +
|
||||
", usedFile = " +
|
||||
usedFile );
|
||||
logger.trace("appendUpdateRecordTransactional::txID={}, id={}, userRecordType={}, record = {}, usedFile = {}",
|
||||
txID, id, recordType, record, usedFile );
|
||||
}
|
||||
|
||||
tx.addPositive( usedFile, id, updateRecordTX.getEncodeSize(), false);
|
||||
} catch (Throwable e ) {
|
||||
logger.error("appendUpdateRecordTransactional:" + e.getMessage(), e );
|
||||
logger.error("Exception during appendUpdateRecordTransactional:", e );
|
||||
setErrorCondition(null, tx, e );
|
||||
} finally {
|
||||
journalLock.readLock().unlock();
|
||||
|
@ -1415,11 +1358,8 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
public void appendDeleteRecordTransactional(final long txID,
|
||||
final long id,
|
||||
final EncodingSupport record) throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("scheduling appendDeleteRecordTransactional::txID=" + txID +
|
||||
", id=" +
|
||||
id);
|
||||
}
|
||||
|
||||
logger.trace("scheduling appendDeleteRecordTransactional::txID={}, id={}", txID, id);
|
||||
|
||||
|
||||
checkJournalIsLoaded();
|
||||
|
@ -1440,16 +1380,12 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
JournalFile usedFile = appendRecord(deleteRecordTX, false, false, tx, null);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendDeleteRecordTransactional::txID=" + txID +
|
||||
", id=" +
|
||||
id +
|
||||
", usedFile = " +
|
||||
usedFile);
|
||||
logger.trace("appendDeleteRecordTransactional::txID={}, id={}, usedFile = {}", txID, id, usedFile);
|
||||
}
|
||||
|
||||
tx.addNegative(usedFile, id);
|
||||
} catch (Throwable e) {
|
||||
logger.error("appendDeleteRecordTransactional:" + e, e);
|
||||
logger.error("Exception during appendDeleteRecordTransactional:", e);
|
||||
setErrorCondition(null, tx, e);
|
||||
} finally {
|
||||
journalLock.readLock().unlock();
|
||||
|
@ -1478,7 +1414,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
lineUpContext(callback);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("scheduling appendPrepareRecord::txID=" + txID);
|
||||
logger.trace("scheduling appendPrepareRecord::txID={}", txID);
|
||||
}
|
||||
|
||||
final SimpleFuture<JournalTransaction> result = newSyncAndCallbackResult(sync, callback);
|
||||
|
@ -1497,16 +1433,16 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
JournalFile usedFile = appendRecord(prepareRecord, true, sync, tx, callback);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendPrepareRecord::txID=" + txID + ", usedFile = " + usedFile);
|
||||
logger.trace("appendPrepareRecord::txID={}, usedFile = {}", txID, usedFile);
|
||||
}
|
||||
|
||||
tx.prepare(usedFile);
|
||||
} catch (ActiveMQShutdownException e) {
|
||||
result.fail(e);
|
||||
logger.error("appendPrepareRecord:" + e, e);
|
||||
logger.error("Exception during appendPrepareRecord:", e);
|
||||
} catch (Throwable e) {
|
||||
result.fail(e);
|
||||
logger.error("appendPrepareRecord:" + e, e);
|
||||
logger.error("Exception during appendPrepareRecord:", e);
|
||||
setErrorCondition(callback, tx, e);
|
||||
} finally {
|
||||
journalLock.readLock().unlock();
|
||||
|
@ -1556,9 +1492,8 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
lineUpContext(callback);
|
||||
}
|
||||
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("scheduling appendCommitRecord::txID=" + txID );
|
||||
logger.trace("scheduling appendCommitRecord::txID={}", txID);
|
||||
}
|
||||
|
||||
JournalTransaction txcheck = transactions.get(txID);
|
||||
|
@ -1585,16 +1520,16 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
JournalFile usedFile = appendRecord(commitRecord, true, sync, tx, callback);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendCommitRecord::txID=" + txID + ", usedFile = " + usedFile);
|
||||
logger.trace("appendCommitRecord::txID={}, usedFile = {}", txID, usedFile);
|
||||
}
|
||||
|
||||
tx.commit(usedFile);
|
||||
} catch (ActiveMQShutdownException e) {
|
||||
result.fail(e);
|
||||
logger.error("appendCommitRecord:" + e, e);
|
||||
logger.error("Exception during appendCommitRecord:", e);
|
||||
} catch (Throwable e) {
|
||||
result.fail(e);
|
||||
logger.error("appendCommitRecord:" + e, e);
|
||||
logger.error("Exception during appendCommitRecord:", e);
|
||||
setErrorCondition(callback, tx, e);
|
||||
} finally {
|
||||
journalLock.readLock().unlock();
|
||||
|
@ -1614,13 +1549,10 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
checkJournalIsLoaded();
|
||||
lineUpContext(callback);
|
||||
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("scheduling appendRollbackRecord::txID=" + txID );
|
||||
logger.trace("scheduling appendRollbackRecord::txID={}", txID);
|
||||
}
|
||||
|
||||
|
||||
|
||||
final SimpleFuture<JournalTransaction> result = newSyncAndCallbackResult(sync, callback);
|
||||
appendExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
|
@ -1630,7 +1562,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
final JournalTransaction tx = transactions.remove(txID);
|
||||
try {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("appendRollbackRecord::txID=" + txID );
|
||||
logger.trace("appendRollbackRecord::txID={}", txID);
|
||||
}
|
||||
|
||||
if (tx == null) {
|
||||
|
@ -1644,10 +1576,10 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
tx.rollback(usedFile);
|
||||
} catch (ActiveMQShutdownException e) {
|
||||
result.fail(e);
|
||||
logger.error("appendRollbackRecord:" + e, e);
|
||||
logger.error("Exception during appendRollbackRecord:", e);
|
||||
} catch (Throwable e) {
|
||||
result.fail(e);
|
||||
logger.error("appendRollbackRecord:" + e, e);
|
||||
logger.error("Exception during appendRollbackRecord:", e);
|
||||
setErrorCondition(callback, tx, e);
|
||||
} finally {
|
||||
journalLock.readLock().unlock();
|
||||
|
@ -1851,7 +1783,8 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
}
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("JournalImpl::compact " + JournalImpl.this + " for its " + (++compactCount) + " time");
|
||||
++compactCount; // Member used only for logging state when debug enabled
|
||||
logger.debug("JournalImpl::compact {} for its {} time", JournalImpl.this, compactCount);
|
||||
}
|
||||
|
||||
compactorLock.writeLock().lock();
|
||||
|
@ -1861,9 +1794,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
boolean previousReclaimValue = isAutoReclaim();
|
||||
|
||||
try {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Starting compacting operation on journal " + this);
|
||||
}
|
||||
logger.debug("Starting compacting operation on journal {}", this);
|
||||
|
||||
onCompactStart();
|
||||
|
||||
|
@ -1928,14 +1859,12 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
// Restore compacted dataFiles
|
||||
for (int i = newDatafiles.size() - 1; i >= 0; i--) {
|
||||
JournalFile fileToAdd = newDatafiles.get(i);
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Adding file " + fileToAdd + " back as datafile");
|
||||
}
|
||||
logger.trace("Adding file {} back as datafile", fileToAdd);
|
||||
filesRepository.addDataFileOnTop(fileToAdd);
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("There are " + filesRepository.getDataFilesCount() + " datafiles Now");
|
||||
logger.trace("There are {} datafiles Now", filesRepository.getDataFilesCount());
|
||||
}
|
||||
|
||||
// Replay pending commands (including updates, deletes and commits)
|
||||
|
@ -1949,9 +1878,8 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
// that happened during the compacting
|
||||
|
||||
localCompactor.getNewTransactions().forEach((id, newTransaction) -> {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Merging pending transaction " + newTransaction + " after compacting the journal");
|
||||
}
|
||||
logger.trace("Merging pending transaction {} after compacting the journal", newTransaction);
|
||||
|
||||
JournalTransaction liveTransaction = transactions.get(newTransaction.getId());
|
||||
if (liveTransaction != null) {
|
||||
liveTransaction.merge(newTransaction);
|
||||
|
@ -1974,15 +1902,11 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
renameFiles(dataFilesToProcess, newDatafiles);
|
||||
deleteControlFile(controlFile);
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Flushing compacting on journal " + this);
|
||||
}
|
||||
logger.debug("Flushing compacting on journal {}", this);
|
||||
|
||||
setAutoReclaim(previousReclaimValue);
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Finished compacting on journal " + this);
|
||||
}
|
||||
logger.debug("Finished compacting on journal {}", this);
|
||||
|
||||
} catch (Throwable e) {
|
||||
try {
|
||||
|
@ -1993,10 +1917,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
}
|
||||
} finally {
|
||||
compactorLock.writeLock().unlock();
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("JournalImpl::compact finalized");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -2131,7 +2052,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
final AtomicLong maxID = new AtomicLong(-1);
|
||||
|
||||
for (final JournalFile file : orderedFiles) {
|
||||
logger.trace("Loading file " + file.getFile().getFileName());
|
||||
logger.trace("Loading file {}", file.getFile().getFileName());
|
||||
|
||||
final AtomicBoolean hasData = new AtomicBoolean(false);
|
||||
|
||||
|
@ -2442,8 +2363,9 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
@Override
|
||||
public void processBackupCleanup() {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("processBackupCleanup with maxFiles = " + journalRetentionMaxFiles + " and period = " + journalRetentionPeriod);
|
||||
logger.debug("processBackupCleanup with maxFiles = {} and period = {}", journalRetentionMaxFiles, journalRetentionPeriod);
|
||||
}
|
||||
|
||||
if (journalRetentionFolder != null && (journalRetentionMaxFiles > 0 || journalRetentionPeriod > 0)) {
|
||||
|
||||
FilenameFilter fnf = (d, name) -> name.endsWith("." + filesRepository.getFileExtension());
|
||||
|
@ -2459,10 +2381,10 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
for (String fileName : fileNames) {
|
||||
long timeOnFile = getDatePortionMillis(fileName);
|
||||
if (timeOnFile < timeCutOf) {
|
||||
logger.debug("File " + fileName + " is too old and should go");
|
||||
logger.debug("File {} is too old and should go", fileName);
|
||||
File fileToRemove = new File(journalRetentionFolder, fileName);
|
||||
if (!fileToRemove.delete()) {
|
||||
logger.debug("Could not remove " + fileToRemove);
|
||||
logger.debug("Could not remove {}", fileToRemove);
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
|
@ -2478,7 +2400,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
int toRemove = fileNames.length - journalRetentionMaxFiles;
|
||||
|
||||
for (String file : fileNames) {
|
||||
logger.debug("Removing " + file);
|
||||
logger.debug("Removing {}", file);
|
||||
File fileToRemove = new File(journalRetentionFolder, file);
|
||||
fileToRemove.delete();
|
||||
toRemove--;
|
||||
|
@ -2551,9 +2473,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
|
||||
File copyTo = new File(journalRetentionFolder, fileName);
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Copying journal retention from " + copyFrom + " to " + copyTo);
|
||||
}
|
||||
logger.debug("Copying journal retention from {} to {}", copyFrom, copyTo);
|
||||
|
||||
try {
|
||||
Files.copy(copyFrom.toPath(), copyTo.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
|
@ -2641,9 +2561,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
for (JournalFile file : filesRepository.getDataFiles()) {
|
||||
if (file.isCanReclaim()) {
|
||||
// File can be reclaimed or deleted
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Reclaiming file " + file);
|
||||
}
|
||||
logger.trace("Reclaiming file {}", file);
|
||||
|
||||
filesRepository.removeDataFile(file);
|
||||
|
||||
|
@ -2676,12 +2594,14 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
|
||||
if (updateFactor > UPDATE_FACTOR) { // this means every add records with at least 10 records
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("There are " + addRecord + " records, with " + updateCount + " towards them. UpdateCound / AddCount = " + updateFactor + ", being greater than " + UPDATE_FACTOR + " meaning we have to schedule compacting");
|
||||
logger.debug("There are {} records, with {} towards them. UpdateCound / AddCount = {}, being greater than {} meaning we have to schedule compacting",
|
||||
addRecord, updateCount, updateFactor, UPDATE_FACTOR);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("There are " + addRecord + " records, with " + updateCount + " towards them. UpdateCound / AddCount = " + updateFactor + ", which is lower than " + UPDATE_FACTOR + " meaning we are ok to leave these records");
|
||||
logger.debug("There are {} records, with {} towards them. UpdateCound / AddCount = {}, which is lower than {} meaning we are ok to leave these records",
|
||||
addRecord, updateCount, updateFactor, UPDATE_FACTOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3659,9 +3579,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
scheduleReclaim();
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Moving next file " + currentFile);
|
||||
}
|
||||
logger.trace("Moving next file {}", currentFile);
|
||||
|
||||
fileFactory.activateBuffer(currentFile.getFile());
|
||||
}
|
||||
|
@ -3681,7 +3599,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
|
|||
try {
|
||||
scheduleCompactAndBlock(60);
|
||||
} catch (Exception e) {
|
||||
logger.warn("Error during compact", e.getMessage(), e);
|
||||
logger.warn("Error during compact", e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -240,14 +240,15 @@ public class JournalTransaction {
|
|||
// without setting this properly...
|
||||
if (compacting && compactor != null) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("adding txID=" + this.id + " into compacting");
|
||||
logger.trace("adding txID={} into compacting", this.id);
|
||||
}
|
||||
compactor.addCommandCommit(this, file);
|
||||
} else {
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("there was no compactor on commit txID=" + this.id);
|
||||
logger.trace("there was no compactor on commit txID={}", this.id);
|
||||
}
|
||||
|
||||
if (pos != null) {
|
||||
for (JournalUpdate trUpdate : pos) {
|
||||
JournalRecord posFiles = journal.getRecords().get(trUpdate.id);
|
||||
|
|
|
@ -108,7 +108,7 @@ public class AMQPConnectionCallback implements FailureListener, CloseListener {
|
|||
if (factory != null) {
|
||||
result = factory.create(server, manager, connection, protonConnectionDelegate);
|
||||
} else {
|
||||
logger.debug("Mo matching mechanism found for: " + mechanism);
|
||||
logger.debug("Mo matching mechanism found for: {}", mechanism);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
@ -241,7 +241,7 @@ public class AMQPConnectionCallback implements FailureListener, CloseListener {
|
|||
}
|
||||
|
||||
if (tx == null) {
|
||||
logger.warn("Couldn't find txid = " + txid);
|
||||
logger.warn("Couldn't find txid = {}", txid);
|
||||
throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.txNotFound(txid.toString());
|
||||
}
|
||||
|
||||
|
|
|
@ -714,7 +714,7 @@ public class AMQPSessionCallback implements SessionCallback {
|
|||
((ProtonServerSenderContext) consumer.getProtocolContext()).close(ec);
|
||||
connection.flush();
|
||||
} catch (ActiveMQAMQPException e) {
|
||||
logger.error("Error closing link for " + consumer.getQueue().getAddress());
|
||||
logger.error("Error closing link for {}", consumer.getQueue().getAddress());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -87,10 +87,10 @@ public class ProtonClientConnectionManager implements BaseConnectionLifeCycleLis
|
|||
public void connectionReadyForWrites(Object connectionID, boolean ready) {
|
||||
RemotingConnection connection = connectionMap.get(connectionID);
|
||||
if (connection != null) {
|
||||
log.info("Connection " + connection.getRemoteAddress() + " ready");
|
||||
log.info("Connection {} ready", connection.getRemoteAddress());
|
||||
connection.getTransportConnection().fireReady(true);
|
||||
} else {
|
||||
log.error("Connection with id " + connectionID + " not found in connectionReadyForWrites()!");
|
||||
log.error("Connection with id {} not found in connectionReadyForWrites()!", connectionID);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -337,7 +337,7 @@ public class AMQPBrokerConnection implements ClientConnectionLifeCycleListener,
|
|||
retryCounter++;
|
||||
ActiveMQAMQPProtocolLogger.LOGGER.retryConnection(brokerConnectConfiguration.getName(), host + ":" + port, retryCounter, brokerConnectConfiguration.getReconnectAttempts());
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Reconnecting in " + brokerConnectConfiguration.getRetryInterval() + ", this is the " + retryCounter + " of " + brokerConnectConfiguration.getReconnectAttempts());
|
||||
logger.debug("Reconnecting in {}, this is the {} of {}", brokerConnectConfiguration.getRetryInterval(), retryCounter, brokerConnectConfiguration.getReconnectAttempts());
|
||||
}
|
||||
reconnectFuture = scheduledExecutorService.schedule(() -> connectExecutor.execute(() -> doConnect()), brokerConnectConfiguration.getRetryInterval(), TimeUnit.MILLISECONDS);
|
||||
} else {
|
||||
|
@ -346,7 +346,7 @@ public class AMQPBrokerConnection implements ClientConnectionLifeCycleListener,
|
|||
connecting = false;
|
||||
ActiveMQAMQPProtocolLogger.LOGGER.retryConnectionFailed(brokerConnectConfiguration.getName(), host + ":" + port, lastRetryCounter);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("no more reconnections as the retry counter reached " + retryCounter + " out of " + brokerConnectConfiguration.getReconnectAttempts());
|
||||
logger.debug("no more reconnections as the retry counter reached {} out of {}", retryCounter, brokerConnectConfiguration.getReconnectAttempts());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -395,15 +395,13 @@ public class AMQPBrokerConnection implements ClientConnectionLifeCycleListener,
|
|||
mirrorControlQueue = server.createQueue(new QueueConfiguration(getMirrorSNF(replicaConfig)).setAddress(getMirrorSNF(replicaConfig)).setRoutingType(RoutingType.ANYCAST).setDurable(replicaConfig.isDurable()).setInternal(true), true);
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Mirror queue " + mirrorControlQueue.getName());
|
||||
}
|
||||
logger.debug("Mirror queue {}", mirrorControlQueue.getName());
|
||||
|
||||
mirrorControlQueue.setMirrorController(true);
|
||||
|
||||
QueueBinding snfReplicaQueueBinding = (QueueBinding)server.getPostOffice().getBinding(getMirrorSNF(replicaConfig));
|
||||
if (snfReplicaQueueBinding == null) {
|
||||
logger.warn("Queue does not exist even after creation! " + replicaConfig);
|
||||
logger.warn("Queue does not exist even after creation! {}", replicaConfig);
|
||||
throw new IllegalAccessException("Cannot start replica");
|
||||
}
|
||||
|
||||
|
@ -453,9 +451,7 @@ public class AMQPBrokerConnection implements ClientConnectionLifeCycleListener,
|
|||
AMQPSessionContext sessionContext,
|
||||
Queue queue,
|
||||
Symbol... capabilities) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Connecting inbound for " + queue);
|
||||
}
|
||||
logger.debug("Connecting inbound for {}", queue);
|
||||
|
||||
if (session == null) {
|
||||
logger.debug("session is null");
|
||||
|
@ -501,10 +497,7 @@ public class AMQPBrokerConnection implements ClientConnectionLifeCycleListener,
|
|||
String brokerID,
|
||||
Symbol[] desiredCapabilities,
|
||||
Symbol[] targetCapabilities) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Connecting outbound for " + queue);
|
||||
}
|
||||
|
||||
logger.debug("Connecting outbound for {}", queue);
|
||||
|
||||
if (session == null) {
|
||||
logger.debug("Session is null");
|
||||
|
@ -697,9 +690,7 @@ public class AMQPBrokerConnection implements ClientConnectionLifeCycleListener,
|
|||
// keeping a single executor thread to this purpose would simplify things
|
||||
connectExecutor.execute(() -> {
|
||||
if (connecting) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Broker connection " + this.getName() + " was already in retry mode, exception or retry not captured");
|
||||
}
|
||||
logger.debug("Broker connection {} was already in retry mode, exception or retry not captured", getName());
|
||||
return;
|
||||
}
|
||||
connecting = true;
|
||||
|
|
|
@ -76,9 +76,8 @@ public class AMQPBrokerConnectionManager implements ActiveMQComponent, ClientCon
|
|||
NettyConnector bridgesConnector = (NettyConnector)factory.createConnector(config.getTransportConfigurations().get(0).getParams(), null, this, server.getExecutorFactory().getExecutor(), server.getThreadPool(), server.getScheduledPool(), new ClientProtocolManagerWithAMQP(protonProtocolManager));
|
||||
bridgesConnector.start();
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Connecting " + config);
|
||||
}
|
||||
logger.debug("Connecting {}", config);
|
||||
|
||||
AMQPBrokerConnection amqpBrokerConnection = new AMQPBrokerConnection(this, config, protonProtocolManager, server, bridgesConnector);
|
||||
amqpBrokerConnectionList.add(amqpBrokerConnection);
|
||||
server.registerBrokerConnection(amqpBrokerConnection);
|
||||
|
|
|
@ -128,9 +128,7 @@ public class AMQPMirrorControllerSource extends BasicMirrorController<Sender> im
|
|||
|
||||
@Override
|
||||
public void addAddress(AddressInfo addressInfo) throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(server + " addAddress " + addressInfo);
|
||||
}
|
||||
logger.trace("{} addAddress {}", server, addressInfo);
|
||||
|
||||
if (getControllerInUse() != null && !addressInfo.isInternal()) {
|
||||
return;
|
||||
|
@ -148,9 +146,8 @@ public class AMQPMirrorControllerSource extends BasicMirrorController<Sender> im
|
|||
|
||||
@Override
|
||||
public void deleteAddress(AddressInfo addressInfo) throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(server + " deleteAddress " + addressInfo);
|
||||
}
|
||||
logger.trace("{} deleteAddress {}", server, addressInfo);
|
||||
|
||||
if (invalidTarget(getControllerInUse()) || addressInfo.isInternal()) {
|
||||
return;
|
||||
}
|
||||
|
@ -165,18 +162,18 @@ public class AMQPMirrorControllerSource extends BasicMirrorController<Sender> im
|
|||
|
||||
@Override
|
||||
public void createQueue(QueueConfiguration queueConfiguration) throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(server + " createQueue " + queueConfiguration);
|
||||
}
|
||||
logger.trace("{} createQueue {}", server, queueConfiguration);
|
||||
|
||||
if (invalidTarget(getControllerInUse()) || queueConfiguration.isInternal()) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Rejecting ping pong on create " + queueConfiguration + " as isInternal=" + queueConfiguration.isInternal() + " and mirror target = " + getControllerInUse());
|
||||
logger.trace("Rejecting ping pong on create {} as isInternal={} and mirror target = {}", queueConfiguration, queueConfiguration.isInternal(), getControllerInUse());
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
if (ignoreAddress(queueConfiguration.getAddress())) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Skipping create " + queueConfiguration + ", queue address " + queueConfiguration.getAddress() + " doesn't match filter");
|
||||
logger.trace("Skipping create {}, queue address {} doesn't match filter", queueConfiguration, queueConfiguration.getAddress());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -189,7 +186,7 @@ public class AMQPMirrorControllerSource extends BasicMirrorController<Sender> im
|
|||
@Override
|
||||
public void deleteQueue(SimpleString address, SimpleString queue) throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(server + " deleteQueue " + address + "/" + queue);
|
||||
logger.trace("{} deleteQueue {}/{}", server, address, queue);
|
||||
}
|
||||
|
||||
if (invalidTarget(getControllerInUse())) {
|
||||
|
@ -223,29 +220,21 @@ public class AMQPMirrorControllerSource extends BasicMirrorController<Sender> im
|
|||
SimpleString address = context.getAddress(message);
|
||||
|
||||
if (invalidTarget(context.getMirrorSource())) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("server " + server + " is discarding send to avoid infinite loop (reflection with the mirror)");
|
||||
}
|
||||
logger.trace("server {} is discarding send to avoid infinite loop (reflection with the mirror)", server);
|
||||
return;
|
||||
}
|
||||
|
||||
if (context.isInternal()) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("server " + server + " is discarding send to avoid sending to internal queue");
|
||||
}
|
||||
logger.trace("server {} is discarding send to avoid sending to internal queue", server);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ignoreAddress(address)) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("server " + server + " is discarding send to address " + address + ", address doesn't match filter");
|
||||
}
|
||||
logger.trace("server {} is discarding send to address {}, address doesn't match filter", server, address);
|
||||
return;
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(server + " send message " + message);
|
||||
}
|
||||
logger.trace("{} send message {}", server, message);
|
||||
|
||||
try {
|
||||
context.setReusable(false);
|
||||
|
@ -253,9 +242,7 @@ public class AMQPMirrorControllerSource extends BasicMirrorController<Sender> im
|
|||
MessageReference ref = MessageReference.Factory.createReference(message, snfQueue);
|
||||
String nodeID = setProtocolData(idSupplier, ref);
|
||||
if (nodeID != null && nodeID.equals(getRemoteMirrorId())) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Message " + message + "already belonged to the node, " + getRemoteMirrorId() + ", it won't circle send");
|
||||
}
|
||||
logger.trace("Message {} already belonged to the node, {}, it won't circle send", message, getRemoteMirrorId());
|
||||
return;
|
||||
}
|
||||
snfQueue.refUp(ref);
|
||||
|
@ -331,26 +318,24 @@ public class AMQPMirrorControllerSource extends BasicMirrorController<Sender> im
|
|||
|
||||
if ((ref.getQueue() != null && (ref.getQueue().isInternalQueue() || ref.getQueue().isMirrorController()))) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug(server + " rejecting postAcknowledge queue=" + ref.getQueue().getName() + ", ref=" + ref + " to avoid infinite loop with the mirror (reflection)");
|
||||
logger.debug("{} rejecting postAcknowledge queue={}, ref={} to avoid infinite loop with the mirror (reflection)", server, ref.getQueue().getName(), ref);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (ignoreAddress(ref.getQueue().getAddress())) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(server + " rejecting postAcknowledge queue=" + ref.getQueue().getName() + ", ref=" + ref + ", queue address is excluded");
|
||||
logger.trace("{} rejecting postAcknowledge queue={}, ref={}, queue address is excluded", server, ref.getQueue().getName(), ref);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(server + " postAcknowledge " + ref);
|
||||
}
|
||||
logger.trace("{} postAcknowledge {}", server, ref);
|
||||
|
||||
String nodeID = idSupplier.getServerID(ref); // notice the brokerID will be null for any message generated on this broker.
|
||||
long internalID = idSupplier.getID(ref);
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(server + " sending ack message from server " + nodeID + " with messageID=" + internalID);
|
||||
logger.trace("{} sending ack message from server {} with messageID={}", server, nodeID, internalID);
|
||||
}
|
||||
Message message = createMessage(ref.getQueue().getAddress(), ref.getQueue().getName(), POST_ACK, nodeID, internalID, reason);
|
||||
route(server, message);
|
||||
|
|
|
@ -120,9 +120,7 @@ public class AMQPMirrorControllerTarget extends ProtonAbstractReceiver implement
|
|||
|
||||
@Override
|
||||
public void run() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Delivery settling for " + delivery + ", context=" + delivery.getContext());
|
||||
}
|
||||
logger.trace("Delivery settling for {}, context={}", delivery, delivery.getContext());
|
||||
delivery.disposition(Accepted.getInstance());
|
||||
settle(delivery);
|
||||
connection.flush();
|
||||
|
@ -188,9 +186,7 @@ public class AMQPMirrorControllerTarget extends ProtonAbstractReceiver implement
|
|||
recoverContext();
|
||||
incrementSettle();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(server + "::actualdelivery call for " + message);
|
||||
}
|
||||
logger.trace("{}::actualdelivery call for {}", server, message);
|
||||
setControllerInUse(this);
|
||||
|
||||
delivery.setContext(message);
|
||||
|
@ -280,17 +276,15 @@ public class AMQPMirrorControllerTarget extends ProtonAbstractReceiver implement
|
|||
|
||||
@Override
|
||||
public void addAddress(AddressInfo addressInfo) throws Exception {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug(server + " adding address " + addressInfo);
|
||||
}
|
||||
logger.debug("{} adding address {}", server, addressInfo);
|
||||
|
||||
server.addAddressInfo(addressInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAddress(AddressInfo addressInfo) throws Exception {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug(server + " delete address " + addressInfo);
|
||||
}
|
||||
logger.debug("{} delete address {}", server, addressInfo);
|
||||
|
||||
try {
|
||||
server.removeAddressInfo(addressInfo.getName(), null, true);
|
||||
} catch (ActiveMQAddressDoesNotExistException expected) {
|
||||
|
@ -303,25 +297,26 @@ public class AMQPMirrorControllerTarget extends ProtonAbstractReceiver implement
|
|||
|
||||
@Override
|
||||
public void createQueue(QueueConfiguration queueConfiguration) throws Exception {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug(server + " adding queue " + queueConfiguration);
|
||||
}
|
||||
logger.debug("{} adding queue {}", server, queueConfiguration);
|
||||
|
||||
try {
|
||||
server.createQueue(queueConfiguration, true);
|
||||
} catch (Exception e) {
|
||||
logger.debug("Queue could not be created, already existed " + queueConfiguration, e);
|
||||
logger.debug("Queue could not be created, already existed {}", queueConfiguration, e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteQueue(SimpleString addressName, SimpleString queueName) throws Exception {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug(server + " destroy queue " + queueName + " on address = " + addressName + " server " + server.getIdentity());
|
||||
logger.debug("{} destroy queue {} on address = {} server {}", server, queueName, addressName, server.getIdentity());
|
||||
}
|
||||
try {
|
||||
server.destroyQueue(queueName, null, false, true, false, false);
|
||||
} catch (ActiveMQNonExistentQueueException expected) {
|
||||
logger.debug(server + " queue " + queueName + " was previously removed", expected);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("{} queue {} was previously removed", server, queueName, expected);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -333,19 +328,20 @@ public class AMQPMirrorControllerTarget extends ProtonAbstractReceiver implement
|
|||
final Queue targetQueue = server.locateQueue(queue);
|
||||
|
||||
if (targetQueue == null) {
|
||||
logger.warn("Queue " + queue + " not found on mirror target, ignoring ack for queue=" + queue + ", messageID=" + messageID + ", nodeID=" + nodeID);
|
||||
logger.warn("Queue {} not found on mirror target, ignoring ack for queue={}, messageID={}, nodeID={}", queue, queue, messageID, nodeID);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
// we only do the following check if debug
|
||||
if (targetQueue.getConsumerCount() > 0) {
|
||||
logger.debug("server " + server.getIdentity() + ", queue " + targetQueue.getName() + " has consumers while delivering ack for " + messageID);
|
||||
logger.debug("server {}, queue {} has consumers while delivering ack for {}", server.getIdentity(), targetQueue.getName(), messageID);
|
||||
}
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Server " + server.getIdentity() + " with queue = " + queue + " being acked for " + messageID + " coming from " + messageID + " targetQueue = " + targetQueue);
|
||||
logger.trace("Server {} with queue = {} being acked for {} coming from {} targetQueue = {}",
|
||||
server.getIdentity(), queue, messageID, messageID, targetQueue);
|
||||
}
|
||||
|
||||
performAck(nodeID, messageID, targetQueue, ackMessage, reason, (short)0);
|
||||
|
@ -359,13 +355,13 @@ public class AMQPMirrorControllerTarget extends ProtonAbstractReceiver implement
|
|||
|
||||
private void performAck(String nodeID, long messageID, Queue targetQueue, ACKMessageOperation ackMessageOperation, AckReason reason, final short retry) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("performAck (nodeID=" + nodeID + ", messageID=" + messageID + ")" + ", targetQueue=" + targetQueue.getName());
|
||||
logger.trace("performAck (nodeID={}, messageID={}), targetQueue={}", nodeID, messageID, targetQueue.getName());
|
||||
}
|
||||
MessageReference reference = targetQueue.removeWithSuppliedID(nodeID, messageID, referenceNodeStore);
|
||||
|
||||
if (reference == null) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Retrying Reference not found on messageID=" + messageID + " nodeID=" + nodeID + ", currentRetry=" + retry);
|
||||
logger.debug("Retrying Reference not found on messageID={}, nodeID={}, currentRetry={}", messageID, nodeID, retry);
|
||||
}
|
||||
switch (retry) {
|
||||
case 0:
|
||||
|
@ -394,7 +390,7 @@ public class AMQPMirrorControllerTarget extends ProtonAbstractReceiver implement
|
|||
|
||||
if (reference != null) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Post ack Server " + server + " worked well for messageID=" + messageID + " nodeID=" + nodeID);
|
||||
logger.trace("Post ack Server {} worked well for messageID={} nodeID={}", server, messageID, nodeID);
|
||||
}
|
||||
try {
|
||||
switch (reason) {
|
||||
|
@ -437,7 +433,7 @@ public class AMQPMirrorControllerTarget extends ProtonAbstractReceiver implement
|
|||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("sendMessage on server " + server + " for message " + message + " with internalID = " + internalIDLong + " mirror id " + internalMirrorID);
|
||||
logger.trace("sendMessage on server {} for message {} with internalID = {} mirror id {}", server, message, internalIDLong, internalMirrorID);
|
||||
}
|
||||
|
||||
routingContext.setDuplicateDetection(false); // we do our own duplicate detection here
|
||||
|
|
|
@ -776,7 +776,7 @@ public class AMQPConnectionContext extends ProtonInitializable implements EventH
|
|||
if (handler != null) {
|
||||
handler.onMessage(delivery);
|
||||
} else {
|
||||
log.warn("Handler is null, can't delivery " + delivery, new Exception("tracing location"));
|
||||
log.warn("Handler is null, can't delivery {}", delivery, new Exception("tracing location"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -678,9 +678,8 @@ public class ProtonServerSenderContext extends ProtonInitializable implements Pr
|
|||
replaceInitialHeader(deliveryAnnotationsToEncode, context, new NettyWritable(frameBuffer));
|
||||
} catch (IndexOutOfBoundsException indexOutOfBoundsException) {
|
||||
assert position == 0 : "this shouldn't happen unless replaceInitialHeader is updating position before modifying frameBuffer";
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Delivery of message failed with an overFlowException, retrying again with expandable buffer");
|
||||
}
|
||||
|
||||
// on the very first packet, if the initial header was replaced with a much bigger header (re-encoding)
|
||||
// we could recover the situation with a retry using an expandable buffer.
|
||||
// this is tested on org.apache.activemq.artemis.tests.integration.amqp.AmqpMessageDivertsTest
|
||||
|
|
|
@ -411,7 +411,7 @@ public class ProtonHandler extends ProtonInitializable implements SaslListener {
|
|||
|
||||
int received = sasl.recv(dataSASL, 0, dataSASL.length);
|
||||
if (log.isTraceEnabled()) {
|
||||
log.trace("Working on sasl, length:" + received);
|
||||
log.trace("Working on sasl, length:{}", received);
|
||||
}
|
||||
|
||||
byte[] response = chosenMechanism.processSASL(received != -1 ? dataSASL : null);
|
||||
|
@ -559,9 +559,8 @@ public class ProtonHandler extends ProtonInitializable implements SaslListener {
|
|||
}
|
||||
while ((ev = collector.peek()) != null) {
|
||||
for (EventHandler h : handlers) {
|
||||
if (log.isTraceEnabled()) {
|
||||
log.trace("Handling " + ev + " towards " + h);
|
||||
}
|
||||
log.trace("Handling {} towards {}", ev, h);
|
||||
|
||||
try {
|
||||
Events.dispatch(ev, h);
|
||||
} catch (ActiveMQSecurityException e) {
|
||||
|
|
|
@ -418,7 +418,7 @@ public class TestConversions extends Assert {
|
|||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Message encoded :: " + encodedMessage.toDebugString());
|
||||
logger.debug("Message encoded :: {}", encodedMessage.toDebugString());
|
||||
}
|
||||
|
||||
encodedMessage.messageChanged();
|
||||
|
@ -428,9 +428,7 @@ public class TestConversions extends Assert {
|
|||
// this line is needed to force a failure
|
||||
ICoreMessage coreMessage = encodedMessage.toCore();
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Converted message: " + coreMessage);
|
||||
}
|
||||
logger.debug("Converted message: {}", coreMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -459,9 +457,7 @@ public class TestConversions extends Assert {
|
|||
AmqpValue value = (AmqpValue) encodedMessage.getProtonMessage().getBody();
|
||||
Assert.assertEquals(text, (String) value.getValue());
|
||||
ICoreMessage coreMessage = encodedMessage.toCore();
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Converted message: " + coreMessage);
|
||||
}
|
||||
logger.debug("Converted message: {}", coreMessage);
|
||||
|
||||
// I'm going to replace the message every 10 messages by a re-encoded version to check if the wiring still acturate.
|
||||
// I want to mix replacing and not replacing to make sure the re-encoding is not giving me any surprises
|
||||
|
|
|
@ -243,10 +243,8 @@ public class MQTTPublishManager {
|
|||
if (closeMqttConnectionOnPublishAuthorizationFailure) {
|
||||
throw e;
|
||||
} else {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("MQTT 3.1.1 client not authorized to publish message.");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* For MQTT 3.1 clients:
|
||||
|
@ -258,10 +256,8 @@ public class MQTTPublishManager {
|
|||
*
|
||||
* Log the failure since we have to just swallow it.
|
||||
*/
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("MQTT 3.1 client not authorized to publish message.");
|
||||
}
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
MQTTLogger.LOGGER.failedToPublishMqttMessage(t.getMessage(), t);
|
||||
tx.rollback();
|
||||
|
@ -364,7 +360,7 @@ public class MQTTPublishManager {
|
|||
releaseFlowControl(ref.getB());
|
||||
}
|
||||
} catch (ActiveMQIllegalStateException e) {
|
||||
logger.warn("MQTT Client(" + session.getState().getClientId() + ") attempted to Ack already Ack'd message");
|
||||
logger.warn("MQTT Client({}) attempted to Ack already Ack'd message", session.getState().getClientId());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -293,7 +293,7 @@ public class OpenWireConnection extends AbstractRemotingConnection implements Se
|
|||
* Log packaged into a separate method for performance reasons.
|
||||
*/
|
||||
private static void traceBufferReceived(Object connectionID, Command command) {
|
||||
logger.trace("connectionID: " + connectionID + " RECEIVED: " + (command == null ? "NULL" : command));
|
||||
logger.trace("connectionID: {} RECEIVED: {}", connectionID, (command == null ? "NULL" : command));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -531,7 +531,7 @@ public class OpenWireConnection extends AbstractRemotingConnection implements Se
|
|||
* Log packaged into a separate method for performance reasons.
|
||||
*/
|
||||
private static void tracePhysicalSend(Connection transportConnection, Command command) {
|
||||
logger.trace("connectionID: " + (transportConnection == null ? "" : transportConnection.getID()) + " SENDING: " + (command == null ? "NULL" : command));
|
||||
logger.trace("connectionID: {} SENDING: {}", (transportConnection == null ? "" : transportConnection.getID()), (command == null ? "NULL" : command));
|
||||
}
|
||||
|
||||
public void physicalSend(Command command) throws IOException {
|
||||
|
@ -770,8 +770,7 @@ public class OpenWireConnection extends AbstractRemotingConnection implements Se
|
|||
try {
|
||||
protocolManager.getScheduledPool().schedule(() -> {
|
||||
fail(new ActiveMQException(reason, cause, ActiveMQExceptionType.GENERIC_EXCEPTION), reason);
|
||||
logger.warn("Stopping " + transportConnection.getRemoteAddress() + "because " +
|
||||
reason);
|
||||
logger.warn("Stopping {} because {}", transportConnection.getRemoteAddress(), reason);
|
||||
}, waitTimeMillis, TimeUnit.MILLISECONDS);
|
||||
} catch (Throwable t) {
|
||||
logger.warn("Cannot stop connection. This exception will be ignored.", t);
|
||||
|
@ -868,9 +867,7 @@ public class OpenWireConnection extends AbstractRemotingConnection implements Se
|
|||
* This will answer with commands to the client
|
||||
*/
|
||||
public boolean sendCommand(final Command command) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("sending " + command);
|
||||
}
|
||||
logger.trace("sending {}", command);
|
||||
|
||||
if (isDestroyed()) {
|
||||
return false;
|
||||
|
@ -922,7 +919,8 @@ public class OpenWireConnection extends AbstractRemotingConnection implements Se
|
|||
if (!tempDestinationExists(info.getDestination().getPhysicalName())) {
|
||||
this.state.addTempDestination(info);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug(this + " added temp destination to state: " + info.getDestination().getPhysicalName() + "; " + state.getTempDestinations().size());
|
||||
logger.debug("{} added temp destination to state: {} ; {}",
|
||||
this, info.getDestination().getPhysicalName(), state.getTempDestinations().size());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1035,7 +1033,7 @@ public class OpenWireConnection extends AbstractRemotingConnection implements Se
|
|||
ActiveMQDestination dest = new ActiveMQTempQueue(bindingName.toString());
|
||||
state.removeTempDestination(dest);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug(this + " removed temp destination from state: " + bindingName + "; " + state.getTempDestinations().size());
|
||||
logger.debug("{} removed temp destination from state: {} ; {}", this, bindingName, state.getTempDestinations().size());
|
||||
}
|
||||
|
||||
if (!AdvisorySupport.isAdvisoryTopic(dest)) {
|
||||
|
@ -1046,7 +1044,7 @@ public class OpenWireConnection extends AbstractRemotingConnection implements Se
|
|||
try {
|
||||
protocolManager.fireAdvisory(context, topic, advInfo);
|
||||
} catch (Exception e) {
|
||||
logger.warn("Failed to fire advisory on " + topic, e);
|
||||
logger.warn("Failed to fire advisory on {}", topic, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1138,7 +1136,7 @@ public class OpenWireConnection extends AbstractRemotingConnection implements Se
|
|||
if (!dest.isTemporary()) {
|
||||
// this should not really happen,
|
||||
// so I'm not creating a Logger for this
|
||||
logger.warn("OpenWire client sending a queue remove towards " + dest.getPhysicalName());
|
||||
logger.warn("OpenWire client sending a queue remove towards {}", dest.getPhysicalName());
|
||||
}
|
||||
try {
|
||||
server.destroyQueue(new SimpleString(dest.getPhysicalName()), getRemotingConnection());
|
||||
|
@ -1369,9 +1367,7 @@ public class OpenWireConnection extends AbstractRemotingConnection implements Se
|
|||
ex.errorCode = XAException.XA_HEURRB;
|
||||
throw ex;
|
||||
} else {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("xarollback into " + tx + ", xid=" + xid + " forcing a rollback regular");
|
||||
}
|
||||
logger.trace("xarollback into {}, xid={} forcing a rollback regular", tx, xid);
|
||||
|
||||
try {
|
||||
if (amqSession != null) {
|
||||
|
@ -1387,9 +1383,8 @@ public class OpenWireConnection extends AbstractRemotingConnection implements Se
|
|||
}
|
||||
} else {
|
||||
if (tx.getState() == Transaction.State.SUSPENDED) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("xarollback into " + tx + " sending tx back as it was suspended");
|
||||
}
|
||||
logger.trace("xarollback into {} sending tx back as it was suspended", tx);
|
||||
|
||||
// Put it back
|
||||
resourceManager.putTransaction(xid, tx, OpenWireConnection.this);
|
||||
XAException ex = new XAException("Cannot commit transaction, it is suspended " + xid);
|
||||
|
@ -1520,9 +1515,8 @@ public class OpenWireConnection extends AbstractRemotingConnection implements Se
|
|||
if (txID.isXATransaction()) {
|
||||
ResourceManager resourceManager = server.getResourceManager();
|
||||
Xid xid = OpenWireUtil.toXID(txID);
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("XAcommit into " + tx + ", xid=" + xid);
|
||||
}
|
||||
|
||||
logger.trace("XAcommit into {}, xid={}", tx, xid);
|
||||
|
||||
if (tx == null) {
|
||||
if (resourceManager.getHeuristicCommittedTransactions().contains(xid)) {
|
||||
|
@ -1535,9 +1529,7 @@ public class OpenWireConnection extends AbstractRemotingConnection implements Se
|
|||
ex.errorCode = XAException.XA_HEURRB;
|
||||
throw ex;
|
||||
} else {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("XAcommit into " + tx + ", xid=" + xid + " cannot find it");
|
||||
}
|
||||
logger.trace("XAcommit into {}, xid={} cannot find it", tx, xid);
|
||||
XAException ex = new XAException("Cannot find xid in resource manager: " + xid);
|
||||
ex.errorCode = XAException.XAER_NOTA;
|
||||
throw ex;
|
||||
|
|
|
@ -40,9 +40,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
public ActiveMQRABytesMessage(final BytesMessage message, final ActiveMQRASession session) {
|
||||
super(message, session);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor(" + message + ", " + session + ")");
|
||||
}
|
||||
logger.trace("constructor({}, {})", message, session);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,9 +51,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
*/
|
||||
@Override
|
||||
public long getBodyLength() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getBodyLength()");
|
||||
}
|
||||
|
||||
return ((BytesMessage) message).getBodyLength();
|
||||
}
|
||||
|
@ -68,9 +64,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
*/
|
||||
@Override
|
||||
public boolean readBoolean() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readBoolean()");
|
||||
}
|
||||
|
||||
return ((BytesMessage) message).readBoolean();
|
||||
}
|
||||
|
@ -83,9 +77,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
*/
|
||||
@Override
|
||||
public byte readByte() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readByte()");
|
||||
}
|
||||
|
||||
return ((BytesMessage) message).readByte();
|
||||
}
|
||||
|
@ -101,7 +93,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
@Override
|
||||
public int readBytes(final byte[] value, final int length) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readBytes(" + Arrays.toString(value) + ", " + length + ")");
|
||||
logger.trace("readBytes({}, {})", Arrays.toString(value), length);
|
||||
}
|
||||
|
||||
return ((BytesMessage) message).readBytes(value, length);
|
||||
|
@ -117,7 +109,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
@Override
|
||||
public int readBytes(final byte[] value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readBytes(" + Arrays.toString(value) + ")");
|
||||
logger.trace("readBytes({})", Arrays.toString(value));
|
||||
}
|
||||
|
||||
return ((BytesMessage) message).readBytes(value);
|
||||
|
@ -131,9 +123,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
*/
|
||||
@Override
|
||||
public char readChar() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readChar()");
|
||||
}
|
||||
|
||||
return ((BytesMessage) message).readChar();
|
||||
}
|
||||
|
@ -146,9 +136,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
*/
|
||||
@Override
|
||||
public double readDouble() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readDouble()");
|
||||
}
|
||||
|
||||
return ((BytesMessage) message).readDouble();
|
||||
}
|
||||
|
@ -161,9 +149,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
*/
|
||||
@Override
|
||||
public float readFloat() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readFloat()");
|
||||
}
|
||||
|
||||
return ((BytesMessage) message).readFloat();
|
||||
}
|
||||
|
@ -176,9 +162,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
*/
|
||||
@Override
|
||||
public int readInt() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readInt()");
|
||||
}
|
||||
|
||||
return ((BytesMessage) message).readInt();
|
||||
}
|
||||
|
@ -191,9 +175,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
*/
|
||||
@Override
|
||||
public long readLong() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readLong()");
|
||||
}
|
||||
|
||||
return ((BytesMessage) message).readLong();
|
||||
}
|
||||
|
@ -206,9 +188,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
*/
|
||||
@Override
|
||||
public short readShort() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readShort()");
|
||||
}
|
||||
|
||||
return ((BytesMessage) message).readShort();
|
||||
}
|
||||
|
@ -221,9 +201,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
*/
|
||||
@Override
|
||||
public int readUnsignedByte() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readUnsignedByte()");
|
||||
}
|
||||
|
||||
return ((BytesMessage) message).readUnsignedByte();
|
||||
}
|
||||
|
@ -236,9 +214,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
*/
|
||||
@Override
|
||||
public int readUnsignedShort() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readUnsignedShort()");
|
||||
}
|
||||
|
||||
return ((BytesMessage) message).readUnsignedShort();
|
||||
}
|
||||
|
@ -251,9 +227,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
*/
|
||||
@Override
|
||||
public String readUTF() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readUTF()");
|
||||
}
|
||||
|
||||
return ((BytesMessage) message).readUTF();
|
||||
}
|
||||
|
@ -265,9 +239,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
*/
|
||||
@Override
|
||||
public void reset() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("reset()");
|
||||
}
|
||||
|
||||
((BytesMessage) message).reset();
|
||||
}
|
||||
|
@ -281,7 +253,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
@Override
|
||||
public void writeBoolean(final boolean value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeBoolean(" + value + ")");
|
||||
logger.trace("writeBoolean({})", value);
|
||||
}
|
||||
|
||||
((BytesMessage) message).writeBoolean(value);
|
||||
|
@ -296,7 +268,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
@Override
|
||||
public void writeByte(final byte value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeByte(" + value + ")");
|
||||
logger.trace("writeByte({})", value);
|
||||
}
|
||||
|
||||
((BytesMessage) message).writeByte(value);
|
||||
|
@ -313,7 +285,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
@Override
|
||||
public void writeBytes(final byte[] value, final int offset, final int length) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeBytes(" + Arrays.toString(value) + ", " + offset + ", " + length + ")");
|
||||
logger.trace("writeBytes({}, {}, {})", Arrays.toString(value), offset, length);
|
||||
}
|
||||
|
||||
((BytesMessage) message).writeBytes(value, offset, length);
|
||||
|
@ -328,7 +300,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
@Override
|
||||
public void writeBytes(final byte[] value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeBytes(" + Arrays.toString(value) + ")");
|
||||
logger.trace("writeBytes({})", Arrays.toString(value));
|
||||
}
|
||||
|
||||
((BytesMessage) message).writeBytes(value);
|
||||
|
@ -343,7 +315,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
@Override
|
||||
public void writeChar(final char value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeChar(" + value + ")");
|
||||
logger.trace("writeChar({})", value);
|
||||
}
|
||||
|
||||
((BytesMessage) message).writeChar(value);
|
||||
|
@ -358,7 +330,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
@Override
|
||||
public void writeDouble(final double value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeDouble(" + value + ")");
|
||||
logger.trace("writeDouble({})", value);
|
||||
}
|
||||
|
||||
((BytesMessage) message).writeDouble(value);
|
||||
|
@ -373,7 +345,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
@Override
|
||||
public void writeFloat(final float value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeFloat(" + value + ")");
|
||||
logger.trace("writeFloat({})", value);
|
||||
}
|
||||
|
||||
((BytesMessage) message).writeFloat(value);
|
||||
|
@ -388,7 +360,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
@Override
|
||||
public void writeInt(final int value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeInt(" + value + ")");
|
||||
logger.trace("writeInt({})", value);
|
||||
}
|
||||
|
||||
((BytesMessage) message).writeInt(value);
|
||||
|
@ -403,7 +375,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
@Override
|
||||
public void writeLong(final long value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeLong(" + value + ")");
|
||||
logger.trace("writeLong({})", value);
|
||||
}
|
||||
|
||||
((BytesMessage) message).writeLong(value);
|
||||
|
@ -417,9 +389,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
*/
|
||||
@Override
|
||||
public void writeObject(final Object value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeObject(" + value + ")");
|
||||
}
|
||||
logger.trace("writeObject({})", value);
|
||||
|
||||
((BytesMessage) message).writeObject(value);
|
||||
}
|
||||
|
@ -433,7 +403,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
@Override
|
||||
public void writeShort(final short value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeShort(" + value + ")");
|
||||
logger.trace("writeShort({})", value);
|
||||
}
|
||||
|
||||
((BytesMessage) message).writeShort(value);
|
||||
|
@ -447,9 +417,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe
|
|||
*/
|
||||
@Override
|
||||
public void writeUTF(final String value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeUTF(" + value + ")");
|
||||
}
|
||||
logger.trace("writeUTF({})", value);
|
||||
|
||||
((BytesMessage) message).writeUTF(value);
|
||||
}
|
||||
|
|
|
@ -75,25 +75,19 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
|
|||
* @param cm The connection manager
|
||||
*/
|
||||
public ActiveMQRAConnectionFactoryImpl(final ActiveMQRAManagedConnectionFactory mcf, final ConnectionManager cm) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor(" + mcf + ", " + cm + ")");
|
||||
}
|
||||
logger.trace("constructor({}, {})", mcf, cm);
|
||||
|
||||
this.mcf = mcf;
|
||||
|
||||
if (cm == null) {
|
||||
// This is standalone usage, no appserver
|
||||
this.cm = new ActiveMQRAConnectionManager();
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Created new ConnectionManager=" + this.cm);
|
||||
}
|
||||
logger.trace("Created new ConnectionManager={}", this.cm);
|
||||
} else {
|
||||
this.cm = cm;
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Using ManagedConnectionFactory=" + mcf + ", ConnectionManager=" + cm);
|
||||
}
|
||||
logger.trace("Using ManagedConnectionFactory={}, ConnectionManager={}", mcf, cm);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -103,9 +97,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
|
|||
*/
|
||||
@Override
|
||||
public void setReference(final Reference reference) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setReference(" + reference + ")");
|
||||
}
|
||||
logger.trace("setReference({})", reference);
|
||||
|
||||
this.reference = reference;
|
||||
}
|
||||
|
@ -117,9 +109,8 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
|
|||
*/
|
||||
@Override
|
||||
public Reference getReference() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getReference()");
|
||||
}
|
||||
|
||||
if (reference == null) {
|
||||
try {
|
||||
reference = new Reference(this.getClass().getCanonicalName(), new SerializableObjectRefAddr("ActiveMQ-CF", this), ActiveMQRAConnectionFactoryObjectFactory.class.getCanonicalName(), null);
|
||||
|
@ -140,15 +131,11 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
|
|||
*/
|
||||
@Override
|
||||
public QueueConnection createQueueConnection() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createQueueConnection()");
|
||||
}
|
||||
|
||||
ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.QUEUE_CONNECTION);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Created queue connection: " + s);
|
||||
}
|
||||
logger.trace("Created queue connection: {}", s);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
@ -163,9 +150,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
|
|||
*/
|
||||
@Override
|
||||
public QueueConnection createQueueConnection(final String userName, final String password) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createQueueConnection(" + userName + ", ****)");
|
||||
}
|
||||
logger.trace("createQueueConnection({}, ****)", userName);
|
||||
|
||||
ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.QUEUE_CONNECTION);
|
||||
s.setUserName(userName);
|
||||
|
@ -173,9 +158,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
|
|||
|
||||
validateUser(s);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Created queue connection: " + s);
|
||||
}
|
||||
logger.trace("Created queue connection: {}", s);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
@ -188,15 +171,11 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
|
|||
*/
|
||||
@Override
|
||||
public TopicConnection createTopicConnection() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createTopicConnection()");
|
||||
}
|
||||
|
||||
ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.TOPIC_CONNECTION);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Created topic connection: " + s);
|
||||
}
|
||||
logger.trace("Created topic connection: {}", s);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
@ -211,18 +190,14 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
|
|||
*/
|
||||
@Override
|
||||
public TopicConnection createTopicConnection(final String userName, final String password) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createTopicConnection(" + userName + ", ****)");
|
||||
}
|
||||
logger.trace("createTopicConnection({}, ****)", userName);
|
||||
|
||||
ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.TOPIC_CONNECTION);
|
||||
s.setUserName(userName);
|
||||
s.setPassword(password);
|
||||
validateUser(s);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Created topic connection: " + s);
|
||||
}
|
||||
logger.trace("Created topic connection: {}", s);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
@ -235,15 +210,11 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
|
|||
*/
|
||||
@Override
|
||||
public Connection createConnection() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createConnection()");
|
||||
}
|
||||
|
||||
ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.CONNECTION);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Created connection: " + s);
|
||||
}
|
||||
logger.trace("Created connection: {}", s);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
@ -258,9 +229,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
|
|||
*/
|
||||
@Override
|
||||
public Connection createConnection(final String userName, final String password) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createConnection(" + userName + ", ****)");
|
||||
}
|
||||
logger.trace("createConnection({}, ****)", userName);
|
||||
|
||||
ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.CONNECTION);
|
||||
s.setUserName(userName);
|
||||
|
@ -268,9 +237,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
|
|||
|
||||
validateUser(s);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Created connection: " + s);
|
||||
}
|
||||
logger.trace("Created connection: {}", s);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
@ -283,15 +250,11 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
|
|||
*/
|
||||
@Override
|
||||
public XAQueueConnection createXAQueueConnection() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createXAQueueConnection()");
|
||||
}
|
||||
|
||||
ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.XA_QUEUE_CONNECTION);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Created queue connection: " + s);
|
||||
}
|
||||
logger.trace("Created queue connection: {}", s);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
@ -306,18 +269,14 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
|
|||
*/
|
||||
@Override
|
||||
public XAQueueConnection createXAQueueConnection(final String userName, final String password) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createXAQueueConnection(" + userName + ", ****)");
|
||||
}
|
||||
logger.trace("createXAQueueConnection({}, ****)", userName);
|
||||
|
||||
ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.XA_QUEUE_CONNECTION);
|
||||
s.setUserName(userName);
|
||||
s.setPassword(password);
|
||||
validateUser(s);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Created queue connection: " + s);
|
||||
}
|
||||
logger.trace("Created queue connection: {}", s);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
@ -330,15 +289,11 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
|
|||
*/
|
||||
@Override
|
||||
public XATopicConnection createXATopicConnection() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createXATopicConnection()");
|
||||
}
|
||||
|
||||
ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.XA_TOPIC_CONNECTION);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Created topic connection: " + s);
|
||||
}
|
||||
logger.trace("Created topic connection: {}", s);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
@ -353,18 +308,14 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
|
|||
*/
|
||||
@Override
|
||||
public XATopicConnection createXATopicConnection(final String userName, final String password) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createXATopicConnection(" + userName + ", ****)");
|
||||
}
|
||||
logger.trace("createXATopicConnection({}, ****)", userName);
|
||||
|
||||
ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.XA_TOPIC_CONNECTION);
|
||||
s.setUserName(userName);
|
||||
s.setPassword(password);
|
||||
validateUser(s);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Created topic connection: " + s);
|
||||
}
|
||||
logger.trace("Created topic connection: {}", s);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
@ -377,15 +328,11 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
|
|||
*/
|
||||
@Override
|
||||
public XAConnection createXAConnection() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createXAConnection()");
|
||||
}
|
||||
|
||||
ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.XA_CONNECTION);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Created connection: " + s);
|
||||
}
|
||||
logger.trace("Created connection: {}", s);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
@ -400,18 +347,14 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact
|
|||
*/
|
||||
@Override
|
||||
public XAConnection createXAConnection(final String userName, final String password) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createXAConnection(" + userName + ", ****)");
|
||||
}
|
||||
logger.trace("createXAConnection({}, ****)", userName);
|
||||
|
||||
ActiveMQRASessionFactoryImpl s = new ActiveMQRASessionFactoryImpl(mcf, cm, getResourceAdapter().getTM(), ActiveMQRAConnectionFactory.XA_CONNECTION);
|
||||
s.setUserName(userName);
|
||||
s.setPassword(password);
|
||||
validateUser(s);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Created connection: " + s);
|
||||
}
|
||||
logger.trace("Created connection: {}", s);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
|
|
@ -44,10 +44,8 @@ public class ActiveMQRAConnectionManager implements ConnectionManager {
|
|||
* Constructor
|
||||
*/
|
||||
public ActiveMQRAConnectionManager() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor()");
|
||||
}
|
||||
}
|
||||
|
||||
ConcurrentHashSet<ManagedConnection> connections = new ConcurrentHashSet<>();
|
||||
|
||||
|
@ -62,16 +60,12 @@ public class ActiveMQRAConnectionManager implements ConnectionManager {
|
|||
@Override
|
||||
public Object allocateConnection(final ManagedConnectionFactory mcf,
|
||||
final ConnectionRequestInfo cxRequestInfo) throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("allocateConnection(" + mcf + ", " + cxRequestInfo + ")");
|
||||
}
|
||||
logger.trace("allocateConnection({}, {})", mcf, cxRequestInfo);
|
||||
|
||||
ManagedConnection mc = mcf.createManagedConnection(null, cxRequestInfo);
|
||||
Object c = mc.getConnection(null, cxRequestInfo);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Allocated connection: " + c + ", with managed connection: " + mc);
|
||||
}
|
||||
logger.trace("Allocated connection: {}, with managed connection: {}", c, mc);
|
||||
|
||||
connections.add(mc);
|
||||
return c;
|
||||
|
|
|
@ -56,10 +56,8 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData {
|
|||
* Constructor
|
||||
*/
|
||||
public ActiveMQRAConnectionMetaData() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor()");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the JMS version
|
||||
|
@ -68,9 +66,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData {
|
|||
*/
|
||||
@Override
|
||||
public String getJMSVersion() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getJMSVersion()");
|
||||
}
|
||||
return JMS_VERSION_NAME;
|
||||
}
|
||||
|
||||
|
@ -81,9 +77,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData {
|
|||
*/
|
||||
@Override
|
||||
public int getJMSMajorVersion() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getJMSMajorVersion()");
|
||||
}
|
||||
return JMS_MAJOR_VERSION;
|
||||
}
|
||||
|
||||
|
@ -94,9 +88,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData {
|
|||
*/
|
||||
@Override
|
||||
public int getJMSMinorVersion() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getJMSMinorVersion()");
|
||||
}
|
||||
return JMS_MINOR_VERSION;
|
||||
}
|
||||
|
||||
|
@ -107,9 +99,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData {
|
|||
*/
|
||||
@Override
|
||||
public String getJMSProviderName() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getJMSProviderName()");
|
||||
}
|
||||
|
||||
return "ActiveMQ Artemis";
|
||||
}
|
||||
|
@ -121,9 +111,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData {
|
|||
*/
|
||||
@Override
|
||||
public String getProviderVersion() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getJMSProviderName()");
|
||||
}
|
||||
|
||||
return "2.4";
|
||||
}
|
||||
|
@ -135,9 +123,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData {
|
|||
*/
|
||||
@Override
|
||||
public int getProviderMajorVersion() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getProviderMajorVersion()");
|
||||
}
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
@ -149,9 +135,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData {
|
|||
*/
|
||||
@Override
|
||||
public int getProviderMinorVersion() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getProviderMinorVersion()");
|
||||
}
|
||||
|
||||
return 4;
|
||||
}
|
||||
|
|
|
@ -67,9 +67,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
|
|||
* @param type The connection type
|
||||
*/
|
||||
public ActiveMQRAConnectionRequestInfo(final ActiveMQRAProperties prop, final int type) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor(" + prop + ")");
|
||||
}
|
||||
logger.trace("constructor({})", prop);
|
||||
|
||||
userName = prop.getUserName();
|
||||
password = prop.getPassword();
|
||||
|
@ -88,12 +86,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
|
|||
*/
|
||||
public ActiveMQRAConnectionRequestInfo(final boolean transacted, final int acknowledgeMode, final int type) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor(" + transacted +
|
||||
", " +
|
||||
acknowledgeMode +
|
||||
", " +
|
||||
type +
|
||||
")");
|
||||
logger.trace("constructor({}, {}, {})", transacted, acknowledgeMode, type);
|
||||
}
|
||||
|
||||
this.transacted = transacted;
|
||||
|
@ -107,9 +100,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
|
|||
* @param prop The resource adapter properties
|
||||
*/
|
||||
public void setDefaults(final ActiveMQRAProperties prop) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setDefaults(" + prop + ")");
|
||||
}
|
||||
logger.trace("setDefaults({})", prop);
|
||||
|
||||
if (userName == null) {
|
||||
userName = prop.getUserName();
|
||||
|
@ -128,9 +119,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
|
|||
* @return The value
|
||||
*/
|
||||
public String getUserName() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getUserName()");
|
||||
}
|
||||
|
||||
return userName;
|
||||
}
|
||||
|
@ -141,9 +130,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
|
|||
* @param userName The value
|
||||
*/
|
||||
public void setUserName(final String userName) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setUserName(" + userName + ")");
|
||||
}
|
||||
logger.trace("setUserName({})", userName);
|
||||
|
||||
this.userName = userName;
|
||||
}
|
||||
|
@ -154,9 +141,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
|
|||
* @return The value
|
||||
*/
|
||||
public String getPassword() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getPassword()");
|
||||
}
|
||||
|
||||
return password;
|
||||
}
|
||||
|
@ -167,9 +152,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
|
|||
* @param password The value
|
||||
*/
|
||||
public void setPassword(final String password) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setPassword(****)");
|
||||
}
|
||||
|
||||
this.password = password;
|
||||
}
|
||||
|
@ -180,9 +163,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
|
|||
* @return The value
|
||||
*/
|
||||
public String getClientID() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getClientID()");
|
||||
}
|
||||
|
||||
return clientID;
|
||||
}
|
||||
|
@ -193,9 +174,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
|
|||
* @param clientID The value
|
||||
*/
|
||||
public void setClientID(final String clientID) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setClientID(" + clientID + ")");
|
||||
}
|
||||
logger.trace("setClientID({})", clientID);
|
||||
|
||||
this.clientID = clientID;
|
||||
}
|
||||
|
@ -206,9 +185,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
|
|||
* @return The type
|
||||
*/
|
||||
public int getType() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getType()");
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
@ -220,7 +197,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
|
|||
*/
|
||||
public boolean isTransacted() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("isTransacted() " + transacted);
|
||||
logger.trace("isTransacted() {}", transacted);
|
||||
}
|
||||
|
||||
return transacted;
|
||||
|
@ -232,9 +209,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
|
|||
* @return The mode
|
||||
*/
|
||||
public int getAcknowledgeMode() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getAcknowledgeMode()");
|
||||
}
|
||||
|
||||
return acknowledgeMode;
|
||||
}
|
||||
|
@ -247,9 +222,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
|
|||
*/
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("equals(" + obj + ")");
|
||||
}
|
||||
logger.trace("equals({})", obj);
|
||||
|
||||
if (obj == null) {
|
||||
return false;
|
||||
|
@ -274,9 +247,7 @@ public class ActiveMQRAConnectionRequestInfo implements ConnectionRequestInfo {
|
|||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("hashCode()");
|
||||
}
|
||||
|
||||
int hash = 7;
|
||||
|
||||
|
|
|
@ -56,10 +56,8 @@ public class ActiveMQRACredential implements Serializable {
|
|||
* Private constructor
|
||||
*/
|
||||
private ActiveMQRACredential() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor()");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the user name
|
||||
|
@ -67,9 +65,7 @@ public class ActiveMQRACredential implements Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public String getUserName() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getUserName()");
|
||||
}
|
||||
|
||||
return userName;
|
||||
}
|
||||
|
@ -80,9 +76,7 @@ public class ActiveMQRACredential implements Serializable {
|
|||
* @param userName The value
|
||||
*/
|
||||
private void setUserName(final String userName) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setUserName(" + userName + ")");
|
||||
}
|
||||
logger.trace("setUserName({})", userName);
|
||||
|
||||
this.userName = userName;
|
||||
}
|
||||
|
@ -93,9 +87,7 @@ public class ActiveMQRACredential implements Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public String getPassword() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getPassword()");
|
||||
}
|
||||
|
||||
return password;
|
||||
}
|
||||
|
@ -106,9 +98,7 @@ public class ActiveMQRACredential implements Serializable {
|
|||
* @param password The value
|
||||
*/
|
||||
private void setPassword(final String password) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setPassword(****)");
|
||||
}
|
||||
|
||||
this.password = password;
|
||||
}
|
||||
|
@ -126,7 +116,7 @@ public class ActiveMQRACredential implements Serializable {
|
|||
final Subject subject,
|
||||
final ConnectionRequestInfo info) throws SecurityException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getCredential(" + mcf + ", " + subject + ", " + info + ")");
|
||||
logger.trace("getCredential({}, {} ,{})", mcf, subject, info);
|
||||
}
|
||||
|
||||
ActiveMQRACredential jc = new ActiveMQRACredential();
|
||||
|
@ -156,9 +146,7 @@ public class ActiveMQRACredential implements Serializable {
|
|||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("toString()");
|
||||
}
|
||||
|
||||
return super.toString() + "{ username=" + userName + ", password=**** }";
|
||||
}
|
||||
|
@ -185,9 +173,7 @@ public class ActiveMQRACredential implements Serializable {
|
|||
* @param mcf The managed connection factory
|
||||
*/
|
||||
GetCredentialAction(final Subject subject, final ManagedConnectionFactory mcf) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor(" + subject + ", " + mcf + ")");
|
||||
}
|
||||
logger.trace("constructor({}, {})", subject, mcf);
|
||||
|
||||
this.subject = subject;
|
||||
this.mcf = mcf;
|
||||
|
@ -200,9 +186,7 @@ public class ActiveMQRACredential implements Serializable {
|
|||
*/
|
||||
@Override
|
||||
public PasswordCredential run() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("run()");
|
||||
}
|
||||
|
||||
Set<PasswordCredential> creds = subject.getPrivateCredentials(PasswordCredential.class);
|
||||
PasswordCredential pwdc = null;
|
||||
|
@ -224,9 +208,7 @@ public class ActiveMQRACredential implements Serializable {
|
|||
* @return The credential
|
||||
*/
|
||||
static PasswordCredential getCredential(final Subject subject, final ManagedConnectionFactory mcf) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getCredential(" + subject + ", " + mcf + ")");
|
||||
}
|
||||
logger.trace("getCredential({}, {})", subject, mcf);
|
||||
|
||||
GetCredentialAction action = new GetCredentialAction(subject, mcf);
|
||||
return AccessController.doPrivileged(action);
|
||||
|
|
|
@ -42,9 +42,7 @@ public class ActiveMQRALocalTransaction implements LocalTransaction {
|
|||
* @param mc The managed connection
|
||||
*/
|
||||
public ActiveMQRALocalTransaction(final ActiveMQRAManagedConnection mc) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor(" + mc + ")");
|
||||
}
|
||||
logger.trace("constructor({})", mc);
|
||||
|
||||
this.mc = mc;
|
||||
}
|
||||
|
@ -56,9 +54,7 @@ public class ActiveMQRALocalTransaction implements LocalTransaction {
|
|||
*/
|
||||
@Override
|
||||
public void begin() throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("begin()");
|
||||
}
|
||||
|
||||
// mc.setInManagedTx(true);
|
||||
}
|
||||
|
@ -70,9 +66,7 @@ public class ActiveMQRALocalTransaction implements LocalTransaction {
|
|||
*/
|
||||
@Override
|
||||
public void commit() throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("commit()");
|
||||
}
|
||||
|
||||
mc.lock();
|
||||
try {
|
||||
|
@ -94,9 +88,7 @@ public class ActiveMQRALocalTransaction implements LocalTransaction {
|
|||
*/
|
||||
@Override
|
||||
public void rollback() throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("rollback()");
|
||||
}
|
||||
|
||||
mc.lock();
|
||||
try {
|
||||
|
|
|
@ -74,9 +74,7 @@ public class ActiveMQRAMCFProperties extends ConnectionFactoryProperties impleme
|
|||
* Constructor
|
||||
*/
|
||||
public ActiveMQRAMCFProperties() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor()");
|
||||
}
|
||||
|
||||
useTryLock = null;
|
||||
}
|
||||
|
@ -87,9 +85,7 @@ public class ActiveMQRAMCFProperties extends ConnectionFactoryProperties impleme
|
|||
* @return The type
|
||||
*/
|
||||
public int getType() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getType()");
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
@ -99,9 +95,7 @@ public class ActiveMQRAMCFProperties extends ConnectionFactoryProperties impleme
|
|||
}
|
||||
|
||||
public void setConnectorClassName(final String connectorClassName) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setConnectorClassName(" + connectorClassName + ")");
|
||||
}
|
||||
logger.trace("setConnectorClassName({})", connectorClassName);
|
||||
|
||||
strConnectorClassName = connectorClassName;
|
||||
|
||||
|
@ -126,9 +120,7 @@ public class ActiveMQRAMCFProperties extends ConnectionFactoryProperties impleme
|
|||
* @param defaultType either javax.jms.Topic or javax.jms.Queue
|
||||
*/
|
||||
public void setSessionDefaultType(final String defaultType) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setSessionDefaultType(" + type + ")");
|
||||
}
|
||||
logger.trace("setSessionDefaultType({})", type);
|
||||
|
||||
if (defaultType.equals(ActiveMQRAMCFProperties.QUEUE_TYPE)) {
|
||||
type = ActiveMQRAConnectionFactory.QUEUE_CONNECTION;
|
||||
|
@ -145,9 +137,7 @@ public class ActiveMQRAMCFProperties extends ConnectionFactoryProperties impleme
|
|||
* @return The default session type
|
||||
*/
|
||||
public String getSessionDefaultType() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getSessionDefaultType()");
|
||||
}
|
||||
|
||||
if (type == ActiveMQRAConnectionFactory.CONNECTION) {
|
||||
return "BOTH";
|
||||
|
@ -164,9 +154,7 @@ public class ActiveMQRAMCFProperties extends ConnectionFactoryProperties impleme
|
|||
* @return the useTryLock.
|
||||
*/
|
||||
public Integer getUseTryLock() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getUseTryLock()");
|
||||
}
|
||||
|
||||
return useTryLock;
|
||||
}
|
||||
|
@ -177,9 +165,7 @@ public class ActiveMQRAMCFProperties extends ConnectionFactoryProperties impleme
|
|||
* @param useTryLock the useTryLock.
|
||||
*/
|
||||
public void setUseTryLock(final Integer useTryLock) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setUseTryLock(" + useTryLock + ")");
|
||||
}
|
||||
logger.trace("setUseTryLock({})", useTryLock);
|
||||
|
||||
this.useTryLock = useTryLock;
|
||||
}
|
||||
|
|
|
@ -142,7 +142,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
final String userName,
|
||||
final String password) throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor(" + mcf + ", " + cri + ", " + userName + ", ****)");
|
||||
logger.trace("constructor({}, {}, {}, ****))", mcf, cri, userName);
|
||||
}
|
||||
|
||||
this.mcf = mcf;
|
||||
|
@ -188,9 +188,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
@Override
|
||||
public synchronized Object getConnection(final Subject subject,
|
||||
final ConnectionRequestInfo cxRequestInfo) throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getConnection(" + subject + ", " + cxRequestInfo + ")");
|
||||
}
|
||||
logger.trace("getConnection({}, {})", subject, cxRequestInfo);
|
||||
|
||||
// Check user first
|
||||
ActiveMQRACredential credential = ActiveMQRACredential.getCredential(mcf, subject, cxRequestInfo);
|
||||
|
@ -219,9 +217,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
* @throws ResourceException Failed to close one or more handles.
|
||||
*/
|
||||
private void destroyHandles() throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("destroyHandles()");
|
||||
}
|
||||
|
||||
for (ActiveMQRASession session : handles) {
|
||||
session.destroy();
|
||||
|
@ -237,9 +233,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
*/
|
||||
@Override
|
||||
public void destroy() throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("destroy()");
|
||||
}
|
||||
|
||||
if (isDestroyed.get() || connection == null) {
|
||||
return;
|
||||
|
@ -250,7 +244,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
try {
|
||||
connection.setExceptionListener(null);
|
||||
} catch (JMSException e) {
|
||||
logger.debug("Error unsetting the exception listener " + this, e);
|
||||
logger.debug("Error unsetting the exception listener {}", this, e);
|
||||
}
|
||||
|
||||
connection.signalStopToAllSessions();
|
||||
|
@ -288,7 +282,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
xaSession.close();
|
||||
}
|
||||
} catch (JMSException e) {
|
||||
logger.debug("Error closing session " + this, e);
|
||||
logger.debug("Error closing session {}", this, e);
|
||||
}
|
||||
|
||||
} catch (Throwable e) {
|
||||
|
@ -303,9 +297,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
*/
|
||||
@Override
|
||||
public void cleanup() throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("cleanup()");
|
||||
}
|
||||
|
||||
if (isDestroyed.get()) {
|
||||
throw new IllegalStateException("ManagedConnection already destroyed");
|
||||
|
@ -333,9 +325,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
*/
|
||||
@Override
|
||||
public void associateConnection(final Object obj) throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("associateConnection(" + obj + ")");
|
||||
}
|
||||
logger.trace("associateConnection({})", obj);
|
||||
|
||||
if (!isDestroyed.get() && obj instanceof ActiveMQRASession) {
|
||||
ActiveMQRASession h = (ActiveMQRASession) obj;
|
||||
|
@ -370,9 +360,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
* Aqquire a lock on the managed connection
|
||||
*/
|
||||
protected void lock() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("lock()");
|
||||
}
|
||||
|
||||
lock.lock();
|
||||
}
|
||||
|
@ -383,9 +371,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
* @throws JMSException Thrown if an error occurs
|
||||
*/
|
||||
protected void tryLock() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("tryLock()");
|
||||
}
|
||||
|
||||
Integer tryLock = mcf.getUseTryLock();
|
||||
if (tryLock == null || tryLock.intValue() <= 0) {
|
||||
|
@ -405,9 +391,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
* Unlock the managed connection
|
||||
*/
|
||||
protected void unlock() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("unlock()");
|
||||
}
|
||||
|
||||
lock.unlock();
|
||||
}
|
||||
|
@ -419,9 +403,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
*/
|
||||
@Override
|
||||
public void addConnectionEventListener(final ConnectionEventListener l) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("addConnectionEventListener(" + l + ")");
|
||||
}
|
||||
logger.trace("addConnectionEventListener({})", l);
|
||||
|
||||
eventListeners.add(l);
|
||||
}
|
||||
|
@ -433,9 +415,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
*/
|
||||
@Override
|
||||
public void removeConnectionEventListener(final ConnectionEventListener l) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("removeConnectionEventListener(" + l + ")");
|
||||
}
|
||||
logger.trace("removeConnectionEventListener({})", l);
|
||||
|
||||
eventListeners.remove(l);
|
||||
}
|
||||
|
@ -448,9 +428,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
*/
|
||||
@Override
|
||||
public XAResource getXAResource() throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getXAResource()");
|
||||
}
|
||||
|
||||
//
|
||||
// Spec says a mc must always return the same XA resource,
|
||||
|
@ -467,9 +445,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
xaResource = ServiceUtils.wrapXAResource(activeMQRAXAResource, xaResourceProperties);
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("XAResource=" + xaResource);
|
||||
}
|
||||
logger.trace("XAResource={}", xaResource);
|
||||
|
||||
return xaResource;
|
||||
}
|
||||
|
@ -482,15 +458,11 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
*/
|
||||
@Override
|
||||
public LocalTransaction getLocalTransaction() throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getLocalTransaction()");
|
||||
}
|
||||
|
||||
LocalTransaction tx = new ActiveMQRALocalTransaction(this);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("LocalTransaction=" + tx);
|
||||
}
|
||||
logger.trace("LocalTransaction={}", tx);
|
||||
|
||||
return tx;
|
||||
}
|
||||
|
@ -504,9 +476,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
*/
|
||||
@Override
|
||||
public ManagedConnectionMetaData getMetaData() throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getMetaData()");
|
||||
}
|
||||
|
||||
if (isDestroyed.get()) {
|
||||
throw new IllegalStateException("The managed connection is already destroyed");
|
||||
|
@ -523,9 +493,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
*/
|
||||
@Override
|
||||
public void setLogWriter(final PrintWriter out) throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setLogWriter(" + out + ")");
|
||||
}
|
||||
logger.trace("setLogWriter({})", out);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -536,9 +504,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
*/
|
||||
@Override
|
||||
public PrintWriter getLogWriter() throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getLogWriter()");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
@ -554,12 +520,12 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
return;
|
||||
}
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("onException(" + exception + ")");
|
||||
logger.trace("onException()", exception);
|
||||
}
|
||||
|
||||
if (isDestroyed.get()) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Ignoring error on already destroyed connection " + this, exception);
|
||||
logger.trace("Ignoring error on already destroyed connection {}", this, exception);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -584,15 +550,11 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
*/
|
||||
protected Session getSession() throws JMSException {
|
||||
if (xaResource != null && inManagedTx) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getSession() -> XA session " + xaSession.getSession());
|
||||
}
|
||||
logger.trace("getSession() -> XA session {}", xaSession.getSession());
|
||||
|
||||
return xaSession.getSession();
|
||||
} else {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getSession() -> non XA session " + nonXAsession);
|
||||
}
|
||||
logger.trace("getSession() -> non XA session {}", nonXAsession);
|
||||
|
||||
return nonXAsession;
|
||||
}
|
||||
|
@ -604,9 +566,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
* @param event The event to send.
|
||||
*/
|
||||
protected void sendEvent(final ConnectionEvent event) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("sendEvent(" + event + ")");
|
||||
}
|
||||
logger.trace("sendEvent({})", event);
|
||||
|
||||
int type = event.getId();
|
||||
|
||||
|
@ -647,9 +607,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
* @param handle The handle to remove.
|
||||
*/
|
||||
protected void removeHandle(final ActiveMQRASession handle) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("removeHandle(" + handle + ")");
|
||||
}
|
||||
logger.trace("removeHandle({})", handle);
|
||||
|
||||
handles.remove(handle);
|
||||
}
|
||||
|
@ -660,9 +618,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
* @return The connection request info for this connection.
|
||||
*/
|
||||
protected ActiveMQRAConnectionRequestInfo getCRI() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getCRI()");
|
||||
}
|
||||
|
||||
return cri;
|
||||
}
|
||||
|
@ -673,9 +629,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
* @return The connection factory for this connection.
|
||||
*/
|
||||
protected ActiveMQRAManagedConnectionFactory getManagedConnectionFactory() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getManagedConnectionFactory()");
|
||||
}
|
||||
|
||||
return mcf;
|
||||
}
|
||||
|
@ -686,9 +640,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
* @throws JMSException Thrown if the connection can't be started
|
||||
*/
|
||||
void start() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("start()");
|
||||
}
|
||||
|
||||
if (connection != null) {
|
||||
connection.start();
|
||||
|
@ -701,9 +653,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
* @throws JMSException Thrown if the connection can't be stopped
|
||||
*/
|
||||
void stop() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("stop()");
|
||||
}
|
||||
|
||||
if (connection != null) {
|
||||
connection.stop();
|
||||
|
@ -716,9 +666,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
* @return The user name
|
||||
*/
|
||||
protected String getUserName() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getUserName()");
|
||||
}
|
||||
|
||||
return userName;
|
||||
}
|
||||
|
@ -729,9 +677,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc
|
|||
* @throws ResourceException Thrown if a connection couldn't be created
|
||||
*/
|
||||
private void setup() throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setup()");
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
|
|
|
@ -82,9 +82,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
|
|||
* Constructor
|
||||
*/
|
||||
public ActiveMQRAManagedConnectionFactory() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor()");
|
||||
}
|
||||
|
||||
ra = null;
|
||||
cm = null;
|
||||
|
@ -99,9 +97,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
|
|||
*/
|
||||
@Override
|
||||
public Object createConnectionFactory() throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.debug("createConnectionFactory()");
|
||||
}
|
||||
|
||||
return createConnectionFactory(new ActiveMQRAConnectionManager());
|
||||
}
|
||||
|
@ -115,19 +111,14 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
|
|||
*/
|
||||
@Override
|
||||
public Object createConnectionFactory(final ConnectionManager cxManager) throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createConnectionFactory(" + cxManager + ")");
|
||||
}
|
||||
logger.trace("createConnectionFactory({})", cxManager);
|
||||
|
||||
cm = cxManager;
|
||||
|
||||
ActiveMQRAConnectionFactory cf = new ActiveMQRAConnectionFactoryImpl(this, cm);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Created connection factory: " + cf +
|
||||
", using connection manager: " +
|
||||
cm);
|
||||
}
|
||||
logger.trace("Created connection factory: {}, using connection manager: {}", cf, cm);
|
||||
|
||||
return cf;
|
||||
}
|
||||
|
||||
|
@ -142,23 +133,17 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
|
|||
@Override
|
||||
public ManagedConnection createManagedConnection(final Subject subject,
|
||||
final ConnectionRequestInfo cxRequestInfo) throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createManagedConnection(" + subject + ", " + cxRequestInfo + ")");
|
||||
}
|
||||
logger.trace("createManagedConnection({}, {})", subject, cxRequestInfo);
|
||||
|
||||
ActiveMQRAConnectionRequestInfo cri = getCRI((ActiveMQRAConnectionRequestInfo) cxRequestInfo);
|
||||
|
||||
ActiveMQRACredential credential = ActiveMQRACredential.getCredential(this, subject, cri);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("jms credential: " + credential);
|
||||
}
|
||||
logger.trace("jms credential: {}", credential);
|
||||
|
||||
ActiveMQRAManagedConnection mc = new ActiveMQRAManagedConnection(this, cri, ra, credential.getUserName(), credential.getPassword());
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("created new managed connection: " + mc);
|
||||
}
|
||||
logger.trace("created new managed connection: {}", mc);
|
||||
|
||||
registerRecovery();
|
||||
|
||||
|
@ -193,20 +178,13 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
|
|||
final Subject subject,
|
||||
final ConnectionRequestInfo cxRequestInfo) throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("matchManagedConnections(" + connectionSet +
|
||||
", " +
|
||||
subject +
|
||||
", " +
|
||||
cxRequestInfo +
|
||||
")");
|
||||
logger.trace("matchManagedConnections({}, {}, {})", connectionSet, subject, cxRequestInfo);
|
||||
}
|
||||
|
||||
ActiveMQRAConnectionRequestInfo cri = getCRI((ActiveMQRAConnectionRequestInfo) cxRequestInfo);
|
||||
ActiveMQRACredential credential = ActiveMQRACredential.getCredential(this, subject, cri);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Looking for connection matching credentials: " + credential);
|
||||
}
|
||||
logger.trace("Looking for connection matching credentials: {}", credential);
|
||||
|
||||
for (Object obj : connectionSet) {
|
||||
if (obj instanceof ActiveMQRAManagedConnection) {
|
||||
|
@ -215,9 +193,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
|
|||
|
||||
if ((mc.getUserName() == null || mc.getUserName() != null && mc.getUserName().equals(credential.getUserName())) && mcf.equals(this)) {
|
||||
if (cri.equals(mc.getCRI())) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Found matching connection: " + mc);
|
||||
}
|
||||
logger.trace("Found matching connection: {}", mc);
|
||||
|
||||
return mc;
|
||||
}
|
||||
|
@ -225,9 +201,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
|
|||
}
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("No matching connection was found");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
@ -240,9 +214,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
|
|||
*/
|
||||
@Override
|
||||
public void setLogWriter(final PrintWriter out) throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setLogWriter(" + out + ")");
|
||||
}
|
||||
logger.trace("setLogWriter({})", out);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -253,9 +225,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
|
|||
*/
|
||||
@Override
|
||||
public PrintWriter getLogWriter() throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getLogWriter()");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
@ -267,9 +237,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
|
|||
*/
|
||||
@Override
|
||||
public ResourceAdapter getResourceAdapter() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getResourceAdapter()");
|
||||
}
|
||||
|
||||
return ra;
|
||||
}
|
||||
|
@ -288,9 +256,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
|
|||
*/
|
||||
@Override
|
||||
public void setResourceAdapter(final ResourceAdapter ra) throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setResourceAdapter(" + ra + ")");
|
||||
}
|
||||
logger.trace("setResourceAdapter({})", ra);
|
||||
|
||||
if (ra == null || !(ra instanceof ActiveMQResourceAdapter)) {
|
||||
throw new ResourceException("Resource adapter is " + ra);
|
||||
|
@ -308,9 +274,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
|
|||
*/
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("equals(" + obj + ")");
|
||||
}
|
||||
logger.trace("equals({})", obj);
|
||||
|
||||
if (obj == null) {
|
||||
return false;
|
||||
|
@ -332,9 +296,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
|
|||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("hashCode()");
|
||||
}
|
||||
|
||||
int hash = mcfProperties.hashCode();
|
||||
hash += 31 * (ra != null ? ra.hashCode() : 0);
|
||||
|
@ -348,9 +310,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
|
|||
* @return The value
|
||||
*/
|
||||
public String getSessionDefaultType() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getSessionDefaultType()");
|
||||
}
|
||||
|
||||
return mcfProperties.getSessionDefaultType();
|
||||
}
|
||||
|
@ -361,9 +321,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
|
|||
* @param type either javax.jms.Topic or javax.jms.Queue
|
||||
*/
|
||||
public void setSessionDefaultType(final String type) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setSessionDefaultType(" + type + ")");
|
||||
}
|
||||
logger.trace("setSessionDefaultType({})", type);
|
||||
|
||||
mcfProperties.setSessionDefaultType(type);
|
||||
}
|
||||
|
@ -746,9 +704,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
|
|||
* @return the useTryLock.
|
||||
*/
|
||||
public Integer getUseTryLock() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getUseTryLock()");
|
||||
}
|
||||
|
||||
return mcfProperties.getUseTryLock();
|
||||
}
|
||||
|
@ -759,9 +715,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
|
|||
* @param useTryLock the useTryLock.
|
||||
*/
|
||||
public void setUseTryLock(final Integer useTryLock) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setUseTryLock(" + useTryLock + ")");
|
||||
}
|
||||
logger.trace("setUseTryLock({})", useTryLock);
|
||||
|
||||
mcfProperties.setUseTryLock(useTryLock);
|
||||
}
|
||||
|
@ -772,9 +726,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
|
|||
* @return The metadata
|
||||
*/
|
||||
public ConnectionMetaData getMetaData() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getMetadata()");
|
||||
}
|
||||
|
||||
return new ActiveMQRAConnectionMetaData();
|
||||
}
|
||||
|
@ -785,9 +737,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
|
|||
* @return The properties
|
||||
*/
|
||||
protected ActiveMQRAMCFProperties getProperties() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getProperties()");
|
||||
}
|
||||
|
||||
return mcfProperties;
|
||||
}
|
||||
|
@ -799,9 +749,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti
|
|||
* @return The instance
|
||||
*/
|
||||
private ActiveMQRAConnectionRequestInfo getCRI(final ActiveMQRAConnectionRequestInfo info) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getCRI(" + info + ")");
|
||||
}
|
||||
logger.trace("getCRI({})", info);
|
||||
|
||||
if (info == null) {
|
||||
// Create a default one
|
||||
|
|
|
@ -41,9 +41,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
public ActiveMQRAMapMessage(final MapMessage message, final ActiveMQRASession session) {
|
||||
super(message, session);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor(" + message + ", " + session + ")");
|
||||
}
|
||||
logger.trace("constructor({}, {})", message, session);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -55,9 +53,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
*/
|
||||
@Override
|
||||
public boolean getBoolean(final String name) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getBoolean(" + name + ")");
|
||||
}
|
||||
logger.trace("getBoolean({})", name);
|
||||
|
||||
return ((MapMessage) message).getBoolean(name);
|
||||
}
|
||||
|
@ -71,9 +67,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
*/
|
||||
@Override
|
||||
public byte getByte(final String name) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getByte(" + name + ")");
|
||||
}
|
||||
logger.trace("getByte({})", name);
|
||||
|
||||
return ((MapMessage) message).getByte(name);
|
||||
}
|
||||
|
@ -87,9 +81,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
*/
|
||||
@Override
|
||||
public byte[] getBytes(final String name) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getBytes(" + name + ")");
|
||||
}
|
||||
logger.trace("getBytes({})", name);
|
||||
|
||||
return ((MapMessage) message).getBytes(name);
|
||||
}
|
||||
|
@ -103,9 +95,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
*/
|
||||
@Override
|
||||
public char getChar(final String name) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getChar(" + name + ")");
|
||||
}
|
||||
logger.trace("getChar({})", name);
|
||||
|
||||
return ((MapMessage) message).getChar(name);
|
||||
}
|
||||
|
@ -119,9 +109,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
*/
|
||||
@Override
|
||||
public double getDouble(final String name) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getDouble(" + name + ")");
|
||||
}
|
||||
logger.trace("getDouble({})", name);
|
||||
|
||||
return ((MapMessage) message).getDouble(name);
|
||||
}
|
||||
|
@ -135,9 +123,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
*/
|
||||
@Override
|
||||
public float getFloat(final String name) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getFloat(" + name + ")");
|
||||
}
|
||||
logger.trace("getFloat({})", name);
|
||||
|
||||
return ((MapMessage) message).getFloat(name);
|
||||
}
|
||||
|
@ -151,9 +137,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
*/
|
||||
@Override
|
||||
public int getInt(final String name) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getInt(" + name + ")");
|
||||
}
|
||||
logger.trace("getInt({})", name);
|
||||
|
||||
return ((MapMessage) message).getInt(name);
|
||||
}
|
||||
|
@ -167,9 +151,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
*/
|
||||
@Override
|
||||
public long getLong(final String name) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getLong(" + name + ")");
|
||||
}
|
||||
logger.trace("getLong({})", name);
|
||||
|
||||
return ((MapMessage) message).getLong(name);
|
||||
}
|
||||
|
@ -182,9 +164,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
*/
|
||||
@Override
|
||||
public Enumeration getMapNames() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getMapNames()");
|
||||
}
|
||||
|
||||
return ((MapMessage) message).getMapNames();
|
||||
}
|
||||
|
@ -198,9 +178,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
*/
|
||||
@Override
|
||||
public Object getObject(final String name) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getObject(" + name + ")");
|
||||
}
|
||||
logger.trace("getObject({})", name);
|
||||
|
||||
return ((MapMessage) message).getObject(name);
|
||||
}
|
||||
|
@ -214,9 +192,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
*/
|
||||
@Override
|
||||
public short getShort(final String name) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getShort(" + name + ")");
|
||||
}
|
||||
logger.trace("getShort({})", name);
|
||||
|
||||
return ((MapMessage) message).getShort(name);
|
||||
}
|
||||
|
@ -230,9 +206,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
*/
|
||||
@Override
|
||||
public String getString(final String name) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getString(" + name + ")");
|
||||
}
|
||||
logger.trace("getString({})", name);
|
||||
|
||||
return ((MapMessage) message).getString(name);
|
||||
}
|
||||
|
@ -246,9 +220,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
*/
|
||||
@Override
|
||||
public boolean itemExists(final String name) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("itemExists(" + name + ")");
|
||||
}
|
||||
logger.trace("itemExists({})", name);
|
||||
|
||||
return ((MapMessage) message).itemExists(name);
|
||||
}
|
||||
|
@ -263,7 +235,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
@Override
|
||||
public void setBoolean(final String name, final boolean value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setBoolean(" + name + ", " + value + ")");
|
||||
logger.trace("setBoolean({}, {})", name, value);
|
||||
}
|
||||
|
||||
((MapMessage) message).setBoolean(name, value);
|
||||
|
@ -279,7 +251,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
@Override
|
||||
public void setByte(final String name, final byte value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setByte(" + name + ", " + value + ")");
|
||||
logger.trace("setByte({}, {})", name, value);
|
||||
}
|
||||
|
||||
((MapMessage) message).setByte(name, value);
|
||||
|
@ -297,8 +269,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
@Override
|
||||
public void setBytes(final String name, final byte[] value, final int offset, final int length) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setBytes(" + name + ", " + Arrays.toString(value) + ", " + offset + ", " +
|
||||
length + ")");
|
||||
logger.trace("setBytes({}, {}, {}, {})", name, Arrays.toString(value), offset, length);
|
||||
}
|
||||
|
||||
((MapMessage) message).setBytes(name, value, offset, length);
|
||||
|
@ -314,7 +285,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
@Override
|
||||
public void setBytes(final String name, final byte[] value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setBytes(" + name + ", " + Arrays.toString(value) + ")");
|
||||
logger.trace("setBytes({}, {})", name, Arrays.toString(value));
|
||||
}
|
||||
|
||||
((MapMessage) message).setBytes(name, value);
|
||||
|
@ -330,7 +301,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
@Override
|
||||
public void setChar(final String name, final char value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setChar(" + name + ", " + value + ")");
|
||||
logger.trace("setChar({}, {})", name, value);
|
||||
}
|
||||
|
||||
((MapMessage) message).setChar(name, value);
|
||||
|
@ -346,7 +317,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
@Override
|
||||
public void setDouble(final String name, final double value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setDouble(" + name + ", " + value + ")");
|
||||
logger.trace("setDouble({}, {})", name, value);
|
||||
}
|
||||
|
||||
((MapMessage) message).setDouble(name, value);
|
||||
|
@ -362,7 +333,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
@Override
|
||||
public void setFloat(final String name, final float value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setFloat(" + name + ", " + value + ")");
|
||||
logger.trace("setFloat({}, {})", name, value);
|
||||
}
|
||||
|
||||
((MapMessage) message).setFloat(name, value);
|
||||
|
@ -378,7 +349,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
@Override
|
||||
public void setInt(final String name, final int value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setInt(" + name + ", " + value + ")");
|
||||
logger.trace("setInt({}, {})", name, value);
|
||||
}
|
||||
|
||||
((MapMessage) message).setInt(name, value);
|
||||
|
@ -394,7 +365,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
@Override
|
||||
public void setLong(final String name, final long value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setLong(" + name + ", " + value + ")");
|
||||
logger.trace("setLong({}, {})", name, value);
|
||||
}
|
||||
|
||||
((MapMessage) message).setLong(name, value);
|
||||
|
@ -410,7 +381,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
@Override
|
||||
public void setObject(final String name, final Object value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setObject(" + name + ", " + value + ")");
|
||||
logger.trace("setObject({}, {})", name, value);
|
||||
}
|
||||
|
||||
((MapMessage) message).setObject(name, value);
|
||||
|
@ -426,7 +397,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
@Override
|
||||
public void setShort(final String name, final short value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setShort(" + name + ", " + value + ")");
|
||||
logger.trace("setShort({}, {})", name, value);
|
||||
}
|
||||
|
||||
((MapMessage) message).setShort(name, value);
|
||||
|
@ -441,9 +412,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag
|
|||
*/
|
||||
@Override
|
||||
public void setString(final String name, final String value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setString(" + name + ", " + value + ")");
|
||||
}
|
||||
logger.trace("setString({}, {})", name, value);
|
||||
|
||||
((MapMessage) message).setString(name, value);
|
||||
}
|
||||
|
|
|
@ -55,9 +55,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
checkNotNull(message);
|
||||
checkNotNull(session);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor(" + message + ", " + session + ")");
|
||||
}
|
||||
logger.trace("constructor({}, {})", message, session);
|
||||
|
||||
this.message = message;
|
||||
this.session = session;
|
||||
|
@ -70,9 +68,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public void acknowledge() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("acknowledge()");
|
||||
}
|
||||
|
||||
session.getSession(); // Check for closed
|
||||
message.acknowledge();
|
||||
|
@ -85,9 +81,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public void clearBody() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("clearBody()");
|
||||
}
|
||||
|
||||
message.clearBody();
|
||||
}
|
||||
|
@ -99,9 +93,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public void clearProperties() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("clearProperties()");
|
||||
}
|
||||
|
||||
message.clearProperties();
|
||||
}
|
||||
|
@ -115,9 +107,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public boolean getBooleanProperty(final String name) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getBooleanProperty(" + name + ")");
|
||||
}
|
||||
logger.trace("getBooleanProperty({})", name);
|
||||
|
||||
return message.getBooleanProperty(name);
|
||||
}
|
||||
|
@ -131,9 +121,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public byte getByteProperty(final String name) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getByteProperty(" + name + ")");
|
||||
}
|
||||
logger.trace("getByteProperty({})", name);
|
||||
|
||||
return message.getByteProperty(name);
|
||||
}
|
||||
|
@ -147,9 +135,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public double getDoubleProperty(final String name) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getDoubleProperty(" + name + ")");
|
||||
}
|
||||
logger.trace("getDoubleProperty({})", name);
|
||||
|
||||
return message.getDoubleProperty(name);
|
||||
}
|
||||
|
@ -163,9 +149,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public float getFloatProperty(final String name) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getFloatProperty(" + name + ")");
|
||||
}
|
||||
logger.trace("getFloatProperty({})", name);
|
||||
|
||||
return message.getFloatProperty(name);
|
||||
}
|
||||
|
@ -179,9 +163,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public int getIntProperty(final String name) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getIntProperty(" + name + ")");
|
||||
}
|
||||
logger.trace("getIntProperty({})", name);
|
||||
|
||||
return message.getIntProperty(name);
|
||||
}
|
||||
|
@ -194,9 +176,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public String getJMSCorrelationID() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getJMSCorrelationID()");
|
||||
}
|
||||
|
||||
return message.getJMSCorrelationID();
|
||||
}
|
||||
|
@ -209,9 +189,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public byte[] getJMSCorrelationIDAsBytes() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getJMSCorrelationIDAsBytes()");
|
||||
}
|
||||
|
||||
return message.getJMSCorrelationIDAsBytes();
|
||||
}
|
||||
|
@ -224,9 +202,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public int getJMSDeliveryMode() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getJMSDeliveryMode()");
|
||||
}
|
||||
|
||||
return message.getJMSDeliveryMode();
|
||||
}
|
||||
|
@ -239,9 +215,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public Destination getJMSDestination() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getJMSDestination()");
|
||||
}
|
||||
|
||||
return message.getJMSDestination();
|
||||
}
|
||||
|
@ -254,9 +228,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public long getJMSExpiration() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getJMSExpiration()");
|
||||
}
|
||||
|
||||
return message.getJMSExpiration();
|
||||
}
|
||||
|
@ -269,9 +241,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public String getJMSMessageID() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getJMSMessageID()");
|
||||
}
|
||||
|
||||
return message.getJMSMessageID();
|
||||
}
|
||||
|
@ -284,9 +254,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public int getJMSPriority() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getJMSPriority()");
|
||||
}
|
||||
|
||||
return message.getJMSPriority();
|
||||
}
|
||||
|
@ -299,9 +267,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public boolean getJMSRedelivered() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getJMSRedelivered()");
|
||||
}
|
||||
|
||||
return message.getJMSRedelivered();
|
||||
}
|
||||
|
@ -314,9 +280,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public Destination getJMSReplyTo() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getJMSReplyTo()");
|
||||
}
|
||||
|
||||
return message.getJMSReplyTo();
|
||||
}
|
||||
|
@ -329,9 +293,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public long getJMSTimestamp() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getJMSTimestamp()");
|
||||
}
|
||||
|
||||
return message.getJMSTimestamp();
|
||||
}
|
||||
|
@ -344,9 +306,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public String getJMSType() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getJMSType()");
|
||||
}
|
||||
|
||||
return message.getJMSType();
|
||||
}
|
||||
|
@ -360,9 +320,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public long getLongProperty(final String name) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getLongProperty(" + name + ")");
|
||||
}
|
||||
logger.trace("getLongProperty({})", name);
|
||||
|
||||
return message.getLongProperty(name);
|
||||
}
|
||||
|
@ -376,9 +334,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public Object getObjectProperty(final String name) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getObjectProperty(" + name + ")");
|
||||
}
|
||||
logger.trace("getObjectProperty({})", name);
|
||||
|
||||
return message.getObjectProperty(name);
|
||||
}
|
||||
|
@ -391,9 +347,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public Enumeration getPropertyNames() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getPropertyNames()");
|
||||
}
|
||||
|
||||
return message.getPropertyNames();
|
||||
}
|
||||
|
@ -407,9 +361,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public short getShortProperty(final String name) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getShortProperty(" + name + ")");
|
||||
}
|
||||
logger.trace("getShortProperty({})", name);
|
||||
|
||||
return message.getShortProperty(name);
|
||||
}
|
||||
|
@ -423,9 +375,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public String getStringProperty(final String name) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getStringProperty(" + name + ")");
|
||||
}
|
||||
logger.trace("getStringProperty({})", name);
|
||||
|
||||
return message.getStringProperty(name);
|
||||
}
|
||||
|
@ -439,9 +389,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public boolean propertyExists(final String name) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("propertyExists(" + name + ")");
|
||||
}
|
||||
logger.trace("propertyExists({})", name);
|
||||
|
||||
return message.propertyExists(name);
|
||||
}
|
||||
|
@ -456,7 +404,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
@Override
|
||||
public void setBooleanProperty(final String name, final boolean value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setBooleanProperty(" + name + ", " + value + ")");
|
||||
logger.trace("setBooleanProperty({}, {})", name, value);
|
||||
}
|
||||
|
||||
message.setBooleanProperty(name, value);
|
||||
|
@ -472,7 +420,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
@Override
|
||||
public void setByteProperty(final String name, final byte value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setByteProperty(" + name + ", " + value + ")");
|
||||
logger.trace("setByteProperty({}, {})", name, value);
|
||||
}
|
||||
|
||||
message.setByteProperty(name, value);
|
||||
|
@ -488,7 +436,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
@Override
|
||||
public void setDoubleProperty(final String name, final double value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setDoubleProperty(" + name + ", " + value + ")");
|
||||
logger.trace("setDoubleProperty({}, {})", name, value);
|
||||
}
|
||||
|
||||
message.setDoubleProperty(name, value);
|
||||
|
@ -504,7 +452,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
@Override
|
||||
public void setFloatProperty(final String name, final float value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setFloatProperty(" + name + ", " + value + ")");
|
||||
logger.trace("setFloatProperty({}, {})", name, value);
|
||||
}
|
||||
|
||||
message.setFloatProperty(name, value);
|
||||
|
@ -520,7 +468,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
@Override
|
||||
public void setIntProperty(final String name, final int value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setIntProperty(" + name + ", " + value + ")");
|
||||
logger.trace("setIntProperty({}, {})", name, value);
|
||||
}
|
||||
|
||||
message.setIntProperty(name, value);
|
||||
|
@ -535,7 +483,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
@Override
|
||||
public void setJMSCorrelationID(final String correlationID) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setJMSCorrelationID(" + correlationID + ")");
|
||||
logger.trace("setJMSCorrelationID({})", correlationID);
|
||||
}
|
||||
|
||||
message.setJMSCorrelationID(correlationID);
|
||||
|
@ -550,7 +498,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
@Override
|
||||
public void setJMSCorrelationIDAsBytes(final byte[] correlationID) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setJMSCorrelationIDAsBytes(" + Arrays.toString(correlationID) + ")");
|
||||
logger.trace("setJMSCorrelationIDAsBytes({})", Arrays.toString(correlationID));
|
||||
}
|
||||
|
||||
message.setJMSCorrelationIDAsBytes(correlationID);
|
||||
|
@ -565,7 +513,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
@Override
|
||||
public void setJMSDeliveryMode(final int deliveryMode) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setJMSDeliveryMode(" + deliveryMode + ")");
|
||||
logger.trace("setJMSDeliveryMode({})", deliveryMode);
|
||||
}
|
||||
|
||||
message.setJMSDeliveryMode(deliveryMode);
|
||||
|
@ -579,9 +527,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public void setJMSDestination(final Destination destination) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setJMSDestination(" + destination + ")");
|
||||
}
|
||||
logger.trace("setJMSDestination({})", destination);
|
||||
|
||||
message.setJMSDestination(destination);
|
||||
}
|
||||
|
@ -595,7 +541,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
@Override
|
||||
public void setJMSExpiration(final long expiration) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setJMSExpiration(" + expiration + ")");
|
||||
logger.trace("setJMSExpiration({})", expiration);
|
||||
}
|
||||
|
||||
message.setJMSExpiration(expiration);
|
||||
|
@ -609,9 +555,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public void setJMSMessageID(final String id) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setJMSMessageID(" + id + ")");
|
||||
}
|
||||
logger.trace("setJMSMessageID({})", id);
|
||||
|
||||
message.setJMSMessageID(id);
|
||||
}
|
||||
|
@ -625,7 +569,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
@Override
|
||||
public void setJMSPriority(final int priority) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setJMSPriority(" + priority + ")");
|
||||
logger.trace("setJMSPriority({})", priority);
|
||||
}
|
||||
|
||||
message.setJMSPriority(priority);
|
||||
|
@ -640,7 +584,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
@Override
|
||||
public void setJMSRedelivered(final boolean redelivered) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setJMSRedelivered(" + redelivered + ")");
|
||||
logger.trace("setJMSRedelivered({})", redelivered);
|
||||
}
|
||||
|
||||
message.setJMSRedelivered(redelivered);
|
||||
|
@ -654,9 +598,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public void setJMSReplyTo(final Destination replyTo) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setJMSReplyTo(" + replyTo + ")");
|
||||
}
|
||||
logger.trace("setJMSReplyTo({})", replyTo);
|
||||
|
||||
message.setJMSReplyTo(replyTo);
|
||||
}
|
||||
|
@ -670,7 +612,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
@Override
|
||||
public void setJMSTimestamp(final long timestamp) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setJMSTimestamp(" + timestamp + ")");
|
||||
logger.trace("setJMSTimestamp({})", timestamp);
|
||||
}
|
||||
|
||||
message.setJMSTimestamp(timestamp);
|
||||
|
@ -684,9 +626,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public void setJMSType(final String type) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setJMSType(" + type + ")");
|
||||
}
|
||||
logger.trace("setJMSType({})", type);
|
||||
|
||||
message.setJMSType(type);
|
||||
}
|
||||
|
@ -701,7 +641,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
@Override
|
||||
public void setLongProperty(final String name, final long value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setLongProperty(" + name + ", " + value + ")");
|
||||
logger.trace("setLongProperty({}, {})", name, value);
|
||||
}
|
||||
|
||||
message.setLongProperty(name, value);
|
||||
|
@ -716,9 +656,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public void setObjectProperty(final String name, final Object value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setObjectProperty(" + name + ", " + value + ")");
|
||||
}
|
||||
logger.trace("setObjectProperty({}, {})", name, value);
|
||||
|
||||
message.setObjectProperty(name, value);
|
||||
}
|
||||
|
@ -733,7 +671,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
@Override
|
||||
public void setShortProperty(final String name, final short value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setShortProperty(" + name + ", " + value + ")");
|
||||
logger.trace("setShortProperty({}, {})", name, value);
|
||||
}
|
||||
|
||||
message.setShortProperty(name, value);
|
||||
|
@ -749,7 +687,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
@Override
|
||||
public void setStringProperty(final String name, final String value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setStringProperty(" + name + ", " + value + ")");
|
||||
logger.trace("setStringProperty({}, {})", name, value);
|
||||
}
|
||||
|
||||
message.setStringProperty(name, value);
|
||||
|
@ -757,34 +695,31 @@ public class ActiveMQRAMessage implements Message {
|
|||
|
||||
@Override
|
||||
public long getJMSDeliveryTime() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getJMSDeliveryTime()");
|
||||
}
|
||||
|
||||
return message.getJMSDeliveryTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setJMSDeliveryTime(long deliveryTime) throws JMSException {
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setJMSDeliveryTime(" + deliveryTime + ")");
|
||||
logger.trace("setJMSDeliveryTime({})", deliveryTime);
|
||||
}
|
||||
|
||||
message.setJMSDeliveryTime(deliveryTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T getBody(Class<T> c) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getBody(" + c + ")");
|
||||
}
|
||||
logger.trace("getBody({})", c);
|
||||
|
||||
return message.getBody(c);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBodyAssignableTo(Class c) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("isBodyAssignableTo(" + c + ")");
|
||||
}
|
||||
logger.trace("isBodyAssignableTo({})", c);
|
||||
|
||||
return message.isBodyAssignableTo(c);
|
||||
}
|
||||
|
||||
|
@ -795,9 +730,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("hashCode()");
|
||||
}
|
||||
|
||||
return message.hashCode();
|
||||
}
|
||||
|
@ -810,9 +743,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public boolean equals(final Object object) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("equals(" + object + ")");
|
||||
}
|
||||
logger.trace("equals({})", object);
|
||||
|
||||
if (object != null && object instanceof ActiveMQRAMessage) {
|
||||
return message.equals(((ActiveMQRAMessage) object).message);
|
||||
|
@ -828,9 +759,7 @@ public class ActiveMQRAMessage implements Message {
|
|||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("toString()");
|
||||
}
|
||||
|
||||
return message.toString();
|
||||
}
|
||||
|
|
|
@ -58,11 +58,7 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer {
|
|||
this.session = session;
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("new ActiveMQMessageConsumer " + this +
|
||||
" consumer=" +
|
||||
consumer +
|
||||
" session=" +
|
||||
session);
|
||||
logger.trace("new ActiveMQMessageConsumer {} consumer={} session={}", this, consumer, session);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,9 +69,8 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer {
|
|||
*/
|
||||
@Override
|
||||
public void close() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("close " + this);
|
||||
}
|
||||
logger.trace("close {}", this);
|
||||
|
||||
try {
|
||||
closeConsumer();
|
||||
} finally {
|
||||
|
@ -89,9 +84,8 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer {
|
|||
* @throws JMSException Thrown if an error occurs
|
||||
*/
|
||||
void checkState() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("checkState()");
|
||||
}
|
||||
|
||||
session.checkState();
|
||||
}
|
||||
|
||||
|
@ -103,9 +97,7 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer {
|
|||
*/
|
||||
@Override
|
||||
public MessageListener getMessageListener() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getMessageListener()");
|
||||
}
|
||||
|
||||
checkState();
|
||||
session.checkStrict();
|
||||
|
@ -142,9 +134,7 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer {
|
|||
*/
|
||||
@Override
|
||||
public String getMessageSelector() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getMessageSelector()");
|
||||
}
|
||||
|
||||
checkState();
|
||||
return consumer.getMessageSelector();
|
||||
|
@ -160,16 +150,12 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer {
|
|||
public Message receive() throws JMSException {
|
||||
session.lock();
|
||||
try {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("receive " + this);
|
||||
}
|
||||
logger.trace("receive {}", this);
|
||||
|
||||
checkState();
|
||||
Message message = consumer.receive();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("received " + this + " result=" + message);
|
||||
}
|
||||
logger.trace("received {} result={}", this, message);
|
||||
|
||||
if (message == null) {
|
||||
return null;
|
||||
|
@ -193,15 +179,13 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer {
|
|||
session.lock();
|
||||
try {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("receive " + this + " timeout=" + timeout);
|
||||
logger.trace("receive {} timeout={}", this, timeout);
|
||||
}
|
||||
|
||||
checkState();
|
||||
Message message = consumer.receive(timeout);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("received " + this + " result=" + message);
|
||||
}
|
||||
logger.trace("received {} result={}", this, message);
|
||||
|
||||
if (message == null) {
|
||||
return null;
|
||||
|
@ -223,16 +207,12 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer {
|
|||
public Message receiveNoWait() throws JMSException {
|
||||
session.lock();
|
||||
try {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("receiveNoWait " + this);
|
||||
}
|
||||
logger.trace("receiveNoWait {}", this);
|
||||
|
||||
checkState();
|
||||
Message message = consumer.receiveNoWait();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("received " + this + " result=" + message);
|
||||
}
|
||||
logger.trace("received {} result={}", this, message);
|
||||
|
||||
if (message == null) {
|
||||
return null;
|
||||
|
@ -250,9 +230,7 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer {
|
|||
* @throws JMSException Thrown if an error occurs
|
||||
*/
|
||||
void closeConsumer() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("closeConsumer()");
|
||||
}
|
||||
|
||||
consumer.close();
|
||||
}
|
||||
|
@ -264,9 +242,7 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer {
|
|||
* @return The wrapped message
|
||||
*/
|
||||
Message wrapMessage(final Message message) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("wrapMessage(" + message + ")");
|
||||
}
|
||||
logger.trace("wrapMessage({})", message);
|
||||
|
||||
if (message instanceof BytesMessage) {
|
||||
return new ActiveMQRABytesMessage((BytesMessage) message, session);
|
||||
|
@ -289,9 +265,7 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer {
|
|||
* @return The wrapped listener
|
||||
*/
|
||||
MessageListener wrapMessageListener(final MessageListener listener) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getMessageSelector()");
|
||||
}
|
||||
|
||||
return new ActiveMQRAMessageListener(listener, this);
|
||||
}
|
||||
|
|
|
@ -48,9 +48,7 @@ public class ActiveMQRAMessageListener implements MessageListener {
|
|||
* @param consumer the consumer
|
||||
*/
|
||||
public ActiveMQRAMessageListener(final MessageListener listener, final ActiveMQRAMessageConsumer consumer) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor(" + listener + ", " + consumer + ")");
|
||||
}
|
||||
logger.trace("constructor({}, {})", listener, consumer);
|
||||
|
||||
this.listener = listener;
|
||||
this.consumer = consumer;
|
||||
|
@ -63,9 +61,7 @@ public class ActiveMQRAMessageListener implements MessageListener {
|
|||
*/
|
||||
@Override
|
||||
public void onMessage(Message message) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("onMessage(" + message + ")");
|
||||
}
|
||||
logger.trace("onMessage({})", message);
|
||||
|
||||
message = consumer.wrapMessage(message);
|
||||
listener.onMessage(message);
|
||||
|
|
|
@ -54,11 +54,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
|
|||
this.session = session;
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("new ActiveMQMessageProducer " + this +
|
||||
" producer=" +
|
||||
producer +
|
||||
" session=" +
|
||||
session);
|
||||
logger.trace("new ActiveMQMessageProducer {} producer={} session={}", this, producer, session);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,9 +65,8 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
|
|||
*/
|
||||
@Override
|
||||
public void close() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("close " + this);
|
||||
}
|
||||
logger.trace("close {}", this);
|
||||
|
||||
try {
|
||||
closeProducer();
|
||||
} finally {
|
||||
|
@ -98,26 +93,15 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
|
|||
session.lock();
|
||||
try {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("send " + this +
|
||||
" destination=" +
|
||||
destination +
|
||||
" message=" +
|
||||
message +
|
||||
" deliveryMode=" +
|
||||
deliveryMode +
|
||||
" priority=" +
|
||||
priority +
|
||||
" ttl=" +
|
||||
timeToLive);
|
||||
logger.trace("send {} destination={} message={} deliveryMode={} priority={} ttl={}",
|
||||
this, destination, message, deliveryMode, priority, timeToLive);
|
||||
}
|
||||
|
||||
checkState();
|
||||
|
||||
producer.send(destination, message, deliveryMode, priority, timeToLive);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("sent " + this + " result=" + message);
|
||||
}
|
||||
logger.trace("sent {} result={}", this, message);
|
||||
} finally {
|
||||
session.unlock();
|
||||
}
|
||||
|
@ -135,16 +119,14 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
|
|||
session.lock();
|
||||
try {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("send " + this + " destination=" + destination + " message=" + message);
|
||||
logger.trace("send {} destination={} message={}", this, destination, message);
|
||||
}
|
||||
|
||||
checkState();
|
||||
|
||||
producer.send(destination, message);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("sent " + this + " result=" + message);
|
||||
}
|
||||
logger.trace("sent {} result={}", this, message);
|
||||
} finally {
|
||||
session.unlock();
|
||||
}
|
||||
|
@ -167,24 +149,15 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
|
|||
session.lock();
|
||||
try {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("send " + this +
|
||||
" message=" +
|
||||
message +
|
||||
" deliveryMode=" +
|
||||
deliveryMode +
|
||||
" priority=" +
|
||||
priority +
|
||||
" ttl=" +
|
||||
timeToLive);
|
||||
logger.trace("send {} message={} deliveryMode={} priority={} ttl={}",
|
||||
this, message, deliveryMode, priority, timeToLive);
|
||||
}
|
||||
|
||||
checkState();
|
||||
|
||||
producer.send(message, deliveryMode, priority, timeToLive);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("sent " + this + " result=" + message);
|
||||
}
|
||||
logger.trace("sent {} result={}", this, message);
|
||||
} finally {
|
||||
session.unlock();
|
||||
}
|
||||
|
@ -200,17 +173,13 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
|
|||
public void send(final Message message) throws JMSException {
|
||||
session.lock();
|
||||
try {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("send " + this + " message=" + message);
|
||||
}
|
||||
logger.trace("send {} result={}", this, message);
|
||||
|
||||
checkState();
|
||||
|
||||
producer.send(message);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("sent " + this + " result=" + message);
|
||||
}
|
||||
logger.trace("sent {} result={}", this, message);
|
||||
} finally {
|
||||
session.unlock();
|
||||
}
|
||||
|
@ -224,9 +193,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
|
|||
*/
|
||||
@Override
|
||||
public int getDeliveryMode() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getRoutingType()");
|
||||
}
|
||||
|
||||
return producer.getDeliveryMode();
|
||||
}
|
||||
|
@ -239,9 +206,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
|
|||
*/
|
||||
@Override
|
||||
public Destination getDestination() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getDestination()");
|
||||
}
|
||||
|
||||
return producer.getDestination();
|
||||
}
|
||||
|
@ -254,9 +219,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
|
|||
*/
|
||||
@Override
|
||||
public boolean getDisableMessageID() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getDisableMessageID()");
|
||||
}
|
||||
|
||||
return producer.getDisableMessageID();
|
||||
}
|
||||
|
@ -269,9 +232,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
|
|||
*/
|
||||
@Override
|
||||
public boolean getDisableMessageTimestamp() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getDisableMessageTimestamp()");
|
||||
}
|
||||
|
||||
return producer.getDisableMessageTimestamp();
|
||||
}
|
||||
|
@ -284,9 +245,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
|
|||
*/
|
||||
@Override
|
||||
public int getPriority() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getPriority()");
|
||||
}
|
||||
|
||||
return producer.getPriority();
|
||||
}
|
||||
|
@ -299,9 +258,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
|
|||
*/
|
||||
@Override
|
||||
public long getTimeToLive() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getTimeToLive()");
|
||||
}
|
||||
|
||||
return producer.getTimeToLive();
|
||||
}
|
||||
|
@ -315,7 +272,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
|
|||
@Override
|
||||
public void setDeliveryMode(final int deliveryMode) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setRoutingType(" + deliveryMode + ")");
|
||||
logger.trace("setRoutingType({})", deliveryMode);
|
||||
}
|
||||
|
||||
producer.setDeliveryMode(deliveryMode);
|
||||
|
@ -330,7 +287,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
|
|||
@Override
|
||||
public void setDisableMessageID(final boolean value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setDisableMessageID(" + value + ")");
|
||||
logger.trace("setDisableMessageID({})", value);
|
||||
}
|
||||
|
||||
producer.setDisableMessageID(value);
|
||||
|
@ -345,7 +302,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
|
|||
@Override
|
||||
public void setDisableMessageTimestamp(final boolean value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setDisableMessageTimestamp(" + value + ")");
|
||||
logger.trace("setDisableMessageTimestamp({})", value);
|
||||
}
|
||||
|
||||
producer.setDisableMessageTimestamp(value);
|
||||
|
@ -360,7 +317,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
|
|||
@Override
|
||||
public void setPriority(final int defaultPriority) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setPriority(" + defaultPriority + ")");
|
||||
logger.trace("setPriority({})", defaultPriority);
|
||||
}
|
||||
|
||||
producer.setPriority(defaultPriority);
|
||||
|
@ -375,7 +332,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
|
|||
@Override
|
||||
public void setTimeToLive(final long timeToLive) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setTimeToLive(" + timeToLive + ")");
|
||||
logger.trace("setTimeToLive({})", timeToLive);
|
||||
}
|
||||
|
||||
producer.setTimeToLive(timeToLive);
|
||||
|
@ -384,24 +341,22 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
|
|||
@Override
|
||||
public void setDeliveryDelay(long deliveryDelay) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setDeliveryDelay(" + deliveryDelay + ")");
|
||||
logger.trace("setDeliveryDelay({})", deliveryDelay);
|
||||
}
|
||||
producer.setDeliveryDelay(deliveryDelay);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getDeliveryDelay() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getDeliveryDelay()");
|
||||
}
|
||||
|
||||
return producer.getDeliveryDelay();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void send(Message message, CompletionListener completionListener) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("send(" + message + ", " + completionListener + ")");
|
||||
}
|
||||
logger.trace("send({}, {})", message, completionListener);
|
||||
|
||||
producer.send(message, completionListener);
|
||||
}
|
||||
|
||||
|
@ -412,8 +367,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
|
|||
long timeToLive,
|
||||
CompletionListener completionListener) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("send(" + message + ", " + deliveryMode + ", " + priority + ", " + timeToLive +
|
||||
", " + completionListener + ")");
|
||||
logger.trace("send({}, {}, {}, {}, {})", message, deliveryMode, priority, timeToLive, completionListener);
|
||||
}
|
||||
producer.send(message, deliveryMode, priority, timeToLive, completionListener);
|
||||
}
|
||||
|
@ -423,7 +377,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
|
|||
Message message,
|
||||
CompletionListener completionListener) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("send(" + destination + ", " + message + ", " + completionListener + ")");
|
||||
logger.trace("send({}, {}, {})", destination, message, completionListener);
|
||||
}
|
||||
producer.send(destination, message, completionListener);
|
||||
}
|
||||
|
@ -436,8 +390,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer {
|
|||
long timeToLive,
|
||||
CompletionListener completionListener) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("send(" + destination + ", " + message + ", " + deliveryMode + ", " + priority +
|
||||
", " + timeToLive + ", " + completionListener + ")");
|
||||
logger.trace("send({}, {}, {}, {}, {}, {})", destination, message, deliveryMode, priority, timeToLive, completionListener);
|
||||
}
|
||||
producer.send(destination, message, deliveryMode, priority, timeToLive, completionListener);
|
||||
}
|
||||
|
|
|
@ -41,9 +41,7 @@ public class ActiveMQRAMetaData implements ManagedConnectionMetaData {
|
|||
* @param mc The managed connection
|
||||
*/
|
||||
public ActiveMQRAMetaData(final ActiveMQRAManagedConnection mc) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor(" + mc + ")");
|
||||
}
|
||||
logger.trace("constructor({})", mc);
|
||||
|
||||
this.mc = mc;
|
||||
}
|
||||
|
@ -56,9 +54,7 @@ public class ActiveMQRAMetaData implements ManagedConnectionMetaData {
|
|||
*/
|
||||
@Override
|
||||
public String getEISProductName() throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getEISProductName()");
|
||||
}
|
||||
|
||||
return "ActiveMQ Artemis";
|
||||
}
|
||||
|
@ -71,9 +67,7 @@ public class ActiveMQRAMetaData implements ManagedConnectionMetaData {
|
|||
*/
|
||||
@Override
|
||||
public String getEISProductVersion() throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getEISProductVersion()");
|
||||
}
|
||||
|
||||
return "2.0";
|
||||
}
|
||||
|
@ -86,9 +80,7 @@ public class ActiveMQRAMetaData implements ManagedConnectionMetaData {
|
|||
*/
|
||||
@Override
|
||||
public String getUserName() throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getUserName()");
|
||||
}
|
||||
|
||||
return mc.getUserName();
|
||||
}
|
||||
|
@ -101,9 +93,7 @@ public class ActiveMQRAMetaData implements ManagedConnectionMetaData {
|
|||
*/
|
||||
@Override
|
||||
public int getMaxConnections() throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getMaxConnections()");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -40,9 +40,7 @@ public class ActiveMQRAObjectMessage extends ActiveMQRAMessage implements Object
|
|||
public ActiveMQRAObjectMessage(final ObjectMessage message, final ActiveMQRASession session) {
|
||||
super(message, session);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor(" + message + ", " + session + ")");
|
||||
}
|
||||
logger.trace("constructor({}, {})", message, session);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,9 +51,7 @@ public class ActiveMQRAObjectMessage extends ActiveMQRAMessage implements Object
|
|||
*/
|
||||
@Override
|
||||
public Serializable getObject() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getObject()");
|
||||
}
|
||||
|
||||
return ((ObjectMessage) message).getObject();
|
||||
}
|
||||
|
@ -68,9 +64,7 @@ public class ActiveMQRAObjectMessage extends ActiveMQRAMessage implements Object
|
|||
*/
|
||||
@Override
|
||||
public void setObject(final Serializable object) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setObject(" + object + ")");
|
||||
}
|
||||
logger.trace("setObject({})", object);
|
||||
|
||||
((ObjectMessage) message).setObject(object);
|
||||
}
|
||||
|
|
|
@ -89,10 +89,8 @@ public class ActiveMQRAProperties extends ConnectionFactoryProperties implements
|
|||
* Constructor
|
||||
*/
|
||||
public ActiveMQRAProperties() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor()");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the user name
|
||||
|
@ -100,9 +98,7 @@ public class ActiveMQRAProperties extends ConnectionFactoryProperties implements
|
|||
* @return The value
|
||||
*/
|
||||
public String getUserName() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getUserName()");
|
||||
}
|
||||
|
||||
return userName;
|
||||
}
|
||||
|
@ -113,9 +109,7 @@ public class ActiveMQRAProperties extends ConnectionFactoryProperties implements
|
|||
* @param userName The value
|
||||
*/
|
||||
public void setUserName(final String userName) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setUserName(" + userName + ")");
|
||||
}
|
||||
logger.trace("setUserName({})", userName);
|
||||
|
||||
this.userName = userName;
|
||||
}
|
||||
|
@ -126,9 +120,7 @@ public class ActiveMQRAProperties extends ConnectionFactoryProperties implements
|
|||
* @return The value
|
||||
*/
|
||||
public String getPassword() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getPassword()");
|
||||
}
|
||||
|
||||
return password;
|
||||
}
|
||||
|
@ -144,9 +136,7 @@ public class ActiveMQRAProperties extends ConnectionFactoryProperties implements
|
|||
* @param password The value
|
||||
*/
|
||||
public void setPassword(final String password) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setPassword(****)");
|
||||
}
|
||||
|
||||
this.password = password;
|
||||
}
|
||||
|
@ -182,9 +172,7 @@ public class ActiveMQRAProperties extends ConnectionFactoryProperties implements
|
|||
* @return The value
|
||||
*/
|
||||
public Boolean getUseLocalTx() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getUseLocalTx()");
|
||||
}
|
||||
|
||||
return localTx;
|
||||
}
|
||||
|
@ -195,9 +183,7 @@ public class ActiveMQRAProperties extends ConnectionFactoryProperties implements
|
|||
* @param localTx The value
|
||||
*/
|
||||
public void setUseLocalTx(final Boolean localTx) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setUseLocalTx(" + localTx + ")");
|
||||
}
|
||||
logger.trace("setUseLocalTx({})", localTx);
|
||||
|
||||
this.localTx = localTx;
|
||||
}
|
||||
|
|
|
@ -40,9 +40,7 @@ public class ActiveMQRAQueueReceiver extends ActiveMQRAMessageConsumer implement
|
|||
public ActiveMQRAQueueReceiver(final QueueReceiver consumer, final ActiveMQRASession session) {
|
||||
super(consumer, session);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor(" + consumer + ", " + session + ")");
|
||||
}
|
||||
logger.trace("constructor({}, {})", consumer, session);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,9 +51,7 @@ public class ActiveMQRAQueueReceiver extends ActiveMQRAMessageConsumer implement
|
|||
*/
|
||||
@Override
|
||||
public Queue getQueue() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getQueue()");
|
||||
}
|
||||
|
||||
checkState();
|
||||
return ((QueueReceiver) consumer).getQueue();
|
||||
|
|
|
@ -42,7 +42,7 @@ public class ActiveMQRAQueueSender extends ActiveMQRAMessageProducer implements
|
|||
super(producer, session);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor(" + producer + ", " + session + ")");
|
||||
logger.trace("constructor({}, {})", producer, session);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,9 +54,7 @@ public class ActiveMQRAQueueSender extends ActiveMQRAMessageProducer implements
|
|||
*/
|
||||
@Override
|
||||
public Queue getQueue() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getQueue()");
|
||||
}
|
||||
|
||||
return ((QueueSender) producer).getQueue();
|
||||
}
|
||||
|
@ -80,25 +78,14 @@ public class ActiveMQRAQueueSender extends ActiveMQRAMessageProducer implements
|
|||
session.lock();
|
||||
try {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("send " + this +
|
||||
" destination=" +
|
||||
destination +
|
||||
" message=" +
|
||||
message +
|
||||
" deliveryMode=" +
|
||||
deliveryMode +
|
||||
" priority=" +
|
||||
priority +
|
||||
" ttl=" +
|
||||
timeToLive);
|
||||
logger.trace("send {} destination={} message={} deliveryMode={} priority={} ttl={}",
|
||||
this, destination, message, deliveryMode, priority, timeToLive);
|
||||
}
|
||||
|
||||
checkState();
|
||||
producer.send(destination, message, deliveryMode, priority, timeToLive);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("sent " + this + " result=" + message);
|
||||
}
|
||||
logger.trace("sent {} result={}", this, message);
|
||||
} finally {
|
||||
session.unlock();
|
||||
}
|
||||
|
@ -116,15 +103,13 @@ public class ActiveMQRAQueueSender extends ActiveMQRAMessageProducer implements
|
|||
session.lock();
|
||||
try {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("send " + this + " destination=" + destination + " message=" + message);
|
||||
logger.trace("send {} destination={} message={}", this, destination, message);
|
||||
}
|
||||
|
||||
checkState();
|
||||
producer.send(destination, message);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("sent " + this + " result=" + message);
|
||||
}
|
||||
logger.trace("sent {} result={}", this, message);
|
||||
} finally {
|
||||
session.unlock();
|
||||
}
|
||||
|
|
|
@ -98,9 +98,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
* @param cri The connection request info
|
||||
*/
|
||||
public ActiveMQRASession(final ActiveMQRAManagedConnection mc, final ActiveMQRAConnectionRequestInfo cri) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor(" + mc + ", " + cri + ")");
|
||||
}
|
||||
logger.trace("constructor({}, {})", mc, cri);
|
||||
|
||||
this.mc = mc;
|
||||
this.cri = cri;
|
||||
|
@ -115,9 +113,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
* @param sf The session factory
|
||||
*/
|
||||
public void setActiveMQSessionFactory(final ActiveMQRASessionFactory sf) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setActiveMQSessionFactory(" + sf + ")");
|
||||
}
|
||||
logger.trace("setActiveMQSessionFactory({})", sf);
|
||||
|
||||
this.sf = sf;
|
||||
}
|
||||
|
@ -129,9 +125,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
* @throws IllegalStateException The session is closed
|
||||
*/
|
||||
protected void lock() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("lock()");
|
||||
}
|
||||
|
||||
final ActiveMQRAManagedConnection mcLocal = this.mc;
|
||||
if (mcLocal != null) {
|
||||
|
@ -145,9 +139,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
* Unlock
|
||||
*/
|
||||
protected void unlock() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("unlock()");
|
||||
}
|
||||
|
||||
final ActiveMQRAManagedConnection mcLocal = this.mc;
|
||||
if (mcLocal != null) {
|
||||
|
@ -168,9 +160,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
public BytesMessage createBytesMessage() throws JMSException {
|
||||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createBytesMessage" + session);
|
||||
}
|
||||
logger.trace("createBytesMessage(), {}", session);
|
||||
|
||||
return session.createBytesMessage();
|
||||
}
|
||||
|
@ -185,9 +175,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
public MapMessage createMapMessage() throws JMSException {
|
||||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createMapMessage(), " + session);
|
||||
}
|
||||
logger.trace("createMapMessage(), {}", session);
|
||||
|
||||
return session.createMapMessage();
|
||||
}
|
||||
|
@ -202,9 +190,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
public Message createMessage() throws JMSException {
|
||||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createMessage" + session);
|
||||
}
|
||||
logger.trace("createMessage(), {}", session);
|
||||
|
||||
return session.createMessage();
|
||||
}
|
||||
|
@ -219,9 +205,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
public ObjectMessage createObjectMessage() throws JMSException {
|
||||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createObjectMessage" + session);
|
||||
}
|
||||
logger.trace("createObjectMessage(), {}", session);
|
||||
|
||||
return session.createObjectMessage();
|
||||
}
|
||||
|
@ -237,9 +221,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
public ObjectMessage createObjectMessage(final Serializable object) throws JMSException {
|
||||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createObjectMessage(" + object + ")" + session);
|
||||
}
|
||||
logger.trace("createObjectMessage({})", object, session);
|
||||
|
||||
return session.createObjectMessage(object);
|
||||
}
|
||||
|
@ -254,9 +236,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
public StreamMessage createStreamMessage() throws JMSException {
|
||||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createStreamMessage" + session);
|
||||
}
|
||||
logger.trace("createStreamMessage(), {}", session);
|
||||
|
||||
return session.createStreamMessage();
|
||||
}
|
||||
|
@ -271,9 +251,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
public TextMessage createTextMessage() throws JMSException {
|
||||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createTextMessage" + session);
|
||||
}
|
||||
logger.trace("createTextMessage(), {}", session);
|
||||
|
||||
return session.createTextMessage();
|
||||
}
|
||||
|
@ -289,9 +267,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
public TextMessage createTextMessage(final String string) throws JMSException {
|
||||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createTextMessage(" + string + ")" + session);
|
||||
}
|
||||
logger.trace("createTextMessage({}) {}", string, session);
|
||||
|
||||
return session.createTextMessage(string);
|
||||
}
|
||||
|
@ -304,9 +280,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
*/
|
||||
@Override
|
||||
public boolean getTransacted() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getTransacted()");
|
||||
}
|
||||
|
||||
getSessionInternal();
|
||||
return cri.isTransacted();
|
||||
|
@ -320,9 +294,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
*/
|
||||
@Override
|
||||
public MessageListener getMessageListener() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getMessageListener()");
|
||||
}
|
||||
|
||||
throw new IllegalStateException("Method not allowed");
|
||||
}
|
||||
|
@ -335,9 +307,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
*/
|
||||
@Override
|
||||
public void setMessageListener(final MessageListener listener) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setMessageListener(" + listener + ")");
|
||||
}
|
||||
logger.trace("setMessageListener({})", listener);
|
||||
|
||||
throw new IllegalStateException("Method not allowed");
|
||||
}
|
||||
|
@ -349,9 +319,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("run()");
|
||||
}
|
||||
|
||||
throw new Error("Method not allowed");
|
||||
}
|
||||
|
@ -364,9 +332,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
*/
|
||||
@Override
|
||||
public void close() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("close()");
|
||||
}
|
||||
|
||||
sf.closeSession(this);
|
||||
closeSession();
|
||||
|
@ -392,9 +358,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
throw new IllegalStateException("Session is not transacted");
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Commit session " + this);
|
||||
}
|
||||
logger.trace("Commit session {}", this);
|
||||
|
||||
session.commit();
|
||||
} finally {
|
||||
|
@ -422,9 +386,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
throw new IllegalStateException("Session is not transacted");
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Rollback session " + this);
|
||||
}
|
||||
logger.trace("Rollback session {}", this);
|
||||
|
||||
session.rollback();
|
||||
} finally {
|
||||
|
@ -447,9 +409,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
throw new IllegalStateException("Session is transacted");
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Recover session " + this);
|
||||
}
|
||||
logger.trace("Recover session {}", this);
|
||||
|
||||
session.recover();
|
||||
} finally {
|
||||
|
@ -473,13 +433,13 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createTopic " + session + " topicName=" + topicName);
|
||||
logger.trace("createTopic {} topicName={}", session, topicName);
|
||||
}
|
||||
|
||||
Topic result = session.createTopic(topicName);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdTopic " + session + " topic=" + result);
|
||||
logger.trace("createdTopic {} topic={}", session, result);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -498,16 +458,12 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
try {
|
||||
TopicSession session = getTopicSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createSubscriber " + session + " topic=" + topic);
|
||||
}
|
||||
logger.trace("createSubscriber {} topic={}", session, topic);
|
||||
|
||||
TopicSubscriber result = session.createSubscriber(topic);
|
||||
result = new ActiveMQRATopicSubscriber(result, this);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdSubscriber " + session + " ActiveMQTopicSubscriber=" + result);
|
||||
}
|
||||
logger.trace("createdSubscriber {} ActiveMQTopicSubscriber={}", session, result);
|
||||
|
||||
addConsumer(result);
|
||||
|
||||
|
@ -535,21 +491,13 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
TopicSession session = getTopicSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createSubscriber " + session +
|
||||
" topic=" +
|
||||
topic +
|
||||
" selector=" +
|
||||
messageSelector +
|
||||
" noLocal=" +
|
||||
noLocal);
|
||||
logger.trace("createSubscriber {} topic={} selector={} noLocal={}", session, topic, messageSelector, noLocal);
|
||||
}
|
||||
|
||||
TopicSubscriber result = session.createSubscriber(topic, messageSelector, noLocal);
|
||||
result = new ActiveMQRATopicSubscriber(result, this);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdSubscriber " + session + " ActiveMQTopicSubscriber=" + result);
|
||||
}
|
||||
logger.trace("createdSubscriber {} ActiveMQTopicSubscriber={}", session, result);
|
||||
|
||||
addConsumer(result);
|
||||
|
||||
|
@ -578,15 +526,13 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createDurableSubscriber " + session + " topic=" + topic + " name=" + name);
|
||||
logger.trace("createDurableSubscriber {} topic={} name={}", session, topic, name);
|
||||
}
|
||||
|
||||
TopicSubscriber result = session.createDurableSubscriber(topic, name);
|
||||
result = new ActiveMQRATopicSubscriber(result, this);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdDurableSubscriber " + session + " ActiveMQTopicSubscriber=" + result);
|
||||
}
|
||||
logger.trace("createdDurableSubscriber {} ActiveMQTopicSubscriber={}", session, result);
|
||||
|
||||
addConsumer(result);
|
||||
|
||||
|
@ -616,23 +562,14 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createDurableSubscriber " + session +
|
||||
" topic=" +
|
||||
topic +
|
||||
" name=" +
|
||||
name +
|
||||
" selector=" +
|
||||
messageSelector +
|
||||
" noLocal=" +
|
||||
noLocal);
|
||||
logger.trace("createDurableSubscriber {} topic={} name={} selector={} noLocal={}",
|
||||
session, topic, name, messageSelector, noLocal);
|
||||
}
|
||||
|
||||
TopicSubscriber result = session.createDurableSubscriber(topic, name, messageSelector, noLocal);
|
||||
result = new ActiveMQRATopicSubscriber(result, this);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdDurableSubscriber " + session + " ActiveMQTopicSubscriber=" + result);
|
||||
}
|
||||
logger.trace("createdDurableSubscriber {} ActiveMQTopicSubscriber={}", session, result);
|
||||
|
||||
addConsumer(result);
|
||||
|
||||
|
@ -655,16 +592,12 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
try {
|
||||
TopicSession session = getTopicSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createPublisher " + session + " topic=" + topic);
|
||||
}
|
||||
logger.trace("createPublisher {} topic={}", session, topic);
|
||||
|
||||
TopicPublisher result = session.createPublisher(topic);
|
||||
result = new ActiveMQRATopicPublisher(result, this);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdPublisher " + session + " publisher=" + result);
|
||||
}
|
||||
logger.trace("createdPublisher {} publisher=", session, result);
|
||||
|
||||
addProducer(result);
|
||||
|
||||
|
@ -690,15 +623,11 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
try {
|
||||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createTemporaryTopic " + session);
|
||||
}
|
||||
logger.trace("createTemporaryTopic {}", session);
|
||||
|
||||
TemporaryTopic temp = session.createTemporaryTopic();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdTemporaryTopic " + session + " temp=" + temp);
|
||||
}
|
||||
logger.trace("createdTemporaryTopic {} temp={}", session, temp);
|
||||
|
||||
sf.addTemporaryTopic(temp);
|
||||
|
||||
|
@ -724,9 +653,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
try {
|
||||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("unsubscribe " + session + " name=" + name);
|
||||
}
|
||||
logger.trace("unsubscribe {} name={}", session, name);
|
||||
|
||||
session.unsubscribe(name);
|
||||
} finally {
|
||||
|
@ -749,15 +676,11 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
|
||||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createBrowser " + session + " queue=" + queue);
|
||||
}
|
||||
logger.trace("createBrowser {} queue={}", session, queue);
|
||||
|
||||
QueueBrowser result = session.createBrowser(queue);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdBrowser " + session + " browser=" + result);
|
||||
}
|
||||
logger.trace("createdBrowser {} browser={}", session, result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -779,14 +702,12 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createBrowser " + session + " queue=" + queue + " selector=" + messageSelector);
|
||||
logger.trace("createBrowser {} queue={} selector={}", session, queue, messageSelector);
|
||||
}
|
||||
|
||||
QueueBrowser result = session.createBrowser(queue, messageSelector);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdBrowser " + session + " browser=" + result);
|
||||
}
|
||||
logger.trace("createdBrowser {} browser={}", session, result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -806,15 +727,11 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
|
||||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createQueue " + session + " queueName=" + queueName);
|
||||
}
|
||||
logger.trace("createQueue {} queueName={}", session, queueName);
|
||||
|
||||
Queue result = session.createQueue(queueName);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdQueue " + session + " queue=" + result);
|
||||
}
|
||||
logger.trace("createdQueue {} queue={}", session, result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -832,16 +749,12 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
try {
|
||||
QueueSession session = getQueueSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createReceiver " + session + " queue=" + queue);
|
||||
}
|
||||
logger.trace("createReceiver {} queue={}", session, queue);
|
||||
|
||||
QueueReceiver result = session.createReceiver(queue);
|
||||
result = new ActiveMQRAQueueReceiver(result, this);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdReceiver " + session + " receiver=" + result);
|
||||
}
|
||||
logger.trace("createdReceiver {} receiver={}", session, result);
|
||||
|
||||
addConsumer(result);
|
||||
|
||||
|
@ -866,15 +779,13 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
QueueSession session = getQueueSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createReceiver " + session + " queue=" + queue + " selector=" + messageSelector);
|
||||
logger.trace("createReceiver {} queue={} selector={}", session, queue, messageSelector);
|
||||
}
|
||||
|
||||
QueueReceiver result = session.createReceiver(queue, messageSelector);
|
||||
result = new ActiveMQRAQueueReceiver(result, this);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdReceiver " + session + " receiver=" + result);
|
||||
}
|
||||
logger.trace("createdReceiver {} receiver={}", session, result);
|
||||
|
||||
addConsumer(result);
|
||||
|
||||
|
@ -897,16 +808,12 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
try {
|
||||
QueueSession session = getQueueSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createSender " + session + " queue=" + queue);
|
||||
}
|
||||
logger.trace("createSender {} queue={}", session, queue);
|
||||
|
||||
QueueSender result = session.createSender(queue);
|
||||
result = new ActiveMQRAQueueSender(result, this);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdSender " + session + " sender=" + result);
|
||||
}
|
||||
logger.trace("createdSender {} sender={}", session, result);
|
||||
|
||||
addProducer(result);
|
||||
|
||||
|
@ -932,15 +839,11 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
try {
|
||||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createTemporaryQueue " + session);
|
||||
}
|
||||
logger.trace("createTemporaryQueue {}", session);
|
||||
|
||||
TemporaryQueue temp = session.createTemporaryQueue();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdTemporaryQueue " + session + " temp=" + temp);
|
||||
}
|
||||
logger.trace("createdTemporaryQueue {} temp={}", session, temp);
|
||||
|
||||
sf.addTemporaryQueue(temp);
|
||||
|
||||
|
@ -963,16 +866,12 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
try {
|
||||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createConsumer " + session + " dest=" + destination);
|
||||
}
|
||||
logger.trace("createConsumer {} dest={}", session, destination);
|
||||
|
||||
MessageConsumer result = session.createConsumer(destination);
|
||||
result = new ActiveMQRAMessageConsumer(result, this);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdConsumer " + session + " consumer=" + result);
|
||||
}
|
||||
logger.trace("createdConsumer {} consumer={}", session, result);
|
||||
|
||||
addConsumer(result);
|
||||
|
||||
|
@ -998,19 +897,13 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createConsumer " + session +
|
||||
" dest=" +
|
||||
destination +
|
||||
" messageSelector=" +
|
||||
messageSelector);
|
||||
logger.trace("createConsumer {} dest={} messageSelector={}", session, destination, messageSelector);
|
||||
}
|
||||
|
||||
MessageConsumer result = session.createConsumer(destination, messageSelector);
|
||||
result = new ActiveMQRAMessageConsumer(result, this);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdConsumer " + session + " consumer=" + result);
|
||||
}
|
||||
logger.trace("createdConsumer {} consumer={}", session, result);
|
||||
|
||||
addConsumer(result);
|
||||
|
||||
|
@ -1038,21 +931,14 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createConsumer " + session +
|
||||
" dest=" +
|
||||
destination +
|
||||
" messageSelector=" +
|
||||
messageSelector +
|
||||
" noLocal=" +
|
||||
noLocal);
|
||||
logger.trace("createConsumer {} dest={} messageSelector={} noLocal={}",
|
||||
session, destination, messageSelector, noLocal);
|
||||
}
|
||||
|
||||
MessageConsumer result = session.createConsumer(destination, messageSelector, noLocal);
|
||||
result = new ActiveMQRAMessageConsumer(result, this);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdConsumer " + session + " consumer=" + result);
|
||||
}
|
||||
logger.trace("createdConsumer {} consumer={}", session, result);
|
||||
|
||||
addConsumer(result);
|
||||
|
||||
|
@ -1075,16 +961,12 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
try {
|
||||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createProducer " + session + " dest=" + destination);
|
||||
}
|
||||
logger.trace("createProducer {} dest={}", session, destination);
|
||||
|
||||
MessageProducer result = session.createProducer(destination);
|
||||
result = new ActiveMQRAMessageProducer(result, this);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdProducer " + session + " producer=" + result);
|
||||
}
|
||||
logger.trace("createdProducer {} producer={}", session, result);
|
||||
|
||||
addProducer(result);
|
||||
|
||||
|
@ -1102,9 +984,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
*/
|
||||
@Override
|
||||
public int getAcknowledgeMode() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getAcknowledgeMode()");
|
||||
}
|
||||
|
||||
getSessionInternal();
|
||||
return cri.getAcknowledgeMode();
|
||||
|
@ -1115,9 +995,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
*/
|
||||
@Override
|
||||
public XAResource getXAResource() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getXAResource()");
|
||||
}
|
||||
|
||||
if (cri.getType() == ActiveMQRAConnectionFactory.CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.QUEUE_CONNECTION ||
|
||||
cri.getType() == ActiveMQRAConnectionFactory.TOPIC_CONNECTION) {
|
||||
|
@ -1154,9 +1032,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
*/
|
||||
@Override
|
||||
public Session getSession() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getNonXAsession()");
|
||||
}
|
||||
|
||||
if (cri.getType() == ActiveMQRAConnectionFactory.CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.QUEUE_CONNECTION ||
|
||||
cri.getType() == ActiveMQRAConnectionFactory.TOPIC_CONNECTION) {
|
||||
|
@ -1179,9 +1055,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
*/
|
||||
@Override
|
||||
public QueueSession getQueueSession() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getQueueSession()");
|
||||
}
|
||||
|
||||
if (cri.getType() == ActiveMQRAConnectionFactory.CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.QUEUE_CONNECTION ||
|
||||
cri.getType() == ActiveMQRAConnectionFactory.TOPIC_CONNECTION) {
|
||||
|
@ -1204,9 +1078,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
*/
|
||||
@Override
|
||||
public TopicSession getTopicSession() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getTopicSession()");
|
||||
}
|
||||
|
||||
if (cri.getType() == ActiveMQRAConnectionFactory.CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.QUEUE_CONNECTION ||
|
||||
cri.getType() == ActiveMQRAConnectionFactory.TOPIC_CONNECTION) {
|
||||
|
@ -1229,15 +1101,13 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createSharedConsumer " + session + " topic=" + topic + ", sharedSubscriptionName=" + sharedSubscriptionName);
|
||||
logger.trace("createSharedConsumer {} topic={}, sharedSubscriptionName={}", session, topic, sharedSubscriptionName);
|
||||
}
|
||||
|
||||
MessageConsumer result = session.createSharedConsumer(topic, sharedSubscriptionName);
|
||||
result = new ActiveMQRAMessageConsumer(result, this);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdConsumer " + session + " consumer=" + result);
|
||||
}
|
||||
logger.trace("createdConsumer {} consumer={}", session, result);
|
||||
|
||||
addConsumer(result);
|
||||
|
||||
|
@ -1256,16 +1126,14 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createSharedConsumer " + session + " topic=" + topic +
|
||||
", sharedSubscriptionName=" + sharedSubscriptionName + ", messageSelector=" + messageSelector);
|
||||
logger.trace("createSharedConsumer {} topic={}, sharedSubscriptionName={}, messageSelector={}",
|
||||
session, topic, sharedSubscriptionName, messageSelector);
|
||||
}
|
||||
|
||||
MessageConsumer result = session.createSharedConsumer(topic, sharedSubscriptionName, messageSelector);
|
||||
result = new ActiveMQRAMessageConsumer(result, this);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdConsumer " + session + " consumer=" + result);
|
||||
}
|
||||
logger.trace("createdConsumer {} consumer={}", session, result);
|
||||
|
||||
addConsumer(result);
|
||||
|
||||
|
@ -1282,15 +1150,13 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createSharedConsumer " + session + " topic=" + topic + ", name=" + name);
|
||||
logger.trace("createSharedConsumer {} topic={}, name={}", session, topic, name);
|
||||
}
|
||||
|
||||
MessageConsumer result = session.createDurableConsumer(topic, name);
|
||||
result = new ActiveMQRAMessageConsumer(result, this);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdConsumer " + session + " consumer=" + result);
|
||||
}
|
||||
logger.trace("createdConsumer {} consumer={}", session, result);
|
||||
|
||||
addConsumer(result);
|
||||
|
||||
|
@ -1310,16 +1176,14 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createDurableConsumer " + session + " topic=" + topic + ", name=" + name +
|
||||
", messageSelector=" + messageSelector + ", noLocal=" + noLocal);
|
||||
logger.trace("createDurableConsumer {} topic={}, name={}, messageSelector={}, noLocal={}",
|
||||
session, topic, name, messageSelector, noLocal);
|
||||
}
|
||||
|
||||
MessageConsumer result = session.createDurableConsumer(topic, name, messageSelector, noLocal);
|
||||
result = new ActiveMQRAMessageConsumer(result, this);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdConsumer " + session + " consumer=" + result);
|
||||
}
|
||||
logger.trace("createdConsumer {} consumer={}", session, result);
|
||||
|
||||
addConsumer(result);
|
||||
|
||||
|
@ -1336,16 +1200,13 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createSharedDurableConsumer " + session + " topic=" + topic + ", name=" +
|
||||
name);
|
||||
logger.trace("createSharedDurableConsumer {} topic={}, name={}", session, topic, name);
|
||||
}
|
||||
|
||||
MessageConsumer result = session.createSharedDurableConsumer(topic, name);
|
||||
result = new ActiveMQRAMessageConsumer(result, this);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdConsumer " + session + " consumer=" + result);
|
||||
}
|
||||
logger.trace("createdConsumer {} consumer={}", session, result);
|
||||
|
||||
addConsumer(result);
|
||||
|
||||
|
@ -1364,16 +1225,14 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
Session session = getSessionInternal();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createSharedDurableConsumer " + session + " topic=" + topic + ", name=" +
|
||||
name + ", messageSelector=" + messageSelector);
|
||||
logger.trace("createSharedDurableConsumer {} topic={}, name={}, messageSelector={}",
|
||||
session, topic, name, messageSelector);
|
||||
}
|
||||
|
||||
MessageConsumer result = session.createSharedDurableConsumer(topic, name, messageSelector);
|
||||
result = new ActiveMQRAMessageConsumer(result, this);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createdConsumer " + session + " consumer=" + result);
|
||||
}
|
||||
logger.trace("createdConsumer {} consumer={}", session, result);
|
||||
|
||||
addConsumer(result);
|
||||
|
||||
|
@ -1389,9 +1248,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
* @param managedConnection The managed connection
|
||||
*/
|
||||
void setManagedConnection(final ActiveMQRAManagedConnection managedConnection) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setManagedConnection(" + managedConnection + ")");
|
||||
}
|
||||
logger.trace("setManagedConnection({})", managedConnection);
|
||||
|
||||
if (mc != null) {
|
||||
mc.removeHandle(this);
|
||||
|
@ -1411,9 +1268,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
* Destroy
|
||||
*/
|
||||
void destroy() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("destroy()");
|
||||
}
|
||||
|
||||
mc = null;
|
||||
}
|
||||
|
@ -1424,9 +1279,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
* @throws JMSException Thrown if an error occurs
|
||||
*/
|
||||
void start() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("start()");
|
||||
}
|
||||
|
||||
if (mc != null) {
|
||||
mc.start();
|
||||
|
@ -1439,9 +1292,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
* @throws JMSException Thrown if an error occurs
|
||||
*/
|
||||
void stop() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("stop()");
|
||||
}
|
||||
|
||||
if (mc != null) {
|
||||
mc.stop();
|
||||
|
@ -1454,9 +1305,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
* @throws JMSException Thrown if an error occurs
|
||||
*/
|
||||
void checkStrict() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("checkStrict()");
|
||||
}
|
||||
|
||||
if (mc != null) {
|
||||
throw new IllegalStateException(ActiveMQRASessionFactory.ISE);
|
||||
|
@ -1516,9 +1365,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
* @param consumer The consumer
|
||||
*/
|
||||
void addConsumer(final MessageConsumer consumer) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("addConsumer(" + consumer + ")");
|
||||
}
|
||||
logger.trace("addConsumer({})", consumer);
|
||||
|
||||
synchronized (consumers) {
|
||||
consumers.add(consumer);
|
||||
|
@ -1531,9 +1378,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
* @param consumer The consumer
|
||||
*/
|
||||
void removeConsumer(final MessageConsumer consumer) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("removeConsumer(" + consumer + ")");
|
||||
}
|
||||
logger.trace("removeConsumer({})", consumer);
|
||||
|
||||
synchronized (consumers) {
|
||||
consumers.remove(consumer);
|
||||
|
@ -1546,9 +1391,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
* @param producer The producer
|
||||
*/
|
||||
void addProducer(final MessageProducer producer) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("addProducer(" + producer + ")");
|
||||
}
|
||||
logger.trace("addProducer({})", producer);
|
||||
|
||||
synchronized (producers) {
|
||||
producers.add(producer);
|
||||
|
@ -1561,9 +1404,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
* @param producer The producer
|
||||
*/
|
||||
void removeProducer(final MessageProducer producer) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("removeProducer(" + producer + ")");
|
||||
}
|
||||
logger.trace("removeProducer({})", producer);
|
||||
|
||||
synchronized (producers) {
|
||||
producers.remove(producer);
|
||||
|
@ -1584,9 +1425,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
|
||||
Session session = mc.getSession();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getSessionInternal " + session + " for " + this);
|
||||
}
|
||||
logger.trace("getSessionInternal {} for {}", session, this);
|
||||
|
||||
return session;
|
||||
}
|
||||
|
@ -1607,7 +1446,7 @@ public class ActiveMQRASession implements QueueSession, TopicSession, XAQueueSes
|
|||
XAResource xares = mc.getXAResource();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getXAResourceInternal " + xares + " for " + this);
|
||||
logger.trace("getXAResourceInternal {} for {}", xares, this);
|
||||
}
|
||||
|
||||
return xares;
|
||||
|
|
|
@ -147,7 +147,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
this.type = type;
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor(" + mcf + ", " + cm + ", " + type);
|
||||
logger.trace("constructor({}, {}, {})", mcf, cm, type);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -197,9 +197,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
*/
|
||||
@Override
|
||||
public void setReference(final Reference reference) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setReference(" + reference + ")");
|
||||
}
|
||||
logger.trace("setReference({})", reference);
|
||||
|
||||
this.reference = reference;
|
||||
}
|
||||
|
@ -211,9 +209,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
*/
|
||||
@Override
|
||||
public Reference getReference() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getReference()");
|
||||
}
|
||||
|
||||
return reference;
|
||||
}
|
||||
|
@ -224,9 +220,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
* @param name The user name
|
||||
*/
|
||||
public void setUserName(final String name) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setUserName(" + name + ")");
|
||||
}
|
||||
logger.trace("setUserName({})", name);
|
||||
|
||||
userName = name;
|
||||
}
|
||||
|
@ -237,9 +231,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
* @param password The password
|
||||
*/
|
||||
public void setPassword(final String password) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setPassword(****)");
|
||||
}
|
||||
|
||||
this.password = password;
|
||||
}
|
||||
|
@ -252,9 +244,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
*/
|
||||
@Override
|
||||
public String getClientID() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getClientID()");
|
||||
}
|
||||
|
||||
checkClosed();
|
||||
|
||||
|
@ -273,9 +263,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
*/
|
||||
@Override
|
||||
public void setClientID(final String cID) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setClientID(" + cID + ")");
|
||||
}
|
||||
logger.trace("setClientID({})", cID);
|
||||
|
||||
throw new IllegalStateException(ISE);
|
||||
}
|
||||
|
@ -291,7 +279,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
@Override
|
||||
public QueueSession createQueueSession(final boolean transacted, final int acknowledgeMode) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createQueueSession(" + transacted + ", " + acknowledgeMode + ")");
|
||||
logger.trace("createQueueSession({}, {})", transacted, acknowledgeMode);
|
||||
}
|
||||
|
||||
checkClosed();
|
||||
|
@ -311,9 +299,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
*/
|
||||
@Override
|
||||
public XAQueueSession createXAQueueSession() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createXAQueueSession()");
|
||||
}
|
||||
|
||||
checkClosed();
|
||||
|
||||
|
@ -341,14 +327,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
final ServerSessionPool sessionPool,
|
||||
final int maxMessages) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createConnectionConsumer(" + queue +
|
||||
", " +
|
||||
messageSelector +
|
||||
", " +
|
||||
sessionPool +
|
||||
", " +
|
||||
maxMessages +
|
||||
")");
|
||||
logger.trace("createConnectionConsumer({}, {}, {}, {})", queue, messageSelector, sessionPool, maxMessages);
|
||||
}
|
||||
|
||||
throw new IllegalStateException(ISE);
|
||||
|
@ -365,7 +344,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
@Override
|
||||
public TopicSession createTopicSession(final boolean transacted, final int acknowledgeMode) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createTopicSession(" + transacted + ", " + acknowledgeMode + ")");
|
||||
logger.trace("createTopicSession({}, {})", transacted, acknowledgeMode);
|
||||
}
|
||||
|
||||
checkClosed();
|
||||
|
@ -385,9 +364,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
*/
|
||||
@Override
|
||||
public XATopicSession createXATopicSession() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createXATopicSession()");
|
||||
}
|
||||
|
||||
checkClosed();
|
||||
|
||||
|
@ -415,14 +392,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
final ServerSessionPool sessionPool,
|
||||
final int maxMessages) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createConnectionConsumer(" + topic +
|
||||
", " +
|
||||
messageSelector +
|
||||
", " +
|
||||
sessionPool +
|
||||
", " +
|
||||
maxMessages +
|
||||
")");
|
||||
logger.trace("createConnectionConsumer({}, {}, {}, {})", topic, messageSelector, sessionPool, maxMessages);
|
||||
}
|
||||
|
||||
throw new IllegalStateException(ISE);
|
||||
|
@ -446,16 +416,8 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
final ServerSessionPool sessionPool,
|
||||
final int maxMessages) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createConnectionConsumer(" + topic +
|
||||
", " +
|
||||
subscriptionName +
|
||||
", " +
|
||||
messageSelector +
|
||||
", " +
|
||||
sessionPool +
|
||||
", " +
|
||||
maxMessages +
|
||||
")");
|
||||
logger.trace("createConnectionConsumer({}, {}, {}, {}, {})",
|
||||
topic, subscriptionName, messageSelector, sessionPool, maxMessages);
|
||||
}
|
||||
|
||||
throw new IllegalStateException(ISE);
|
||||
|
@ -474,12 +436,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
final ServerSessionPool pool,
|
||||
final int maxMessages) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createConnectionConsumer(" + destination +
|
||||
", " +
|
||||
pool +
|
||||
", " +
|
||||
maxMessages +
|
||||
")");
|
||||
logger.trace("createConnectionConsumer({}, {}, {})", destination, pool, maxMessages);
|
||||
}
|
||||
|
||||
throw new IllegalStateException(ISE);
|
||||
|
@ -501,14 +458,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
final ServerSessionPool pool,
|
||||
final int maxMessages) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createConnectionConsumer(" + destination +
|
||||
", " +
|
||||
name +
|
||||
", " +
|
||||
pool +
|
||||
", " +
|
||||
maxMessages +
|
||||
")");
|
||||
logger.trace("createConnectionConsumer({}, {}, {}, {})", destination, name, pool, maxMessages);
|
||||
}
|
||||
|
||||
throw new IllegalStateException(ISE);
|
||||
|
@ -525,7 +475,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
@Override
|
||||
public Session createSession(final boolean transacted, final int acknowledgeMode) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createSession(" + transacted + ", " + acknowledgeMode + ")");
|
||||
logger.trace("createSession({}, {})", transacted, acknowledgeMode);
|
||||
}
|
||||
|
||||
checkClosed();
|
||||
|
@ -540,9 +490,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
*/
|
||||
@Override
|
||||
public XASession createXASession() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createXASession()");
|
||||
}
|
||||
|
||||
checkClosed();
|
||||
return allocateConnection(type);
|
||||
|
@ -556,9 +504,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
*/
|
||||
@Override
|
||||
public ConnectionMetaData getMetaData() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getMetaData()");
|
||||
}
|
||||
|
||||
checkClosed();
|
||||
return mcf.getMetaData();
|
||||
|
@ -572,9 +518,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
*/
|
||||
@Override
|
||||
public ExceptionListener getExceptionListener() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getExceptionListener()");
|
||||
}
|
||||
|
||||
throw new IllegalStateException(ISE);
|
||||
}
|
||||
|
@ -587,9 +531,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
*/
|
||||
@Override
|
||||
public void setExceptionListener(final ExceptionListener listener) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setExceptionListener(" + listener + ")");
|
||||
}
|
||||
logger.trace("setExceptionListener({})", listener);
|
||||
|
||||
throw new IllegalStateException(ISE);
|
||||
}
|
||||
|
@ -603,9 +545,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
public void start() throws JMSException {
|
||||
checkClosed();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("start() " + this);
|
||||
}
|
||||
logger.trace("start() {}", this);
|
||||
|
||||
synchronized (sessions) {
|
||||
if (started) {
|
||||
|
@ -626,9 +566,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
*/
|
||||
@Override
|
||||
public void stop() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("stop() " + this);
|
||||
}
|
||||
logger.trace("stop() {}", this);
|
||||
|
||||
throw new IllegalStateException(ISE);
|
||||
}
|
||||
|
@ -640,9 +578,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
*/
|
||||
@Override
|
||||
public void close() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("close() " + this);
|
||||
}
|
||||
logger.trace("close() {}", this);
|
||||
|
||||
if (closed) {
|
||||
return;
|
||||
|
@ -666,9 +602,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
for (Iterator<TemporaryQueue> i = tempQueues.iterator(); i.hasNext(); ) {
|
||||
TemporaryQueue temp = i.next();
|
||||
try {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Closing temporary queue " + temp + " for " + this);
|
||||
}
|
||||
logger.trace("Closing temporary queue {} for {}", temp, this);
|
||||
temp.delete();
|
||||
} catch (Throwable t) {
|
||||
logger.trace("Error deleting temporary queue", t);
|
||||
|
@ -681,9 +615,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
for (Iterator<TemporaryTopic> i = tempTopics.iterator(); i.hasNext(); ) {
|
||||
TemporaryTopic temp = i.next();
|
||||
try {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Closing temporary topic " + temp + " for " + this);
|
||||
}
|
||||
logger.trace("Closing temporary topic {} for {}", temp, this);
|
||||
temp.delete();
|
||||
} catch (Throwable t) {
|
||||
logger.trace("Error deleting temporary queue", t);
|
||||
|
@ -701,9 +633,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
*/
|
||||
@Override
|
||||
public void closeSession(final ActiveMQRASession session) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("closeSession(" + session + ")");
|
||||
}
|
||||
logger.trace("closeSession({})", session);
|
||||
|
||||
synchronized (sessions) {
|
||||
sessions.remove(session);
|
||||
|
@ -717,9 +647,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
*/
|
||||
@Override
|
||||
public void addTemporaryQueue(final TemporaryQueue temp) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("addTemporaryQueue(" + temp + ")");
|
||||
}
|
||||
logger.trace("addTemporaryQueue({})", temp);
|
||||
|
||||
synchronized (tempQueues) {
|
||||
tempQueues.add(temp);
|
||||
|
@ -733,9 +661,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
*/
|
||||
@Override
|
||||
public void addTemporaryTopic(final TemporaryTopic temp) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("addTemporaryTopic(" + temp + ")");
|
||||
}
|
||||
logger.trace("addTemporaryTopic({})", temp);
|
||||
|
||||
synchronized (tempTopics) {
|
||||
tempTopics.add(temp);
|
||||
|
@ -759,8 +685,8 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
ServerSessionPool sessionPool,
|
||||
int maxMessages) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createSharedConnectionConsumer(" + topic + ", " + subscriptionName + ", " +
|
||||
messageSelector + ", " + sessionPool + ", " + maxMessages + ")");
|
||||
logger.trace("createSharedConnectionConsumer({}, {}, {}, {}, {})",
|
||||
topic, subscriptionName, messageSelector, sessionPool, maxMessages);
|
||||
}
|
||||
|
||||
throw new IllegalStateException(ISE);
|
||||
|
@ -773,8 +699,8 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
ServerSessionPool sessionPool,
|
||||
int maxMessages) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("createSharedDurableConnectionConsumer(" + topic + ", " + subscriptionName +
|
||||
", " + messageSelector + ", " + sessionPool + ", " + maxMessages + ")");
|
||||
logger.trace("createSharedDurableConnectionConsumer({}, {}, {}, {}, {})",
|
||||
topic, subscriptionName, messageSelector, sessionPool, maxMessages);
|
||||
}
|
||||
|
||||
throw new IllegalStateException(ISE);
|
||||
|
@ -804,12 +730,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
int acknowledgeMode,
|
||||
final int sessionType) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("allocateConnection(" + transacted +
|
||||
", " +
|
||||
acknowledgeMode +
|
||||
", " +
|
||||
sessionType +
|
||||
")");
|
||||
logger.trace("allocateConnection({}, {}, {})", transacted, acknowledgeMode, sessionType);
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -866,16 +787,12 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
info.setClientID(clientID);
|
||||
info.setDefaults(((ActiveMQResourceAdapter) mcf.getResourceAdapter()).getProperties());
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Allocating session for " + this + " with request info=" + info);
|
||||
}
|
||||
logger.trace("Allocating session for {} with request info={}", this, info);
|
||||
|
||||
ActiveMQRASession session = (ActiveMQRASession) cm.allocateConnection(mcf, info);
|
||||
|
||||
try {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Allocated " + this + " session=" + session);
|
||||
}
|
||||
logger.trace("Allocated {} session={}", this, session);
|
||||
|
||||
session.setActiveMQSessionFactory(this);
|
||||
|
||||
|
@ -921,9 +838,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon
|
|||
* @throws IllegalStateException Thrown if closed
|
||||
*/
|
||||
protected void checkClosed() throws IllegalStateException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("checkClosed()" + this);
|
||||
}
|
||||
logger.trace("checkClosed() {}", this);
|
||||
|
||||
if (closed) {
|
||||
throw new IllegalStateException("The connection is closed");
|
||||
|
|
|
@ -40,9 +40,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
public ActiveMQRAStreamMessage(final StreamMessage message, final ActiveMQRASession session) {
|
||||
super(message, session);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor(" + message + ", " + session + ")");
|
||||
}
|
||||
logger.trace("constructor({}, {})", message, session);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,9 +51,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
*/
|
||||
@Override
|
||||
public boolean readBoolean() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readBoolean()");
|
||||
}
|
||||
|
||||
return ((StreamMessage) message).readBoolean();
|
||||
}
|
||||
|
@ -68,9 +64,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
*/
|
||||
@Override
|
||||
public byte readByte() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readByte()");
|
||||
}
|
||||
|
||||
return ((StreamMessage) message).readByte();
|
||||
}
|
||||
|
@ -85,7 +79,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
@Override
|
||||
public int readBytes(final byte[] value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readBytes(" + Arrays.toString(value) + ")");
|
||||
logger.trace("readBytes({})", Arrays.toString(value));
|
||||
}
|
||||
|
||||
return ((StreamMessage) message).readBytes(value);
|
||||
|
@ -99,9 +93,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
*/
|
||||
@Override
|
||||
public char readChar() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readChar()");
|
||||
}
|
||||
|
||||
return ((StreamMessage) message).readChar();
|
||||
}
|
||||
|
@ -114,9 +106,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
*/
|
||||
@Override
|
||||
public double readDouble() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readDouble()");
|
||||
}
|
||||
|
||||
return ((StreamMessage) message).readDouble();
|
||||
}
|
||||
|
@ -129,9 +119,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
*/
|
||||
@Override
|
||||
public float readFloat() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readFloat()");
|
||||
}
|
||||
|
||||
return ((StreamMessage) message).readFloat();
|
||||
}
|
||||
|
@ -144,9 +132,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
*/
|
||||
@Override
|
||||
public int readInt() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readInt()");
|
||||
}
|
||||
|
||||
return ((StreamMessage) message).readInt();
|
||||
}
|
||||
|
@ -159,9 +145,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
*/
|
||||
@Override
|
||||
public long readLong() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readLong()");
|
||||
}
|
||||
|
||||
return ((StreamMessage) message).readLong();
|
||||
}
|
||||
|
@ -174,9 +158,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
*/
|
||||
@Override
|
||||
public Object readObject() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readObject()");
|
||||
}
|
||||
|
||||
return ((StreamMessage) message).readObject();
|
||||
}
|
||||
|
@ -189,9 +171,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
*/
|
||||
@Override
|
||||
public short readShort() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readShort()");
|
||||
}
|
||||
|
||||
return ((StreamMessage) message).readShort();
|
||||
}
|
||||
|
@ -204,9 +184,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
*/
|
||||
@Override
|
||||
public String readString() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("readString()");
|
||||
}
|
||||
|
||||
return ((StreamMessage) message).readString();
|
||||
}
|
||||
|
@ -218,9 +196,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
*/
|
||||
@Override
|
||||
public void reset() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("reset()");
|
||||
}
|
||||
|
||||
((StreamMessage) message).reset();
|
||||
}
|
||||
|
@ -234,7 +210,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
@Override
|
||||
public void writeBoolean(final boolean value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeBoolean(" + value + ")");
|
||||
logger.trace("writeBoolean({})", value);
|
||||
}
|
||||
|
||||
((StreamMessage) message).writeBoolean(value);
|
||||
|
@ -249,7 +225,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
@Override
|
||||
public void writeByte(final byte value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeByte(" + value + ")");
|
||||
logger.trace("writeByte({})", value);
|
||||
}
|
||||
|
||||
((StreamMessage) message).writeByte(value);
|
||||
|
@ -266,7 +242,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
@Override
|
||||
public void writeBytes(final byte[] value, final int offset, final int length) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeBytes(" + Arrays.toString(value) + ", " + offset + ", " + length + ")");
|
||||
logger.trace("writeBytes({}, {}, {})", Arrays.toString(value), offset, length);
|
||||
}
|
||||
|
||||
((StreamMessage) message).writeBytes(value, offset, length);
|
||||
|
@ -281,7 +257,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
@Override
|
||||
public void writeBytes(final byte[] value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeBytes(" + Arrays.toString(value) + ")");
|
||||
logger.trace("writeBytes({})", Arrays.toString(value));
|
||||
}
|
||||
|
||||
((StreamMessage) message).writeBytes(value);
|
||||
|
@ -296,7 +272,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
@Override
|
||||
public void writeChar(final char value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeChar(" + value + ")");
|
||||
logger.trace("writeChar({})", value);
|
||||
}
|
||||
|
||||
((StreamMessage) message).writeChar(value);
|
||||
|
@ -311,7 +287,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
@Override
|
||||
public void writeDouble(final double value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeDouble(" + value + ")");
|
||||
logger.trace("writeDouble({})", value);
|
||||
}
|
||||
|
||||
((StreamMessage) message).writeDouble(value);
|
||||
|
@ -326,7 +302,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
@Override
|
||||
public void writeFloat(final float value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeFloat(" + value + ")");
|
||||
logger.trace("writeFloat({})", value);
|
||||
}
|
||||
|
||||
((StreamMessage) message).writeFloat(value);
|
||||
|
@ -341,7 +317,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
@Override
|
||||
public void writeInt(final int value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeInt(" + value + ")");
|
||||
logger.trace("writeInt({})", value);
|
||||
}
|
||||
|
||||
((StreamMessage) message).writeInt(value);
|
||||
|
@ -356,7 +332,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
@Override
|
||||
public void writeLong(final long value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeLong(" + value + ")");
|
||||
logger.trace("writeLong({})", value);
|
||||
}
|
||||
|
||||
((StreamMessage) message).writeLong(value);
|
||||
|
@ -370,9 +346,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
*/
|
||||
@Override
|
||||
public void writeObject(final Object value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeObject(" + value + ")");
|
||||
}
|
||||
logger.trace("writeObject({})", value);
|
||||
|
||||
((StreamMessage) message).writeObject(value);
|
||||
}
|
||||
|
@ -386,7 +360,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
@Override
|
||||
public void writeShort(final short value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeShort(" + value + ")");
|
||||
logger.trace("writeShort({})", value);
|
||||
}
|
||||
|
||||
((StreamMessage) message).writeShort(value);
|
||||
|
@ -400,9 +374,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream
|
|||
*/
|
||||
@Override
|
||||
public void writeString(final String value) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("writeString(" + value + ")");
|
||||
}
|
||||
logger.trace("writeString({})", value);
|
||||
|
||||
((StreamMessage) message).writeString(value);
|
||||
}
|
||||
|
|
|
@ -39,9 +39,7 @@ public class ActiveMQRATextMessage extends ActiveMQRAMessage implements TextMess
|
|||
public ActiveMQRATextMessage(final TextMessage message, final ActiveMQRASession session) {
|
||||
super(message, session);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor(" + message + ", " + session + ")");
|
||||
}
|
||||
logger.trace("constructor({}, {})", message, session);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -52,9 +50,7 @@ public class ActiveMQRATextMessage extends ActiveMQRAMessage implements TextMess
|
|||
*/
|
||||
@Override
|
||||
public String getText() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getText()");
|
||||
}
|
||||
|
||||
return ((TextMessage) message).getText();
|
||||
}
|
||||
|
@ -67,9 +63,7 @@ public class ActiveMQRATextMessage extends ActiveMQRAMessage implements TextMess
|
|||
*/
|
||||
@Override
|
||||
public void setText(final String string) throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setText(" + string + ")");
|
||||
}
|
||||
logger.trace("setText({})", string);
|
||||
|
||||
((TextMessage) message).setText(string);
|
||||
}
|
||||
|
|
|
@ -41,9 +41,7 @@ public class ActiveMQRATopicPublisher extends ActiveMQRAMessageProducer implemen
|
|||
public ActiveMQRATopicPublisher(final TopicPublisher producer, final ActiveMQRASession session) {
|
||||
super(producer, session);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor(" + producer + ", " + session + ")");
|
||||
}
|
||||
logger.trace("constructor({}, {})", producer, session);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -54,9 +52,7 @@ public class ActiveMQRATopicPublisher extends ActiveMQRAMessageProducer implemen
|
|||
*/
|
||||
@Override
|
||||
public Topic getTopic() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getTopic()");
|
||||
}
|
||||
|
||||
return ((TopicPublisher) producer).getTopic();
|
||||
}
|
||||
|
@ -78,24 +74,15 @@ public class ActiveMQRATopicPublisher extends ActiveMQRAMessageProducer implemen
|
|||
session.lock();
|
||||
try {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("send " + this +
|
||||
" message=" +
|
||||
message +
|
||||
" deliveryMode=" +
|
||||
deliveryMode +
|
||||
" priority=" +
|
||||
priority +
|
||||
" ttl=" +
|
||||
timeToLive);
|
||||
logger.trace("send {} message={} deliveryMode={} priority={} ttl={}",
|
||||
this, message, deliveryMode, priority, timeToLive);
|
||||
}
|
||||
|
||||
checkState();
|
||||
|
||||
((TopicPublisher) producer).publish(message, deliveryMode, priority, timeToLive);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("sent " + this + " result=" + message);
|
||||
}
|
||||
logger.trace("sent {} result={}", this, message);
|
||||
} finally {
|
||||
session.unlock();
|
||||
}
|
||||
|
@ -111,17 +98,13 @@ public class ActiveMQRATopicPublisher extends ActiveMQRAMessageProducer implemen
|
|||
public void publish(final Message message) throws JMSException {
|
||||
session.lock();
|
||||
try {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("send " + this + " message=" + message);
|
||||
}
|
||||
logger.trace("send {} result={}", this, message);
|
||||
|
||||
checkState();
|
||||
|
||||
((TopicPublisher) producer).publish(message);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("sent " + this + " result=" + message);
|
||||
}
|
||||
logger.trace("sent {} result={}", this, message);
|
||||
} finally {
|
||||
session.unlock();
|
||||
}
|
||||
|
@ -146,26 +129,15 @@ public class ActiveMQRATopicPublisher extends ActiveMQRAMessageProducer implemen
|
|||
session.lock();
|
||||
try {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("send " + this +
|
||||
" destination=" +
|
||||
destination +
|
||||
" message=" +
|
||||
message +
|
||||
" deliveryMode=" +
|
||||
deliveryMode +
|
||||
" priority=" +
|
||||
priority +
|
||||
" ttl=" +
|
||||
timeToLive);
|
||||
logger.trace("send {} destination={} message={} deliveryMode={} priority={} ttl={}",
|
||||
this, destination, message, deliveryMode, priority, timeToLive);
|
||||
}
|
||||
|
||||
checkState();
|
||||
|
||||
((TopicPublisher) producer).publish(destination, message, deliveryMode, priority, timeToLive);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("sent " + this + " result=" + message);
|
||||
}
|
||||
logger.trace("sent {} result={}", this, message);
|
||||
} finally {
|
||||
session.unlock();
|
||||
}
|
||||
|
@ -183,16 +155,14 @@ public class ActiveMQRATopicPublisher extends ActiveMQRAMessageProducer implemen
|
|||
session.lock();
|
||||
try {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("send " + this + " destination=" + destination + " message=" + message);
|
||||
logger.trace("send {} destination={} message={}", this, destination, message);
|
||||
}
|
||||
|
||||
checkState();
|
||||
|
||||
((TopicPublisher) producer).publish(destination, message);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("sent " + this + " result=" + message);
|
||||
}
|
||||
logger.trace("sent {} result={}", this, message);
|
||||
} finally {
|
||||
session.unlock();
|
||||
}
|
||||
|
|
|
@ -40,9 +40,7 @@ public class ActiveMQRATopicSubscriber extends ActiveMQRAMessageConsumer impleme
|
|||
public ActiveMQRATopicSubscriber(final TopicSubscriber consumer, final ActiveMQRASession session) {
|
||||
super(consumer, session);
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor(" + consumer + ", " + session + ")");
|
||||
}
|
||||
logger.trace("constructor({}, {})", consumer, session);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,9 +51,7 @@ public class ActiveMQRATopicSubscriber extends ActiveMQRAMessageConsumer impleme
|
|||
*/
|
||||
@Override
|
||||
public boolean getNoLocal() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getNoLocal()");
|
||||
}
|
||||
|
||||
checkState();
|
||||
return ((TopicSubscriber) consumer).getNoLocal();
|
||||
|
@ -69,9 +65,7 @@ public class ActiveMQRATopicSubscriber extends ActiveMQRAMessageConsumer impleme
|
|||
*/
|
||||
@Override
|
||||
public Topic getTopic() throws JMSException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getTopic()");
|
||||
}
|
||||
|
||||
checkState();
|
||||
return ((TopicSubscriber) consumer).getTopic();
|
||||
|
|
|
@ -51,9 +51,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource {
|
|||
* @param xaResource the xa resource
|
||||
*/
|
||||
public ActiveMQRAXAResource(final ActiveMQRAManagedConnection managedConnection, final XAResource xaResource) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor(" + managedConnection + ", " + xaResource + ")");
|
||||
}
|
||||
logger.trace("constructor({} ,{})", managedConnection, xaResource);
|
||||
|
||||
this.managedConnection = managedConnection;
|
||||
this.xaResource = xaResource;
|
||||
|
@ -69,7 +67,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource {
|
|||
@Override
|
||||
public void start(final Xid xid, final int flags) throws XAException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("start(" + xid + ", " + flags + ")");
|
||||
logger.trace("start({}, {})", xid, flags);
|
||||
}
|
||||
|
||||
managedConnection.lock();
|
||||
|
@ -104,7 +102,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource {
|
|||
@Override
|
||||
public void end(final Xid xid, final int flags) throws XAException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("end(" + xid + ", " + flags + ")");
|
||||
logger.trace("end({}, {})", xid, flags);
|
||||
}
|
||||
|
||||
managedConnection.lock();
|
||||
|
@ -125,9 +123,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource {
|
|||
*/
|
||||
@Override
|
||||
public int prepare(final Xid xid) throws XAException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("prepare(" + xid + ")");
|
||||
}
|
||||
logger.trace("prepare({})", xid);
|
||||
|
||||
return xaResource.prepare(xid);
|
||||
}
|
||||
|
@ -142,7 +138,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource {
|
|||
@Override
|
||||
public void commit(final Xid xid, final boolean onePhase) throws XAException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("commit(" + xid + ", " + onePhase + ")");
|
||||
logger.trace("commit({}, {})", xid, onePhase);
|
||||
}
|
||||
|
||||
xaResource.commit(xid, onePhase);
|
||||
|
@ -156,9 +152,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource {
|
|||
*/
|
||||
@Override
|
||||
public void rollback(final Xid xid) throws XAException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("rollback(" + xid + ")");
|
||||
}
|
||||
logger.trace("rollback({})", xid);
|
||||
|
||||
xaResource.rollback(xid);
|
||||
}
|
||||
|
@ -171,9 +165,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource {
|
|||
*/
|
||||
@Override
|
||||
public void forget(final Xid xid) throws XAException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("forget(" + xid + ")");
|
||||
}
|
||||
logger.trace("forget({})", xid);
|
||||
|
||||
managedConnection.lock();
|
||||
try {
|
||||
|
@ -194,9 +186,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource {
|
|||
*/
|
||||
@Override
|
||||
public boolean isSameRM(final XAResource xaRes) throws XAException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("isSameRM(" + xaRes + ")");
|
||||
}
|
||||
logger.trace("isSameRM({})", xaRes);
|
||||
|
||||
return xaResource.isSameRM(xaRes);
|
||||
}
|
||||
|
@ -211,7 +201,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource {
|
|||
@Override
|
||||
public Xid[] recover(final int flag) throws XAException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("recover(" + flag + ")");
|
||||
logger.trace("recover({})", flag);
|
||||
}
|
||||
|
||||
return xaResource.recover(flag);
|
||||
|
@ -225,9 +215,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource {
|
|||
*/
|
||||
@Override
|
||||
public int getTransactionTimeout() throws XAException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getTransactionTimeout()");
|
||||
}
|
||||
|
||||
return xaResource.getTransactionTimeout();
|
||||
}
|
||||
|
@ -242,7 +230,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource {
|
|||
@Override
|
||||
public boolean setTransactionTimeout(final int seconds) throws XAException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setTransactionTimeout(" + seconds + ")");
|
||||
logger.trace("setTransactionTimeout({})", seconds);
|
||||
}
|
||||
|
||||
return xaResource.setTransactionTimeout(seconds);
|
||||
|
|
|
@ -139,9 +139,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* Constructor
|
||||
*/
|
||||
public ActiveMQResourceAdapter() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor()");
|
||||
}
|
||||
|
||||
raProperties = new ActiveMQRAProperties();
|
||||
configured = new AtomicBoolean(false);
|
||||
|
@ -173,9 +171,8 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
throw new ResourceException("Unable to create activation", e);
|
||||
}
|
||||
}
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("endpointActivation(" + endpointFactory + ", " + spec + ")");
|
||||
}
|
||||
|
||||
logger.trace("endpointActivation({}, {})", endpointFactory, spec);
|
||||
|
||||
ActiveMQActivation activation = new ActiveMQActivation(this, endpointFactory, (ActiveMQActivationSpec) spec);
|
||||
activations.put(spec, activation);
|
||||
|
@ -190,9 +187,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
*/
|
||||
@Override
|
||||
public void endpointDeactivation(final MessageEndpointFactory endpointFactory, final ActivationSpec spec) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("endpointDeactivation(" + endpointFactory + ", " + spec + ")");
|
||||
}
|
||||
logger.trace("endpointDeactivation({}, {})", endpointFactory, spec);
|
||||
|
||||
ActiveMQActivation activation = activations.remove(spec);
|
||||
if (activation != null) {
|
||||
|
@ -210,7 +205,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
@Override
|
||||
public XAResource[] getXAResources(final ActivationSpec[] specs) throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getXAResources(" + Arrays.toString(specs) + ")");
|
||||
logger.trace("getXAResources({})", Arrays.toString(specs));
|
||||
}
|
||||
|
||||
if (useAutoRecovery) {
|
||||
|
@ -236,9 +231,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
*/
|
||||
@Override
|
||||
public void start(final BootstrapContext ctx) throws ResourceAdapterInternalException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("start(" + ctx + ")");
|
||||
}
|
||||
logger.trace("start({})", ctx);
|
||||
|
||||
tm = ServiceUtils.getTransactionManager();
|
||||
|
||||
|
@ -262,9 +255,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
*/
|
||||
@Override
|
||||
public void stop() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("stop()");
|
||||
}
|
||||
|
||||
for (Map.Entry<ActivationSpec, ActiveMQActivation> entry : activations.entrySet()) {
|
||||
try {
|
||||
|
@ -325,9 +316,8 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
}
|
||||
|
||||
public void setConnectorClassName(final String connectorClassName) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setTransportType(" + connectorClassName + ")");
|
||||
}
|
||||
logger.trace("setTransportType({})", connectorClassName);
|
||||
|
||||
unparsedConnectors = connectorClassName;
|
||||
|
||||
raProperties.setParsedConnectorClassNames(ActiveMQRaUtils.parseConnectorConnectorConfig(connectorClassName));
|
||||
|
@ -380,9 +370,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public String getDiscoveryAddress() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getDiscoveryGroupAddress()");
|
||||
}
|
||||
|
||||
return raProperties.getDiscoveryAddress();
|
||||
}
|
||||
|
@ -409,9 +397,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param dgn The value
|
||||
*/
|
||||
public void setDiscoveryAddress(final String dgn) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setDiscoveryGroupAddress(" + dgn + ")");
|
||||
}
|
||||
logger.trace("setDiscoveryGroupAddress({})", dgn);
|
||||
|
||||
raProperties.setDiscoveryAddress(dgn);
|
||||
}
|
||||
|
@ -422,9 +408,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Integer getDiscoveryPort() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getDiscoveryGroupPort()");
|
||||
}
|
||||
|
||||
return raProperties.getDiscoveryPort();
|
||||
}
|
||||
|
@ -435,9 +419,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param discoveryLocalBindAddress the address value
|
||||
*/
|
||||
public void setDiscoveryLocalBindAddress(final String discoveryLocalBindAddress) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setDiscoveryLocalBindAddress(" + discoveryLocalBindAddress + ")");
|
||||
}
|
||||
logger.trace("setDiscoveryLocalBindAddress({})", discoveryLocalBindAddress);
|
||||
|
||||
raProperties.setDiscoveryLocalBindAddress(discoveryLocalBindAddress);
|
||||
}
|
||||
|
@ -448,9 +430,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return the address value
|
||||
*/
|
||||
public String getDiscoveryLocalBindAddress() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getDiscoveryLocalBindAddress()");
|
||||
}
|
||||
|
||||
return raProperties.getDiscoveryLocalBindAddress();
|
||||
}
|
||||
|
@ -461,9 +441,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param dgp The value
|
||||
*/
|
||||
public void setDiscoveryPort(final Integer dgp) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setDiscoveryGroupPort(" + dgp + ")");
|
||||
}
|
||||
logger.trace("setDiscoveryGroupPort({})", dgp);
|
||||
|
||||
raProperties.setDiscoveryPort(dgp);
|
||||
}
|
||||
|
@ -474,9 +452,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Long getDiscoveryRefreshTimeout() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getDiscoveryRefreshTimeout()");
|
||||
}
|
||||
|
||||
return raProperties.getDiscoveryRefreshTimeout();
|
||||
}
|
||||
|
@ -487,9 +463,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param discoveryRefreshTimeout The value
|
||||
*/
|
||||
public void setDiscoveryRefreshTimeout(final Long discoveryRefreshTimeout) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setDiscoveryRefreshTimeout(" + discoveryRefreshTimeout + ")");
|
||||
}
|
||||
logger.trace("setDiscoveryRefreshTimeout({})", discoveryRefreshTimeout);
|
||||
|
||||
raProperties.setDiscoveryRefreshTimeout(discoveryRefreshTimeout);
|
||||
}
|
||||
|
@ -500,9 +474,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Long getDiscoveryInitialWaitTimeout() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getDiscoveryInitialWaitTimeout()");
|
||||
}
|
||||
|
||||
return raProperties.getDiscoveryInitialWaitTimeout();
|
||||
}
|
||||
|
@ -513,9 +485,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param discoveryInitialWaitTimeout The value
|
||||
*/
|
||||
public void setDiscoveryInitialWaitTimeout(final Long discoveryInitialWaitTimeout) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setDiscoveryInitialWaitTimeout(" + discoveryInitialWaitTimeout + ")");
|
||||
}
|
||||
logger.trace("setDiscoveryInitialWaitTimeout({})", discoveryInitialWaitTimeout);
|
||||
|
||||
raProperties.setDiscoveryInitialWaitTimeout(discoveryInitialWaitTimeout);
|
||||
}
|
||||
|
@ -526,9 +496,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Long getClientFailureCheckPeriod() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getClientFailureCheckPeriod()");
|
||||
}
|
||||
|
||||
return raProperties.getClientFailureCheckPeriod();
|
||||
}
|
||||
|
@ -539,9 +507,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param clientFailureCheckPeriod The value
|
||||
*/
|
||||
public void setClientFailureCheckPeriod(final Long clientFailureCheckPeriod) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setClientFailureCheckPeriod(" + clientFailureCheckPeriod + ")");
|
||||
}
|
||||
logger.trace("setClientFailureCheckPeriod({})", clientFailureCheckPeriod);
|
||||
|
||||
raProperties.setClientFailureCheckPeriod(clientFailureCheckPeriod);
|
||||
}
|
||||
|
@ -552,9 +518,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Long getConnectionTTL() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getConnectionTTL()");
|
||||
}
|
||||
|
||||
return raProperties.getConnectionTTL();
|
||||
}
|
||||
|
@ -565,9 +529,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param connectionTTL The value
|
||||
*/
|
||||
public void setConnectionTTL(final Long connectionTTL) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setConnectionTTL(" + connectionTTL + ")");
|
||||
}
|
||||
logger.trace("setConnectionTTL({})", connectionTTL);
|
||||
|
||||
raProperties.setConnectionTTL(connectionTTL);
|
||||
}
|
||||
|
@ -578,9 +540,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Boolean isCacheLargeMessagesClient() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("isCacheLargeMessagesClient()");
|
||||
}
|
||||
|
||||
return raProperties.isCacheLargeMessagesClient();
|
||||
}
|
||||
|
@ -591,9 +551,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param cacheLargeMessagesClient The value
|
||||
*/
|
||||
public void setCacheLargeMessagesClient(final Boolean cacheLargeMessagesClient) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setCacheLargeMessagesClient(" + cacheLargeMessagesClient + ")");
|
||||
}
|
||||
logger.trace("setCacheLargeMessagesClient({})", cacheLargeMessagesClient);
|
||||
|
||||
raProperties.setCacheLargeMessagesClient(cacheLargeMessagesClient);
|
||||
}
|
||||
|
@ -604,9 +562,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Boolean isCompressLargeMessage() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("isCompressLargeMessage()");
|
||||
}
|
||||
|
||||
return raProperties.isCompressLargeMessage();
|
||||
}
|
||||
|
@ -636,9 +592,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param cacheDestinations The value
|
||||
*/
|
||||
public void setCacheDestinations(final Boolean cacheDestinations) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setCacheDestinations(" + cacheDestinations + ")");
|
||||
}
|
||||
logger.trace("setCacheDestinations({})", cacheDestinations);
|
||||
|
||||
raProperties.setCacheDestinations(cacheDestinations);
|
||||
}
|
||||
|
@ -649,9 +603,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Boolean isCacheDestinations() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("isCacheDestinations()");
|
||||
}
|
||||
|
||||
return raProperties.isCacheDestinations();
|
||||
}
|
||||
|
@ -662,9 +614,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param enable1xPrefixes The value
|
||||
*/
|
||||
public void setEnable1xPrefixes(final Boolean enable1xPrefixes) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setEnable1xPrefixes(" + enable1xPrefixes + ")");
|
||||
}
|
||||
logger.trace("setEnable1xPrefixes({})", enable1xPrefixes);
|
||||
|
||||
raProperties.setEnable1xPrefixes(enable1xPrefixes);
|
||||
}
|
||||
|
@ -675,9 +625,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Boolean isEnable1xPrefixes() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("isEnable1xPrefixes()");
|
||||
}
|
||||
|
||||
return raProperties.isEnable1xPrefixes();
|
||||
}
|
||||
|
@ -688,9 +636,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param compressLargeMessage The value
|
||||
*/
|
||||
public void setCompressLargeMessage(final Boolean compressLargeMessage) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setCompressLargeMessage(" + compressLargeMessage + ")");
|
||||
}
|
||||
logger.trace("setCompressLargeMessage({})", compressLargeMessage);
|
||||
|
||||
raProperties.setCompressLargeMessage(compressLargeMessage);
|
||||
}
|
||||
|
@ -701,9 +647,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Long getCallTimeout() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getCallTimeout()");
|
||||
}
|
||||
|
||||
return raProperties.getCallTimeout();
|
||||
}
|
||||
|
@ -714,9 +658,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param callTimeout The value
|
||||
*/
|
||||
public void setCallTimeout(final Long callTimeout) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setCallTimeout(" + callTimeout + ")");
|
||||
}
|
||||
logger.trace("setCallTimeout({})", callTimeout);
|
||||
|
||||
raProperties.setCallTimeout(callTimeout);
|
||||
}
|
||||
|
@ -727,9 +669,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Long getCallFailoverTimeout() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getCallFailoverTimeout()");
|
||||
}
|
||||
|
||||
return raProperties.getCallFailoverTimeout();
|
||||
}
|
||||
|
@ -740,9 +680,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param callFailoverTimeout The value
|
||||
*/
|
||||
public void setCallFailoverTimeout(final Long callFailoverTimeout) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setCallFailoverTimeout(" + callFailoverTimeout + ")");
|
||||
}
|
||||
logger.trace("setCallFailoverTimeout({})", callFailoverTimeout);
|
||||
|
||||
raProperties.setCallFailoverTimeout(callFailoverTimeout);
|
||||
}
|
||||
|
@ -753,9 +691,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Integer getDupsOKBatchSize() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getDupsOKBatchSize()");
|
||||
}
|
||||
|
||||
return raProperties.getDupsOKBatchSize();
|
||||
}
|
||||
|
@ -766,9 +702,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param dupsOKBatchSize The value
|
||||
*/
|
||||
public void setDupsOKBatchSize(final Integer dupsOKBatchSize) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setDupsOKBatchSize(" + dupsOKBatchSize + ")");
|
||||
}
|
||||
logger.trace("setDupsOKBatchSize({})", dupsOKBatchSize);
|
||||
|
||||
raProperties.setDupsOKBatchSize(dupsOKBatchSize);
|
||||
}
|
||||
|
@ -779,9 +713,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Integer getTransactionBatchSize() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getTransactionBatchSize()");
|
||||
}
|
||||
|
||||
return raProperties.getTransactionBatchSize();
|
||||
}
|
||||
|
@ -792,9 +724,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param transactionBatchSize The value
|
||||
*/
|
||||
public void setTransactionBatchSize(final Integer transactionBatchSize) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setTransactionBatchSize(" + transactionBatchSize + ")");
|
||||
}
|
||||
logger.trace("setTransactionBatchSize({})", transactionBatchSize);
|
||||
|
||||
raProperties.setTransactionBatchSize(transactionBatchSize);
|
||||
}
|
||||
|
@ -805,9 +735,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Integer getConsumerWindowSize() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getConsumerWindowSize()");
|
||||
}
|
||||
|
||||
return raProperties.getConsumerWindowSize();
|
||||
}
|
||||
|
@ -818,9 +746,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param consumerWindowSize The value
|
||||
*/
|
||||
public void setConsumerWindowSize(final Integer consumerWindowSize) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setConsumerWindowSize(" + consumerWindowSize + ")");
|
||||
}
|
||||
logger.trace("setConsumerWindowSize({})", consumerWindowSize);
|
||||
|
||||
raProperties.setConsumerWindowSize(consumerWindowSize);
|
||||
}
|
||||
|
@ -831,9 +757,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Integer getConsumerMaxRate() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getConsumerMaxRate()");
|
||||
}
|
||||
|
||||
return raProperties.getConsumerMaxRate();
|
||||
}
|
||||
|
@ -844,9 +768,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param consumerMaxRate The value
|
||||
*/
|
||||
public void setConsumerMaxRate(final Integer consumerMaxRate) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setConsumerMaxRate(" + consumerMaxRate + ")");
|
||||
}
|
||||
logger.trace("setConsumerMaxRate({})", consumerMaxRate);
|
||||
|
||||
raProperties.setConsumerMaxRate(consumerMaxRate);
|
||||
}
|
||||
|
@ -857,9 +779,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Integer getConfirmationWindowSize() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getConfirmationWindowSize()");
|
||||
}
|
||||
|
||||
return raProperties.getConfirmationWindowSize();
|
||||
}
|
||||
|
@ -870,9 +790,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param confirmationWindowSize The value
|
||||
*/
|
||||
public void setConfirmationWindowSize(final Integer confirmationWindowSize) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setConfirmationWindowSize(" + confirmationWindowSize + ")");
|
||||
}
|
||||
logger.trace("setConfirmationWindowSize({})", confirmationWindowSize);
|
||||
|
||||
raProperties.setConfirmationWindowSize(confirmationWindowSize);
|
||||
}
|
||||
|
@ -883,9 +801,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Integer getProducerMaxRate() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getProducerMaxRate()");
|
||||
}
|
||||
|
||||
return raProperties.getProducerMaxRate();
|
||||
}
|
||||
|
@ -896,9 +812,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param producerMaxRate The value
|
||||
*/
|
||||
public void setProducerMaxRate(final Integer producerMaxRate) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setProducerMaxRate(" + producerMaxRate + ")");
|
||||
}
|
||||
logger.trace("setProducerMaxRate({})", producerMaxRate);
|
||||
|
||||
raProperties.setProducerMaxRate(producerMaxRate);
|
||||
}
|
||||
|
@ -917,9 +831,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Integer getProducerWindowSize() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getProducerWindowSize()");
|
||||
}
|
||||
|
||||
return raProperties.getProducerWindowSize();
|
||||
}
|
||||
|
@ -930,55 +842,43 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param producerWindowSize The value
|
||||
*/
|
||||
public void setProducerWindowSize(final Integer producerWindowSize) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setProducerWindowSize(" + producerWindowSize + ")");
|
||||
}
|
||||
logger.trace("setProducerWindowSize({})", producerWindowSize);
|
||||
|
||||
raProperties.setProducerWindowSize(producerWindowSize);
|
||||
}
|
||||
|
||||
public String getProtocolManagerFactoryStr() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getProtocolManagerFactoryStr()");
|
||||
}
|
||||
|
||||
return raProperties.getProtocolManagerFactoryStr();
|
||||
}
|
||||
|
||||
public void setProtocolManagerFactoryStr(final String protocolManagerFactoryStr) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setProtocolManagerFactoryStr(" + protocolManagerFactoryStr + ")");
|
||||
}
|
||||
logger.trace("setProtocolManagerFactoryStr({})", protocolManagerFactoryStr);
|
||||
|
||||
raProperties.setProtocolManagerFactoryStr(protocolManagerFactoryStr);
|
||||
}
|
||||
|
||||
public String getDeserializationBlackList() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getDeserializationBlackList()");
|
||||
}
|
||||
|
||||
return raProperties.getDeserializationBlackList();
|
||||
}
|
||||
|
||||
public void setDeserializationBlackList(String deserializationBlackList) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setDeserializationBlackList(" + deserializationBlackList + ")");
|
||||
}
|
||||
logger.trace("setDeserializationBlackList({})", deserializationBlackList);
|
||||
|
||||
raProperties.setDeserializationBlackList(deserializationBlackList);
|
||||
}
|
||||
|
||||
public String getDeserializationWhiteList() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getDeserializationWhiteList()");
|
||||
}
|
||||
|
||||
return raProperties.getDeserializationWhiteList();
|
||||
}
|
||||
|
||||
public void setDeserializationWhiteList(String deserializationWhiteList) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setDeserializationWhiteList(" + deserializationWhiteList + ")");
|
||||
}
|
||||
logger.trace("setDeserializationWhiteList({})", deserializationWhiteList);
|
||||
|
||||
raProperties.setDeserializationWhiteList(deserializationWhiteList);
|
||||
}
|
||||
|
@ -989,9 +889,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Integer getMinLargeMessageSize() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getMinLargeMessageSize()");
|
||||
}
|
||||
|
||||
return raProperties.getMinLargeMessageSize();
|
||||
}
|
||||
|
@ -1002,9 +900,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param minLargeMessageSize The value
|
||||
*/
|
||||
public void setMinLargeMessageSize(final Integer minLargeMessageSize) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setMinLargeMessageSize(" + minLargeMessageSize + ")");
|
||||
}
|
||||
logger.trace("setMinLargeMessageSize({})", minLargeMessageSize);
|
||||
|
||||
raProperties.setMinLargeMessageSize(minLargeMessageSize);
|
||||
}
|
||||
|
@ -1015,9 +911,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Boolean getBlockOnAcknowledge() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getBlockOnAcknowledge()");
|
||||
}
|
||||
|
||||
return raProperties.isBlockOnAcknowledge();
|
||||
}
|
||||
|
@ -1028,9 +922,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param blockOnAcknowledge The value
|
||||
*/
|
||||
public void setBlockOnAcknowledge(final Boolean blockOnAcknowledge) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setBlockOnAcknowledge(" + blockOnAcknowledge + ")");
|
||||
}
|
||||
logger.trace("setBlockOnAcknowledge({})", blockOnAcknowledge);
|
||||
|
||||
raProperties.setBlockOnAcknowledge(blockOnAcknowledge);
|
||||
}
|
||||
|
@ -1041,9 +933,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Boolean getBlockOnNonDurableSend() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getBlockOnNonDurableSend()");
|
||||
}
|
||||
|
||||
return raProperties.isBlockOnNonDurableSend();
|
||||
}
|
||||
|
@ -1054,9 +944,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param blockOnNonDurableSend The value
|
||||
*/
|
||||
public void setBlockOnNonDurableSend(final Boolean blockOnNonDurableSend) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setBlockOnNonDurableSend(" + blockOnNonDurableSend + ")");
|
||||
}
|
||||
logger.trace("setBlockOnNonDurableSend({})", blockOnNonDurableSend);
|
||||
|
||||
raProperties.setBlockOnNonDurableSend(blockOnNonDurableSend);
|
||||
}
|
||||
|
@ -1067,9 +955,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Boolean getBlockOnDurableSend() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getBlockOnDurableSend()");
|
||||
}
|
||||
|
||||
return raProperties.isBlockOnDurableSend();
|
||||
}
|
||||
|
@ -1080,9 +966,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param blockOnDurableSend The value
|
||||
*/
|
||||
public void setBlockOnDurableSend(final Boolean blockOnDurableSend) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setBlockOnDurableSend(" + blockOnDurableSend + ")");
|
||||
}
|
||||
logger.trace("setBlockOnDurableSend({})", blockOnDurableSend);
|
||||
|
||||
raProperties.setBlockOnDurableSend(blockOnDurableSend);
|
||||
}
|
||||
|
@ -1093,9 +977,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Boolean getAutoGroup() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getAutoGroup()");
|
||||
}
|
||||
|
||||
return raProperties.isAutoGroup();
|
||||
}
|
||||
|
@ -1106,9 +988,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param autoGroup The value
|
||||
*/
|
||||
public void setAutoGroup(final Boolean autoGroup) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setAutoGroup(" + autoGroup + ")");
|
||||
}
|
||||
logger.trace("setAutoGroup({})", autoGroup);
|
||||
|
||||
raProperties.setAutoGroup(autoGroup);
|
||||
}
|
||||
|
@ -1119,9 +999,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Boolean getPreAcknowledge() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getPreAcknowledge()");
|
||||
}
|
||||
|
||||
return raProperties.isPreAcknowledge();
|
||||
}
|
||||
|
@ -1132,9 +1010,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param preAcknowledge The value
|
||||
*/
|
||||
public void setPreAcknowledge(final Boolean preAcknowledge) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setPreAcknowledge(" + preAcknowledge + ")");
|
||||
}
|
||||
logger.trace("setPreAcknowledge({})", preAcknowledge);
|
||||
|
||||
raProperties.setPreAcknowledge(preAcknowledge);
|
||||
}
|
||||
|
@ -1145,9 +1021,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Integer getInitialConnectAttempts() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getInitialConnectAttempts()");
|
||||
}
|
||||
|
||||
return raProperties.getInitialConnectAttempts();
|
||||
}
|
||||
|
@ -1158,9 +1032,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param initialConnectAttempts The value
|
||||
*/
|
||||
public void setInitialConnectAttempts(final Integer initialConnectAttempts) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setInitialConnectionAttempts(" + initialConnectAttempts + ")");
|
||||
}
|
||||
logger.trace("setInitialConnectionAttempts({})", initialConnectAttempts);
|
||||
|
||||
raProperties.setInitialConnectAttempts(initialConnectAttempts);
|
||||
}
|
||||
|
@ -1171,9 +1043,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Integer getInitialMessagePacketSize() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getInitialMessagePacketSize()");
|
||||
}
|
||||
|
||||
return raProperties.getInitialMessagePacketSize();
|
||||
}
|
||||
|
@ -1184,9 +1054,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param initialMessagePacketSize The value
|
||||
*/
|
||||
public void setInitialMessagePacketSize(final Integer initialMessagePacketSize) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setInitialMessagePacketSize(" + initialMessagePacketSize + ")");
|
||||
}
|
||||
logger.trace("setInitialMessagePacketSize({})", initialMessagePacketSize);
|
||||
|
||||
raProperties.setInitialMessagePacketSize(initialMessagePacketSize);
|
||||
}
|
||||
|
@ -1197,9 +1065,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Long getRetryInterval() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getRetryInterval()");
|
||||
}
|
||||
|
||||
return raProperties.getRetryInterval();
|
||||
}
|
||||
|
@ -1210,9 +1076,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param retryInterval The value
|
||||
*/
|
||||
public void setRetryInterval(final Long retryInterval) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setRetryInterval(" + retryInterval + ")");
|
||||
}
|
||||
logger.trace("setRetryInterval({})", retryInterval);
|
||||
|
||||
raProperties.setRetryInterval(retryInterval);
|
||||
}
|
||||
|
@ -1223,9 +1087,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Double getRetryIntervalMultiplier() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getRetryIntervalMultiplier()");
|
||||
}
|
||||
|
||||
return raProperties.getRetryIntervalMultiplier();
|
||||
}
|
||||
|
@ -1236,9 +1098,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param retryIntervalMultiplier The value
|
||||
*/
|
||||
public void setRetryIntervalMultiplier(final Double retryIntervalMultiplier) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setRetryIntervalMultiplier(" + retryIntervalMultiplier + ")");
|
||||
}
|
||||
logger.trace("setRetryIntervalMultiplier({})", retryIntervalMultiplier);
|
||||
|
||||
raProperties.setRetryIntervalMultiplier(retryIntervalMultiplier);
|
||||
}
|
||||
|
@ -1249,9 +1109,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Long getMaxRetryInterval() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getMaxRetryInterval()");
|
||||
}
|
||||
|
||||
return raProperties.getMaxRetryInterval();
|
||||
}
|
||||
|
@ -1262,9 +1120,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param maxRetryInterval The value
|
||||
*/
|
||||
public void setMaxRetryInterval(final Long maxRetryInterval) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setMaxRetryInterval(" + maxRetryInterval + ")");
|
||||
}
|
||||
logger.trace("setMaxRetryInterval({})", maxRetryInterval);
|
||||
|
||||
raProperties.setMaxRetryInterval(maxRetryInterval);
|
||||
}
|
||||
|
@ -1275,9 +1131,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Integer getReconnectAttempts() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getReconnectAttempts()");
|
||||
}
|
||||
|
||||
return raProperties.getReconnectAttempts();
|
||||
}
|
||||
|
@ -1288,9 +1142,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param reconnectAttempts The value
|
||||
*/
|
||||
public void setReconnectAttempts(final Integer reconnectAttempts) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setReconnectAttempts(" + reconnectAttempts + ")");
|
||||
}
|
||||
logger.trace("setReconnectAttempts({})", reconnectAttempts);
|
||||
|
||||
raProperties.setReconnectAttempts(reconnectAttempts);
|
||||
}
|
||||
|
@ -1300,9 +1152,8 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
}
|
||||
|
||||
public void setConnectionLoadBalancingPolicyClassName(final String connectionLoadBalancingPolicyClassName) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setFailoverOnServerShutdown(" + connectionLoadBalancingPolicyClassName + ")");
|
||||
}
|
||||
logger.trace("setFailoverOnServerShutdown({})", connectionLoadBalancingPolicyClassName);
|
||||
|
||||
raProperties.setConnectionLoadBalancingPolicyClassName(connectionLoadBalancingPolicyClassName);
|
||||
}
|
||||
|
||||
|
@ -1311,9 +1162,8 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
}
|
||||
|
||||
public void setScheduledThreadPoolMaxSize(final Integer scheduledThreadPoolMaxSize) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setFailoverOnServerShutdown(" + scheduledThreadPoolMaxSize + ")");
|
||||
}
|
||||
logger.trace("setFailoverOnServerShutdown({})", scheduledThreadPoolMaxSize);
|
||||
|
||||
raProperties.setScheduledThreadPoolMaxSize(scheduledThreadPoolMaxSize);
|
||||
}
|
||||
|
||||
|
@ -1322,9 +1172,8 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
}
|
||||
|
||||
public void setThreadPoolMaxSize(final Integer threadPoolMaxSize) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setFailoverOnServerShutdown(" + threadPoolMaxSize + ")");
|
||||
}
|
||||
logger.trace("setFailoverOnServerShutdown({})", threadPoolMaxSize);
|
||||
|
||||
raProperties.setThreadPoolMaxSize(threadPoolMaxSize);
|
||||
}
|
||||
|
||||
|
@ -1333,9 +1182,8 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
}
|
||||
|
||||
public void setUseGlobalPools(final Boolean useGlobalPools) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setFailoverOnServerShutdown(" + useGlobalPools + ")");
|
||||
}
|
||||
logger.trace("setFailoverOnServerShutdown({})", useGlobalPools);
|
||||
|
||||
raProperties.setUseGlobalPools(useGlobalPools);
|
||||
}
|
||||
|
||||
|
@ -1345,9 +1193,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public String getUserName() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getUserName()");
|
||||
}
|
||||
|
||||
return raProperties.getUserName();
|
||||
}
|
||||
|
@ -1358,9 +1204,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param userName The value
|
||||
*/
|
||||
public void setUserName(final String userName) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setUserName(" + userName + ")");
|
||||
}
|
||||
logger.trace("setUserName({})", userName);
|
||||
|
||||
raProperties.setUserName(userName);
|
||||
}
|
||||
|
@ -1371,9 +1215,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public String getPassword() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getPassword()");
|
||||
}
|
||||
|
||||
return raProperties.getPassword();
|
||||
}
|
||||
|
@ -1427,9 +1269,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public String getClientID() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getClientID()");
|
||||
}
|
||||
|
||||
return raProperties.getClientID();
|
||||
}
|
||||
|
@ -1440,9 +1280,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param clientID The client id
|
||||
*/
|
||||
public void setClientID(final String clientID) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setClientID(" + clientID + ")");
|
||||
}
|
||||
logger.trace("setClientID({})", clientID);
|
||||
|
||||
raProperties.setClientID(clientID);
|
||||
}
|
||||
|
@ -1453,9 +1291,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public String getGroupID() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getGroupID()");
|
||||
}
|
||||
|
||||
return raProperties.getGroupID();
|
||||
}
|
||||
|
@ -1466,9 +1302,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param groupID The group id
|
||||
*/
|
||||
public void setGroupID(final String groupID) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setGroupID(" + groupID + ")");
|
||||
}
|
||||
logger.trace("setGroupID({})", groupID);
|
||||
|
||||
raProperties.setGroupID(groupID);
|
||||
}
|
||||
|
@ -1479,9 +1313,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The value
|
||||
*/
|
||||
public Boolean getUseLocalTx() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getUseLocalTx()");
|
||||
}
|
||||
|
||||
return raProperties.getUseLocalTx();
|
||||
}
|
||||
|
@ -1492,38 +1324,32 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @param localTx The value
|
||||
*/
|
||||
public void setUseLocalTx(final Boolean localTx) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setUseXA(" + localTx + ")");
|
||||
}
|
||||
logger.trace("setUseXA({})", localTx);
|
||||
|
||||
raProperties.setUseLocalTx(localTx);
|
||||
}
|
||||
|
||||
public int getSetupAttempts() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getSetupAttempts()");
|
||||
}
|
||||
|
||||
return raProperties.getSetupAttempts();
|
||||
}
|
||||
|
||||
public void setSetupAttempts(Integer setupAttempts) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setSetupAttempts(" + setupAttempts + ")");
|
||||
}
|
||||
logger.trace("setSetupAttempts({})", setupAttempts);
|
||||
|
||||
raProperties.setSetupAttempts(setupAttempts);
|
||||
}
|
||||
|
||||
public long getSetupInterval() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getSetupInterval()");
|
||||
}
|
||||
|
||||
return raProperties.getSetupInterval();
|
||||
}
|
||||
|
||||
public void setSetupInterval(Long interval) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setSetupInterval(" + interval + ")");
|
||||
}
|
||||
logger.trace("setSetupInterval({})", interval);
|
||||
|
||||
raProperties.setSetupInterval(interval);
|
||||
}
|
||||
|
||||
|
@ -1535,9 +1361,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
*/
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("equals(" + obj + ")");
|
||||
}
|
||||
logger.trace("equals({})", obj);
|
||||
|
||||
if (obj == null) {
|
||||
return false;
|
||||
|
@ -1556,9 +1380,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("hashCode()");
|
||||
}
|
||||
|
||||
return raProperties.hashCode();
|
||||
}
|
||||
|
@ -1569,9 +1391,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The manager
|
||||
*/
|
||||
public WorkManager getWorkManager() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getWorkManager()");
|
||||
}
|
||||
|
||||
if (ctx == null) {
|
||||
return null;
|
||||
|
@ -1622,7 +1442,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
}
|
||||
}
|
||||
|
||||
logger.debug("Using queue connection " + result);
|
||||
logger.debug("Using queue connection {}", result);
|
||||
|
||||
return result;
|
||||
|
||||
|
@ -1638,9 +1458,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
* @return The properties
|
||||
*/
|
||||
public ActiveMQRAProperties getProperties() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getProperties()");
|
||||
}
|
||||
|
||||
return raProperties;
|
||||
}
|
||||
|
@ -1751,9 +1569,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
|
||||
DiscoveryGroupConfiguration groupConfiguration = new DiscoveryGroupConfiguration().setRefreshTimeout(refreshTimeout).setDiscoveryInitialWaitTimeout(initialTimeout).setBroadcastEndpointFactory(endpointFactory);
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Creating Connection Factory on the resource adapter for discovery=" + groupConfiguration + " with ha=" + ha);
|
||||
}
|
||||
logger.debug("Creating Connection Factory on the resource adapter for discovery={} with ha={}", groupConfiguration, ha);
|
||||
|
||||
if (ha) {
|
||||
cf = ActiveMQJMSClient.createConnectionFactoryWithHA(groupConfiguration, JMSFactoryType.XA_CF);
|
||||
|
@ -1783,7 +1599,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
}
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Creating Connection Factory on the resource adapter for transport=" + Arrays.toString(transportConfigurations) + " with ha=" + ha);
|
||||
logger.debug("Creating Connection Factory on the resource adapter for transport={} with ha={}", Arrays.toString(transportConfigurations), ha);
|
||||
}
|
||||
|
||||
if (ha) {
|
||||
|
@ -1826,9 +1642,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
|
||||
groupConfiguration.setRefreshTimeout(refreshTimeout);
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Creating Recovery Connection Factory on the resource adapter for discovery=" + groupConfiguration);
|
||||
}
|
||||
logger.debug("Creating Recovery Connection Factory on the resource adapter for discovery={}", groupConfiguration);
|
||||
|
||||
cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(groupConfiguration, JMSFactoryType.XA_CF);
|
||||
} else {
|
||||
|
@ -1854,7 +1668,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable {
|
|||
}
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Creating Recovery Connection Factory on the resource adapter for transport=" + Arrays.toString(transportConfigurations));
|
||||
logger.debug("Creating Recovery Connection Factory on the resource adapter for transport={}", Arrays.toString(transportConfigurations));
|
||||
}
|
||||
|
||||
cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.XA_CF, transportConfigurations);
|
||||
|
|
|
@ -179,241 +179,209 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
|
|||
}
|
||||
|
||||
public String getConnectionLoadBalancingPolicyClassName() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getConnectionLoadBalancingPolicyClassName()");
|
||||
}
|
||||
|
||||
return connectionLoadBalancingPolicyClassName;
|
||||
}
|
||||
|
||||
public void setConnectionLoadBalancingPolicyClassName(final String connectionLoadBalancingPolicyClassName) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setSessionDefaultType(" + connectionLoadBalancingPolicyClassName + ")");
|
||||
}
|
||||
logger.trace("setSessionDefaultType({})", connectionLoadBalancingPolicyClassName);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.connectionLoadBalancingPolicyClassName = connectionLoadBalancingPolicyClassName;
|
||||
}
|
||||
|
||||
public String getDiscoveryAddress() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getDiscoveryAddress()");
|
||||
}
|
||||
|
||||
return discoveryAddress;
|
||||
}
|
||||
|
||||
public void setDiscoveryAddress(final String discoveryAddress) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setDiscoveryAddress(" + discoveryAddress + ")");
|
||||
}
|
||||
logger.trace("setDiscoveryAddress({})", discoveryAddress);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.discoveryAddress = discoveryAddress;
|
||||
}
|
||||
|
||||
public Integer getDiscoveryPort() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getDiscoveryPort()");
|
||||
}
|
||||
|
||||
return discoveryPort;
|
||||
}
|
||||
|
||||
public void setDiscoveryLocalBindAddress(final String discoveryLocalBindAddress) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setDiscoveryLocalBindAddress(" + discoveryLocalBindAddress + ")");
|
||||
}
|
||||
logger.trace("setDiscoveryLocalBindAddress({})", discoveryLocalBindAddress);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.discoveryLocalBindAddress = discoveryLocalBindAddress;
|
||||
}
|
||||
|
||||
public String getDiscoveryLocalBindAddress() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getDiscoveryLocalBindAddress()");
|
||||
}
|
||||
|
||||
return discoveryLocalBindAddress;
|
||||
}
|
||||
|
||||
public void setDiscoveryPort(final Integer discoveryPort) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setDiscoveryPort(" + discoveryPort + ")");
|
||||
}
|
||||
logger.trace("setDiscoveryPort({})", discoveryPort);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.discoveryPort = discoveryPort;
|
||||
}
|
||||
|
||||
public Long getDiscoveryRefreshTimeout() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getDiscoveryRefreshTimeout()");
|
||||
}
|
||||
|
||||
return discoveryRefreshTimeout;
|
||||
}
|
||||
|
||||
public void setDiscoveryRefreshTimeout(final Long discoveryRefreshTimeout) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setDiscoveryRefreshTimeout(" + discoveryRefreshTimeout + ")");
|
||||
}
|
||||
logger.trace("setDiscoveryRefreshTimeout({})", discoveryRefreshTimeout);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.discoveryRefreshTimeout = discoveryRefreshTimeout;
|
||||
}
|
||||
|
||||
public Long getDiscoveryInitialWaitTimeout() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getDiscoveryInitialWaitTimeout()");
|
||||
}
|
||||
|
||||
return discoveryInitialWaitTimeout;
|
||||
}
|
||||
|
||||
public void setDiscoveryInitialWaitTimeout(final Long discoveryInitialWaitTimeout) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setDiscoveryInitialWaitTimeout(" + discoveryInitialWaitTimeout + ")");
|
||||
}
|
||||
logger.trace("setDiscoveryInitialWaitTimeout({})", discoveryInitialWaitTimeout);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.discoveryInitialWaitTimeout = discoveryInitialWaitTimeout;
|
||||
}
|
||||
|
||||
public String getClientID() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getClientID()");
|
||||
}
|
||||
|
||||
return clientID;
|
||||
}
|
||||
|
||||
public void setClientID(final String clientID) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setClientID(" + clientID + ")");
|
||||
}
|
||||
logger.trace("setClientID({})", clientID);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.clientID = clientID;
|
||||
}
|
||||
|
||||
public Integer getDupsOKBatchSize() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getDupsOKBatchSize()");
|
||||
}
|
||||
|
||||
return dupsOKBatchSize;
|
||||
}
|
||||
|
||||
public void setDupsOKBatchSize(final Integer dupsOKBatchSize) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setDupsOKBatchSize(" + dupsOKBatchSize + ")");
|
||||
}
|
||||
logger.trace("setDupsOKBatchSize({})", dupsOKBatchSize);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.dupsOKBatchSize = dupsOKBatchSize;
|
||||
}
|
||||
|
||||
public Integer getTransactionBatchSize() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getTransactionBatchSize()");
|
||||
}
|
||||
|
||||
return transactionBatchSize;
|
||||
}
|
||||
|
||||
public void setTransactionBatchSize(final Integer transactionBatchSize) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setTransactionBatchSize(" + transactionBatchSize + ")");
|
||||
}
|
||||
logger.trace("setTransactionBatchSize({})", transactionBatchSize);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.transactionBatchSize = transactionBatchSize;
|
||||
}
|
||||
|
||||
public Long getClientFailureCheckPeriod() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getClientFailureCheckPeriod()");
|
||||
}
|
||||
|
||||
return clientFailureCheckPeriod;
|
||||
}
|
||||
|
||||
public void setClientFailureCheckPeriod(final Long clientFailureCheckPeriod) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setClientFailureCheckPeriod(" + clientFailureCheckPeriod + ")");
|
||||
}
|
||||
logger.trace("setClientFailureCheckPeriod({})", clientFailureCheckPeriod);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.clientFailureCheckPeriod = clientFailureCheckPeriod;
|
||||
}
|
||||
|
||||
public Long getConnectionTTL() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getConnectionTTL()");
|
||||
}
|
||||
|
||||
return connectionTTL;
|
||||
}
|
||||
|
||||
public void setConnectionTTL(final Long connectionTTL) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setConnectionTTL(" + connectionTTL + ")");
|
||||
}
|
||||
logger.trace("setConnectionTTL({})", connectionTTL);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.connectionTTL = connectionTTL;
|
||||
}
|
||||
|
||||
public Long getCallTimeout() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getCallTimeout()");
|
||||
}
|
||||
|
||||
return callTimeout;
|
||||
}
|
||||
|
||||
public void setCallTimeout(final Long callTimeout) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setCallTimeout(" + callTimeout + ")");
|
||||
}
|
||||
logger.trace("setCallTimeout({})", callTimeout);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.callTimeout = callTimeout;
|
||||
}
|
||||
|
||||
public Long getCallFailoverTimeout() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getCallFailoverTimeout()");
|
||||
}
|
||||
|
||||
return callFailoverTimeout;
|
||||
}
|
||||
|
||||
public void setCallFailoverTimeout(final Long callFailoverTimeout) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setCallFailoverTimeout(" + callFailoverTimeout + ")");
|
||||
}
|
||||
logger.trace("setCallFailoverTimeout({})", callFailoverTimeout);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.callFailoverTimeout = callFailoverTimeout;
|
||||
}
|
||||
|
||||
public Integer getConsumerWindowSize() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getConsumerWindowSize()");
|
||||
}
|
||||
|
||||
return consumerWindowSize;
|
||||
}
|
||||
|
||||
public void setConsumerWindowSize(final Integer consumerWindowSize) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setConsumerWindowSize(" + consumerWindowSize + ")");
|
||||
}
|
||||
logger.trace("setConsumerWindowSize({})", consumerWindowSize);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.consumerWindowSize = consumerWindowSize;
|
||||
}
|
||||
|
||||
public Integer getConsumerMaxRate() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getConsumerMaxRate()");
|
||||
}
|
||||
|
||||
return consumerMaxRate;
|
||||
}
|
||||
|
||||
public void setConsumerMaxRate(final Integer consumerMaxRate) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setConsumerMaxRate(" + consumerMaxRate + ")");
|
||||
}
|
||||
logger.trace("setConsumerMaxRate({})", consumerMaxRate);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.consumerMaxRate = consumerMaxRate;
|
||||
}
|
||||
|
||||
public Integer getConfirmationWindowSize() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getConfirmationWindowSize()");
|
||||
}
|
||||
|
||||
return confirmationWindowSize;
|
||||
}
|
||||
|
||||
public void setConfirmationWindowSize(final Integer confirmationWindowSize) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setConfirmationWindowSize(" + confirmationWindowSize + ")");
|
||||
}
|
||||
logger.trace("setConfirmationWindowSize({})", confirmationWindowSize);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.confirmationWindowSize = confirmationWindowSize;
|
||||
}
|
||||
|
@ -428,151 +396,131 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
|
|||
}
|
||||
|
||||
public Integer getProducerMaxRate() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getProducerMaxRate()");
|
||||
}
|
||||
|
||||
return producerMaxRate;
|
||||
}
|
||||
|
||||
public void setProducerMaxRate(final Integer producerMaxRate) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setProducerMaxRate(" + producerMaxRate + ")");
|
||||
}
|
||||
logger.trace("setProducerMaxRate({})", producerMaxRate);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.producerMaxRate = producerMaxRate;
|
||||
}
|
||||
|
||||
public Integer getProducerWindowSize() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getProducerWindowSize()");
|
||||
}
|
||||
|
||||
return producerWindowSize;
|
||||
}
|
||||
|
||||
public void setProducerWindowSize(final Integer producerWindowSize) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setProducerWindowSize(" + producerWindowSize + ")");
|
||||
}
|
||||
logger.trace("setProducerWindowSize({})", producerWindowSize);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.producerWindowSize = producerWindowSize;
|
||||
}
|
||||
|
||||
public Integer getMinLargeMessageSize() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getMinLargeMessageSize()");
|
||||
}
|
||||
|
||||
return minLargeMessageSize;
|
||||
}
|
||||
|
||||
public void setMinLargeMessageSize(final Integer minLargeMessageSize) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setMinLargeMessageSize(" + minLargeMessageSize + ")");
|
||||
}
|
||||
logger.trace("setMinLargeMessageSize({})", minLargeMessageSize);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.minLargeMessageSize = minLargeMessageSize;
|
||||
}
|
||||
|
||||
public Boolean isBlockOnAcknowledge() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("isBlockOnAcknowledge()");
|
||||
}
|
||||
|
||||
return blockOnAcknowledge;
|
||||
}
|
||||
|
||||
public void setBlockOnAcknowledge(final Boolean blockOnAcknowledge) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setBlockOnAcknowledge(" + blockOnAcknowledge + ")");
|
||||
}
|
||||
logger.trace("setBlockOnAcknowledge({})", blockOnAcknowledge);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.blockOnAcknowledge = blockOnAcknowledge;
|
||||
}
|
||||
|
||||
public Boolean isBlockOnNonDurableSend() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("isBlockOnNonDurableSend()");
|
||||
}
|
||||
|
||||
return blockOnNonDurableSend;
|
||||
}
|
||||
|
||||
public void setBlockOnNonDurableSend(final Boolean blockOnNonDurableSend) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setBlockOnNonDurableSend(" + blockOnNonDurableSend + ")");
|
||||
}
|
||||
logger.trace("setBlockOnNonDurableSend({})", blockOnNonDurableSend);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.blockOnNonDurableSend = blockOnNonDurableSend;
|
||||
}
|
||||
|
||||
public Boolean isBlockOnDurableSend() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("isBlockOnDurableSend()");
|
||||
}
|
||||
|
||||
return blockOnDurableSend;
|
||||
}
|
||||
|
||||
public void setBlockOnDurableSend(final Boolean blockOnDurableSend) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setBlockOnDurableSend(" + blockOnDurableSend + ")");
|
||||
}
|
||||
logger.trace("setBlockOnDurableSend({})", blockOnDurableSend);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.blockOnDurableSend = blockOnDurableSend;
|
||||
}
|
||||
|
||||
public Boolean isAutoGroup() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("isAutoGroup()");
|
||||
}
|
||||
|
||||
return autoGroup;
|
||||
}
|
||||
|
||||
public void setAutoGroup(final Boolean autoGroup) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setAutoGroup(" + autoGroup + ")");
|
||||
}
|
||||
logger.trace("setAutoGroup({})", autoGroup);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.autoGroup = autoGroup;
|
||||
}
|
||||
|
||||
public Boolean isPreAcknowledge() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("isPreAcknowledge()");
|
||||
}
|
||||
|
||||
return preAcknowledge;
|
||||
}
|
||||
|
||||
public void setPreAcknowledge(final Boolean preAcknowledge) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setPreAcknowledge(" + preAcknowledge + ")");
|
||||
}
|
||||
logger.trace("setPreAcknowledge({})", preAcknowledge);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.preAcknowledge = preAcknowledge;
|
||||
}
|
||||
|
||||
public Long getRetryInterval() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getRetryInterval()");
|
||||
}
|
||||
|
||||
return retryInterval;
|
||||
}
|
||||
|
||||
public void setRetryInterval(final Long retryInterval) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setRetryInterval(" + retryInterval + ")");
|
||||
}
|
||||
logger.trace("setRetryInterval({})", retryInterval);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.retryInterval = retryInterval;
|
||||
}
|
||||
|
||||
public Double getRetryIntervalMultiplier() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getRetryIntervalMultiplier()");
|
||||
}
|
||||
|
||||
return retryIntervalMultiplier;
|
||||
}
|
||||
|
||||
public void setRetryIntervalMultiplier(final Double retryIntervalMultiplier) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setRetryIntervalMultiplier(" + retryIntervalMultiplier + ")");
|
||||
}
|
||||
logger.trace("setRetryIntervalMultiplier({})", retryIntervalMultiplier);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.retryIntervalMultiplier = retryIntervalMultiplier;
|
||||
}
|
||||
|
@ -587,91 +535,79 @@ public class ConnectionFactoryProperties implements ConnectionFactoryOptions {
|
|||
}
|
||||
|
||||
public Integer getReconnectAttempts() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getReconnectAttempts()");
|
||||
}
|
||||
|
||||
return reconnectAttempts;
|
||||
}
|
||||
|
||||
public void setReconnectAttempts(final Integer reconnectAttempts) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setReconnectAttempts(" + reconnectAttempts + ")");
|
||||
}
|
||||
logger.trace("setReconnectAttempts({})", reconnectAttempts);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.reconnectAttempts = reconnectAttempts;
|
||||
}
|
||||
|
||||
public Boolean isUseGlobalPools() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("isUseGlobalPools()");
|
||||
}
|
||||
|
||||
return useGlobalPools;
|
||||
}
|
||||
|
||||
public void setUseGlobalPools(final Boolean useGlobalPools) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setUseGlobalPools(" + useGlobalPools + ")");
|
||||
}
|
||||
logger.trace("setUseGlobalPools({})", useGlobalPools);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.useGlobalPools = useGlobalPools;
|
||||
}
|
||||
|
||||
public Boolean isCacheDestinations() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("isCacheDestinations()");
|
||||
}
|
||||
|
||||
return cacheDestinations;
|
||||
}
|
||||
|
||||
public void setCacheDestinations(final Boolean cacheDestinations) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setCacheDestinations(" + cacheDestinations + ")");
|
||||
}
|
||||
logger.trace("setCacheDestinations({})", cacheDestinations);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.cacheDestinations = cacheDestinations;
|
||||
}
|
||||
|
||||
public Boolean isEnable1xPrefixes() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("isEnable1xPrefixes()");
|
||||
}
|
||||
|
||||
return enable1xPrefixes;
|
||||
}
|
||||
|
||||
public void setEnable1xPrefixes(final Boolean enable1xPrefixes) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setEnable1xPrefixes(" + enable1xPrefixes + ")");
|
||||
}
|
||||
logger.trace("setEnable1xPrefixes({})", enable1xPrefixes);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.enable1xPrefixes = enable1xPrefixes;
|
||||
}
|
||||
|
||||
public Integer getScheduledThreadPoolMaxSize() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getScheduledThreadPoolMaxSize()");
|
||||
}
|
||||
|
||||
return scheduledThreadPoolMaxSize;
|
||||
}
|
||||
|
||||
public void setScheduledThreadPoolMaxSize(final Integer scheduledThreadPoolMaxSize) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setScheduledThreadPoolMaxSize(" + scheduledThreadPoolMaxSize + ")");
|
||||
}
|
||||
logger.trace("setScheduledThreadPoolMaxSize({})", scheduledThreadPoolMaxSize);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.scheduledThreadPoolMaxSize = scheduledThreadPoolMaxSize;
|
||||
}
|
||||
|
||||
public Integer getThreadPoolMaxSize() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getThreadPoolMaxSize()");
|
||||
}
|
||||
|
||||
return threadPoolMaxSize;
|
||||
}
|
||||
|
||||
public void setThreadPoolMaxSize(final Integer threadPoolMaxSize) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setThreadPoolMaxSize(" + threadPoolMaxSize + ")");
|
||||
}
|
||||
logger.trace("setThreadPoolMaxSize({})", threadPoolMaxSize);
|
||||
|
||||
hasBeenUpdated = true;
|
||||
this.threadPoolMaxSize = threadPoolMaxSize;
|
||||
}
|
||||
|
|
|
@ -154,7 +154,7 @@ public class ActiveMQActivation {
|
|||
spec.validate();
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor(" + ra + ", " + endpointFactory + ", " + spec + ")");
|
||||
logger.trace("constructor({}, {}, {})", ra, endpointFactory, spec);
|
||||
}
|
||||
|
||||
String pass = spec.getOwnPassword();
|
||||
|
@ -182,9 +182,7 @@ public class ActiveMQActivation {
|
|||
* @return The value
|
||||
*/
|
||||
public ActiveMQActivationSpec getActivationSpec() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getActivationSpec()");
|
||||
}
|
||||
|
||||
return spec;
|
||||
}
|
||||
|
@ -195,9 +193,7 @@ public class ActiveMQActivation {
|
|||
* @return The value
|
||||
*/
|
||||
public MessageEndpointFactory getMessageEndpointFactory() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getMessageEndpointFactory()");
|
||||
}
|
||||
|
||||
return endpointFactory;
|
||||
}
|
||||
|
@ -208,9 +204,7 @@ public class ActiveMQActivation {
|
|||
* @return The value
|
||||
*/
|
||||
public boolean isDeliveryTransacted() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("isDeliveryTransacted()");
|
||||
}
|
||||
|
||||
return isDeliveryTransacted;
|
||||
}
|
||||
|
@ -221,9 +215,7 @@ public class ActiveMQActivation {
|
|||
* @return The value
|
||||
*/
|
||||
public WorkManager getWorkManager() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getWorkManager()");
|
||||
}
|
||||
|
||||
return ra.getWorkManager();
|
||||
}
|
||||
|
@ -234,9 +226,7 @@ public class ActiveMQActivation {
|
|||
* @return The value
|
||||
*/
|
||||
public boolean isTopic() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("isTopic()");
|
||||
}
|
||||
|
||||
return isTopic;
|
||||
}
|
||||
|
@ -247,9 +237,8 @@ public class ActiveMQActivation {
|
|||
* @throws ResourceException Thrown if an error occurs
|
||||
*/
|
||||
public void start() throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("start()");
|
||||
}
|
||||
|
||||
deliveryActive.set(true);
|
||||
scheduleWork(new SetupActivation());
|
||||
}
|
||||
|
@ -286,9 +275,7 @@ public class ActiveMQActivation {
|
|||
* Stop the activation
|
||||
*/
|
||||
public void stop() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("stop()");
|
||||
}
|
||||
|
||||
deliveryActive.set(false);
|
||||
teardown(true);
|
||||
|
@ -300,7 +287,7 @@ public class ActiveMQActivation {
|
|||
* @throws Exception Thrown if an error occurs
|
||||
*/
|
||||
protected synchronized void setup() throws Exception {
|
||||
logger.debug("Setting up " + spec);
|
||||
logger.debug("Setting up {}", spec);
|
||||
|
||||
setupCF();
|
||||
|
||||
|
@ -360,7 +347,7 @@ public class ActiveMQActivation {
|
|||
factory.getServerLocator().addClusterTopologyListener(new RebalancingListener());
|
||||
}
|
||||
|
||||
logger.debug("Setup complete " + this);
|
||||
logger.debug("Setup complete {}", this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -370,7 +357,7 @@ public class ActiveMQActivation {
|
|||
|
||||
synchronized (teardownLock) {
|
||||
|
||||
logger.debug("Tearing down " + spec);
|
||||
logger.debug("Tearing down {}", spec);
|
||||
|
||||
long timeout = factory == null ? ActiveMQClient.DEFAULT_CALL_TIMEOUT : factory.getCallTimeout();
|
||||
|
||||
|
@ -460,7 +447,7 @@ public class ActiveMQActivation {
|
|||
nodes.clear();
|
||||
lastReceived = false;
|
||||
|
||||
logger.debug("Tearing down complete " + this);
|
||||
logger.debug("Tearing down complete {}", this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -507,7 +494,7 @@ public class ActiveMQActivation {
|
|||
result.addMetaData(ClientSession.JMS_SESSION_CLIENT_ID_PROPERTY, clientID);
|
||||
}
|
||||
|
||||
logger.debug("Using queue connection " + result);
|
||||
logger.debug("Using queue connection {}", result);
|
||||
|
||||
return result;
|
||||
} catch (Throwable t) {
|
||||
|
@ -540,14 +527,12 @@ public class ActiveMQActivation {
|
|||
} else {
|
||||
ctx = new InitialContext(spec.getParsedJndiParams());
|
||||
}
|
||||
logger.debug("Using context " + ctx.getEnvironment() + " for " + spec);
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setupDestination(" + ctx + ")");
|
||||
}
|
||||
logger.debug("Using context {} for {}", ctx.getEnvironment(), spec);
|
||||
logger.trace("setupDestination({})", ctx);
|
||||
|
||||
String destinationTypeString = spec.getDestinationType();
|
||||
if (destinationTypeString != null && !destinationTypeString.trim().equals("")) {
|
||||
logger.debug("Destination type defined as " + destinationTypeString);
|
||||
logger.debug("Destination type defined as {}", destinationTypeString);
|
||||
|
||||
Class<?> destinationType;
|
||||
if (Topic.class.getName().equals(destinationTypeString)) {
|
||||
|
@ -557,7 +542,7 @@ public class ActiveMQActivation {
|
|||
destinationType = Queue.class;
|
||||
}
|
||||
|
||||
logger.debug("Retrieving " + destinationType.getName() + " \"" + destinationName + "\" from JNDI");
|
||||
logger.debug("Retrieving {} \"{}\" from JNDI", destinationType.getName(), destinationName);
|
||||
|
||||
try {
|
||||
destination = (ActiveMQDestination) ActiveMQRaUtils.lookup(ctx, destinationName, destinationType);
|
||||
|
@ -584,7 +569,7 @@ public class ActiveMQActivation {
|
|||
}
|
||||
} else {
|
||||
logger.debug("Destination type not defined in MDB activation configuration.");
|
||||
logger.debug("Retrieving " + Destination.class.getName() + " \"" + destinationName + "\" from JNDI");
|
||||
logger.debug("Retrieving {} \"{}\" from JNDI", Destination.class.getName(), destinationName);
|
||||
|
||||
destination = (ActiveMQDestination) ActiveMQRaUtils.lookup(ctx, destinationName, Destination.class);
|
||||
if (destination instanceof Topic) {
|
||||
|
@ -656,9 +641,8 @@ public class ActiveMQActivation {
|
|||
}
|
||||
|
||||
public void startReconnectThread(final String cause) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Starting reconnect Thread " + cause + " on MDB activation " + this);
|
||||
}
|
||||
logger.trace("Starting reconnect Thread {} on MDB activation {}", cause, this);
|
||||
|
||||
try {
|
||||
// We have to use the worker otherwise we may get the wrong classLoader
|
||||
scheduleWork(new ReconnectWork(cause));
|
||||
|
@ -698,9 +682,8 @@ public class ActiveMQActivation {
|
|||
* @param failure if reconnecting in the event of a failure
|
||||
*/
|
||||
public void reconnect(Throwable failure, boolean useInterrupt) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("reconnecting activation " + this);
|
||||
}
|
||||
logger.trace("reconnecting activation {}", this);
|
||||
|
||||
if (failure != null) {
|
||||
if (failure instanceof ActiveMQException && ((ActiveMQException) failure).getType() == ActiveMQExceptionType.QUEUE_DOES_NOT_EXIST) {
|
||||
ActiveMQRALogger.LOGGER.awaitingTopicQueueCreation(getActivationSpec().getDestination());
|
||||
|
@ -725,7 +708,7 @@ public class ActiveMQActivation {
|
|||
try {
|
||||
Thread.sleep(setupInterval);
|
||||
} catch (InterruptedException e) {
|
||||
logger.debug("Interrupted trying to reconnect " + spec, e);
|
||||
logger.debug("Interrupted trying to reconnect {}", spec, e);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -148,9 +148,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* Constructor
|
||||
*/
|
||||
public ActiveMQActivationSpec() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("constructor()");
|
||||
}
|
||||
|
||||
// we create an Adapter here but only for Application Servers that do introspection on loading to avoid an NPE
|
||||
ra = new ActiveMQResourceAdapter();
|
||||
|
@ -173,9 +171,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
*/
|
||||
@Override
|
||||
public ResourceAdapter getResourceAdapter() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getResourceAdapter()");
|
||||
}
|
||||
|
||||
return ra;
|
||||
}
|
||||
|
@ -227,9 +223,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
*/
|
||||
@Override
|
||||
public void setResourceAdapter(final ResourceAdapter ra) throws ResourceException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setResourceAdapter(" + ra + ")");
|
||||
}
|
||||
logger.trace("setResourceAdapter({})", ra);
|
||||
|
||||
if (ra == null || !(ra instanceof ActiveMQResourceAdapter)) {
|
||||
throw new ResourceException("Resource adapter is " + ra);
|
||||
|
@ -244,9 +238,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @return The value
|
||||
*/
|
||||
public String getConnectionFactoryLookup() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getConnectionFactoryLookup() ->" + connectionFactoryLookup);
|
||||
}
|
||||
logger.trace("getConnectionFactoryLookup() ->{}", connectionFactoryLookup);
|
||||
|
||||
return connectionFactoryLookup;
|
||||
}
|
||||
|
@ -257,9 +249,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @param value The value
|
||||
*/
|
||||
public void setConnectionFactoryLookup(final String value) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setConnectionFactoryLookup(" + value + ")");
|
||||
}
|
||||
logger.trace("setConnectionFactoryLookup({})", value);
|
||||
|
||||
connectionFactoryLookup = value;
|
||||
}
|
||||
|
@ -270,9 +260,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @return The value
|
||||
*/
|
||||
public String getDestination() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getDestination()");
|
||||
}
|
||||
|
||||
return destination;
|
||||
}
|
||||
|
@ -283,9 +271,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @param value The value
|
||||
*/
|
||||
public void setDestination(final String value) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setDestination(" + value + ")");
|
||||
}
|
||||
logger.trace("setDestination({})", value);
|
||||
|
||||
destination = value;
|
||||
}
|
||||
|
@ -315,9 +301,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @return The value
|
||||
*/
|
||||
public String getDestinationType() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getDestinationType()");
|
||||
}
|
||||
|
||||
return destinationType;
|
||||
}
|
||||
|
@ -328,9 +312,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @param value The value
|
||||
*/
|
||||
public void setDestinationType(final String value) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setDestinationType(" + value + ")");
|
||||
}
|
||||
logger.trace("setDestinationType({})", value);
|
||||
|
||||
destinationType = value;
|
||||
}
|
||||
|
@ -341,9 +323,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @return The value
|
||||
*/
|
||||
public String getMessageSelector() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getMessageSelector()");
|
||||
}
|
||||
|
||||
return messageSelector;
|
||||
}
|
||||
|
@ -354,9 +334,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @param value The value
|
||||
*/
|
||||
public void setMessageSelector(final String value) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setMessageSelector(" + value + ")");
|
||||
}
|
||||
logger.trace("setMessageSelector({})", value);
|
||||
|
||||
messageSelector = value;
|
||||
}
|
||||
|
@ -367,9 +345,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @return The value
|
||||
*/
|
||||
public String getAcknowledgeMode() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getAcknowledgeMode()");
|
||||
}
|
||||
|
||||
if (Session.DUPS_OK_ACKNOWLEDGE == acknowledgeMode) {
|
||||
return "Dups-ok-acknowledge";
|
||||
|
@ -401,9 +377,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @param value The value
|
||||
*/
|
||||
public void setAcknowledgeMode(final String value) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setAcknowledgeMode(" + value + ")");
|
||||
}
|
||||
logger.trace("setAcknowledgeMode({})", value);
|
||||
|
||||
try {
|
||||
this.acknowledgeMode = ActiveMQActivationValidationUtils.validateAcknowledgeMode(value);
|
||||
|
@ -417,9 +391,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @return the acknowledgement mode
|
||||
*/
|
||||
public Integer getAcknowledgeModeInt() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getAcknowledgeMode()");
|
||||
}
|
||||
|
||||
return acknowledgeMode;
|
||||
}
|
||||
|
@ -430,9 +402,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @return The value
|
||||
*/
|
||||
public String getSubscriptionDurability() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getSubscriptionDurability()");
|
||||
}
|
||||
|
||||
if (subscriptionDurability) {
|
||||
return "Durable";
|
||||
|
@ -447,9 +417,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @param value The value
|
||||
*/
|
||||
public void setSubscriptionDurability(final String value) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setSubscriptionDurability(" + value + ")");
|
||||
}
|
||||
logger.trace("setSubscriptionDurability({})", value);
|
||||
|
||||
subscriptionDurability = "Durable".equals(value);
|
||||
}
|
||||
|
@ -460,9 +428,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @return The value
|
||||
*/
|
||||
public Boolean isSubscriptionDurable() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("isSubscriptionDurable()");
|
||||
}
|
||||
|
||||
return subscriptionDurability;
|
||||
}
|
||||
|
@ -473,9 +439,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @return The value
|
||||
*/
|
||||
public String getSubscriptionName() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getSubscriptionName()");
|
||||
}
|
||||
|
||||
return subscriptionName;
|
||||
}
|
||||
|
@ -486,9 +450,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @param value The value
|
||||
*/
|
||||
public void setSubscriptionName(final String value) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setSubscriptionName(" + value + ")");
|
||||
}
|
||||
logger.trace("setSubscriptionName({})", value);
|
||||
|
||||
subscriptionName = value;
|
||||
}
|
||||
|
@ -497,9 +459,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @return the shareDurableSubscriptions
|
||||
*/
|
||||
public Boolean isShareSubscriptions() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("isShareSubscriptions() = " + shareSubscriptions);
|
||||
}
|
||||
logger.trace("isShareSubscriptions() = {}", shareSubscriptions);
|
||||
|
||||
return shareSubscriptions;
|
||||
}
|
||||
|
@ -508,9 +468,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @param shareSubscriptions the shareDurableSubscriptions to set
|
||||
*/
|
||||
public void setShareSubscriptions(final Boolean shareSubscriptions) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setShareSubscriptions(" + shareSubscriptions + ")");
|
||||
}
|
||||
logger.trace("setShareSubscriptions({})", shareSubscriptions);
|
||||
|
||||
this.shareSubscriptions = shareSubscriptions;
|
||||
}
|
||||
|
@ -521,9 +479,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @return The value
|
||||
*/
|
||||
public String getUser() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getUser()");
|
||||
}
|
||||
|
||||
if (user == null) {
|
||||
return ra.getUserName();
|
||||
|
@ -538,9 +494,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @param value The value
|
||||
*/
|
||||
public void setUser(final String value) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setUser(" + value + ")");
|
||||
}
|
||||
logger.trace("setUser()", value);
|
||||
|
||||
user = value;
|
||||
}
|
||||
|
@ -551,9 +505,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @return The value
|
||||
*/
|
||||
public String getPassword() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getPassword()");
|
||||
}
|
||||
|
||||
if (password == null) {
|
||||
return ra.getPassword();
|
||||
|
@ -572,9 +524,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @param value The value
|
||||
*/
|
||||
public void setPassword(final String value) throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setPassword(****)");
|
||||
}
|
||||
|
||||
password = value;
|
||||
}
|
||||
|
@ -585,9 +535,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @return The value
|
||||
*/
|
||||
public Integer getMaxSession() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getMaxSession()");
|
||||
}
|
||||
|
||||
if (maxSession == null) {
|
||||
return DEFAULT_MAX_SESSION;
|
||||
|
@ -602,9 +550,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @param value The value
|
||||
*/
|
||||
public void setMaxSession(final Integer value) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setMaxSession(" + value + ")");
|
||||
}
|
||||
logger.trace("setMaxSession({})", value);
|
||||
|
||||
if ( value < 1 ) {
|
||||
maxSession = 1;
|
||||
|
@ -619,9 +565,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @return The value
|
||||
*/
|
||||
public Boolean isSingleConnection() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getSingleConnection()");
|
||||
}
|
||||
|
||||
if (singleConnection == null) {
|
||||
return DEFAULT_SINGLE_CONNECTION;
|
||||
|
@ -636,9 +580,8 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @param value The value
|
||||
*/
|
||||
public void setSingleConnection(final Boolean value) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setSingleConnection(" + value + ")");
|
||||
}
|
||||
logger.trace("setSingleConnection({})", value);
|
||||
|
||||
singleConnection = value;
|
||||
}
|
||||
|
||||
|
@ -648,9 +591,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @return The value
|
||||
*/
|
||||
public Integer getTransactionTimeout() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getTransactionTimeout()");
|
||||
}
|
||||
|
||||
return transactionTimeout;
|
||||
}
|
||||
|
@ -661,9 +602,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
* @param value The value
|
||||
*/
|
||||
public void setTransactionTimeout(final Integer value) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setTransactionTimeout(" + value + ")");
|
||||
}
|
||||
logger.trace("setTransactionTimeout({})", value);
|
||||
|
||||
transactionTimeout = value;
|
||||
}
|
||||
|
@ -689,9 +628,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
}
|
||||
|
||||
public Integer getSetupAttempts() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getSetupAttempts()");
|
||||
}
|
||||
|
||||
if (setupAttempts == null) {
|
||||
return ra.getSetupAttempts();
|
||||
|
@ -701,17 +638,13 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
}
|
||||
|
||||
public void setSetupAttempts(final Integer setupAttempts) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setSetupAttempts(" + setupAttempts + ")");
|
||||
}
|
||||
logger.trace("setSetupAttempts({})", setupAttempts);
|
||||
|
||||
this.setupAttempts = setupAttempts;
|
||||
}
|
||||
|
||||
public Long getSetupInterval() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("getSetupInterval()");
|
||||
}
|
||||
|
||||
if (setupInterval == null) {
|
||||
return ra.getSetupInterval();
|
||||
|
@ -721,9 +654,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
}
|
||||
|
||||
public void setSetupInterval(final Long setupInterval) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setSetupInterval(" + setupInterval + ")");
|
||||
}
|
||||
logger.trace("setSetupInterval({})", setupInterval);
|
||||
|
||||
this.setupInterval = setupInterval;
|
||||
}
|
||||
|
@ -740,9 +671,8 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
*/
|
||||
@Override
|
||||
public void validate() throws InvalidPropertyException {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("validate()");
|
||||
}
|
||||
|
||||
ActiveMQActivationValidationUtils.validate(destination, destinationType, isSubscriptionDurable(), subscriptionName);
|
||||
}
|
||||
|
||||
|
@ -751,9 +681,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
|||
}
|
||||
|
||||
public void setConnectorClassName(final String connectorClassName) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setConnectorClassName(" + connectorClassName + ")");
|
||||
}
|
||||
logger.trace("setConnectorClassName({})", connectorClassName);
|
||||
|
||||
strConnectorClassName = connectorClassName;
|
||||
|
||||
|
|
|
@ -111,9 +111,7 @@ public class ActiveMQMessageHandler implements MessageHandler, FailoverEventList
|
|||
}
|
||||
|
||||
public void setup() throws Exception {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("setup()");
|
||||
}
|
||||
|
||||
this.enable1XPrefix = activation.getConnectionFactory().isEnable1xPrefixes();
|
||||
|
||||
|
@ -136,7 +134,8 @@ public class ActiveMQMessageHandler implements MessageHandler, FailoverEventList
|
|||
if (!spec.isShareSubscriptions()) {
|
||||
throw ActiveMQRALogger.LOGGER.canNotCreatedNonSharedSubscriber();
|
||||
} else if (logger.isDebugEnabled()) {
|
||||
logger.debug("the mdb on destination " + queueName + " already had " + subResponse.getConsumerCount() + " consumers but the MDB is configured to share subscriptions, so no exceptions are thrown");
|
||||
logger.debug("the mdb on destination {} already had {} consumers but the MDB is configured to share subscriptions, so no exceptions are thrown",
|
||||
queueName, subResponse.getConsumerCount());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -230,9 +229,7 @@ public class ActiveMQMessageHandler implements MessageHandler, FailoverEventList
|
|||
* Stop the handler
|
||||
*/
|
||||
public void teardown() {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("teardown()");
|
||||
}
|
||||
|
||||
try {
|
||||
if (endpoint != null) {
|
||||
|
@ -240,7 +237,7 @@ public class ActiveMQMessageHandler implements MessageHandler, FailoverEventList
|
|||
endpoint = null;
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
logger.debug("Error releasing endpoint " + endpoint, t);
|
||||
logger.debug("Error releasing endpoint {}", endpoint, t);
|
||||
}
|
||||
|
||||
//only do this if we haven't been disconnected at some point whilst failing over
|
||||
|
@ -266,14 +263,14 @@ public class ActiveMQMessageHandler implements MessageHandler, FailoverEventList
|
|||
session.close();
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
logger.debug("Error releasing session " + session, t);
|
||||
logger.debug("Error releasing session {}", session, t);
|
||||
}
|
||||
try {
|
||||
if (cf != null) {
|
||||
cf.close();
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
logger.debug("Error releasing session factory " + session, t);
|
||||
logger.debug("Error releasing session factory {}", session, t);
|
||||
}
|
||||
} else {
|
||||
//otherwise we just clean up
|
||||
|
@ -282,7 +279,7 @@ public class ActiveMQMessageHandler implements MessageHandler, FailoverEventList
|
|||
cf.cleanup();
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
logger.debug("Error releasing session factory " + session, t);
|
||||
logger.debug("Error releasing session factory {}", session, t);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -290,9 +287,7 @@ public class ActiveMQMessageHandler implements MessageHandler, FailoverEventList
|
|||
|
||||
@Override
|
||||
public void onMessage(final ClientMessage message) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("onMessage(" + message + ")");
|
||||
}
|
||||
logger.trace("onMessage({})", message);
|
||||
|
||||
ActiveMQMessage msg;
|
||||
if (enable1XPrefix) {
|
||||
|
@ -308,9 +303,7 @@ public class ActiveMQMessageHandler implements MessageHandler, FailoverEventList
|
|||
tm.setTransactionTimeout(activation.getActivationSpec().getTransactionTimeout());
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("ActiveMQMessageHandler::calling beforeDelivery on message " + message);
|
||||
}
|
||||
logger.trace("ActiveMQMessageHandler::calling beforeDelivery on message {}", message);
|
||||
|
||||
endpoint.beforeDelivery(ActiveMQActivation.ONMESSAGE);
|
||||
beforeDelivery = true;
|
||||
|
@ -328,9 +321,7 @@ public class ActiveMQMessageHandler implements MessageHandler, FailoverEventList
|
|||
message.individualAcknowledge();
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("ActiveMQMessageHandler::calling afterDelivery on message " + message);
|
||||
}
|
||||
logger.trace("ActiveMQMessageHandler::calling afterDelivery on message {}", message);
|
||||
|
||||
try {
|
||||
endpoint.afterDelivery();
|
||||
|
@ -346,9 +337,7 @@ public class ActiveMQMessageHandler implements MessageHandler, FailoverEventList
|
|||
session.commit();
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("finished onMessage on " + message);
|
||||
}
|
||||
logger.trace("finished onMessage on {}", message);
|
||||
} catch (Throwable e) {
|
||||
ActiveMQRALogger.LOGGER.errorDeliveringMessage(e);
|
||||
// we need to call before/afterDelivery as a pair
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue