ACTIVEMQ6-4 Rename HornetQ* classes to ActiveMQ*

This commit is contained in:
jbertram 2014-11-18 10:03:42 -06:00
parent e7a3e7d25b
commit 034adfbf9b
1073 changed files with 11006 additions and 11008 deletions

View File

@ -17,18 +17,18 @@ import io.airlift.command.Command;
import org.apache.activemq.cli.ActiveMQ; import org.apache.activemq.cli.ActiveMQ;
import org.apache.activemq.core.config.Configuration; import org.apache.activemq.core.config.Configuration;
import org.apache.activemq.core.server.impl.HornetQServerImpl; import org.apache.activemq.core.server.impl.ActiveMQServerImpl;
import org.apache.activemq.dto.BrokerDTO; import org.apache.activemq.dto.BrokerDTO;
import org.apache.activemq.factory.BrokerFactory; import org.apache.activemq.factory.BrokerFactory;
import org.apache.activemq.factory.CoreFactory; import org.apache.activemq.factory.CoreFactory;
import org.apache.activemq.factory.JmsFactory; import org.apache.activemq.factory.JmsFactory;
import org.apache.activemq.factory.SecurityManagerFactory; import org.apache.activemq.factory.SecurityManagerFactory;
import org.apache.activemq.integration.bootstrap.HornetQBootstrapLogger; import org.apache.activemq.integration.bootstrap.ActiveMQBootstrapLogger;
import org.apache.activemq.jms.server.JMSServerManager; import org.apache.activemq.jms.server.JMSServerManager;
import org.apache.activemq.jms.server.config.JMSConfiguration; import org.apache.activemq.jms.server.config.JMSConfiguration;
import org.apache.activemq.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.jms.server.impl.JMSServerManagerImpl;
import org.apache.activemq.jms.server.impl.StandaloneNamingServer; import org.apache.activemq.jms.server.impl.StandaloneNamingServer;
import org.apache.activemq.spi.core.security.HornetQSecurityManager; import org.apache.activemq.spi.core.security.ActiveMQSecurityManager;
import javax.management.MBeanServer; import javax.management.MBeanServer;
@ -67,11 +67,11 @@ public class Run implements Action
JMSConfiguration jms = JmsFactory.create(broker.jms); JMSConfiguration jms = JmsFactory.create(broker.jms);
HornetQSecurityManager security = SecurityManagerFactory.create(broker.security); ActiveMQSecurityManager security = SecurityManagerFactory.create(broker.security);
MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer(); MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
HornetQServerImpl server = new HornetQServerImpl(core, mBeanServer, security); ActiveMQServerImpl server = new ActiveMQServerImpl(core, mBeanServer, security);
namingServer = new StandaloneNamingServer(server); namingServer = new StandaloneNamingServer(server);
@ -85,7 +85,7 @@ public class Run implements Action
namingServer.start(); namingServer.start();
HornetQBootstrapLogger.LOGGER.startedNamingService(broker.naming.bindAddress, broker.naming.port, broker.naming.rmiBindAddress, broker.naming.rmiPort); ActiveMQBootstrapLogger.LOGGER.startedNamingService(broker.naming.bindAddress, broker.naming.port, broker.naming.rmiBindAddress, broker.naming.rmiPort);
if (jms != null) if (jms != null)
{ {
@ -96,7 +96,7 @@ public class Run implements Action
jmsServerManager = new JMSServerManagerImpl(server); jmsServerManager = new JMSServerManagerImpl(server);
} }
HornetQBootstrapLogger.LOGGER.serverStarting(); ActiveMQBootstrapLogger.LOGGER.serverStarting();
jmsServerManager.start(); jmsServerManager.start();
@ -114,7 +114,7 @@ public class Run implements Action
{ {
if (!file.delete()) if (!file.delete())
{ {
HornetQBootstrapLogger.LOGGER.errorDeletingFile(file.getAbsolutePath()); ActiveMQBootstrapLogger.LOGGER.errorDeletingFile(file.getAbsolutePath());
} }
} }
final Timer timer = new Timer("ActiveMQ Server Shutdown Timer", true); final Timer timer = new Timer("ActiveMQ Server Shutdown Timer", true);

View File

@ -13,7 +13,7 @@
package org.apache.activemq.factory; package org.apache.activemq.factory;
import org.apache.activemq.dto.SecurityDTO; import org.apache.activemq.dto.SecurityDTO;
import org.apache.activemq.spi.core.security.HornetQSecurityManager; import org.apache.activemq.spi.core.security.ActiveMQSecurityManager;
import org.apache.activemq.utils.FactoryFinder; import org.apache.activemq.utils.FactoryFinder;
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;
@ -21,12 +21,12 @@ import javax.xml.bind.annotation.XmlRootElement;
public class SecurityManagerFactory public class SecurityManagerFactory
{ {
public static HornetQSecurityManager create(SecurityDTO config) throws Exception public static ActiveMQSecurityManager create(SecurityDTO config) throws Exception
{ {
if (config != null) if (config != null)
{ {
FactoryFinder finder = new FactoryFinder("META-INF/services/org/apache/activemq/security/"); FactoryFinder finder = new FactoryFinder("META-INF/services/org/apache/activemq/security/");
HornetQSecurityManager manager = (HornetQSecurityManager)finder.newInstance(config.getClass().getAnnotation(XmlRootElement.class).name()); ActiveMQSecurityManager manager = (ActiveMQSecurityManager)finder.newInstance(config.getClass().getAnnotation(XmlRootElement.class).name());
return manager; return manager;
} }
else else

View File

@ -25,7 +25,7 @@ import org.jboss.logging.annotations.MessageBundle;
* *
* so 109000 to 109999 * so 109000 to 109999
*/ */
@MessageBundle(projectCode = "HQ") @MessageBundle(projectCode = "AMQ")
public class HornetQBootstrapBundle public class ActiveMQBootstrapBundle
{ {
} }

View File

@ -37,13 +37,13 @@ import org.jboss.logging.annotations.MessageLogger;
* *
* so an INFO message would be 101000 to 101999 * so an INFO message would be 101000 to 101999
*/ */
@MessageLogger(projectCode = "HQ") @MessageLogger(projectCode = "AMQ")
public interface HornetQBootstrapLogger extends BasicLogger public interface ActiveMQBootstrapLogger extends BasicLogger
{ {
/** /**
* The default logger. * The default logger.
*/ */
HornetQBootstrapLogger LOGGER = Logger.getMessageLogger(HornetQBootstrapLogger.class, HornetQBootstrapLogger.class.getPackage().getName()); ActiveMQBootstrapLogger LOGGER = Logger.getMessageLogger(ActiveMQBootstrapLogger.class, ActiveMQBootstrapLogger.class.getPackage().getName());
@LogMessage(level = Logger.Level.INFO) @LogMessage(level = Logger.Level.INFO)
@Message(id = 101000, value = "Starting ActiveMQ Server", format = Message.Format.MESSAGE_FORMAT) @Message(id = 101000, value = "Starting ActiveMQ Server", format = Message.Format.MESSAGE_FORMAT)

View File

@ -18,7 +18,7 @@ import java.nio.ByteBuffer;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
/** /**
* A HornetQBuffer wraps a Netty's ChannelBuffer and is used throughout HornetQ code base. * A ActiveMQBuffer wraps a Netty's ChannelBuffer and is used throughout ActiveMQ code base.
* <p> * <p>
* Instances of it can be obtained from {@link ActiveMQBuffers} factory. * Instances of it can be obtained from {@link ActiveMQBuffers} factory.
* <p> * <p>

View File

@ -25,10 +25,10 @@ import org.apache.activemq.core.buffers.impl.ChannelBufferWrapper;
public final class ActiveMQBuffers public final class ActiveMQBuffers
{ {
/** /**
* Creates a <em>self-expanding</em> HornetQBuffer with the given initial size * Creates a <em>self-expanding</em> ActiveMQBuffer with the given initial size
* *
* @param size the initial size of the created HornetQBuffer * @param size the initial size of the created ActiveMQBuffer
* @return a self-expanding HornetQBuffer starting with the given size * @return a self-expanding ActiveMQBuffer starting with the given size
*/ */
public static ActiveMQBuffer dynamicBuffer(final int size) public static ActiveMQBuffer dynamicBuffer(final int size)
{ {
@ -36,10 +36,10 @@ public final class ActiveMQBuffers
} }
/** /**
* Creates a <em>self-expanding</em> HornetQBuffer filled with the given byte array * Creates a <em>self-expanding</em> ActiveMQBuffer filled with the given byte array
* *
* @param bytes the created buffer will be initially filled with this byte array * @param bytes the created buffer will be initially filled with this byte array
* @return a self-expanding HornetQBuffer filled with the given byte array * @return a self-expanding ActiveMQBuffer filled with the given byte array
*/ */
public static ActiveMQBuffer dynamicBuffer(final byte[] bytes) public static ActiveMQBuffer dynamicBuffer(final byte[] bytes)
{ {
@ -51,12 +51,12 @@ public final class ActiveMQBuffers
} }
/** /**
* Creates a HornetQBuffer wrapping an underlying NIO ByteBuffer * Creates a ActiveMQBuffer wrapping an underlying NIO ByteBuffer
* *
* The position on this buffer won't affect the position on the inner buffer * The position on this buffer won't affect the position on the inner buffer
* *
* @param underlying the underlying NIO ByteBuffer * @param underlying the underlying NIO ByteBuffer
* @return a HornetQBuffer wrapping the underlying NIO ByteBuffer * @return a ActiveMQBuffer wrapping the underlying NIO ByteBuffer
*/ */
public static ActiveMQBuffer wrappedBuffer(final ByteBuffer underlying) public static ActiveMQBuffer wrappedBuffer(final ByteBuffer underlying)
{ {
@ -68,10 +68,10 @@ public final class ActiveMQBuffers
} }
/** /**
* Creates a HornetQBuffer wrapping an underlying byte array * Creates a ActiveMQBuffer wrapping an underlying byte array
* *
* @param underlying the underlying byte array * @param underlying the underlying byte array
* @return a HornetQBuffer wrapping the underlying byte array * @return a ActiveMQBuffer wrapping the underlying byte array
*/ */
public static ActiveMQBuffer wrappedBuffer(final byte[] underlying) public static ActiveMQBuffer wrappedBuffer(final byte[] underlying)
{ {
@ -79,10 +79,10 @@ public final class ActiveMQBuffers
} }
/** /**
* Creates a <em>fixed</em> HornetQBuffer of the given size * Creates a <em>fixed</em> ActiveMQBuffer of the given size
* *
* @param size the size of the created HornetQBuffer * @param size the size of the created ActiveMQBuffer
* @return a fixed HornetQBuffer with the given size * @return a fixed ActiveMQBuffer with the given size
*/ */
public static ActiveMQBuffer fixedBuffer(final int size) public static ActiveMQBuffer fixedBuffer(final int size)
{ {

View File

@ -16,7 +16,7 @@ package org.apache.activemq.api.core;
import static org.apache.activemq.api.core.ActiveMQExceptionType.CONNECTION_TIMEDOUT; import static org.apache.activemq.api.core.ActiveMQExceptionType.CONNECTION_TIMEDOUT;
/** /**
* A client timed out will connecting to HornetQ server. * A client timed out will connecting to ActiveMQ server.
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 4/30/12 * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 4/30/12
*/ */
public final class ActiveMQConnectionTimedOutException extends ActiveMQException public final class ActiveMQConnectionTimedOutException extends ActiveMQException

View File

@ -16,7 +16,7 @@ package org.apache.activemq.api.core;
import static org.apache.activemq.api.core.ActiveMQExceptionType.DISCONNECTED; import static org.apache.activemq.api.core.ActiveMQExceptionType.DISCONNECTED;
/** /**
* A client was disconnected from HornetQ server when the server has shut down. * A client was disconnected from ActiveMQ server when the server has shut down.
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 4/30/12 * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 4/30/12
*/ */
public final class ActiveMQDisconnectedException extends ActiveMQException public final class ActiveMQDisconnectedException extends ActiveMQException

View File

@ -16,7 +16,7 @@ package org.apache.activemq.api.core;
import static org.apache.activemq.api.core.ActiveMQExceptionType.ILLEGAL_STATE; import static org.apache.activemq.api.core.ActiveMQExceptionType.ILLEGAL_STATE;
/** /**
* A HornetQ resource is not in a legal state (e.g. calling ClientConsumer.receive() if a * A ActiveMQ resource is not in a legal state (e.g. calling ClientConsumer.receive() if a
* MessageHandler is set). * MessageHandler is set).
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 5/2/12 * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 5/2/12
*/ */

View File

@ -16,7 +16,7 @@ package org.apache.activemq.api.core;
import static org.apache.activemq.api.core.ActiveMQExceptionType.INTERNAL_ERROR; import static org.apache.activemq.api.core.ActiveMQExceptionType.INTERNAL_ERROR;
/** /**
* Internal error which prevented HornetQ from performing an important operation. * Internal error which prevented ActiveMQ from performing an important operation.
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 4/30/12 * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 4/30/12
*/ */
public final class ActiveMQInternalErrorException extends ActiveMQException public final class ActiveMQInternalErrorException extends ActiveMQException

View File

@ -15,7 +15,7 @@ package org.apache.activemq.api.core;
/** /**
* An error has happened at HornetQ's native (non-Java) code used in reading and writing data. * An error has happened at ActiveMQ's native (non-Java) code used in reading and writing data.
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 5/4/12 * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 5/4/12
*/ */
// XXX // XXX

View File

@ -16,7 +16,7 @@ package org.apache.activemq.api.core;
import static org.apache.activemq.api.core.ActiveMQExceptionType.NOT_CONNECTED; import static org.apache.activemq.api.core.ActiveMQExceptionType.NOT_CONNECTED;
/** /**
* A client is not able to connect to HornetQ server. * A client is not able to connect to ActiveMQ server.
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 4/30/12 * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 4/30/12
*/ */
public final class ActiveMQNotConnectedException extends ActiveMQException public final class ActiveMQNotConnectedException extends ActiveMQException

View File

@ -16,7 +16,7 @@ package org.apache.activemq.api.core;
import static org.apache.activemq.api.core.ActiveMQExceptionType.UNSUPPORTED_PACKET; import static org.apache.activemq.api.core.ActiveMQExceptionType.UNSUPPORTED_PACKET;
/** /**
* A packet of unsupported type was received by HornetQ PacketHandler. * A packet of unsupported type was received by ActiveMQ PacketHandler.
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 4/30/12 * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 4/30/12
*/ */
public final class ActiveMQUnsupportedPacketException extends ActiveMQException public final class ActiveMQUnsupportedPacketException extends ActiveMQException

View File

@ -23,7 +23,7 @@ import org.apache.activemq.utils.DataConstants;
* A simple String class that can store all characters, and stores as simple {@code byte[]}, this * A simple String class that can store all characters, and stores as simple {@code byte[]}, this
* minimises expensive copying between String objects. * minimises expensive copying between String objects.
* <p> * <p>
* This object is used heavily throughout HornetQ for performance reasons. * This object is used heavily throughout ActiveMQ for performance reasons.
* *
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a> * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
*/ */

View File

@ -14,14 +14,14 @@
package org.apache.activemq.core.server; package org.apache.activemq.core.server;
/** /**
* A HornetQComponent * A ActiveMQComponent
* *
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a> * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
* @version <tt>$Revision: 2796 $</tt> * @version <tt>$Revision: 2796 $</tt>
* *
* *
*/ */
public interface HornetQComponent public interface ActiveMQComponent
{ {
void start() throws Exception; void start() throws Exception;

View File

@ -19,12 +19,12 @@ import java.util.concurrent.atomic.AtomicInteger;
/** /**
* *
* A HornetQThreadFactory * A ActiveMQThreadFactory
* *
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a> * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
* *
*/ */
public final class HornetQThreadFactory implements ThreadFactory public final class ActiveMQThreadFactory implements ThreadFactory
{ {
private final ThreadGroup group; private final ThreadGroup group;
@ -36,7 +36,7 @@ public final class HornetQThreadFactory implements ThreadFactory
private final ClassLoader tccl; private final ClassLoader tccl;
public HornetQThreadFactory(final String groupName, final boolean daemon, final ClassLoader tccl) public ActiveMQThreadFactory(final String groupName, final boolean daemon, final ClassLoader tccl)
{ {
group = new ThreadGroup(groupName + "-" + System.identityHashCode(this)); group = new ThreadGroup(groupName + "-" + System.identityHashCode(this));

View File

@ -29,10 +29,10 @@ import org.jboss.logging.Messages;
* *
* so 209000 to 209999 * so 209000 to 209999
*/ */
@MessageBundle(projectCode = "HQ") @MessageBundle(projectCode = "AMQ")
public interface HornetQUtilBundle public interface ActiveMQUtilBundle
{ {
HornetQUtilBundle BUNDLE = Messages.getBundle(HornetQUtilBundle.class); ActiveMQUtilBundle BUNDLE = Messages.getBundle(ActiveMQUtilBundle.class);
@Message(id = 209000, value = "invalid property: {0}" , format = Message.Format.MESSAGE_FORMAT) @Message(id = 209000, value = "invalid property: {0}" , format = Message.Format.MESSAGE_FORMAT)
ActiveMQIllegalStateException invalidProperty(String part); ActiveMQIllegalStateException invalidProperty(String part);

View File

@ -35,13 +35,13 @@ import org.jboss.logging.annotations.MessageLogger;
* *
* so an INFO message would be 201000 to 201999 * so an INFO message would be 201000 to 201999
*/ */
@MessageLogger(projectCode = "HQ") @MessageLogger(projectCode = "AMQ")
public interface HornetQUtilLogger extends BasicLogger public interface ActiveMQUtilLogger extends BasicLogger
{ {
/** /**
* The default logger. * The default logger.
*/ */
HornetQUtilLogger LOGGER = Logger.getMessageLogger(HornetQUtilLogger.class, HornetQUtilLogger.class.getPackage().getName()); ActiveMQUtilLogger LOGGER = Logger.getMessageLogger(ActiveMQUtilLogger.class, ActiveMQUtilLogger.class.getPackage().getName());
@LogMessage(level = Logger.Level.WARN) @LogMessage(level = Logger.Level.WARN)
@Message(id = 202000, value = "Missing privileges to set Thread Context Class Loader on Thread Factory. Using current Thread Context Class Loader", @Message(id = 202000, value = "Missing privileges to set Thread Context Class Loader on Thread Factory. Using current Thread Context Class Loader",

View File

@ -16,7 +16,7 @@ import java.net.URL;
/** /**
* This class will be used to perform generic class-loader operations, * This class will be used to perform generic class-loader operations,
* such as load a class first using TCCL, and then the classLoader used by HornetQ (ClassloadingUtil.getClass().getClassLoader()). * such as load a class first using TCCL, and then the classLoader used by ActiveMQ (ClassloadingUtil.getClass().getClassLoader()).
* <p> * <p>
* Is't required to use a Security Block on any calls to this class. * Is't required to use a Security Block on any calls to this class.
* *

View File

@ -63,7 +63,7 @@ public class PasswordMaskingUtil
} }
catch (Exception e) catch (Exception e)
{ {
throw HornetQUtilBundle.BUNDLE.errorCreatingCodec(e, codecClassName); throw ActiveMQUtilBundle.BUNDLE.errorCreatingCodec(e, codecClassName);
} }
} }
}); });
@ -76,7 +76,7 @@ public class PasswordMaskingUtil
{ {
String[] keyVal = parts[i].split("="); String[] keyVal = parts[i].split("=");
if (keyVal.length != 2) if (keyVal.length != 2)
throw HornetQUtilBundle.BUNDLE.invalidProperty(parts[i]); throw ActiveMQUtilBundle.BUNDLE.invalidProperty(parts[i]);
props.put(keyVal[0], keyVal[1]); props.put(keyVal[0], keyVal[1]);
} }
codecInstance.init(props); codecInstance.init(props);

View File

@ -24,7 +24,7 @@ import java.util.concurrent.locks.AbstractQueuedSynchronizer;
* *
* <p>It could be used for sync points when one process is feeding the latch while another will wait when everything is done. (e.g. waiting IO completions to finish)</p> * <p>It could be used for sync points when one process is feeding the latch while another will wait when everything is done. (e.g. waiting IO completions to finish)</p>
* *
* <p>On HornetQ we have the requirement of increment and decrement a counter until the user fires a ready event (commit). At that point we just act as a regular countDown.</p> * <p>On ActiveMQ we have the requirement of increment and decrement a counter until the user fires a ready event (commit). At that point we just act as a regular countDown.</p>
* *
* <p>Note: This latch is reusable. Once it reaches zero, you can call up again, and reuse it on further waits.</p> * <p>Note: This latch is reusable. Once it reaches zero, you can call up again, and reuse it on further waits.</p>
* *

View File

@ -547,7 +547,7 @@ public final class TypedProperties
} }
default: default:
{ {
throw HornetQUtilBundle.BUNDLE.invalidType(type); throw ActiveMQUtilBundle.BUNDLE.invalidType(type);
} }
} }
} }

View File

@ -35,7 +35,7 @@ public final class UTF8Util
// utility class // utility class
} }
private static final boolean isTrace = HornetQUtilLogger.LOGGER.isTraceEnabled(); private static final boolean isTrace = ActiveMQUtilLogger.LOGGER.isTraceEnabled();
private static final ThreadLocal<SoftReference<StringUtilBuffer>> currenBuffer = private static final ThreadLocal<SoftReference<StringUtilBuffer>> currenBuffer =
new ThreadLocal<SoftReference<StringUtilBuffer>>(); new ThreadLocal<SoftReference<StringUtilBuffer>>();
@ -46,14 +46,14 @@ public final class UTF8Util
if (str.length() > 0xffff) if (str.length() > 0xffff)
{ {
throw HornetQUtilBundle.BUNDLE.stringTooLong(str.length()); throw ActiveMQUtilBundle.BUNDLE.stringTooLong(str.length());
} }
final int len = UTF8Util.calculateUTFSize(str, buffer); final int len = UTF8Util.calculateUTFSize(str, buffer);
if (len > 0xffff) if (len > 0xffff)
{ {
throw HornetQUtilBundle.BUNDLE.stringTooLong(len); throw ActiveMQUtilBundle.BUNDLE.stringTooLong(len);
} }
out.writeShort((short)len); out.writeShort((short)len);
@ -76,7 +76,7 @@ public final class UTF8Util
if (UTF8Util.isTrace) if (UTF8Util.isTrace)
{ {
// This message is too verbose for debug, that's why we are using trace here // This message is too verbose for debug, that's why we are using trace here
HornetQUtilLogger.LOGGER.trace("Saving string with utfSize=" + len + " stringSize=" + str.length()); ActiveMQUtilLogger.LOGGER.trace("Saving string with utfSize=" + len + " stringSize=" + str.length());
} }
int stringLength = str.length(); int stringLength = str.length();
@ -125,7 +125,7 @@ public final class UTF8Util
if (UTF8Util.isTrace) if (UTF8Util.isTrace)
{ {
// This message is too verbose for debug, that's why we are using trace here // This message is too verbose for debug, that's why we are using trace here
HornetQUtilLogger.LOGGER.trace("Reading string with utfSize=" + size); ActiveMQUtilLogger.LOGGER.trace("Reading string with utfSize=" + size);
} }
int count = 0; int count = 0;

View File

@ -124,9 +124,9 @@ public final class UUIDGenerator
*/ */
dummy[0] |= (byte) 0x01; dummy[0] |= (byte) 0x01;
if (HornetQUtilLogger.LOGGER.isDebugEnabled()) if (ActiveMQUtilLogger.LOGGER.isDebugEnabled())
{ {
HornetQUtilLogger.LOGGER.debug("using dummy address " + UUIDGenerator.asString(dummy)); ActiveMQUtilLogger.LOGGER.debug("using dummy address " + UUIDGenerator.asString(dummy));
} }
return dummy; return dummy;
} }
@ -173,9 +173,9 @@ public final class UUIDGenerator
isVirtualMethod); isVirtualMethod);
if (address != null) if (address != null)
{ {
if (HornetQUtilLogger.LOGGER.isDebugEnabled()) if (ActiveMQUtilLogger.LOGGER.isDebugEnabled())
{ {
HornetQUtilLogger.LOGGER.debug("using hardware address " + UUIDGenerator.asString(address)); ActiveMQUtilLogger.LOGGER.debug("using hardware address " + UUIDGenerator.asString(address));
} }
return address; return address;
} }

View File

@ -17,7 +17,7 @@ import java.io.ObjectInputStream;
import java.io.ObjectOutputStream; import java.io.ObjectOutputStream;
import java.io.Serializable; import java.io.Serializable;
import org.apache.activemq.api.core.client.HornetQClient; import org.apache.activemq.api.core.client.ActiveMQClient;
import org.apache.activemq.utils.UUIDGenerator; import org.apache.activemq.utils.UUIDGenerator;
/** /**
@ -39,9 +39,9 @@ public final class DiscoveryGroupConfiguration implements Serializable
private String name = UUIDGenerator.getInstance().generateStringUUID(); private String name = UUIDGenerator.getInstance().generateStringUUID();
private long refreshTimeout = HornetQClient.DEFAULT_DISCOVERY_REFRESH_TIMEOUT; private long refreshTimeout = ActiveMQClient.DEFAULT_DISCOVERY_REFRESH_TIMEOUT;
private long discoveryInitialWaitTimeout = HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT; private long discoveryInitialWaitTimeout = ActiveMQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT;
/* /*
* The localBindAddress is needed so we can be backward compatible with 2.2 clients * The localBindAddress is needed so we can be backward compatible with 2.2 clients

View File

@ -13,26 +13,26 @@
package org.apache.activemq.api.core; package org.apache.activemq.api.core;
/** /**
* Constants representing pre-defined message attributes that can be referenced in HornetQ core * Constants representing pre-defined message attributes that can be referenced in ActiveMQ core
* filter expressions. * filter expressions.
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a> * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
*/ */
public final class FilterConstants public final class FilterConstants
{ {
/** /**
* Name of the HornetQ UserID header. * Name of the ActiveMQ UserID header.
*/ */
public static final SimpleString HORNETQ_USERID = new SimpleString("HQUserID"); public static final SimpleString ACTIVEMQ_USERID = new SimpleString("HQUserID");
/** /**
* Name of the HornetQ Message expiration header. * Name of the ActiveMQ Message expiration header.
*/ */
public static final SimpleString HORNETQ_EXPIRATION = new SimpleString("HQExpiration"); public static final SimpleString ACTIVEMQ_EXPIRATION = new SimpleString("HQExpiration");
/** /**
* Name of the HornetQ Message durable header. * Name of the ActiveMQ Message durable header.
*/ */
public static final SimpleString HORNETQ_DURABLE = new SimpleString("HQDurable"); public static final SimpleString ACTIVEMQ_DURABLE = new SimpleString("HQDurable");
/** /**
* Value for the Durable header when the message is non-durable. * Value for the Durable header when the message is non-durable.
@ -45,24 +45,24 @@ public final class FilterConstants
public static final SimpleString DURABLE = new SimpleString("DURABLE"); public static final SimpleString DURABLE = new SimpleString("DURABLE");
/** /**
* Name of the HornetQ Message timestamp header. * Name of the ActiveMQ Message timestamp header.
*/ */
public static final SimpleString HORNETQ_TIMESTAMP = new SimpleString("HQTimestamp"); public static final SimpleString ACTIVEMQ_TIMESTAMP = new SimpleString("HQTimestamp");
/** /**
* Name of the HornetQ Message priority header. * Name of the ActiveMQ Message priority header.
*/ */
public static final SimpleString HORNETQ_PRIORITY = new SimpleString("HQPriority"); public static final SimpleString ACTIVEMQ_PRIORITY = new SimpleString("HQPriority");
/** /**
* Name of the HornetQ Message size header. * Name of the ActiveMQ Message size header.
*/ */
public static final SimpleString HORNETQ_SIZE = new SimpleString("HQSize"); public static final SimpleString ACTIVEMQ_SIZE = new SimpleString("HQSize");
/** /**
* All HornetQ headers are prepended by this prefix. * All ActiveMQ headers are prepended by this prefix.
*/ */
public static final SimpleString HORNETQ_PREFIX = new SimpleString("HQ"); public static final SimpleString ACTIVEMQ_PREFIX = new SimpleString("HQ");
private FilterConstants() private FilterConstants()
{ {

View File

@ -16,10 +16,10 @@ import org.apache.activemq.core.protocol.core.Packet;
import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.spi.core.protocol.RemotingConnection;
/** /**
* This is class is a simple way to intercepting calls on HornetQ client and servers. * This is class is a simple way to intercepting calls on ActiveMQ client and servers.
* <p> * <p>
* To add an interceptor to HornetQ server, you have to modify the server configuration file * To add an interceptor to ActiveMQ server, you have to modify the server configuration file
* {@literal hornetq-configuration.xml}.<br> * {@literal activemq-configuration.xml}.<br>
* To add it to a client, use {@link org.apache.activemq.api.core.client.ServerLocator#addIncomingInterceptor(Interceptor)} * To add it to a client, use {@link org.apache.activemq.api.core.client.ServerLocator#addIncomingInterceptor(Interceptor)}
* *
* @author clebert.suconic@jboss.com * @author clebert.suconic@jboss.com

View File

@ -31,11 +31,11 @@ import org.jgroups.conf.PlainConfigurator;
* There are two ways to constructing a JGroups channel (JChannel): * There are two ways to constructing a JGroups channel (JChannel):
* <ol> * <ol>
* <li> by passing in a JGroups configuration file<br> * <li> by passing in a JGroups configuration file<br>
* The file must exists in the hornetq classpath. HornetQ creates a JChannel with the * The file must exists in the activemq classpath. ActiveMQ creates a JChannel with the
* configuration file and use it for broadcasting and discovery. In standalone server * configuration file and use it for broadcasting and discovery. In standalone server
* mode HornetQ uses this way for constructing JChannels.</li> * mode ActiveMQ uses this way for constructing JChannels.</li>
* <li> by passing in a JChannel instance<br> * <li> by passing in a JChannel instance<br>
* This is useful when HornetQ needs to get a JChannel from a running JGroups service as in the * This is useful when ActiveMQ needs to get a JChannel from a running JGroups service as in the
* case of AS7 integration.</li> * case of AS7 integration.</li>
* </ol> * </ol>
* <p> * <p>
@ -118,7 +118,7 @@ public final class JGroupsBroadcastGroupConfiguration implements BroadcastEndpoi
} }
/** /**
* This class is the implementation of HornetQ members discovery that will use JGroups. * This class is the implementation of ActiveMQ members discovery that will use JGroups.
* *
* @author Howard Gao * @author Howard Gao
*/ */

View File

@ -158,7 +158,7 @@ public interface Message
* Returns the message timestamp. * Returns the message timestamp.
* <br> * <br>
* The timestamp corresponds to the time this message * The timestamp corresponds to the time this message
* was handled by a HornetQ server. * was handled by a ActiveMQ server.
*/ */
long getTimestamp(); long getTimestamp();
@ -196,22 +196,22 @@ public interface Message
boolean isLargeMessage(); boolean isLargeMessage();
/** /**
* Returns the message body as a HornetQBuffer * Returns the message body as a ActiveMQBuffer
*/ */
ActiveMQBuffer getBodyBuffer(); ActiveMQBuffer getBodyBuffer();
/** /**
* Writes the input byte array to the message body HornetQBuffer * Writes the input byte array to the message body ActiveMQBuffer
*/ */
Message writeBodyBufferBytes(byte[] bytes); Message writeBodyBufferBytes(byte[] bytes);
/** /**
* Writes the input String to the message body HornetQBuffer * Writes the input String to the message body ActiveMQBuffer
*/ */
Message writeBodyBufferString(String string); Message writeBodyBufferString(String string);
/** /**
* Returns a <em>copy</em> of the message body as a HornetQBuffer. Any modification * Returns a <em>copy</em> of the message body as a ActiveMQBuffer. Any modification
* of this buffer should not impact the underlying buffer. * of this buffer should not impact the underlying buffer.
*/ */
ActiveMQBuffer getBodyBufferCopy(); ActiveMQBuffer getBodyBufferCopy();

View File

@ -16,7 +16,7 @@ import java.io.Serializable;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.apache.activemq.core.client.HornetQClientMessageBundle; import org.apache.activemq.core.client.ActiveMQClientMessageBundle;
import org.apache.activemq.core.remoting.impl.TransportConfigurationUtil; import org.apache.activemq.core.remoting.impl.TransportConfigurationUtil;
import org.apache.activemq.core.remoting.impl.netty.TransportConstants; import org.apache.activemq.core.remoting.impl.netty.TransportConstants;
import org.apache.activemq.utils.UUIDGenerator; import org.apache.activemq.utils.UUIDGenerator;
@ -290,7 +290,7 @@ public class TransportConfiguration implements Serializable
/** /**
* Encodes this TransportConfiguration into a buffer. * Encodes this TransportConfiguration into a buffer.
* <p> * <p>
* Note that this is only used internally HornetQ. * Note that this is only used internally ActiveMQ.
* *
* @param buffer the buffer to encode into * @param buffer the buffer to encode into
*/ */
@ -331,7 +331,7 @@ public class TransportConfiguration implements Serializable
} }
else else
{ {
throw HornetQClientMessageBundle.BUNDLE.invalidEncodeType(val); throw ActiveMQClientMessageBundle.BUNDLE.invalidEncodeType(val);
} }
} }
} }
@ -340,7 +340,7 @@ public class TransportConfiguration implements Serializable
/** /**
* Decodes this TransportConfiguration from a buffer. * Decodes this TransportConfiguration from a buffer.
* <p> * <p>
* Note this is only used internally by HornetQ * Note this is only used internally by ActiveMQ
* *
* @param buffer the buffer to decode from * @param buffer the buffer to decode from
*/ */
@ -399,7 +399,7 @@ public class TransportConfiguration implements Serializable
} }
default: default:
{ {
throw HornetQClientMessageBundle.BUNDLE.invalidType(type); throw ActiveMQClientMessageBundle.BUNDLE.invalidType(type);
} }
} }

View File

@ -22,7 +22,7 @@ import java.net.InetSocketAddress;
import java.net.MulticastSocket; import java.net.MulticastSocket;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
/** /**
@ -189,7 +189,7 @@ public final class UDPBroadcastGroupConfiguration implements BroadcastEndpointFa
{ {
if (open) if (open)
{ {
HornetQClientLogger.LOGGER.warn(this + " getting exception when receiving broadcasting.", e); ActiveMQClientLogger.LOGGER.warn(this + " getting exception when receiving broadcasting.", e);
} }
} }
break; break;
@ -214,7 +214,7 @@ public final class UDPBroadcastGroupConfiguration implements BroadcastEndpointFa
{ {
if (localAddress != null) if (localAddress != null)
{ {
HornetQClientLogger.LOGGER.broadcastGroupBindError(); ActiveMQClientLogger.LOGGER.broadcastGroupBindError();
} }
broadcastingSocket = new DatagramSocket(); broadcastingSocket = new DatagramSocket();
} }
@ -233,7 +233,7 @@ public final class UDPBroadcastGroupConfiguration implements BroadcastEndpointFa
} }
catch (IOException e) catch (IOException e)
{ {
HornetQClientLogger.LOGGER.ioDiscoveryError(groupAddress.getHostAddress(), groupAddress instanceof Inet4Address ? "IPv4" : "IPv6"); ActiveMQClientLogger.LOGGER.ioDiscoveryError(groupAddress.getHostAddress(), groupAddress instanceof Inet4Address ? "IPv4" : "IPv6");
receivingSocket = new MulticastSocket(groupPort); receivingSocket = new MulticastSocket(groupPort);
} }

View File

@ -19,14 +19,14 @@ import org.apache.activemq.api.core.client.loadbalance.RoundRobinConnectionLoadB
import org.apache.activemq.core.client.impl.ServerLocatorImpl; import org.apache.activemq.core.client.impl.ServerLocatorImpl;
/** /**
* Utility class for creating HornetQ {@link ClientSessionFactory} objects. * Utility class for creating ActiveMQ {@link ClientSessionFactory} objects.
* <p> * <p>
* Once a {@link ClientSessionFactory} has been created, it can be further configured using its * Once a {@link ClientSessionFactory} has been created, it can be further configured using its
* setter methods before creating the sessions. Once a session is created, the factory can no longer * setter methods before creating the sessions. Once a session is created, the factory can no longer
* be modified (its setter methods will throw a {@link IllegalStateException}. * be modified (its setter methods will throw a {@link IllegalStateException}.
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
*/ */
public final class HornetQClient public final class ActiveMQClient
{ {
public static final String DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME = RoundRobinConnectionLoadBalancingPolicy.class.getCanonicalName(); public static final String DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME = RoundRobinConnectionLoadBalancingPolicy.class.getCanonicalName();
@ -202,7 +202,7 @@ public final class HornetQClient
} }
private HornetQClient() private ActiveMQClient()
{ {
// Utility class // Utility class
} }

View File

@ -16,7 +16,7 @@ import org.apache.activemq.api.core.ActiveMQException;
import org.apache.activemq.spi.core.remoting.ConsumerContext; import org.apache.activemq.spi.core.remoting.ConsumerContext;
/** /**
* A ClientConsumer receives messages from HornetQ queues. * A ClientConsumer receives messages from ActiveMQ queues.
* <br> * <br>
* Messages can be consumed synchronously by using the <code>receive()</code> methods * Messages can be consumed synchronously by using the <code>receive()</code> methods
* which will block until a message is received (or a timeout expires) or asynchronously * which will block until a message is received (or a timeout expires) or asynchronously
@ -36,7 +36,7 @@ public interface ClientConsumer extends AutoCloseable
/** /**
* The server's ID associated with this consumer. * The server's ID associated with this consumer.
* HornetQ implements this as a long but this could be protocol dependent. * ActiveMQ implements this as a long but this could be protocol dependent.
* @return * @return
*/ */
ConsumerContext getConsumerContext(); ConsumerContext getConsumerContext();
@ -65,7 +65,7 @@ public interface ClientConsumer extends AutoCloseable
ClientMessage receive(long timeout) throws ActiveMQException; ClientMessage receive(long timeout) throws ActiveMQException;
/** /**
* Receives a message from a queue. This call will force a network trip to HornetQ server to * Receives a message from a queue. This call will force a network trip to ActiveMQ server to
* ensure that there are no messages in the queue which can be delivered to this consumer. * ensure that there are no messages in the queue which can be delivered to this consumer.
* <p> * <p>
* This call will never wait indefinitely for a message, it will return {@code null} if no * This call will never wait indefinitely for a message, it will return {@code null} if no

View File

@ -21,7 +21,7 @@ import org.apache.activemq.api.core.SimpleString;
/** /**
* *
* A ClientMessage represents a message sent and/or received by HornetQ. * A ClientMessage represents a message sent and/or received by ActiveMQ.
* *
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a> * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
* @author <a href="mailto:clebert.suconic@jboss.com">Clebert Suconic</a> * @author <a href="mailto:clebert.suconic@jboss.com">Clebert Suconic</a>
@ -37,7 +37,7 @@ public interface ClientMessage extends Message
/** /**
* Sets the delivery count for this message. * Sets the delivery count for this message.
* <p> * <p>
* This method is not meant to be called by HornetQ clients. * This method is not meant to be called by ActiveMQ clients.
* @param deliveryCount message delivery count * @param deliveryCount message delivery count
* @return this ClientMessage * @return this ClientMessage
*/ */

View File

@ -18,7 +18,7 @@ import org.apache.activemq.spi.core.protocol.RemotingConnection;
/** /**
* A ClientSessionFactory is the entry point to create and configure HornetQ resources to produce and consume messages. * A ClientSessionFactory is the entry point to create and configure ActiveMQ resources to produce and consume messages.
* <br> * <br>
* It is possible to configure a factory using the setter methods only if no session has been created. * It is possible to configure a factory using the setter methods only if no session has been created.
* Once a session is created, the configuration is fixed and any call to a setter method will throw a IllegalStateException. * Once a session is created, the configuration is fixed and any call to a setter method will throw a IllegalStateException.

View File

@ -102,7 +102,7 @@ public interface ServerLocator extends AutoCloseable
* Returns the period used to check if a client has failed to receive pings from the server. * Returns the period used to check if a client has failed to receive pings from the server.
* <p> * <p>
* Period is in milliseconds, default value is * Period is in milliseconds, default value is
* {@link HornetQClient#DEFAULT_CLIENT_FAILURE_CHECK_PERIOD}. * {@link ActiveMQClient#DEFAULT_CLIENT_FAILURE_CHECK_PERIOD}.
* *
* @return the period used to check if a client has failed to receive pings from the server * @return the period used to check if a client has failed to receive pings from the server
*/ */
@ -125,7 +125,7 @@ public interface ServerLocator extends AutoCloseable
* <p> * <p>
* There is 1 temporary file created for each large message. * There is 1 temporary file created for each large message.
* <p> * <p>
* Default value is {@link HornetQClient#DEFAULT_CACHE_LARGE_MESSAGE_CLIENT}. * Default value is {@link ActiveMQClient#DEFAULT_CACHE_LARGE_MESSAGE_CLIENT}.
* *
* @return <code>true</code> if consumers created through this factory will cache large messages * @return <code>true</code> if consumers created through this factory will cache large messages
* in temporary files, <code>false</code> else * in temporary files, <code>false</code> else
@ -145,7 +145,7 @@ public interface ServerLocator extends AutoCloseable
* <p> * <p>
* This TTL determines how long the server will keep a connection alive in the absence of any * This TTL determines how long the server will keep a connection alive in the absence of any
* data arriving from the client. Value is in milliseconds, default value is * data arriving from the client. Value is in milliseconds, default value is
* {@link HornetQClient#DEFAULT_CONNECTION_TTL}. * {@link ActiveMQClient#DEFAULT_CONNECTION_TTL}.
* *
* @return the connection time-to-live in milliseconds * @return the connection time-to-live in milliseconds
*/ */
@ -166,7 +166,7 @@ public interface ServerLocator extends AutoCloseable
* <p> * <p>
* If client's blocking calls to the server take more than this timeout, the call will throw a * If client's blocking calls to the server take more than this timeout, the call will throw a
* {@link org.apache.activemq.api.core.ActiveMQException} with the code {@link org.apache.activemq.api.core.ActiveMQExceptionType#CONNECTION_TIMEDOUT}. Value * {@link org.apache.activemq.api.core.ActiveMQException} with the code {@link org.apache.activemq.api.core.ActiveMQExceptionType#CONNECTION_TIMEDOUT}. Value
* is in milliseconds, default value is {@link HornetQClient#DEFAULT_CALL_TIMEOUT}. * is in milliseconds, default value is {@link ActiveMQClient#DEFAULT_CALL_TIMEOUT}.
* *
* @return the blocking calls timeout * @return the blocking calls timeout
*/ */
@ -210,7 +210,7 @@ public interface ServerLocator extends AutoCloseable
* Returns the large message size threshold. * Returns the large message size threshold.
* <p> * <p>
* Messages whose size is if greater than this value will be handled as <em>large messages</em>. * Messages whose size is if greater than this value will be handled as <em>large messages</em>.
* Value is in bytes, default value is {@link HornetQClient#DEFAULT_MIN_LARGE_MESSAGE_SIZE}. * Value is in bytes, default value is {@link ActiveMQClient#DEFAULT_MIN_LARGE_MESSAGE_SIZE}.
* *
* @return the message size threshold to treat messages as large messages. * @return the message size threshold to treat messages as large messages.
*/ */
@ -229,7 +229,7 @@ public interface ServerLocator extends AutoCloseable
/** /**
* Returns the window size for flow control of the consumers created through this factory. * Returns the window size for flow control of the consumers created through this factory.
* <p> * <p>
* Value is in bytes, default value is {@link HornetQClient#DEFAULT_CONSUMER_WINDOW_SIZE}. * Value is in bytes, default value is {@link ActiveMQClient#DEFAULT_CONSUMER_WINDOW_SIZE}.
* *
* @return the window size used for consumer flow control * @return the window size used for consumer flow control
*/ */
@ -252,7 +252,7 @@ public interface ServerLocator extends AutoCloseable
* This value controls the rate at which a consumer can consume messages. A consumer will never consume messages at a rate faster than the rate specified. * This value controls the rate at which a consumer can consume messages. A consumer will never consume messages at a rate faster than the rate specified.
* <p> * <p>
* Value is -1 (to disable) or a positive integer corresponding to the maximum desired message consumption rate specified in units of messages per second. * Value is -1 (to disable) or a positive integer corresponding to the maximum desired message consumption rate specified in units of messages per second.
* Default value is {@link HornetQClient#DEFAULT_CONSUMER_MAX_RATE}. * Default value is {@link ActiveMQClient#DEFAULT_CONSUMER_MAX_RATE}.
* *
* @return the consumer max rate * @return the consumer max rate
*/ */
@ -272,7 +272,7 @@ public interface ServerLocator extends AutoCloseable
* Returns the size for the confirmation window of clients using this factory. * Returns the size for the confirmation window of clients using this factory.
* <p> * <p>
* Value is in bytes or -1 (to disable the window). Default value is * Value is in bytes or -1 (to disable the window). Default value is
* {@link HornetQClient#DEFAULT_CONFIRMATION_WINDOW_SIZE}. * {@link ActiveMQClient#DEFAULT_CONFIRMATION_WINDOW_SIZE}.
* *
* @return the size for the confirmation window of clients using this factory * @return the size for the confirmation window of clients using this factory
*/ */
@ -292,7 +292,7 @@ public interface ServerLocator extends AutoCloseable
* Returns the window size for flow control of the producers created through this factory. * Returns the window size for flow control of the producers created through this factory.
* <p> * <p>
* Value must be -1 (to disable flow control) or greater than 0 to determine the maximum amount of bytes at any give time (to prevent overloading the connection). * Value must be -1 (to disable flow control) or greater than 0 to determine the maximum amount of bytes at any give time (to prevent overloading the connection).
* Default value is {@link HornetQClient#DEFAULT_PRODUCER_WINDOW_SIZE}. * Default value is {@link ActiveMQClient#DEFAULT_PRODUCER_WINDOW_SIZE}.
* *
* @return the window size for flow control of the producers created through this factory. * @return the window size for flow control of the producers created through this factory.
*/ */
@ -314,7 +314,7 @@ public interface ServerLocator extends AutoCloseable
* This value controls the rate at which a producer can produce messages. A producer will never produce messages at a rate faster than the rate specified. * This value controls the rate at which a producer can produce messages. A producer will never produce messages at a rate faster than the rate specified.
* <p> * <p>
* Value is -1 (to disable) or a positive integer corresponding to the maximum desired message production rate specified in units of messages per second. * Value is -1 (to disable) or a positive integer corresponding to the maximum desired message production rate specified in units of messages per second.
* Default value is {@link HornetQClient#DEFAULT_PRODUCER_MAX_RATE}. * Default value is {@link ActiveMQClient#DEFAULT_PRODUCER_MAX_RATE}.
* *
* @return maximum rate of message production (in messages per seconds) * @return maximum rate of message production (in messages per seconds)
*/ */
@ -334,7 +334,7 @@ public interface ServerLocator extends AutoCloseable
* Returns whether consumers created through this factory will block while * Returns whether consumers created through this factory will block while
* sending message acknowledgments or do it asynchronously. * sending message acknowledgments or do it asynchronously.
* <p> * <p>
* Default value is {@link HornetQClient#DEFAULT_BLOCK_ON_ACKNOWLEDGE}. * Default value is {@link ActiveMQClient#DEFAULT_BLOCK_ON_ACKNOWLEDGE}.
* *
* @return whether consumers will block while sending message * @return whether consumers will block while sending message
* acknowledgments or do it asynchronously * acknowledgments or do it asynchronously
@ -358,7 +358,7 @@ public interface ServerLocator extends AutoCloseable
* If the session is configured to send durable message asynchronously, the client can set a SendAcknowledgementHandler on the ClientSession * If the session is configured to send durable message asynchronously, the client can set a SendAcknowledgementHandler on the ClientSession
* to be notified once the message has been handled by the server. * to be notified once the message has been handled by the server.
* <p> * <p>
* Default value is {@link HornetQClient#DEFAULT_BLOCK_ON_DURABLE_SEND}. * Default value is {@link ActiveMQClient#DEFAULT_BLOCK_ON_DURABLE_SEND}.
* *
* @return whether producers will block while sending persistent messages or do it asynchronously * @return whether producers will block while sending persistent messages or do it asynchronously
*/ */
@ -378,7 +378,7 @@ public interface ServerLocator extends AutoCloseable
* If the session is configured to send non-durable message asynchronously, the client can set a SendAcknowledgementHandler on the ClientSession * If the session is configured to send non-durable message asynchronously, the client can set a SendAcknowledgementHandler on the ClientSession
* to be notified once the message has been handled by the server. * to be notified once the message has been handled by the server.
* <p> * <p>
* Default value is {@link HornetQClient#DEFAULT_BLOCK_ON_NON_DURABLE_SEND}. * Default value is {@link ActiveMQClient#DEFAULT_BLOCK_ON_NON_DURABLE_SEND}.
* *
* @return whether producers will block while sending non-durable messages or do it asynchronously * @return whether producers will block while sending non-durable messages or do it asynchronously
*/ */
@ -398,7 +398,7 @@ public interface ServerLocator extends AutoCloseable
* <p> * <p>
* if <code>true</code>, a random unique group ID is created and set on each message for the property * if <code>true</code>, a random unique group ID is created and set on each message for the property
* {@link org.apache.activemq.api.core.Message#HDR_GROUP_ID}. * {@link org.apache.activemq.api.core.Message#HDR_GROUP_ID}.
* Default value is {@link HornetQClient#DEFAULT_AUTO_GROUP}. * Default value is {@link ActiveMQClient#DEFAULT_AUTO_GROUP}.
* *
* @return whether producers will automatically assign a group ID to their messages * @return whether producers will automatically assign a group ID to their messages
*/ */
@ -433,7 +433,7 @@ public interface ServerLocator extends AutoCloseable
/** /**
* Returns whether messages will pre-acknowledged on the server before they are sent to the consumers or not. * Returns whether messages will pre-acknowledged on the server before they are sent to the consumers or not.
* <p> * <p>
* Default value is {@link HornetQClient#DEFAULT_PRE_ACKNOWLEDGE} * Default value is {@link ActiveMQClient#DEFAULT_PRE_ACKNOWLEDGE}
*/ */
boolean isPreAcknowledge(); boolean isPreAcknowledge();
@ -451,7 +451,7 @@ public interface ServerLocator extends AutoCloseable
/** /**
* Returns the acknowledgments batch size. * Returns the acknowledgments batch size.
* <p> * <p>
* Default value is {@link HornetQClient#DEFAULT_ACK_BATCH_SIZE}. * Default value is {@link ActiveMQClient#DEFAULT_ACK_BATCH_SIZE}.
* *
* @return the acknowledgments batch size * @return the acknowledgments batch size
*/ */
@ -484,7 +484,7 @@ public interface ServerLocator extends AutoCloseable
* Returns whether this factory will use global thread pools (shared among all the factories in the same JVM) * Returns whether this factory will use global thread pools (shared among all the factories in the same JVM)
* or its own pools. * or its own pools.
* <p> * <p>
* Default value is {@link HornetQClient#DEFAULT_USE_GLOBAL_POOLS}. * Default value is {@link ActiveMQClient#DEFAULT_USE_GLOBAL_POOLS}.
* *
* @return <code>true</code> if this factory uses global thread pools, <code>false</code> else * @return <code>true</code> if this factory uses global thread pools, <code>false</code> else
*/ */
@ -502,7 +502,7 @@ public interface ServerLocator extends AutoCloseable
/** /**
* Returns the maximum size of the scheduled thread pool. * Returns the maximum size of the scheduled thread pool.
* <p> * <p>
* Default value is {@link HornetQClient#DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE}. * Default value is {@link ActiveMQClient#DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE}.
* *
* @return the maximum size of the scheduled thread pool. * @return the maximum size of the scheduled thread pool.
*/ */
@ -522,7 +522,7 @@ public interface ServerLocator extends AutoCloseable
/** /**
* Returns the maximum size of the thread pool. * Returns the maximum size of the thread pool.
* <p> * <p>
* Default value is {@link HornetQClient#DEFAULT_THREAD_POOL_MAX_SIZE}. * Default value is {@link ActiveMQClient#DEFAULT_THREAD_POOL_MAX_SIZE}.
* *
* @return the maximum size of the thread pool. * @return the maximum size of the thread pool.
*/ */
@ -542,7 +542,7 @@ public interface ServerLocator extends AutoCloseable
/** /**
* Returns the time to retry connections created by this factory after failure. * Returns the time to retry connections created by this factory after failure.
* <p> * <p>
* Value is in milliseconds, default is {@link HornetQClient#DEFAULT_RETRY_INTERVAL}. * Value is in milliseconds, default is {@link ActiveMQClient#DEFAULT_RETRY_INTERVAL}.
* *
* @return the time to retry connections created by this factory after failure * @return the time to retry connections created by this factory after failure
*/ */
@ -561,7 +561,7 @@ public interface ServerLocator extends AutoCloseable
/** /**
* Returns the multiplier to apply to successive retry intervals. * Returns the multiplier to apply to successive retry intervals.
* <p> * <p>
* Default value is {@link HornetQClient#DEFAULT_RETRY_INTERVAL_MULTIPLIER}. * Default value is {@link ActiveMQClient#DEFAULT_RETRY_INTERVAL_MULTIPLIER}.
* *
* @return the multiplier to apply to successive retry intervals * @return the multiplier to apply to successive retry intervals
*/ */
@ -580,7 +580,7 @@ public interface ServerLocator extends AutoCloseable
/** /**
* Returns the maximum retry interval (in the case a retry interval multiplier has been specified). * Returns the maximum retry interval (in the case a retry interval multiplier has been specified).
* <p> * <p>
* Value is in milliseconds, default value is {@link HornetQClient#DEFAULT_MAX_RETRY_INTERVAL}. * Value is in milliseconds, default value is {@link ActiveMQClient#DEFAULT_MAX_RETRY_INTERVAL}.
* *
* @return the maximum retry interval * @return the maximum retry interval
*/ */
@ -600,7 +600,7 @@ public interface ServerLocator extends AutoCloseable
/** /**
* Returns the maximum number of attempts to retry connection in case of failure. * Returns the maximum number of attempts to retry connection in case of failure.
* <p> * <p>
* Default value is {@link HornetQClient#DEFAULT_RECONNECT_ATTEMPTS}. * Default value is {@link ActiveMQClient#DEFAULT_RECONNECT_ATTEMPTS}.
* *
* @return the maximum number of attempts to retry connection in case of failure. * @return the maximum number of attempts to retry connection in case of failure.
*/ */
@ -635,7 +635,7 @@ public interface ServerLocator extends AutoCloseable
* Returns true if the client will automatically attempt to connect to the backup server if the initial * Returns true if the client will automatically attempt to connect to the backup server if the initial
* connection to the live server fails * connection to the live server fails
* <p> * <p>
* Default value is {@link HornetQClient#DEFAULT_FAILOVER_ON_INITIAL_CONNECTION}. * Default value is {@link ActiveMQClient#DEFAULT_FAILOVER_ON_INITIAL_CONNECTION}.
*/ */
boolean isFailoverOnInitialConnection(); boolean isFailoverOnInitialConnection();
@ -669,7 +669,7 @@ public interface ServerLocator extends AutoCloseable
/** /**
* Returns the initial size of messages created through this factory. * Returns the initial size of messages created through this factory.
* <p> * <p>
* Value is in bytes, default value is {@link HornetQClient#DEFAULT_INITIAL_MESSAGE_PACKET_SIZE}. * Value is in bytes, default value is {@link ActiveMQClient#DEFAULT_INITIAL_MESSAGE_PACKET_SIZE}.
* *
* @return the initial size of messages created through this factory * @return the initial size of messages created through this factory
*/ */
@ -690,7 +690,7 @@ public interface ServerLocator extends AutoCloseable
* method is the same as invoking <code>addIncomingInterceptor(Interceptor).</code> * method is the same as invoking <code>addIncomingInterceptor(Interceptor).</code>
* *
* @param interceptor an Interceptor * @param interceptor an Interceptor
* @deprecated As of HornetQ 2.3.0.Final, replaced by * @deprecated As of ActiveMQ 2.3.0.Final, replaced by
* {@link #addIncomingInterceptor(Interceptor)} and * {@link #addIncomingInterceptor(Interceptor)} and
* {@link #addOutgoingInterceptor(Interceptor)} * {@link #addOutgoingInterceptor(Interceptor)}
*/ */
@ -719,7 +719,7 @@ public interface ServerLocator extends AutoCloseable
* *
* @param interceptor interceptor to remove * @param interceptor interceptor to remove
* @return <code>true</code> if the interceptor is removed from this factory, <code>false</code> else * @return <code>true</code> if the interceptor is removed from this factory, <code>false</code> else
* @deprecated As of HornetQ 2.3.0.Final, replaced by * @deprecated As of ActiveMQ 2.3.0.Final, replaced by
* {@link #removeIncomingInterceptor(Interceptor)} and * {@link #removeIncomingInterceptor(Interceptor)} and
* {@link #removeOutgoingInterceptor(Interceptor)} * {@link #removeOutgoingInterceptor(Interceptor)}
*/ */

View File

@ -14,8 +14,8 @@
* Client load-balancing API. * Client load-balancing API.
* <br> * <br>
* This package defines the policies supported by * This package defines the policies supported by
* HornetQ to load-balance client connections across * ActiveMQ to load-balance client connections across
* HornetQ servers. * ActiveMQ servers.
*/ */
package org.apache.activemq.api.core.client.loadbalance; package org.apache.activemq.api.core.client.loadbalance;

View File

@ -13,7 +13,7 @@
/** /**
* Core Client Messaging API. * Core Client Messaging API.
* <br> * <br>
* This package defines the API used by HornetQ clients to produce and consume messages. * This package defines the API used by ActiveMQ clients to produce and consume messages.
*/ */
package org.apache.activemq.api.core.client; package org.apache.activemq.api.core.client;

View File

@ -21,7 +21,7 @@ import java.util.Map;
* *
* @see Acceptor * @see Acceptor
*/ */
public interface AcceptorControl extends HornetQComponentControl public interface AcceptorControl extends ActiveMQComponentControl
{ {
/** /**
* Returns the name of the acceptor * Returns the name of the acceptor

View File

@ -13,11 +13,11 @@
package org.apache.activemq.api.core.management; package org.apache.activemq.api.core.management;
/** /**
* A HornetQComponentControl is used to manage the life cycle of a HornetQ component. * A ActiveMQComponentControl is used to manage the life cycle of a ActiveMQ component.
* *
* @author <a href="mailto:jmesnil@redhat.com">Jeff Mesnil</a> * @author <a href="mailto:jmesnil@redhat.com">Jeff Mesnil</a>
*/ */
public interface HornetQComponentControl public interface ActiveMQComponentControl
{ {
/** /**
* Returns {@code true} if this component is started, {@code false} else. * Returns {@code true} if this component is started, {@code false} else.

View File

@ -15,9 +15,9 @@ package org.apache.activemq.api.core.management;
import javax.management.MBeanOperationInfo; import javax.management.MBeanOperationInfo;
/** /**
* A HornetQServerControl is used to manage HornetQ servers. * A ActiveMQServerControl is used to manage ActiveMQ servers.
*/ */
public interface HornetQServerControl public interface ActiveMQServerControl
{ {
/** /**
* Returns this server's version. * Returns this server's version.
@ -39,7 +39,7 @@ public interface HornetQServerControl
* <code>getIncomingInterceptorClassNames().</code> * <code>getIncomingInterceptorClassNames().</code>
* *
* @see org.apache.activemq.api.core.Interceptor * @see org.apache.activemq.api.core.Interceptor
* @deprecated As of HornetQ 2.3.0.Final, replaced by * @deprecated As of ActiveMQ 2.3.0.Final, replaced by
* {@link #getIncomingInterceptorClassNames()} and * {@link #getIncomingInterceptorClassNames()} and
* {@link #getOutgoingInterceptorClassNames()} * {@link #getOutgoingInterceptorClassNames()}
*/ */
@ -492,8 +492,8 @@ public interface HornetQServerControl
/** /**
* Closes all the connections of clients connected to this server which matches the specified IP address. * Closes all the connections of clients connected to this server which matches the specified IP address.
*/ */
@Operation(desc = "Closes all the consumer connections for the given HornetQ address", impact = MBeanOperationInfo.INFO) @Operation(desc = "Closes all the consumer connections for the given ActiveMQ address", impact = MBeanOperationInfo.INFO)
boolean closeConsumerConnectionsForAddress(@Parameter(desc = "a HornetQ address", name = "address") String address) throws Exception; boolean closeConsumerConnectionsForAddress(@Parameter(desc = "a ActiveMQ address", name = "address") String address) throws Exception;
/** /**
* Closes all the connections of sessions with a matching user name. * Closes all the connections of sessions with a matching user name.
@ -516,7 +516,7 @@ public interface HornetQServerControl
String[] listSessions(@Parameter(desc = "a connection ID", name = "connectionID") String connectionID) throws Exception; String[] listSessions(@Parameter(desc = "a connection ID", name = "connectionID") String connectionID) throws Exception;
/** /**
* This method is used by HornetQ clustering and must not be called by HornetQ clients. * This method is used by ActiveMQ clustering and must not be called by ActiveMQ clients.
*/ */
void sendQueueInfoToQueue(String queueName, String address) throws Exception; void sendQueueInfoToQueue(String queueName, String address) throws Exception;

View File

@ -19,7 +19,7 @@ package org.apache.activemq.api.core.management;
* @author <a href="jmesnil@redhat.com">Jeff Mesnil</a> * @author <a href="jmesnil@redhat.com">Jeff Mesnil</a>
* *
*/ */
public interface BridgeControl extends HornetQComponentControl public interface BridgeControl extends ActiveMQComponentControl
{ {
/** /**
* Returns the name of this bridge * Returns the name of this bridge

View File

@ -18,7 +18,7 @@ package org.apache.activemq.api.core.management;
* @author <a href="jmesnil@redhat.com">Jeff Mesnil</a> * @author <a href="jmesnil@redhat.com">Jeff Mesnil</a>
* *
*/ */
public interface BroadcastGroupControl extends HornetQComponentControl public interface BroadcastGroupControl extends ActiveMQComponentControl
{ {
/** /**
* Returns the configuration name of this broadcast group. * Returns the configuration name of this broadcast group.

View File

@ -20,7 +20,7 @@ import java.util.Map;
* @author <a href="jmesnil@redhat.com">Jeff Mesnil</a> * @author <a href="jmesnil@redhat.com">Jeff Mesnil</a>
* *
*/ */
public interface ClusterConnectionControl extends HornetQComponentControl public interface ClusterConnectionControl extends ActiveMQComponentControl
{ {
/** /**
* Returns the configuration name of this cluster connection. * Returns the configuration name of this cluster connection.

View File

@ -19,12 +19,12 @@ import java.util.Map;
import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.Message;
import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.SimpleString;
import org.apache.activemq.core.client.HornetQClientMessageBundle; import org.apache.activemq.core.client.ActiveMQClientMessageBundle;
import org.apache.activemq.utils.json.JSONArray; import org.apache.activemq.utils.json.JSONArray;
import org.apache.activemq.utils.json.JSONObject; import org.apache.activemq.utils.json.JSONObject;
/** /**
* Helper class to use HornetQ Core messages to manage server resources. * Helper class to use ActiveMQ Core messages to manage server resources.
* *
* @author <a href="mailto:jmesnil@redhat.com">Jeff Mesnil</a> * @author <a href="mailto:jmesnil@redhat.com">Jeff Mesnil</a>
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a> * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
@ -292,12 +292,12 @@ public final class ManagementHelper
param instanceof Byte == false && param instanceof Byte == false &&
param instanceof Short == false) param instanceof Short == false)
{ {
throw HornetQClientMessageBundle.BUNDLE.invalidManagementParam(param.getClass().getName()); throw ActiveMQClientMessageBundle.BUNDLE.invalidManagementParam(param.getClass().getName());
} }
} }
/** /**
* Used by HornetQ management service. * Used by ActiveMQ management service.
*/ */
public static Object[] retrieveOperationParameters(final Message message) throws Exception public static Object[] retrieveOperationParameters(final Message message) throws Exception
{ {
@ -333,7 +333,7 @@ public final class ManagementHelper
} }
/** /**
* Used by HornetQ management service. * Used by ActiveMQ management service.
*/ */
public static void storeResult(final Message message, final Object result) throws Exception public static void storeResult(final Message message, final Object result) throws Exception
{ {
@ -417,7 +417,7 @@ public final class ManagementHelper
} }
/** /**
* Used by HornetQ management service. * Used by ActiveMQ management service.
*/ */
public static Map<String, Object> fromCommaSeparatedKeyValues(final String str) throws Exception public static Map<String, Object> fromCommaSeparatedKeyValues(final String str) throws Exception
{ {
@ -433,7 +433,7 @@ public final class ManagementHelper
} }
/** /**
* Used by HornetQ management service. * Used by ActiveMQ management service.
*/ */
public static Object[] fromCommaSeparatedArrayOfCommaSeparatedKeyValues(final String str) throws Exception public static Object[] fromCommaSeparatedArrayOfCommaSeparatedKeyValues(final String str) throws Exception
{ {

View File

@ -13,15 +13,15 @@
package org.apache.activemq.api.core.management; package org.apache.activemq.api.core.management;
/** /**
* Types of notification emitted by HornetQ servers. * Types of notification emitted by ActiveMQ servers.
* <p> * <p>
* These notifications can be received through: * These notifications can be received through:
* <ul> * <ul>
* <li>JMX' MBeans subscriptions * <li>JMX' MBeans subscriptions
* <li>Core messages to a notification address (default value is {@code hornetq.notifications}) * <li>Core messages to a notification address (default value is {@code activemq.notifications})
* <li>JMS messages * <li>JMS messages
* </ul> * </ul>
* @see the HornetQ user manual section on "Management Notifications" * @see the ActiveMQ user manual section on "Management Notifications"
* @author <a href="mailto:jmesnil@redhat.com">Jeff Mesnil</a> * @author <a href="mailto:jmesnil@redhat.com">Jeff Mesnil</a>
*/ */
public interface NotificationType public interface NotificationType

View File

@ -18,7 +18,7 @@ import org.apache.activemq.api.config.ActiveMQDefaultConfiguration;
import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.SimpleString;
/** /**
* Helper class to build ObjectNames for HornetQ resources. * Helper class to build ObjectNames for ActiveMQ resources.
* @author <a href="jmesnil@redhat.com">Jeff Mesnil</a> * @author <a href="jmesnil@redhat.com">Jeff Mesnil</a>
*/ */
public final class ObjectNameBuilder public final class ObjectNameBuilder
@ -27,7 +27,7 @@ public final class ObjectNameBuilder
// Constants ----------------------------------------------------- // Constants -----------------------------------------------------
/** /**
* Default JMX domain for HornetQ resources. * Default JMX domain for ActiveMQ resources.
*/ */
public static final ObjectNameBuilder DEFAULT = new ObjectNameBuilder(ActiveMQDefaultConfiguration.getDefaultJmxDomain()); public static final ObjectNameBuilder DEFAULT = new ObjectNameBuilder(ActiveMQDefaultConfiguration.getDefaultJmxDomain());
@ -63,9 +63,9 @@ public final class ObjectNameBuilder
// Public -------------------------------------------------------- // Public --------------------------------------------------------
/** /**
* Returns the ObjectName used by the single {@link HornetQServerControl}. * Returns the ObjectName used by the single {@link ActiveMQServerControl}.
*/ */
public ObjectName getHornetQServerObjectName() throws Exception public ObjectName getActiveMQServerObjectName() throws Exception
{ {
return ObjectName.getInstance(domain + ":module=Core,type=Server"); return ObjectName.getInstance(domain + ":module=Core,type=Server");
} }

View File

@ -11,9 +11,9 @@
* permissions and limitations under the License. * permissions and limitations under the License.
*/ */
/** /**
* Management API for HornetQ servers and its Core resources. * Management API for ActiveMQ servers and its Core resources.
* <br> * <br>
* HornetQ can be managed either using JMX or by sending management messages to the * ActiveMQ can be managed either using JMX or by sending management messages to the
* server's special management address. Please refer to the user manual for more information. * server's special management address. Please refer to the user manual for more information.
*/ */
package org.apache.activemq.api.core.management; package org.apache.activemq.api.core.management;

View File

@ -14,7 +14,7 @@
* Core Messaging API. * Core Messaging API.
* <br> * <br>
* This package defines base classes and interfaces used * This package defines base classes and interfaces used
* throughout HornetQ API * throughout ActiveMQ API
*/ */
package org.apache.activemq.api.core; package org.apache.activemq.api.core;

View File

@ -19,12 +19,12 @@ import org.apache.activemq.api.core.SimpleString;
import org.apache.activemq.core.message.impl.MessageInternal; import org.apache.activemq.core.message.impl.MessageInternal;
/** /**
* A ResetLimitWrappedHornetQBuffer * A ResetLimitWrappedActiveMQBuffer
* TODO: Move this to commons * TODO: Move this to commons
* @author Tim Fox * @author Tim Fox
* *
*/ */
public final class ResetLimitWrappedHornetQBuffer extends ChannelBufferWrapper public final class ResetLimitWrappedActiveMQBuffer extends ChannelBufferWrapper
{ {
private final int limit; private final int limit;
@ -40,7 +40,7 @@ public final class ResetLimitWrappedHornetQBuffer extends ChannelBufferWrapper
this.message = message; this.message = message;
} }
public ResetLimitWrappedHornetQBuffer(final int limit, final ActiveMQBuffer buffer, final MessageInternal message) public ResetLimitWrappedActiveMQBuffer(final int limit, final ActiveMQBuffer buffer, final MessageInternal message)
{ {
super(buffer.byteBuf()); super(buffer.byteBuf());

View File

@ -44,13 +44,13 @@ import org.w3c.dom.Node;
* *
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
*/ */
@MessageLogger(projectCode = "HQ") @MessageLogger(projectCode = "AMQ")
public interface HornetQClientLogger extends BasicLogger public interface ActiveMQClientLogger extends BasicLogger
{ {
/** /**
* The default logger. * The default logger.
*/ */
HornetQClientLogger LOGGER = Logger.getMessageLogger(HornetQClientLogger.class, HornetQClientLogger.class.getPackage().getName()); ActiveMQClientLogger LOGGER = Logger.getMessageLogger(ActiveMQClientLogger.class, ActiveMQClientLogger.class.getPackage().getName());
@LogMessage(level = Logger.Level.INFO) @LogMessage(level = Logger.Level.INFO)
@Message(id = 211000, value = "**** Dumping session creation stacks ****", format = Message.Format.MESSAGE_FORMAT) @Message(id = 211000, value = "**** Dumping session creation stacks ****", format = Message.Format.MESSAGE_FORMAT)
@ -254,7 +254,7 @@ public interface HornetQClientLogger extends BasicLogger
void propertyNotBoolean(String propName, String name); void propertyNotBoolean(String propName, String name);
@LogMessage(level = Logger.Level.WARN) @LogMessage(level = Logger.Level.WARN)
@Message(id = 212046, value = "Cannot find hornetq-version.properties on classpath: {0}", @Message(id = 212046, value = "Cannot find activemq-version.properties on classpath: {0}",
format = Message.Format.MESSAGE_FORMAT) format = Message.Format.MESSAGE_FORMAT)
void noVersionOnClasspath(String classpath); void noVersionOnClasspath(String classpath);

View File

@ -45,10 +45,10 @@ import org.w3c.dom.Node;
* *
* so 119000 to 119999 * so 119000 to 119999
*/ */
@MessageBundle(projectCode = "HQ") @MessageBundle(projectCode = "AMQ")
public interface HornetQClientMessageBundle public interface ActiveMQClientMessageBundle
{ {
HornetQClientMessageBundle BUNDLE = Messages.getBundle(HornetQClientMessageBundle.class); ActiveMQClientMessageBundle BUNDLE = Messages.getBundle(ActiveMQClientMessageBundle.class);
@Message(id = 119000, value = "ClientSession closed while creating session", format = Message.Format.MESSAGE_FORMAT) @Message(id = 119000, value = "ClientSession closed while creating session", format = Message.Format.MESSAGE_FORMAT)
ActiveMQInternalErrorException clientSessionClosed(); ActiveMQInternalErrorException clientSessionClosed();
@ -58,7 +58,7 @@ public interface HornetQClientMessageBundle
@Message(id = 119002, value = "Internal Error! ClientSessionFactoryImpl::createSessionInternal " @Message(id = 119002, value = "Internal Error! ClientSessionFactoryImpl::createSessionInternal "
+ "just reached a condition that was not supposed to happen. " + "just reached a condition that was not supposed to happen. "
+ "Please inform this condition to the HornetQ team", format = Message.Format.MESSAGE_FORMAT) + "Please inform this condition to the ActiveMQ team", format = Message.Format.MESSAGE_FORMAT)
ActiveMQInternalErrorException clietSessionInternal(); ActiveMQInternalErrorException clietSessionInternal();
@Message(id = 119003, value = "Queue can not be both durable and temporary", format = Message.Format.MESSAGE_FORMAT) @Message(id = 119003, value = "Queue can not be both durable and temporary", format = Message.Format.MESSAGE_FORMAT)

View File

@ -14,7 +14,7 @@ package org.apache.activemq.core.client.impl;
import javax.transaction.xa.XAResource; import javax.transaction.xa.XAResource;
public interface HornetQXAResource extends XAResource public interface ActiveMQXAResource extends XAResource
{ {
XAResource getResource(); XAResource getResource();
} }

View File

@ -30,8 +30,8 @@ import org.apache.activemq.api.core.client.ClientSession;
import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ClientSessionFactory;
import org.apache.activemq.api.core.client.MessageHandler; import org.apache.activemq.api.core.client.MessageHandler;
import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.client.ServerLocator;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
import org.apache.activemq.core.client.HornetQClientMessageBundle; import org.apache.activemq.core.client.ActiveMQClientMessageBundle;
import org.apache.activemq.spi.core.remoting.ConsumerContext; import org.apache.activemq.spi.core.remoting.ConsumerContext;
import org.apache.activemq.spi.core.remoting.SessionContext; import org.apache.activemq.spi.core.remoting.SessionContext;
import org.apache.activemq.utils.FutureLatch; import org.apache.activemq.utils.FutureLatch;
@ -53,7 +53,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal
// Constants // Constants
// ------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------
private static final boolean isTrace = HornetQClientLogger.LOGGER.isTraceEnabled(); private static final boolean isTrace = ActiveMQClientLogger.LOGGER.isTraceEnabled();
private static final long CLOSE_TIMEOUT_MILLISECONDS = 10000; private static final long CLOSE_TIMEOUT_MILLISECONDS = 10000;
@ -204,7 +204,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal
if (handler != null) if (handler != null)
{ {
throw HornetQClientMessageBundle.BUNDLE.messageHandlerSet(); throw ActiveMQClientMessageBundle.BUNDLE.messageHandlerSet();
} }
if (clientWindowSize == 0) if (clientWindowSize == 0)
@ -295,7 +295,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal
{ {
if (isTrace) if (isTrace)
{ {
HornetQClientLogger.LOGGER.trace("Forcing delivery"); ActiveMQClientLogger.LOGGER.trace("Forcing delivery");
} }
// JBPAPP-6030 - Calling forceDelivery outside of the lock to avoid distributed dead locks // JBPAPP-6030 - Calling forceDelivery outside of the lock to avoid distributed dead locks
sessionContext.forceDelivery(this, forceDeliveryCount++); sessionContext.forceDelivery(this, forceDeliveryCount++);
@ -321,7 +321,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal
if (isTrace) if (isTrace)
{ {
HornetQClientLogger.LOGGER.trace("There was nothing on the queue, leaving it now:: returning null"); ActiveMQClientLogger.LOGGER.trace("There was nothing on the queue, leaving it now:: returning null");
} }
return null; return null;
@ -330,7 +330,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal
{ {
if (isTrace) if (isTrace)
{ {
HornetQClientLogger.LOGGER.trace("Ignored force delivery answer as it belonged to another call"); ActiveMQClientLogger.LOGGER.trace("Ignored force delivery answer as it belonged to another call");
} }
// Ignore the message // Ignore the message
continue; continue;
@ -369,7 +369,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal
if (isTrace) if (isTrace)
{ {
HornetQClientLogger.LOGGER.trace("Returning " + m); ActiveMQClientLogger.LOGGER.trace("Returning " + m);
} }
return m; return m;
@ -378,7 +378,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal
{ {
if (isTrace) if (isTrace)
{ {
HornetQClientLogger.LOGGER.trace("Returning null"); ActiveMQClientLogger.LOGGER.trace("Returning null");
} }
resetIfSlowConsumer(); resetIfSlowConsumer();
return null; return null;
@ -428,7 +428,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal
if (receiverThread != null) if (receiverThread != null)
{ {
throw HornetQClientMessageBundle.BUNDLE.inReceive(); throw ActiveMQClientMessageBundle.BUNDLE.inReceive();
} }
boolean noPreviousHandler = handler == null; boolean noPreviousHandler = handler == null;
@ -492,7 +492,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal
} }
catch (ActiveMQException e) catch (ActiveMQException e)
{ {
HornetQClientLogger.LOGGER.warn("problem cleaning up: " + this); ActiveMQClientLogger.LOGGER.warn("problem cleaning up: " + this);
} }
} }
@ -717,7 +717,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal
{ {
if (isTrace) if (isTrace)
{ {
HornetQClientLogger.LOGGER.trace("Sending back credits for largeController = null " + flowControlSize); ActiveMQClientLogger.LOGGER.trace("Sending back credits for largeController = null " + flowControlSize);
} }
flowControl(flowControlSize, false); flowControl(flowControlSize, false);
} }
@ -751,7 +751,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal
} }
catch (Exception e) catch (Exception e)
{ {
HornetQClientLogger.LOGGER.errorClearingMessages(e); ActiveMQClientLogger.LOGGER.errorClearingMessages(e);
} }
} }
@ -764,7 +764,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal
catch (Throwable e) catch (Throwable e)
{ {
// nothing that could be done here // nothing that could be done here
HornetQClientLogger.LOGGER.errorClearingMessages(e); ActiveMQClientLogger.LOGGER.errorClearingMessages(e);
} }
} }
@ -853,7 +853,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal
{ {
if (isTrace) if (isTrace)
{ {
HornetQClientLogger.LOGGER.trace("FlowControl::Sending " + creditsToSend + " -1, for slow consumer"); ActiveMQClientLogger.LOGGER.trace("FlowControl::Sending " + creditsToSend + " -1, for slow consumer");
} }
// sending the credits - 1 initially send to fire the slow consumer, or the slow consumer would be // sending the credits - 1 initially send to fire the slow consumer, or the slow consumer would be
@ -869,9 +869,9 @@ public final class ClientConsumerImpl implements ClientConsumerInternal
} }
else else
{ {
if (HornetQClientLogger.LOGGER.isDebugEnabled()) if (ActiveMQClientLogger.LOGGER.isDebugEnabled())
{ {
HornetQClientLogger.LOGGER.debug("Sending " + messageBytes + " from flow-control"); ActiveMQClientLogger.LOGGER.debug("Sending " + messageBytes + " from flow-control");
} }
final int credits = creditsToSend; final int credits = creditsToSend;
@ -906,7 +906,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal
{ {
if (isTrace) if (isTrace)
{ {
HornetQClientLogger.LOGGER.trace("Sending 1 credit to start delivering of one message to slow consumer"); ActiveMQClientLogger.LOGGER.trace("Sending 1 credit to start delivering of one message to slow consumer");
} }
sendCredits(1); sendCredits(1);
try try
@ -962,7 +962,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal
{ {
if (isTrace) if (isTrace)
{ {
HornetQClientLogger.LOGGER.trace("Adding Runner on Executor for delivery"); ActiveMQClientLogger.LOGGER.trace("Adding Runner on Executor for delivery");
} }
sessionExecutor.execute(runner); sessionExecutor.execute(runner);
@ -1011,7 +1011,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal
if (!ok) if (!ok)
{ {
HornetQClientLogger.LOGGER.timeOutWaitingForProcessing(); ActiveMQClientLogger.LOGGER.timeOutWaitingForProcessing();
} }
} }
@ -1019,7 +1019,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal
{ {
if (closed) if (closed)
{ {
throw HornetQClientMessageBundle.BUNDLE.consumerClosed(); throw ActiveMQClientMessageBundle.BUNDLE.consumerClosed();
} }
} }
@ -1073,7 +1073,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal
{ {
if (isTrace) if (isTrace)
{ {
HornetQClientLogger.LOGGER.trace("Calling handler.onMessage"); ActiveMQClientLogger.LOGGER.trace("Calling handler.onMessage");
} }
final ClassLoader originalLoader = AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() final ClassLoader originalLoader = AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
{ {
@ -1107,7 +1107,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal
} }
catch (Exception e) catch (Exception e)
{ {
HornetQClientLogger.LOGGER.warn(e.getMessage(), e); ActiveMQClientLogger.LOGGER.warn(e.getMessage(), e);
} }
onMessageThread = null; onMessageThread = null;
@ -1115,7 +1115,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal
if (isTrace) if (isTrace)
{ {
HornetQClientLogger.LOGGER.trace("Handler.onMessage done"); ActiveMQClientLogger.LOGGER.trace("Handler.onMessage done");
} }
if (message.isLargeMessage()) if (message.isLargeMessage())
@ -1229,7 +1229,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal
} }
catch (Exception e) catch (Exception e)
{ {
HornetQClientLogger.LOGGER.onMessageError(e); ActiveMQClientLogger.LOGGER.onMessageError(e);
lastException = e; lastException = e;
} }

View File

@ -18,7 +18,7 @@ import java.io.OutputStream;
import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.ActiveMQBuffer;
import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.ActiveMQException;
import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.Message;
import org.apache.activemq.core.buffers.impl.ResetLimitWrappedHornetQBuffer; import org.apache.activemq.core.buffers.impl.ResetLimitWrappedActiveMQBuffer;
import org.apache.activemq.utils.DataConstants; import org.apache.activemq.utils.DataConstants;
/** /**
@ -183,19 +183,19 @@ public final class ClientLargeMessageImpl extends ClientMessageImpl implements C
} }
createBody((int)bodySize); createBody((int)bodySize);
bodyBuffer = new ResetLimitWrappedHornetQBuffer(BODY_OFFSET, buffer, this); bodyBuffer = new ResetLimitWrappedActiveMQBuffer(BODY_OFFSET, buffer, this);
largeMessageController.saveBuffer(new HornetQOutputStream(bodyBuffer)); largeMessageController.saveBuffer(new ActiveMQOutputStream(bodyBuffer));
} }
} }
// Inner classes ------------------------------------------------- // Inner classes -------------------------------------------------
private static class HornetQOutputStream extends OutputStream private static class ActiveMQOutputStream extends OutputStream
{ {
private final ActiveMQBuffer bufferOut; private final ActiveMQBuffer bufferOut;
HornetQOutputStream(ActiveMQBuffer out) ActiveMQOutputStream(ActiveMQBuffer out)
{ {
this.bufferOut = out; this.bufferOut = out;
} }

View File

@ -23,7 +23,7 @@ import org.apache.activemq.api.core.ActiveMQException;
import org.apache.activemq.api.core.ActiveMQPropertyConversionException; import org.apache.activemq.api.core.ActiveMQPropertyConversionException;
import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.Message;
import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.SimpleString;
import org.apache.activemq.core.client.HornetQClientMessageBundle; import org.apache.activemq.core.client.ActiveMQClientMessageBundle;
import org.apache.activemq.core.message.BodyEncoder; import org.apache.activemq.core.message.BodyEncoder;
import org.apache.activemq.core.message.impl.MessageImpl; import org.apache.activemq.core.message.impl.MessageImpl;
import org.apache.activemq.reader.MessageUtil; import org.apache.activemq.reader.MessageUtil;
@ -173,7 +173,7 @@ public class ClientMessageImpl extends MessageImpl implements ClientMessageInter
} }
catch (IOException e) catch (IOException e)
{ {
throw HornetQClientMessageBundle.BUNDLE.errorSavingBody(e); throw ActiveMQClientMessageBundle.BUNDLE.errorSavingBody(e);
} }
} }

View File

@ -14,8 +14,8 @@ package org.apache.activemq.core.client.impl;
import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.ActiveMQException;
import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.SimpleString;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
import org.apache.activemq.core.client.HornetQClientMessageBundle; import org.apache.activemq.core.client.ActiveMQClientMessageBundle;
import org.apache.activemq.spi.core.remoting.SessionContext; import org.apache.activemq.spi.core.remoting.SessionContext;
import java.util.concurrent.Semaphore; import java.util.concurrent.Semaphore;
@ -99,7 +99,7 @@ public class ClientProducerCreditsImpl implements ClientProducerCredits
{ {
// I'm using string concatenation here in case address is null // I'm using string concatenation here in case address is null
// better getting a "null" string than a NPE // better getting a "null" string than a NPE
HornetQClientLogger.LOGGER.outOfCreditOnFlowControl("" + address); ActiveMQClientLogger.LOGGER.outOfCreditOnFlowControl("" + address);
} }
} }
finally finally
@ -127,7 +127,7 @@ public class ClientProducerCreditsImpl implements ClientProducerCredits
pendingCredits = 0; pendingCredits = 0;
arriving = 0; arriving = 0;
throw HornetQClientMessageBundle.BUNDLE.addressIsFull(address.toString(), credits); throw ActiveMQClientMessageBundle.BUNDLE.addressIsFull(address.toString(), credits);
} }
} }
} }

View File

@ -23,13 +23,13 @@ import org.apache.activemq.api.core.ActiveMQInterruptedException;
import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.Message;
import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.SimpleString;
import org.apache.activemq.api.core.client.SendAcknowledgementHandler; import org.apache.activemq.api.core.client.SendAcknowledgementHandler;
import org.apache.activemq.core.client.HornetQClientMessageBundle; import org.apache.activemq.core.client.ActiveMQClientMessageBundle;
import org.apache.activemq.core.message.BodyEncoder; import org.apache.activemq.core.message.BodyEncoder;
import org.apache.activemq.core.message.impl.MessageInternal; import org.apache.activemq.core.message.impl.MessageInternal;
import org.apache.activemq.core.protocol.core.impl.wireformat.SessionSendContinuationMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.SessionSendContinuationMessage;
import org.apache.activemq.spi.core.remoting.SessionContext; import org.apache.activemq.spi.core.remoting.SessionContext;
import org.apache.activemq.utils.DeflaterReader; import org.apache.activemq.utils.DeflaterReader;
import org.apache.activemq.utils.HornetQBufferInputStream; import org.apache.activemq.utils.ActiveMQBufferInputStream;
import org.apache.activemq.utils.TokenBucketLimiter; import org.apache.activemq.utils.TokenBucketLimiter;
import org.apache.activemq.utils.UUIDGenerator; import org.apache.activemq.utils.UUIDGenerator;
@ -333,7 +333,7 @@ public class ClientProducerImpl implements ClientProducerInternal
{ {
if (closed) if (closed)
{ {
throw HornetQClientMessageBundle.BUNDLE.producerClosed(); throw ActiveMQClientMessageBundle.BUNDLE.producerClosed();
} }
} }
@ -351,7 +351,7 @@ public class ClientProducerImpl implements ClientProducerInternal
if (msgI.getHeadersAndPropertiesEncodeSize() >= minLargeMessageSize) if (msgI.getHeadersAndPropertiesEncodeSize() >= minLargeMessageSize)
{ {
throw HornetQClientMessageBundle.BUNDLE.headerSizeTooBig(headerSize); throw ActiveMQClientMessageBundle.BUNDLE.headerSizeTooBig(headerSize);
} }
// msg.getBody() could be Null on LargeServerMessage // msg.getBody() could be Null on LargeServerMessage
@ -459,7 +459,7 @@ public class ClientProducerImpl implements ClientProducerInternal
final ClientProducerCredits credits, SendAcknowledgementHandler handler) throws ActiveMQException final ClientProducerCredits credits, SendAcknowledgementHandler handler) throws ActiveMQException
{ {
msgI.getBodyBuffer().readerIndex(0); msgI.getBodyBuffer().readerIndex(0);
largeMessageSendStreamed(sendBlocking, msgI, new HornetQBufferInputStream(msgI.getBodyBuffer()), credits, largeMessageSendStreamed(sendBlocking, msgI, new ActiveMQBufferInputStream(msgI.getBodyBuffer()), credits,
handler); handler);
} }
@ -513,7 +513,7 @@ public class ClientProducerImpl implements ClientProducerInternal
} }
catch (IOException e) catch (IOException e)
{ {
throw HornetQClientMessageBundle.BUNDLE.errorReadingBody(e); throw ActiveMQClientMessageBundle.BUNDLE.errorReadingBody(e);
} }
if (numberOfBytesRead == -1) if (numberOfBytesRead == -1)
@ -601,7 +601,7 @@ public class ClientProducerImpl implements ClientProducerInternal
} }
catch (IOException e) catch (IOException e)
{ {
throw HornetQClientMessageBundle.BUNDLE.errorClosingLargeMessage(e); throw ActiveMQClientMessageBundle.BUNDLE.errorClosingLargeMessage(e);
} }
} }
} }

View File

@ -38,14 +38,14 @@ import org.apache.activemq.api.core.TransportConfiguration;
import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSession;
import org.apache.activemq.api.core.client.FailoverEventListener; import org.apache.activemq.api.core.client.FailoverEventListener;
import org.apache.activemq.api.core.client.FailoverEventType; import org.apache.activemq.api.core.client.FailoverEventType;
import org.apache.activemq.api.core.client.HornetQClient; import org.apache.activemq.api.core.client.ActiveMQClient;
import org.apache.activemq.api.core.client.ServerLocator; import org.apache.activemq.api.core.client.ServerLocator;
import org.apache.activemq.api.core.client.SessionFailureListener; import org.apache.activemq.api.core.client.SessionFailureListener;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
import org.apache.activemq.core.client.HornetQClientMessageBundle; import org.apache.activemq.core.client.ActiveMQClientMessageBundle;
import org.apache.activemq.core.protocol.core.CoreRemotingConnection; import org.apache.activemq.core.protocol.core.CoreRemotingConnection;
import org.apache.activemq.core.remoting.FailureListener; import org.apache.activemq.core.remoting.FailureListener;
import org.apache.activemq.core.server.HornetQComponent; import org.apache.activemq.core.server.ActiveMQComponent;
import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.spi.core.protocol.RemotingConnection;
import org.apache.activemq.spi.core.remoting.BufferHandler; import org.apache.activemq.spi.core.remoting.BufferHandler;
import org.apache.activemq.spi.core.remoting.ClientProtocolManager; import org.apache.activemq.spi.core.remoting.ClientProtocolManager;
@ -74,9 +74,9 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
// Constants // Constants
// ------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------
private static final boolean isTrace = HornetQClientLogger.LOGGER.isTraceEnabled(); private static final boolean isTrace = ActiveMQClientLogger.LOGGER.isTraceEnabled();
private static final boolean isDebug = HornetQClientLogger.LOGGER.isDebugEnabled(); private static final boolean isDebug = ActiveMQClientLogger.LOGGER.isDebugEnabled();
// Attributes // Attributes
// ----------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------
@ -189,11 +189,11 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
// HORNETQ-1314 - if this in an in-vm connection then disable connection monitoring // HORNETQ-1314 - if this in an in-vm connection then disable connection monitoring
if (connectorFactory.isReliable() && if (connectorFactory.isReliable() &&
clientFailureCheckPeriod == HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD && clientFailureCheckPeriod == ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD &&
connectionTTL == HornetQClient.DEFAULT_CONNECTION_TTL) connectionTTL == ActiveMQClient.DEFAULT_CONNECTION_TTL)
{ {
this.clientFailureCheckPeriod = HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD_INVM; this.clientFailureCheckPeriod = ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD_INVM;
this.connectionTTL = HornetQClient.DEFAULT_CONNECTION_TTL_INVM; this.connectionTTL = ActiveMQClient.DEFAULT_CONNECTION_TTL_INVM;
} }
else else
{ {
@ -282,7 +282,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
{ {
if (ClientSessionFactoryImpl.isDebug) if (ClientSessionFactoryImpl.isDebug)
{ {
HornetQClientLogger.LOGGER.debug("Setting up backup config = " + backUp + " for live = " + live); ActiveMQClientLogger.LOGGER.debug("Setting up backup config = " + backUp + " for live = " + live);
} }
backupConfig = backUp; backupConfig = backUp;
} }
@ -290,7 +290,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
{ {
if (ClientSessionFactoryImpl.isDebug) if (ClientSessionFactoryImpl.isDebug)
{ {
HornetQClientLogger.LOGGER.debug("ClientSessionFactoryImpl received backup update for live/backup pair = " + live + ActiveMQClientLogger.LOGGER.debug("ClientSessionFactoryImpl received backup update for live/backup pair = " + live +
" / " + " / " +
backUp + backUp +
" but it didn't belong to " + " but it didn't belong to " +
@ -405,7 +405,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
// ConnectionLifeCycleListener implementation -------------------------------------------------- // ConnectionLifeCycleListener implementation --------------------------------------------------
public void connectionCreated(final HornetQComponent component, final Connection connection, final String protocol) public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol)
{ {
} }
@ -413,7 +413,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
{ {
// The exception has to be created in the same thread where it's being called // The exception has to be created in the same thread where it's being called
// as to avoid a different stack trace cause // as to avoid a different stack trace cause
final ActiveMQException ex = HornetQClientMessageBundle.BUNDLE.channelDisconnected(); final ActiveMQException ex = ActiveMQClientMessageBundle.BUNDLE.channelDisconnected();
// It has to use the same executor as the disconnect message is being sent through // It has to use the same executor as the disconnect message is being sent through
@ -516,7 +516,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
} }
catch (Exception e1) catch (Exception e1)
{ {
HornetQClientLogger.LOGGER.unableToCloseSession(e1); ActiveMQClientLogger.LOGGER.unableToCloseSession(e1);
} }
} }
checkCloseConnection(); checkCloseConnection();
@ -573,12 +573,12 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
catch (ActiveMQInterruptedException e1) catch (ActiveMQInterruptedException e1)
{ {
// this is just a debug, since an interrupt is an expected event (in case of a shutdown) // this is just a debug, since an interrupt is an expected event (in case of a shutdown)
HornetQClientLogger.LOGGER.debug(e1.getMessage(), e1); ActiveMQClientLogger.LOGGER.debug(e1.getMessage(), e1);
} }
} }
/** /**
* TODO: Maybe this belongs to HornetQClientProtocolManager * TODO: Maybe this belongs to ActiveMQClientProtocolManager
* @param connectionID * @param connectionID
* @param me * @param me
*/ */
@ -602,7 +602,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
if (ClientSessionFactoryImpl.isTrace) if (ClientSessionFactoryImpl.isTrace)
{ {
HornetQClientLogger.LOGGER.trace("Client Connection failed, calling failure listeners and trying to reconnect, reconnectAttempts=" + reconnectAttempts); ActiveMQClientLogger.LOGGER.trace("Client Connection failed, calling failure listeners and trying to reconnect, reconnectAttempts=" + reconnectAttempts);
} }
callFailoverListeners(FailoverEventType.FAILURE_DETECTED); callFailoverListeners(FailoverEventType.FAILURE_DETECTED);
@ -728,7 +728,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
} }
catch (Exception cause) catch (Exception cause)
{ {
HornetQClientLogger.LOGGER.failedToCleanupSession(cause); ActiveMQClientLogger.LOGGER.failedToCleanupSession(cause);
} }
} }
} }
@ -824,7 +824,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
// Failure of one listener to execute shouldn't prevent others // Failure of one listener to execute shouldn't prevent others
// from // from
// executing // executing
HornetQClientLogger.LOGGER.failedToExecuteListener(t); ActiveMQClientLogger.LOGGER.failedToExecuteListener(t);
} }
} }
} }
@ -844,7 +844,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
// Failure of one listener to execute shouldn't prevent others // Failure of one listener to execute shouldn't prevent others
// from // from
// executing // executing
HornetQClientLogger.LOGGER.failedToExecuteListener(t); ActiveMQClientLogger.LOGGER.failedToExecuteListener(t);
} }
} }
} }
@ -870,7 +870,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
if (connection == null) if (connection == null)
{ {
if (!clientProtocolManager.isAlive()) if (!clientProtocolManager.isAlive())
HornetQClientLogger.LOGGER.failedToConnectToServer(); ActiveMQClientLogger.LOGGER.failedToConnectToServer();
return; return;
} }
@ -907,9 +907,9 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
{ {
if (!clientProtocolManager.isAlive()) if (!clientProtocolManager.isAlive())
return; return;
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace("getConnectionWithRetry::" + reconnectAttempts + ActiveMQClientLogger.LOGGER.trace("getConnectionWithRetry::" + reconnectAttempts +
" with retryInterval = " + " with retryInterval = " +
retryInterval + retryInterval +
" multiplier = " + " multiplier = " +
@ -924,14 +924,14 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
{ {
if (ClientSessionFactoryImpl.isDebug) if (ClientSessionFactoryImpl.isDebug)
{ {
HornetQClientLogger.LOGGER.debug("Trying reconnection attempt " + count + "/" + reconnectAttempts); ActiveMQClientLogger.LOGGER.debug("Trying reconnection attempt " + count + "/" + reconnectAttempts);
} }
if (getConnection() != null) if (getConnection() != null)
{ {
if (HornetQClientLogger.LOGGER.isDebugEnabled()) if (ActiveMQClientLogger.LOGGER.isDebugEnabled())
{ {
HornetQClientLogger.LOGGER.debug("Reconnection successful"); ActiveMQClientLogger.LOGGER.debug("Reconnection successful");
} }
return; return;
} }
@ -947,7 +947,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
{ {
if (reconnectAttempts != 1) if (reconnectAttempts != 1)
{ {
HornetQClientLogger.LOGGER.failedToConnectToServer(reconnectAttempts); ActiveMQClientLogger.LOGGER.failedToConnectToServer(reconnectAttempts);
} }
return; return;
@ -955,7 +955,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
if (ClientSessionFactoryImpl.isTrace) if (ClientSessionFactoryImpl.isTrace)
{ {
HornetQClientLogger.LOGGER.waitingForRetry(interval, retryInterval, retryIntervalMultiplier); ActiveMQClientLogger.LOGGER.waitingForRetry(interval, retryInterval, retryIntervalMultiplier);
} }
try try
@ -982,7 +982,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
} }
else else
{ {
HornetQClientLogger.LOGGER.debug("Could not connect to any server. Didn't have reconnection configured on the ClientSessionFactory"); ActiveMQClientLogger.LOGGER.debug("Could not connect to any server. Didn't have reconnection configured on the ClientSessionFactory");
return; return;
} }
} }
@ -1086,14 +1086,14 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
{ {
if (ClientSessionFactoryImpl.isTrace) if (ClientSessionFactoryImpl.isTrace)
{ {
HornetQClientLogger.LOGGER.trace(this + "::Subscribing Topology"); ActiveMQClientLogger.LOGGER.trace(this + "::Subscribing Topology");
} }
clientProtocolManager.sendSubscribeTopology(serverLocator.isClusterConnection()); clientProtocolManager.sendSubscribeTopology(serverLocator.isClusterConnection());
} }
} }
else else
{ {
HornetQClientLogger.LOGGER.debug("serverLocator@" + System.identityHashCode(serverLocator + " had no topology")); ActiveMQClientLogger.LOGGER.debug("serverLocator@" + System.identityHashCode(serverLocator + " had no topology"));
} }
return connection; return connection;
@ -1133,7 +1133,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
{ {
if (!closed && finalizeCheck) if (!closed && finalizeCheck)
{ {
HornetQClientLogger.LOGGER.factoryLeftOpen(createTrace, System.identityHashCode(this)); ActiveMQClientLogger.LOGGER.factoryLeftOpen(createTrace, System.identityHashCode(this));
close(); close();
} }
@ -1184,11 +1184,11 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
CLOSE_RUNNABLES.add(this); CLOSE_RUNNABLES.add(this);
if (scaleDownTargetNodeID == null) if (scaleDownTargetNodeID == null)
{ {
conn.fail(HornetQClientMessageBundle.BUNDLE.disconnected()); conn.fail(ActiveMQClientMessageBundle.BUNDLE.disconnected());
} }
else else
{ {
conn.fail(HornetQClientMessageBundle.BUNDLE.disconnected(), scaleDownTargetNodeID); conn.fail(ActiveMQClientMessageBundle.BUNDLE.disconnected(), scaleDownTargetNodeID);
} }
} }
finally finally
@ -1234,7 +1234,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
{ {
if (ClientSessionFactoryImpl.isDebug) if (ClientSessionFactoryImpl.isDebug)
{ {
HornetQClientLogger.LOGGER.debug("Connector towards " + connector + " failed"); ActiveMQClientLogger.LOGGER.debug("Connector towards " + connector + " failed");
} }
try try
@ -1291,7 +1291,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
{ {
if (ClientSessionFactoryImpl.isDebug) if (ClientSessionFactoryImpl.isDebug)
{ {
HornetQClientLogger.LOGGER.debug("Trying to connect with connector = " + connectorFactory + ActiveMQClientLogger.LOGGER.debug("Trying to connect with connector = " + connectorFactory +
", parameters = " + ", parameters = " +
connectorConfig.getParams() + connectorConfig.getParams() +
" connector = " + " connector = " +
@ -1310,7 +1310,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
{ {
if (ClientSessionFactoryImpl.isDebug) if (ClientSessionFactoryImpl.isDebug)
{ {
HornetQClientLogger.LOGGER.debug("Trying backup config = " + backupConfig); ActiveMQClientLogger.LOGGER.debug("Trying backup config = " + backupConfig);
} }
ConnectorFactory backupConnectorFactory = instantiateConnectorFactory(backupConfig.getFactoryClassName()); ConnectorFactory backupConnectorFactory = instantiateConnectorFactory(backupConfig.getFactoryClassName());
@ -1325,7 +1325,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
if (ClientSessionFactoryImpl.isDebug) if (ClientSessionFactoryImpl.isDebug)
{ {
HornetQClientLogger.LOGGER.debug("Connected to the backup at " + backupConfig); ActiveMQClientLogger.LOGGER.debug("Connected to the backup at " + backupConfig);
} }
// Switching backup as live // Switching backup as live
@ -1338,7 +1338,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
{ {
if (ClientSessionFactoryImpl.isDebug) if (ClientSessionFactoryImpl.isDebug)
{ {
HornetQClientLogger.LOGGER.debug("Backup is not active yet"); ActiveMQClientLogger.LOGGER.debug("Backup is not active yet");
} }
} }
@ -1348,7 +1348,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
{ {
// Sanity catch for badly behaved remoting plugins // Sanity catch for badly behaved remoting plugins
HornetQClientLogger.LOGGER.createConnectorException(cause); ActiveMQClientLogger.LOGGER.createConnectorException(cause);
if (transportConnection != null) if (transportConnection != null)
{ {
@ -1392,7 +1392,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
} }
else else
{ {
HornetQClientLogger.LOGGER.debug("TheConn == null on ClientSessionFactoryImpl::DelegatingBufferHandler, ignoring packet"); ActiveMQClientLogger.LOGGER.debug("TheConn == null on ClientSessionFactoryImpl::DelegatingBufferHandler, ignoring packet");
} }
} }
} }
@ -1473,7 +1473,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
// We use a different thread to send the fail // We use a different thread to send the fail
// but the exception has to be created here to preserve the stack trace // but the exception has to be created here to preserve the stack trace
final ActiveMQException me = HornetQClientMessageBundle.BUNDLE.connectionTimedOut(connection.getTransportConnection()); final ActiveMQException me = ActiveMQClientMessageBundle.BUNDLE.connectionTimedOut(connection.getTransportConnection());
cancelled = true; cancelled = true;
@ -1521,7 +1521,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
{ {
if (ClientSessionFactoryImpl.isTrace) if (ClientSessionFactoryImpl.isTrace)
{ {
HornetQClientLogger.LOGGER.trace("Neither backup or live were active, will just give up now"); ActiveMQClientLogger.LOGGER.trace("Neither backup or live were active, will just give up now");
} }
return null; return null;
} }
@ -1535,9 +1535,9 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
schedulePing(); schedulePing();
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace("returning " + connection); ActiveMQClientLogger.LOGGER.trace("returning " + connection);
} }
return newConnection; return newConnection;
@ -1573,9 +1573,9 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
public void nodeDisconnected(RemotingConnection conn, String nodeID, String scaleDownTargetNodeID) public void nodeDisconnected(RemotingConnection conn, String nodeID, String scaleDownTargetNodeID)
{ {
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace("Disconnect being called on client:" + ActiveMQClientLogger.LOGGER.trace("Disconnect being called on client:" +
" server locator = " + " server locator = " +
serverLocator + serverLocator +
" notifying node " + " notifying node " +

View File

@ -36,8 +36,8 @@ import org.apache.activemq.api.core.client.ClientSessionFactory;
import org.apache.activemq.api.core.client.FailoverEventListener; import org.apache.activemq.api.core.client.FailoverEventListener;
import org.apache.activemq.api.core.client.SendAcknowledgementHandler; import org.apache.activemq.api.core.client.SendAcknowledgementHandler;
import org.apache.activemq.api.core.client.SessionFailureListener; import org.apache.activemq.api.core.client.SessionFailureListener;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
import org.apache.activemq.core.client.HornetQClientMessageBundle; import org.apache.activemq.core.client.ActiveMQClientMessageBundle;
import org.apache.activemq.core.remoting.FailureListener; import org.apache.activemq.core.remoting.FailureListener;
import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.spi.core.protocol.RemotingConnection;
import org.apache.activemq.spi.core.remoting.ConsumerContext; import org.apache.activemq.spi.core.remoting.ConsumerContext;
@ -492,19 +492,19 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
if (outcomeKnown) if (outcomeKnown)
{ {
throw HornetQClientMessageBundle.BUNDLE.txRolledBack(); throw ActiveMQClientMessageBundle.BUNDLE.txRolledBack();
} }
throw HornetQClientMessageBundle.BUNDLE.txOutcomeUnknown(); throw ActiveMQClientMessageBundle.BUNDLE.txOutcomeUnknown();
} }
public void commit() throws ActiveMQException public void commit() throws ActiveMQException
{ {
checkClosed(); checkClosed();
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace("Sending commit"); ActiveMQClientLogger.LOGGER.trace("Sending commit");
} }
/* /*
@ -565,9 +565,9 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
public void rollback(final boolean isLastMessageAsDelivered) throws ActiveMQException public void rollback(final boolean isLastMessageAsDelivered) throws ActiveMQException
{ {
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace("calling rollback(isLastMessageAsDelivered=" + isLastMessageAsDelivered + ")"); ActiveMQClientLogger.LOGGER.trace("calling rollback(isLastMessageAsDelivered=" + isLastMessageAsDelivered + ")");
} }
checkClosed(); checkClosed();
@ -651,7 +651,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
{ {
if (rollbackOnly) if (rollbackOnly)
{ {
HornetQClientLogger.LOGGER.resettingSessionAfterFailure(); ActiveMQClientLogger.LOGGER.resettingSessionAfterFailure();
rollback(false); rollback(false);
} }
} }
@ -771,9 +771,9 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
} }
checkClosed(); checkClosed();
if (HornetQClientLogger.LOGGER.isDebugEnabled()) if (ActiveMQClientLogger.LOGGER.isDebugEnabled())
{ {
HornetQClientLogger.LOGGER.debug("client ack messageID = " + message.getMessageID()); ActiveMQClientLogger.LOGGER.debug("client ack messageID = " + message.getMessageID());
} }
startCall(); startCall();
@ -900,7 +900,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
} }
catch (ActiveMQException e) catch (ActiveMQException e)
{ {
HornetQClientLogger.LOGGER.unableToCloseConsumer(e); ActiveMQClientLogger.LOGGER.unableToCloseConsumer(e);
} }
} }
}); });
@ -911,13 +911,13 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
{ {
if (closed) if (closed)
{ {
HornetQClientLogger.LOGGER.debug("Session was already closed, giving up now, this=" + this); ActiveMQClientLogger.LOGGER.debug("Session was already closed, giving up now, this=" + this);
return; return;
} }
if (HornetQClientLogger.LOGGER.isDebugEnabled()) if (ActiveMQClientLogger.LOGGER.isDebugEnabled())
{ {
HornetQClientLogger.LOGGER.debug("Calling close on session " + this); ActiveMQClientLogger.LOGGER.debug("Calling close on session " + this);
} }
try try
@ -936,7 +936,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
// Session close should always return without exception // Session close should always return without exception
// Note - we only log at trace // Note - we only log at trace
HornetQClientLogger.LOGGER.trace("Failed to close session", e); ActiveMQClientLogger.LOGGER.trace("Failed to close session", e);
} }
doCleanup(false); doCleanup(false);
@ -993,9 +993,9 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
if (!reattached) if (!reattached)
{ {
if (HornetQClientLogger.LOGGER.isDebugEnabled()) if (ActiveMQClientLogger.LOGGER.isDebugEnabled())
{ {
HornetQClientLogger.LOGGER.debug("ClientSession couldn't be reattached, creating a new session"); ActiveMQClientLogger.LOGGER.debug("ClientSession couldn't be reattached, creating a new session");
} }
for (ClientConsumerInternal consumer : cloneConsumers()) for (ClientConsumerInternal consumer : cloneConsumers())
@ -1061,7 +1061,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
} }
catch (Throwable t) catch (Throwable t)
{ {
HornetQClientLogger.LOGGER.failedToHandleFailover(t); ActiveMQClientLogger.LOGGER.failedToHandleFailover(t);
} }
finally finally
{ {
@ -1179,7 +1179,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
{ {
if (concurrentCall.incrementAndGet() > 1) if (concurrentCall.incrementAndGet() > 1)
{ {
HornetQClientLogger.LOGGER.invalidConcurrentSessionUsage(new Exception("trace")); ActiveMQClientLogger.LOGGER.invalidConcurrentSessionUsage(new Exception("trace"));
} }
} }
@ -1197,16 +1197,16 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
public void commit(final Xid xid, final boolean onePhase) throws XAException public void commit(final Xid xid, final boolean onePhase) throws XAException
{ {
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace("call commit(xid=" + convert(xid)); ActiveMQClientLogger.LOGGER.trace("call commit(xid=" + convert(xid));
} }
checkXA(); checkXA();
// we should never throw rollback if we have already prepared // we should never throw rollback if we have already prepared
if (rollbackOnly) if (rollbackOnly)
{ {
HornetQClientLogger.LOGGER.commitAfterFailover(); ActiveMQClientLogger.LOGGER.commitAfterFailover();
} }
// Note - don't need to flush acks since the previous end would have // Note - don't need to flush acks since the previous end would have
@ -1224,7 +1224,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
} }
catch (Throwable t) catch (Throwable t)
{ {
HornetQClientLogger.LOGGER.failoverDuringCommit(); ActiveMQClientLogger.LOGGER.failoverDuringCommit();
// Any error on commit -> RETRY // Any error on commit -> RETRY
// We can't rollback a Prepared TX for definition // We can't rollback a Prepared TX for definition
@ -1240,9 +1240,9 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
public void end(final Xid xid, final int flags) throws XAException public void end(final Xid xid, final int flags) throws XAException
{ {
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace("Calling end:: " + convert(xid) + ", flags=" + convertTXFlag(flags)); ActiveMQClientLogger.LOGGER.trace("Calling end:: " + convert(xid) + ", flags=" + convertTXFlag(flags));
} }
checkXA(); checkXA();
@ -1257,7 +1257,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
} }
catch (Throwable ignored) catch (Throwable ignored)
{ {
HornetQClientLogger.LOGGER.debug("Error on rollback during end call!", ignored); ActiveMQClientLogger.LOGGER.debug("Error on rollback during end call!", ignored);
} }
throw new XAException(XAException.XA_RBOTHER); throw new XAException(XAException.XA_RBOTHER);
} }
@ -1282,7 +1282,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
} }
catch (Throwable t) catch (Throwable t)
{ {
HornetQClientLogger.LOGGER.errorCallingEnd(t); ActiveMQClientLogger.LOGGER.errorCallingEnd(t);
// This could occur if the TM interrupts the thread // This could occur if the TM interrupts the thread
XAException xaException = new XAException(XAException.XAER_RMERR); XAException xaException = new XAException(XAException.XAER_RMERR);
xaException.initCause(t); xaException.initCause(t);
@ -1392,9 +1392,9 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
{ {
return (ClientSessionInternal) xares; return (ClientSessionInternal) xares;
} }
else if (xares instanceof HornetQXAResource) else if (xares instanceof ActiveMQXAResource)
{ {
return getSessionInternalFromXAResource(((HornetQXAResource)xares).getResource()); return getSessionInternalFromXAResource(((ActiveMQXAResource)xares).getResource());
} }
return null; return null;
} }
@ -1402,9 +1402,9 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
public int prepare(final Xid xid) throws XAException public int prepare(final Xid xid) throws XAException
{ {
checkXA(); checkXA();
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace("Calling prepare:: " + convert(xid)); ActiveMQClientLogger.LOGGER.trace("Calling prepare:: " + convert(xid));
} }
@ -1439,7 +1439,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
{ {
// ignore and rollback // ignore and rollback
} }
HornetQClientLogger.LOGGER.failoverDuringPrepareRollingBack(); ActiveMQClientLogger.LOGGER.failoverDuringPrepareRollingBack();
try try
{ {
rollback(false); rollback(false);
@ -1452,12 +1452,12 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
throw xaException; throw xaException;
} }
HornetQClientLogger.LOGGER.errorDuringPrepare(e); ActiveMQClientLogger.LOGGER.errorDuringPrepare(e);
throw new XAException(XAException.XA_RBOTHER); throw new XAException(XAException.XA_RBOTHER);
} }
HornetQClientLogger.LOGGER.errorDuringPrepare(e); ActiveMQClientLogger.LOGGER.errorDuringPrepare(e);
// This should never occur // This should never occur
XAException xaException = new XAException(XAException.XAER_RMERR); XAException xaException = new XAException(XAException.XAER_RMERR);
@ -1466,7 +1466,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
} }
catch (Throwable t) catch (Throwable t)
{ {
HornetQClientLogger.LOGGER.errorDuringPrepare(t); ActiveMQClientLogger.LOGGER.errorDuringPrepare(t);
// This could occur if the TM interrupts the thread // This could occur if the TM interrupts the thread
XAException xaException = new XAException(XAException.XAER_RMERR); XAException xaException = new XAException(XAException.XAER_RMERR);
@ -1505,9 +1505,9 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
{ {
checkXA(); checkXA();
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace("Calling rollback:: " + convert(xid)); ActiveMQClientLogger.LOGGER.trace("Calling rollback:: " + convert(xid));
} }
try try
@ -1569,9 +1569,9 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
public void start(final Xid xid, final int flags) throws XAException public void start(final Xid xid, final int flags) throws XAException
{ {
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace("Calling start:: " + convert(xid) + " clientXID=" + xid + " flags = " + convertTXFlag(flags)); ActiveMQClientLogger.LOGGER.trace("Calling start:: " + convert(xid) + " clientXID=" + xid + " flags = " + convertTXFlag(flags));
} }
checkXA(); checkXA();
@ -1632,7 +1632,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
} }
catch (Exception e) catch (Exception e)
{ {
HornetQClientLogger.LOGGER.failedToCleanupSession(e); ActiveMQClientLogger.LOGGER.failedToCleanupSession(e);
} }
} }
@ -1742,7 +1742,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
if (durable && temp) if (durable && temp)
{ {
throw HornetQClientMessageBundle.BUNDLE.queueMisConfigured(); throw ActiveMQClientMessageBundle.BUNDLE.queueMisConfigured();
} }
startCall(); startCall();
@ -1760,7 +1760,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
{ {
if (!xa) if (!xa)
{ {
HornetQClientLogger.LOGGER.sessionNotXA(); ActiveMQClientLogger.LOGGER.sessionNotXA();
throw new XAException(XAException.XAER_RMERR); throw new XAException(XAException.XAER_RMERR);
} }
} }
@ -1769,7 +1769,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
{ {
if (closed || inClose) if (closed || inClose)
{ {
throw HornetQClientMessageBundle.BUNDLE.sessionClosed(); throw ActiveMQClientMessageBundle.BUNDLE.sessionClosed();
} }
} }
@ -1784,9 +1784,9 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
private void doCleanup(boolean failingOver) private void doCleanup(boolean failingOver)
{ {
if (HornetQClientLogger.LOGGER.isDebugEnabled()) if (ActiveMQClientLogger.LOGGER.isDebugEnabled())
{ {
HornetQClientLogger.LOGGER.debug("calling cleanup on " + this); ActiveMQClientLogger.LOGGER.debug("calling cleanup on " + this);
} }
synchronized (this) synchronized (this)
@ -1936,7 +1936,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
{ {
if (!confirmationWindowWarning.warningIssued.get()) if (!confirmationWindowWarning.warningIssued.get())
{ {
HornetQClientLogger.LOGGER.confirmationWindowDisabledWarning(); ActiveMQClientLogger.LOGGER.confirmationWindowDisabledWarning();
confirmationWindowWarning.warningIssued.set(true); confirmationWindowWarning.warningIssued.set(true);
} }
return false; return false;

View File

@ -22,9 +22,9 @@ import org.apache.activemq.api.core.ActiveMQBuffer;
import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.api.core.ActiveMQBuffers;
import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.ActiveMQException;
import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.SimpleString;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
import org.apache.activemq.utils.DataConstants; import org.apache.activemq.utils.DataConstants;
import org.apache.activemq.utils.HornetQBufferInputStream; import org.apache.activemq.utils.ActiveMQBufferInputStream;
import org.apache.activemq.utils.InflaterReader; import org.apache.activemq.utils.InflaterReader;
import org.apache.activemq.utils.InflaterWriter; import org.apache.activemq.utils.InflaterWriter;
import org.apache.activemq.utils.UTF8Util; import org.apache.activemq.utils.UTF8Util;
@ -102,7 +102,7 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll
{ {
try try
{ {
InputStream input = new HornetQBufferInputStream(bufferDelegate); InputStream input = new ActiveMQBufferInputStream(bufferDelegate);
dataInput = new DataInputStream(new InflaterReader(input)); dataInput = new DataInputStream(new InflaterReader(input));
} }
@ -432,7 +432,7 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll
int nReadBytes = getStream().read(dst, dstIndex, length); int nReadBytes = getStream().read(dst, dstIndex, length);
if (nReadBytes < length) if (nReadBytes < length)
{ {
HornetQClientLogger.LOGGER.compressedLargeMessageError(length, nReadBytes); ActiveMQClientLogger.LOGGER.compressedLargeMessageError(length, nReadBytes);
} }
} }
catch (Exception e) catch (Exception e)

View File

@ -27,7 +27,7 @@ import org.apache.activemq.api.core.client.ClientSessionFactory;
import org.apache.activemq.api.core.client.FailoverEventListener; import org.apache.activemq.api.core.client.FailoverEventListener;
import org.apache.activemq.api.core.client.SendAcknowledgementHandler; import org.apache.activemq.api.core.client.SendAcknowledgementHandler;
import org.apache.activemq.api.core.client.SessionFailureListener; import org.apache.activemq.api.core.client.SessionFailureListener;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.spi.core.protocol.RemotingConnection;
import org.apache.activemq.spi.core.remoting.ConsumerContext; import org.apache.activemq.spi.core.remoting.ConsumerContext;
import org.apache.activemq.utils.ConcurrentHashSet; import org.apache.activemq.utils.ConcurrentHashSet;
@ -55,11 +55,11 @@ public class DelegatingSession implements ClientSessionInternal
public static void dumpSessionCreationStacks() public static void dumpSessionCreationStacks()
{ {
HornetQClientLogger.LOGGER.dumpingSessionStacks(); ActiveMQClientLogger.LOGGER.dumpingSessionStacks();
for (DelegatingSession session : DelegatingSession.sessions) for (DelegatingSession session : DelegatingSession.sessions)
{ {
HornetQClientLogger.LOGGER.dumpingSessionStack(session.creationStack); ActiveMQClientLogger.LOGGER.dumpingSessionStack(session.creationStack);
} }
} }
@ -76,7 +76,7 @@ public class DelegatingSession implements ClientSessionInternal
// //
if (!closed && !session.isClosed()) if (!closed && !session.isClosed())
{ {
HornetQClientLogger.LOGGER.clientSessionNotClosed(creationStack, System.identityHashCode(this)); ActiveMQClientLogger.LOGGER.clientSessionNotClosed(creationStack, System.identityHashCode(this));
close(); close();
} }

View File

@ -32,8 +32,8 @@ import org.apache.activemq.api.core.ActiveMQException;
import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.api.core.ActiveMQExceptionType;
import org.apache.activemq.api.core.ActiveMQInterruptedException; import org.apache.activemq.api.core.ActiveMQInterruptedException;
import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.SimpleString;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
import org.apache.activemq.core.client.HornetQClientMessageBundle; import org.apache.activemq.core.client.ActiveMQClientMessageBundle;
import org.apache.activemq.utils.DataConstants; import org.apache.activemq.utils.DataConstants;
import org.apache.activemq.utils.UTF8Util; import org.apache.activemq.utils.UTF8Util;
@ -191,7 +191,7 @@ public class LargeMessageControllerImpl implements LargeMessageController
} }
catch (Exception e) catch (Exception e)
{ {
HornetQClientLogger.LOGGER.errorAddingPacket(e); ActiveMQClientLogger.LOGGER.errorAddingPacket(e);
handledException = e; handledException = e;
} }
} }
@ -205,7 +205,7 @@ public class LargeMessageControllerImpl implements LargeMessageController
} }
catch (Exception e) catch (Exception e)
{ {
HornetQClientLogger.LOGGER.errorAddingPacket(e); ActiveMQClientLogger.LOGGER.errorAddingPacket(e);
handledException = e; handledException = e;
} }
} }
@ -223,7 +223,7 @@ public class LargeMessageControllerImpl implements LargeMessageController
} }
catch (Exception e) catch (Exception e)
{ {
HornetQClientLogger.LOGGER.errorAddingPacket(e); ActiveMQClientLogger.LOGGER.errorAddingPacket(e);
handledException = e; handledException = e;
} }
} }
@ -231,7 +231,7 @@ public class LargeMessageControllerImpl implements LargeMessageController
public void cancel() public void cancel()
{ {
this.handledException = HornetQClientMessageBundle.BUNDLE.largeMessageInterrupted(); this.handledException = ActiveMQClientMessageBundle.BUNDLE.largeMessageInterrupted();
synchronized (this) synchronized (this)
{ {
@ -249,7 +249,7 @@ public class LargeMessageControllerImpl implements LargeMessageController
catch (Exception ignored) catch (Exception ignored)
{ {
// what else can we do here? // what else can we do here?
HornetQClientLogger.LOGGER.errorCallingCancel(ignored); ActiveMQClientLogger.LOGGER.errorCallingCancel(ignored);
} }
largeMessageData.offer(new LargeData()); largeMessageData.offer(new LargeData());
@ -308,7 +308,7 @@ public class LargeMessageControllerImpl implements LargeMessageController
{ {
if (streamClosed) if (streamClosed)
{ {
throw HornetQClientMessageBundle.BUNDLE.largeMessageLostSession(); throw ActiveMQClientMessageBundle.BUNDLE.largeMessageLostSession();
} }
setOutputStream(output); setOutputStream(output);
waitCompletion(0); waitCompletion(0);
@ -354,11 +354,11 @@ public class LargeMessageControllerImpl implements LargeMessageController
{ {
if (timeWait != 0 && System.currentTimeMillis() > timeOut) if (timeWait != 0 && System.currentTimeMillis() > timeOut)
{ {
throw HornetQClientMessageBundle.BUNDLE.timeoutOnLargeMessage(); throw ActiveMQClientMessageBundle.BUNDLE.timeoutOnLargeMessage();
} }
else if (System.currentTimeMillis() > timeOut && !packetAdded) else if (System.currentTimeMillis() > timeOut && !packetAdded)
{ {
throw HornetQClientMessageBundle.BUNDLE.timeoutOnLargeMessage(); throw ActiveMQClientMessageBundle.BUNDLE.timeoutOnLargeMessage();
} }
} }
} }
@ -613,7 +613,7 @@ public class LargeMessageControllerImpl implements LargeMessageController
} }
catch (Exception e) catch (Exception e)
{ {
HornetQClientLogger.LOGGER.errorReadingIndex(e); ActiveMQClientLogger.LOGGER.errorReadingIndex(e);
throw new RuntimeException(e.getMessage(), e); throw new RuntimeException(e.getMessage(), e);
} }
this.readerIndex = readerIndex; this.readerIndex = readerIndex;
@ -642,7 +642,7 @@ public class LargeMessageControllerImpl implements LargeMessageController
} }
catch (Exception e) catch (Exception e)
{ {
HornetQClientLogger.LOGGER.errorSettingIndex(e); ActiveMQClientLogger.LOGGER.errorSettingIndex(e);
throw new RuntimeException(e.getMessage(), e); throw new RuntimeException(e.getMessage(), e);
} }
this.readerIndex = readerIndex; this.readerIndex = readerIndex;
@ -694,7 +694,7 @@ public class LargeMessageControllerImpl implements LargeMessageController
} }
catch (Exception e) catch (Exception e)
{ {
HornetQClientLogger.LOGGER.errorReSettingIndex(e); ActiveMQClientLogger.LOGGER.errorReSettingIndex(e);
throw new RuntimeException(e.getMessage(), e); throw new RuntimeException(e.getMessage(), e);
} }
} }
@ -1199,7 +1199,7 @@ public class LargeMessageControllerImpl implements LargeMessageController
} }
catch (IOException e) catch (IOException e)
{ {
throw HornetQClientMessageBundle.BUNDLE.errorWritingLargeMessage(e); throw ActiveMQClientMessageBundle.BUNDLE.errorWritingLargeMessage(e);
} }
} }
@ -1327,7 +1327,7 @@ public class LargeMessageControllerImpl implements LargeMessageController
} }
catch (Exception e) catch (Exception e)
{ {
HornetQClientLogger.LOGGER.errorReadingCache(e); ActiveMQClientLogger.LOGGER.errorReadingCache(e);
throw new RuntimeException(e.getMessage(), e); throw new RuntimeException(e.getMessage(), e);
} }
finally finally
@ -1377,7 +1377,7 @@ public class LargeMessageControllerImpl implements LargeMessageController
} }
catch (Exception e) catch (Exception e)
{ {
HornetQClientLogger.LOGGER.errorClosingCache(e); ActiveMQClientLogger.LOGGER.errorClosingCache(e);
} }
cachedChannel = null; cachedChannel = null;
} }
@ -1390,7 +1390,7 @@ public class LargeMessageControllerImpl implements LargeMessageController
} }
catch (Exception e) catch (Exception e)
{ {
HornetQClientLogger.LOGGER.errorClosingCache(e); ActiveMQClientLogger.LOGGER.errorClosingCache(e);
} }
cachedRAFile = null; cachedRAFile = null;
} }
@ -1409,7 +1409,7 @@ public class LargeMessageControllerImpl implements LargeMessageController
} }
catch (Exception e) catch (Exception e)
{ {
HornetQClientLogger.LOGGER.errorFinalisingCache(e); ActiveMQClientLogger.LOGGER.errorFinalisingCache(e);
} }
} }
} }

View File

@ -45,21 +45,21 @@ import org.apache.activemq.api.core.Pair;
import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.TransportConfiguration;
import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ClientSessionFactory;
import org.apache.activemq.api.core.client.ClusterTopologyListener; import org.apache.activemq.api.core.client.ClusterTopologyListener;
import org.apache.activemq.api.core.client.HornetQClient; import org.apache.activemq.api.core.client.ActiveMQClient;
import org.apache.activemq.api.core.client.TopologyMember; import org.apache.activemq.api.core.client.TopologyMember;
import org.apache.activemq.api.core.client.loadbalance.ConnectionLoadBalancingPolicy; import org.apache.activemq.api.core.client.loadbalance.ConnectionLoadBalancingPolicy;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
import org.apache.activemq.core.client.HornetQClientMessageBundle; import org.apache.activemq.core.client.ActiveMQClientMessageBundle;
import org.apache.activemq.core.cluster.DiscoveryEntry; import org.apache.activemq.core.cluster.DiscoveryEntry;
import org.apache.activemq.core.cluster.DiscoveryGroup; import org.apache.activemq.core.cluster.DiscoveryGroup;
import org.apache.activemq.core.cluster.DiscoveryListener; import org.apache.activemq.core.cluster.DiscoveryListener;
import org.apache.activemq.core.protocol.core.impl.HornetQClientProtocolManagerFactory; import org.apache.activemq.core.protocol.core.impl.ActiveMQClientProtocolManagerFactory;
import org.apache.activemq.core.remoting.FailureListener; import org.apache.activemq.core.remoting.FailureListener;
import org.apache.activemq.spi.core.remoting.ClientProtocolManager; import org.apache.activemq.spi.core.remoting.ClientProtocolManager;
import org.apache.activemq.spi.core.remoting.ClientProtocolManagerFactory; import org.apache.activemq.spi.core.remoting.ClientProtocolManagerFactory;
import org.apache.activemq.spi.core.remoting.Connector; import org.apache.activemq.spi.core.remoting.Connector;
import org.apache.activemq.utils.ClassloadingUtil; import org.apache.activemq.utils.ClassloadingUtil;
import org.apache.activemq.utils.HornetQThreadFactory; import org.apache.activemq.utils.ActiveMQThreadFactory;
import org.apache.activemq.utils.UUIDGenerator; import org.apache.activemq.utils.UUIDGenerator;
/** /**
@ -84,7 +84,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
// This is the default value // This is the default value
private ClientProtocolManagerFactory protocolManagerFactory = HornetQClientProtocolManagerFactory.getInstance(); private ClientProtocolManagerFactory protocolManagerFactory = ActiveMQClientProtocolManagerFactory.getInstance();
private final boolean ha; private final boolean ha;
@ -267,7 +267,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
{ {
if (globalThreadPool == null) if (globalThreadPool == null)
{ {
ThreadFactory factory = new HornetQThreadFactory("HornetQ-client-global-threads", true, getThisClassLoader()); ThreadFactory factory = new ActiveMQThreadFactory("ActiveMQ-client-global-threads", true, getThisClassLoader());
globalThreadPool = Executors.newCachedThreadPool(factory); globalThreadPool = Executors.newCachedThreadPool(factory);
} }
@ -279,11 +279,11 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
{ {
if (globalScheduledThreadPool == null) if (globalScheduledThreadPool == null)
{ {
ThreadFactory factory = new HornetQThreadFactory("HornetQ-client-global-scheduled-threads", ThreadFactory factory = new ActiveMQThreadFactory("ActiveMQ-client-global-scheduled-threads",
true, true,
getThisClassLoader()); getThisClassLoader());
globalScheduledThreadPool = Executors.newScheduledThreadPool(HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, globalScheduledThreadPool = Executors.newScheduledThreadPool(ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE,
factory); factory);
} }
@ -307,7 +307,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
{ {
this.shutdownPool = true; this.shutdownPool = true;
ThreadFactory factory = new HornetQThreadFactory("HornetQ-client-factory-threads-" + System.identityHashCode(this), ThreadFactory factory = new ActiveMQThreadFactory("ActiveMQ-client-factory-threads-" + System.identityHashCode(this),
true, true,
getThisClassLoader()); getThisClassLoader());
@ -320,7 +320,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
threadPool = Executors.newFixedThreadPool(threadPoolMaxSize, factory); threadPool = Executors.newFixedThreadPool(threadPoolMaxSize, factory);
} }
factory = new HornetQThreadFactory("HornetQ-client-factory-pinger-threads-" + System.identityHashCode(this), factory = new ActiveMQThreadFactory("ActiveMQ-client-factory-pinger-threads-" + System.identityHashCode(this),
true, true,
getThisClassLoader()); getThisClassLoader());
@ -386,7 +386,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
catch (Exception e) catch (Exception e)
{ {
state = null; state = null;
throw HornetQClientMessageBundle.BUNDLE.failedToInitialiseSessionFactory(e); throw ActiveMQClientMessageBundle.BUNDLE.failedToInitialiseSessionFactory(e);
} }
} }
} }
@ -415,65 +415,65 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
this.nodeID = UUIDGenerator.getInstance().generateStringUUID(); this.nodeID = UUIDGenerator.getInstance().generateStringUUID();
clientFailureCheckPeriod = HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD; clientFailureCheckPeriod = ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD;
connectionTTL = HornetQClient.DEFAULT_CONNECTION_TTL; connectionTTL = ActiveMQClient.DEFAULT_CONNECTION_TTL;
callTimeout = HornetQClient.DEFAULT_CALL_TIMEOUT; callTimeout = ActiveMQClient.DEFAULT_CALL_TIMEOUT;
callFailoverTimeout = HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT; callFailoverTimeout = ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT;
minLargeMessageSize = HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; minLargeMessageSize = ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE;
consumerWindowSize = HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE; consumerWindowSize = ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE;
consumerMaxRate = HornetQClient.DEFAULT_CONSUMER_MAX_RATE; consumerMaxRate = ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE;
confirmationWindowSize = HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE; confirmationWindowSize = ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE;
producerWindowSize = HornetQClient.DEFAULT_PRODUCER_WINDOW_SIZE; producerWindowSize = ActiveMQClient.DEFAULT_PRODUCER_WINDOW_SIZE;
producerMaxRate = HornetQClient.DEFAULT_PRODUCER_MAX_RATE; producerMaxRate = ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE;
blockOnAcknowledge = HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE; blockOnAcknowledge = ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE;
blockOnDurableSend = HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND; blockOnDurableSend = ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND;
blockOnNonDurableSend = HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND; blockOnNonDurableSend = ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND;
autoGroup = HornetQClient.DEFAULT_AUTO_GROUP; autoGroup = ActiveMQClient.DEFAULT_AUTO_GROUP;
preAcknowledge = HornetQClient.DEFAULT_PRE_ACKNOWLEDGE; preAcknowledge = ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE;
ackBatchSize = HornetQClient.DEFAULT_ACK_BATCH_SIZE; ackBatchSize = ActiveMQClient.DEFAULT_ACK_BATCH_SIZE;
connectionLoadBalancingPolicyClassName = HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME; connectionLoadBalancingPolicyClassName = ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME;
useGlobalPools = HornetQClient.DEFAULT_USE_GLOBAL_POOLS; useGlobalPools = ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS;
scheduledThreadPoolMaxSize = HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE; scheduledThreadPoolMaxSize = ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE;
threadPoolMaxSize = HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE; threadPoolMaxSize = ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE;
retryInterval = HornetQClient.DEFAULT_RETRY_INTERVAL; retryInterval = ActiveMQClient.DEFAULT_RETRY_INTERVAL;
retryIntervalMultiplier = HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER; retryIntervalMultiplier = ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER;
maxRetryInterval = HornetQClient.DEFAULT_MAX_RETRY_INTERVAL; maxRetryInterval = ActiveMQClient.DEFAULT_MAX_RETRY_INTERVAL;
reconnectAttempts = HornetQClient.DEFAULT_RECONNECT_ATTEMPTS; reconnectAttempts = ActiveMQClient.DEFAULT_RECONNECT_ATTEMPTS;
initialConnectAttempts = HornetQClient.INITIAL_CONNECT_ATTEMPTS; initialConnectAttempts = ActiveMQClient.INITIAL_CONNECT_ATTEMPTS;
failoverOnInitialConnection = HornetQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION; failoverOnInitialConnection = ActiveMQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION;
cacheLargeMessagesClient = HornetQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT; cacheLargeMessagesClient = ActiveMQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT;
initialMessagePacketSize = HornetQClient.DEFAULT_INITIAL_MESSAGE_PACKET_SIZE; initialMessagePacketSize = ActiveMQClient.DEFAULT_INITIAL_MESSAGE_PACKET_SIZE;
cacheLargeMessagesClient = HornetQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT; cacheLargeMessagesClient = ActiveMQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT;
compressLargeMessage = HornetQClient.DEFAULT_COMPRESS_LARGE_MESSAGES; compressLargeMessage = ActiveMQClient.DEFAULT_COMPRESS_LARGE_MESSAGES;
clusterConnection = false; clusterConnection = false;
} }
@ -633,7 +633,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
{ {
if (!isClosed()) if (!isClosed())
{ {
HornetQClientLogger.LOGGER.errorConnectingToNodes(e); ActiveMQClientLogger.LOGGER.errorConnectingToNodes(e);
} }
} }
} }
@ -652,7 +652,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
if (protocolManagerFactory == null) if (protocolManagerFactory == null)
{ {
// this could happen over serialization from older versions // this could happen over serialization from older versions
protocolManagerFactory = HornetQClientProtocolManagerFactory.getInstance(); protocolManagerFactory = ActiveMQClientProtocolManagerFactory.getInstance();
} }
return protocolManagerFactory; return protocolManagerFactory;
} }
@ -711,9 +711,9 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
{ {
TopologyMember topologyMember = topology.getMember(nodeID); TopologyMember topologyMember = topology.getMember(nodeID);
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace("Creating connection factory towards " + nodeID + " = " + topologyMember + ", topology=" + topology.describe()); ActiveMQClientLogger.LOGGER.trace("Creating connection factory towards " + nodeID + " = " + topologyMember + ", topology=" + topology.describe());
} }
if (topologyMember == null) if (topologyMember == null)
@ -856,7 +856,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
if (!ok) if (!ok)
{ {
throw HornetQClientMessageBundle.BUNDLE.connectionTimedOutInInitialBroadcast(); throw ActiveMQClientMessageBundle.BUNDLE.connectionTimedOutInInitialBroadcast();
} }
} }
@ -873,7 +873,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
TransportConfiguration tc = selectConnector(); TransportConfiguration tc = selectConnector();
if (tc == null) if (tc == null)
{ {
throw HornetQClientMessageBundle.BUNDLE.noTCForSessionFactory(); throw ActiveMQClientMessageBundle.BUNDLE.noTCForSessionFactory();
} }
// try each factory in the list until we find one which works // try each factory in the list until we find one which works
@ -917,11 +917,11 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
if (topologyArray != null && attempts == topologyArray.length) if (topologyArray != null && attempts == topologyArray.length)
{ {
throw HornetQClientMessageBundle.BUNDLE.cannotConnectToServers(); throw ActiveMQClientMessageBundle.BUNDLE.cannotConnectToServers();
} }
if (topologyArray == null && attempts == this.getNumInitialConnectors()) if (topologyArray == null && attempts == this.getNumInitialConnectors())
{ {
throw HornetQClientMessageBundle.BUNDLE.cannotConnectToServers(); throw ActiveMQClientMessageBundle.BUNDLE.cannotConnectToServers();
} }
} }
retry = true; retry = true;
@ -962,7 +962,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
{ {
if (factory != null) if (factory != null)
factory.cleanup(); factory.cleanup();
throw HornetQClientMessageBundle.BUNDLE.connectionTimedOutOnReceiveTopology(discoveryGroup); throw ActiveMQClientMessageBundle.BUNDLE.connectionTimedOutOnReceiveTopology(discoveryGroup);
} }
addFactory(factory); addFactory(factory);
@ -1465,9 +1465,9 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
{ {
if (state == STATE.CLOSED) if (state == STATE.CLOSED)
{ {
if (HornetQClientLogger.LOGGER.isDebugEnabled()) if (ActiveMQClientLogger.LOGGER.isDebugEnabled())
{ {
HornetQClientLogger.LOGGER.debug(this + " is already closed when calling closed"); ActiveMQClientLogger.LOGGER.debug(this + " is already closed when calling closed");
} }
return; return;
} }
@ -1495,7 +1495,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
} }
catch (Exception e) catch (Exception e)
{ {
HornetQClientLogger.LOGGER.failedToStopDiscovery(e); ActiveMQClientLogger.LOGGER.failedToStopDiscovery(e);
} }
} }
} }
@ -1551,7 +1551,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
{ {
if (!threadPool.awaitTermination(10000, TimeUnit.MILLISECONDS)) if (!threadPool.awaitTermination(10000, TimeUnit.MILLISECONDS))
{ {
HornetQClientLogger.LOGGER.timedOutWaitingForTermination(); ActiveMQClientLogger.LOGGER.timedOutWaitingForTermination();
} }
} }
catch (InterruptedException e) catch (InterruptedException e)
@ -1568,7 +1568,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
{ {
if (!scheduledThreadPool.awaitTermination(10000, TimeUnit.MILLISECONDS)) if (!scheduledThreadPool.awaitTermination(10000, TimeUnit.MILLISECONDS))
{ {
HornetQClientLogger.LOGGER.timedOutWaitingForScheduledPoolTermination(); ActiveMQClientLogger.LOGGER.timedOutWaitingForScheduledPoolTermination();
} }
} }
catch (InterruptedException e) catch (InterruptedException e)
@ -1598,9 +1598,9 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
return; return;
} }
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace("nodeDown " + this + " nodeID=" + nodeID + " as being down", new Exception("trace")); ActiveMQClientLogger.LOGGER.trace("nodeDown " + this + " nodeID=" + nodeID + " as being down", new Exception("trace"));
} }
topology.removeMember(eventTime, nodeID); topology.removeMember(eventTime, nodeID);
@ -1641,9 +1641,9 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
final Pair<TransportConfiguration, TransportConfiguration> connectorPair, final Pair<TransportConfiguration, TransportConfiguration> connectorPair,
final boolean last) final boolean last)
{ {
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace("NodeUp " + this + "::nodeID=" + nodeID + ", connectorPair=" + connectorPair, new Exception("trace")); ActiveMQClientLogger.LOGGER.trace("NodeUp " + this + "::nodeID=" + nodeID + ", connectorPair=" + connectorPair, new Exception("trace"));
} }
TopologyMemberImpl member = new TopologyMemberImpl(nodeID, backupGroupName, scaleDownGroupName, connectorPair.getA(), connectorPair.getB()); TopologyMemberImpl member = new TopologyMemberImpl(nodeID, backupGroupName, scaleDownGroupName, connectorPair.getA(), connectorPair.getB());
@ -1757,7 +1757,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
} }
catch (ActiveMQException e) catch (ActiveMQException e)
{ {
HornetQClientLogger.LOGGER.errorConnectingToNodes(e); ActiveMQClientLogger.LOGGER.errorConnectingToNodes(e);
} }
} }
}; };
@ -1879,9 +1879,9 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
retryNumber++; retryNumber++;
for (Connector conn : connectors) for (Connector conn : connectors)
{ {
if (HornetQClientLogger.LOGGER.isDebugEnabled()) if (ActiveMQClientLogger.LOGGER.isDebugEnabled())
{ {
HornetQClientLogger.LOGGER.debug(this + "::Submitting connect towards " + conn); ActiveMQClientLogger.LOGGER.debug(this + "::Submitting connect towards " + conn);
} }
csf = conn.tryConnect(); csf = conn.tryConnect();
@ -1904,7 +1904,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
catch (Exception e) catch (Exception e)
{ {
// There isn't much to be done if this happens here // There isn't much to be done if this happens here
HornetQClientLogger.LOGGER.errorStartingLocator(e); ActiveMQClientLogger.LOGGER.errorStartingLocator(e);
} }
} }
} }
@ -1922,9 +1922,9 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
} }
}); });
if (HornetQClientLogger.LOGGER.isDebugEnabled()) if (ActiveMQClientLogger.LOGGER.isDebugEnabled())
{ {
HornetQClientLogger.LOGGER.debug("Returning " + csf + ActiveMQClientLogger.LOGGER.debug("Returning " + csf +
" after " + " after " +
retryNumber + retryNumber +
" retries on StaticConnector " + " retries on StaticConnector " +
@ -1949,15 +1949,15 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
{ {
if (isClosed() || skipWarnings) if (isClosed() || skipWarnings)
return null; return null;
HornetQClientLogger.LOGGER.debug("Rejected execution", e); ActiveMQClientLogger.LOGGER.debug("Rejected execution", e);
throw e; throw e;
} }
catch (Exception e) catch (Exception e)
{ {
if (isClosed() || skipWarnings) if (isClosed() || skipWarnings)
return null; return null;
HornetQClientLogger.LOGGER.errorConnectingToNodes(e); ActiveMQClientLogger.LOGGER.errorConnectingToNodes(e);
throw HornetQClientMessageBundle.BUNDLE.cannotConnectToStaticConnectors(e); throw ActiveMQClientMessageBundle.BUNDLE.cannotConnectToStaticConnectors(e);
} }
if (isClosed() || skipWarnings) if (isClosed() || skipWarnings)
@ -1965,8 +1965,8 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
return null; return null;
} }
HornetQClientLogger.LOGGER.errorConnectingToNodes(traceException); ActiveMQClientLogger.LOGGER.errorConnectingToNodes(traceException);
throw HornetQClientMessageBundle.BUNDLE.cannotConnectToStaticConnectors2(); throw ActiveMQClientMessageBundle.BUNDLE.cannotConnectToStaticConnectors2();
} }
private synchronized void createConnectors() private synchronized void createConnectors()
@ -2024,7 +2024,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
{ {
if (!isClosed() && finalizeCheck) if (!isClosed() && finalizeCheck)
{ {
HornetQClientLogger.LOGGER.serverLocatorNotClosed(traceException, System.identityHashCode(this)); ActiveMQClientLogger.LOGGER.serverLocatorNotClosed(traceException, System.identityHashCode(this));
if (ServerLocatorImpl.finalizeCallback != null) if (ServerLocatorImpl.finalizeCallback != null)
{ {
@ -2051,9 +2051,9 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
public ClientSessionFactory tryConnect() throws ActiveMQException public ClientSessionFactory tryConnect() throws ActiveMQException
{ {
if (HornetQClientLogger.LOGGER.isDebugEnabled()) if (ActiveMQClientLogger.LOGGER.isDebugEnabled())
{ {
HornetQClientLogger.LOGGER.debug(this + "::Trying to connect to " + factory); ActiveMQClientLogger.LOGGER.debug(this + "::Trying to connect to " + factory);
} }
try try
{ {
@ -2075,7 +2075,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
} }
catch (ActiveMQException e) catch (ActiveMQException e)
{ {
HornetQClientLogger.LOGGER.debug(this + "::Exception on establish connector initial connection", e); ActiveMQClientLogger.LOGGER.debug(this + "::Exception on establish connector initial connection", e);
return null; return null;
} }
} }

View File

@ -25,7 +25,7 @@ import java.util.concurrent.Executor;
import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.TransportConfiguration;
import org.apache.activemq.api.core.client.ClusterTopologyListener; import org.apache.activemq.api.core.client.ClusterTopologyListener;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
import org.apache.activemq.spi.core.remoting.Connector; import org.apache.activemq.spi.core.remoting.Connector;
/** /**
@ -64,9 +64,9 @@ public final class Topology implements Serializable
public Topology(final Object owner) public Topology(final Object owner)
{ {
this.owner = owner; this.owner = owner;
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace("Topology@" + Integer.toHexString(System.identityHashCode(this)) + " CREATE", ActiveMQClientLogger.LOGGER.trace("Topology@" + Integer.toHexString(System.identityHashCode(this)) + " CREATE",
new Exception("trace")); new Exception("trace"));
} }
} }
@ -86,9 +86,9 @@ public final class Topology implements Serializable
public void addClusterTopologyListener(final ClusterTopologyListener listener) public void addClusterTopologyListener(final ClusterTopologyListener listener)
{ {
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace(this + "::Adding topology listener " + listener, new Exception("Trace")); ActiveMQClientLogger.LOGGER.trace(this + "::Adding topology listener " + listener, new Exception("Trace"));
} }
synchronized (topologyListeners) synchronized (topologyListeners)
{ {
@ -99,9 +99,9 @@ public final class Topology implements Serializable
public void removeClusterTopologyListener(final ClusterTopologyListener listener) public void removeClusterTopologyListener(final ClusterTopologyListener listener)
{ {
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace(this + "::Removing topology listener " + listener, new Exception("Trace")); ActiveMQClientLogger.LOGGER.trace(this + "::Removing topology listener " + listener, new Exception("Trace"));
} }
synchronized (topologyListeners) synchronized (topologyListeners)
{ {
@ -114,9 +114,9 @@ public final class Topology implements Serializable
{ {
synchronized (this) synchronized (this)
{ {
if (HornetQClientLogger.LOGGER.isDebugEnabled()) if (ActiveMQClientLogger.LOGGER.isDebugEnabled())
{ {
HornetQClientLogger.LOGGER.debug(this + "::node " + nodeId + "=" + memberInput); ActiveMQClientLogger.LOGGER.debug(this + "::node " + nodeId + "=" + memberInput);
} }
memberInput.setUniqueEventID(System.currentTimeMillis()); memberInput.setUniqueEventID(System.currentTimeMillis());
topology.remove(nodeId); topology.remove(nodeId);
@ -146,9 +146,9 @@ public final class Topology implements Serializable
public TopologyMemberImpl updateBackup(final TopologyMemberImpl memberInput) public TopologyMemberImpl updateBackup(final TopologyMemberImpl memberInput)
{ {
final String nodeId = memberInput.getNodeId(); final String nodeId = memberInput.getNodeId();
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace(this + "::updateBackup::" + nodeId + ", memberInput=" + memberInput); ActiveMQClientLogger.LOGGER.trace(this + "::updateBackup::" + nodeId + ", memberInput=" + memberInput);
} }
synchronized (this) synchronized (this)
@ -156,9 +156,9 @@ public final class Topology implements Serializable
TopologyMemberImpl currentMember = getMember(nodeId); TopologyMemberImpl currentMember = getMember(nodeId);
if (currentMember == null) if (currentMember == null)
{ {
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace("There's no live to be updated on backup update, node=" + nodeId + " memberInput=" + memberInput, ActiveMQClientLogger.LOGGER.trace("There's no live to be updated on backup update, node=" + nodeId + " memberInput=" + memberInput,
new Exception("trace")); new Exception("trace"));
} }
@ -191,7 +191,7 @@ public final class Topology implements Serializable
Long deleteTme = getMapDelete().get(nodeId); Long deleteTme = getMapDelete().get(nodeId);
if (deleteTme != null && uniqueEventID != 0 && uniqueEventID < deleteTme) if (deleteTme != null && uniqueEventID != 0 && uniqueEventID < deleteTme)
{ {
HornetQClientLogger.LOGGER.debug("Update uniqueEvent=" + uniqueEventID + ActiveMQClientLogger.LOGGER.debug("Update uniqueEvent=" + uniqueEventID +
", nodeId=" + ", nodeId=" +
nodeId + nodeId +
", memberInput=" + ", memberInput=" +
@ -206,9 +206,9 @@ public final class Topology implements Serializable
if (currentMember == null) if (currentMember == null)
{ {
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace(this + "::NewMemberAdd nodeId=" + nodeId + " member = " + memberInput, ActiveMQClientLogger.LOGGER.trace(this + "::NewMemberAdd nodeId=" + nodeId + " member = " + memberInput,
new Exception("trace")); new Exception("trace"));
} }
memberInput.setUniqueEventID(uniqueEventID); memberInput.setUniqueEventID(uniqueEventID);
@ -232,9 +232,9 @@ public final class Topology implements Serializable
newMember.setBackup(currentMember.getBackup()); newMember.setBackup(currentMember.getBackup());
} }
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace(this + "::updated currentMember=nodeID=" + nodeId + ", currentMember=" + ActiveMQClientLogger.LOGGER.trace(this + "::updated currentMember=nodeID=" + nodeId + ", currentMember=" +
currentMember + ", memberInput=" + memberInput + "newMember=" + currentMember + ", memberInput=" + memberInput + "newMember=" +
newMember, newMember,
new Exception("trace")); new Exception("trace"));
@ -267,9 +267,9 @@ public final class Topology implements Serializable
{ {
final ArrayList<ClusterTopologyListener> copy = copyListeners(); final ArrayList<ClusterTopologyListener> copy = copyListeners();
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace(this + "::prepare to send " + nodeId + " to " + copy.size() + " elements"); ActiveMQClientLogger.LOGGER.trace(this + "::prepare to send " + nodeId + " to " + copy.size() + " elements");
} }
if (copy.size() > 0) if (copy.size() > 0)
@ -280,9 +280,9 @@ public final class Topology implements Serializable
{ {
for (ClusterTopologyListener listener : copy) for (ClusterTopologyListener listener : copy)
{ {
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace(Topology.this + " informing " + ActiveMQClientLogger.LOGGER.trace(Topology.this + " informing " +
listener + listener +
" about node up = " + " about node up = " +
nodeId + nodeId +
@ -296,7 +296,7 @@ public final class Topology implements Serializable
} }
catch (Throwable e) catch (Throwable e)
{ {
HornetQClientLogger.LOGGER.errorSendingTopology(e); ActiveMQClientLogger.LOGGER.errorSendingTopology(e);
} }
} }
} }
@ -328,7 +328,7 @@ public final class Topology implements Serializable
{ {
if (member.getUniqueEventID() > uniqueEventID) if (member.getUniqueEventID() > uniqueEventID)
{ {
HornetQClientLogger.LOGGER.debug("The removeMember was issued before the node " + nodeId + " was started, ignoring call"); ActiveMQClientLogger.LOGGER.debug("The removeMember was issued before the node " + nodeId + " was started, ignoring call");
member = null; member = null;
} }
else else
@ -339,9 +339,9 @@ public final class Topology implements Serializable
} }
} }
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace("removeMember " + this + ActiveMQClientLogger.LOGGER.trace("removeMember " + this +
" removing nodeID=" + " removing nodeID=" +
nodeId + nodeId +
", result=" + ", result=" +
@ -360,9 +360,9 @@ public final class Topology implements Serializable
{ {
for (ClusterTopologyListener listener : copy) for (ClusterTopologyListener listener : copy)
{ {
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace(this + " informing " + listener + " about node down = " + nodeId); ActiveMQClientLogger.LOGGER.trace(this + " informing " + listener + " about node down = " + nodeId);
} }
try try
{ {
@ -370,7 +370,7 @@ public final class Topology implements Serializable
} }
catch (Exception e) catch (Exception e)
{ {
HornetQClientLogger.LOGGER.errorSendingTopologyNodedown(e); ActiveMQClientLogger.LOGGER.errorSendingTopologyNodedown(e);
} }
} }
} }
@ -394,9 +394,9 @@ public final class Topology implements Serializable
public synchronized void sendTopology(final ClusterTopologyListener listener) public synchronized void sendTopology(final ClusterTopologyListener listener)
{ {
if (HornetQClientLogger.LOGGER.isDebugEnabled()) if (ActiveMQClientLogger.LOGGER.isDebugEnabled())
{ {
HornetQClientLogger.LOGGER.debug(this + " is sending topology to " + listener); ActiveMQClientLogger.LOGGER.debug(this + " is sending topology to " + listener);
} }
execute(new Runnable() execute(new Runnable()
@ -414,9 +414,9 @@ public final class Topology implements Serializable
for (Map.Entry<String, TopologyMemberImpl> entry : copy.entrySet()) for (Map.Entry<String, TopologyMemberImpl> entry : copy.entrySet())
{ {
if (HornetQClientLogger.LOGGER.isDebugEnabled()) if (ActiveMQClientLogger.LOGGER.isDebugEnabled())
{ {
HornetQClientLogger.LOGGER.debug(Topology.this + " sending " + ActiveMQClientLogger.LOGGER.debug(Topology.this + " sending " +
entry.getKey() + entry.getKey() +
" / " + " / " +
entry.getValue().getConnector() + entry.getValue().getConnector() +

View File

@ -27,8 +27,8 @@ import org.apache.activemq.api.core.BroadcastEndpointFactory;
import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.SimpleString;
import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.TransportConfiguration;
import org.apache.activemq.api.core.management.CoreNotificationType; import org.apache.activemq.api.core.management.CoreNotificationType;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
import org.apache.activemq.core.server.HornetQComponent; import org.apache.activemq.core.server.ActiveMQComponent;
import org.apache.activemq.core.server.management.Notification; import org.apache.activemq.core.server.management.Notification;
import org.apache.activemq.core.server.management.NotificationService; import org.apache.activemq.core.server.management.NotificationService;
import org.apache.activemq.utils.TypedProperties; import org.apache.activemq.utils.TypedProperties;
@ -46,9 +46,9 @@ import org.apache.activemq.utils.TypedProperties;
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a> * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
* @author Clebert Suconic * @author Clebert Suconic
*/ */
public final class DiscoveryGroup implements HornetQComponent public final class DiscoveryGroup implements ActiveMQComponent
{ {
private static final boolean isTrace = HornetQClientLogger.LOGGER.isTraceEnabled(); private static final boolean isTrace = ActiveMQClientLogger.LOGGER.isTraceEnabled();
private final List<DiscoveryListener> listeners = new ArrayList<DiscoveryListener>(); private final List<DiscoveryListener> listeners = new ArrayList<DiscoveryListener>();
@ -106,7 +106,7 @@ public final class DiscoveryGroup implements HornetQComponent
started = true; started = true;
thread = new Thread(new DiscoveryRunnable(), "hornetq-discovery-group-thread-" + name); thread = new Thread(new DiscoveryRunnable(), "activemq-discovery-group-thread-" + name);
thread.setDaemon(true); thread.setDaemon(true);
@ -147,7 +147,7 @@ public final class DiscoveryGroup implements HornetQComponent
} }
catch (Exception e1) catch (Exception e1)
{ {
HornetQClientLogger.LOGGER.errorStoppingDiscoveryBroadcastEndpoint(endpoint, e1); ActiveMQClientLogger.LOGGER.errorStoppingDiscoveryBroadcastEndpoint(endpoint, e1);
} }
try try
@ -156,7 +156,7 @@ public final class DiscoveryGroup implements HornetQComponent
thread.join(10000); thread.join(10000);
if (thread.isAlive()) if (thread.isAlive())
{ {
HornetQClientLogger.LOGGER.timedOutStoppingDiscovery(); ActiveMQClientLogger.LOGGER.timedOutStoppingDiscovery();
} }
} }
catch (InterruptedException e) catch (InterruptedException e)
@ -177,7 +177,7 @@ public final class DiscoveryGroup implements HornetQComponent
} }
catch (Exception e) catch (Exception e)
{ {
HornetQClientLogger.LOGGER.errorSendingNotifOnDiscoveryStop(e); ActiveMQClientLogger.LOGGER.errorSendingNotifOnDiscoveryStop(e);
} }
} }
} }
@ -252,7 +252,7 @@ public final class DiscoveryGroup implements HornetQComponent
{ {
if (!currentUniqueID.equals(uniqueID)) if (!currentUniqueID.equals(uniqueID))
{ {
HornetQClientLogger.LOGGER.multipleServersBroadcastingSameNode(originatingNodeID); ActiveMQClientLogger.LOGGER.multipleServersBroadcastingSameNode(originatingNodeID);
uniqueIDMap.put(originatingNodeID, uniqueID); uniqueIDMap.put(originatingNodeID, uniqueID);
} }
} }
@ -278,7 +278,7 @@ public final class DiscoveryGroup implements HornetQComponent
{ {
// This is totally unexpected, so I'm not even bothering on creating // This is totally unexpected, so I'm not even bothering on creating
// a log entry for that // a log entry for that
HornetQClientLogger.LOGGER.warn("Unexpected null data received from DiscoveryEndpoint"); ActiveMQClientLogger.LOGGER.warn("Unexpected null data received from DiscoveryEndpoint");
} }
break; break;
} }
@ -291,7 +291,7 @@ public final class DiscoveryGroup implements HornetQComponent
} }
else else
{ {
HornetQClientLogger.LOGGER.errorReceivingPAcketInDiscovery(e); ActiveMQClientLogger.LOGGER.errorReceivingPAcketInDiscovery(e);
} }
} }
@ -346,10 +346,10 @@ public final class DiscoveryGroup implements HornetQComponent
{ {
if (isTrace) if (isTrace)
{ {
HornetQClientLogger.LOGGER.trace("Connectors changed on Discovery:"); ActiveMQClientLogger.LOGGER.trace("Connectors changed on Discovery:");
for (DiscoveryEntry connector : connectors.values()) for (DiscoveryEntry connector : connectors.values())
{ {
HornetQClientLogger.LOGGER.trace(connector); ActiveMQClientLogger.LOGGER.trace(connector);
} }
} }
callListeners(); callListeners();
@ -365,7 +365,7 @@ public final class DiscoveryGroup implements HornetQComponent
} }
catch (Exception e) catch (Exception e)
{ {
HornetQClientLogger.LOGGER.failedToReceiveDatagramInDiscovery(e); ActiveMQClientLogger.LOGGER.failedToReceiveDatagramInDiscovery(e);
} }
} }
@ -397,7 +397,7 @@ public final class DiscoveryGroup implements HornetQComponent
catch (Throwable t) catch (Throwable t)
{ {
// Catch it so exception doesn't prevent other listeners from running // Catch it so exception doesn't prevent other listeners from running
HornetQClientLogger.LOGGER.failedToCallListenerInDiscovery(t); ActiveMQClientLogger.LOGGER.failedToCallListenerInDiscovery(t);
} }
} }
} }
@ -419,7 +419,7 @@ public final class DiscoveryGroup implements HornetQComponent
{ {
if (isTrace) if (isTrace)
{ {
HornetQClientLogger.LOGGER.trace("Timed out node on discovery:" + entry.getValue()); ActiveMQClientLogger.LOGGER.trace("Timed out node on discovery:" + entry.getValue());
} }
iter.remove(); iter.remove();

View File

@ -15,24 +15,24 @@ package org.apache.activemq.core.exception;
import javax.transaction.xa.XAException; import javax.transaction.xa.XAException;
/** /**
* A HornetQXAException * A ActiveMQXAException
* *
* @author Tim Fox * @author Tim Fox
* *
* *
*/ */
public class HornetQXAException extends XAException public class ActiveMQXAException extends XAException
{ {
private static final long serialVersionUID = 6535914602965015803L; private static final long serialVersionUID = 6535914602965015803L;
public HornetQXAException(final int errorCode, final String message) public ActiveMQXAException(final int errorCode, final String message)
{ {
super(message); super(message);
this.errorCode = errorCode; this.errorCode = errorCode;
} }
public HornetQXAException(final int errorCode) public ActiveMQXAException(final int errorCode)
{ {
super(errorCode); super(errorCode);
} }

View File

@ -28,27 +28,27 @@ import org.apache.activemq.api.core.ActiveMQException;
public interface BodyEncoder public interface BodyEncoder
{ {
/** /**
* This method must not be called directly by HornetQ clients. * This method must not be called directly by ActiveMQ clients.
*/ */
void open() throws ActiveMQException; void open() throws ActiveMQException;
/** /**
* This method must not be called directly by HornetQ clients. * This method must not be called directly by ActiveMQ clients.
*/ */
void close() throws ActiveMQException; void close() throws ActiveMQException;
/** /**
* This method must not be called directly by HornetQ clients. * This method must not be called directly by ActiveMQ clients.
*/ */
int encode(ByteBuffer bufferRead) throws ActiveMQException; int encode(ByteBuffer bufferRead) throws ActiveMQException;
/** /**
* This method must not be called directly by HornetQ clients. * This method must not be called directly by ActiveMQ clients.
*/ */
int encode(ActiveMQBuffer bufferOut, int size) throws ActiveMQException; int encode(ActiveMQBuffer bufferOut, int size) throws ActiveMQException;
/** /**
* This method must not be called directly by HornetQ clients. * This method must not be called directly by ActiveMQ clients.
*/ */
long getLargeBodySize(); long getLargeBodySize();
} }

View File

@ -23,7 +23,7 @@ import org.apache.activemq.api.core.ActiveMQException;
import org.apache.activemq.api.core.ActiveMQPropertyConversionException; import org.apache.activemq.api.core.ActiveMQPropertyConversionException;
import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.Message;
import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.SimpleString;
import org.apache.activemq.core.buffers.impl.ResetLimitWrappedHornetQBuffer; import org.apache.activemq.core.buffers.impl.ResetLimitWrappedActiveMQBuffer;
import org.apache.activemq.core.message.BodyEncoder; import org.apache.activemq.core.message.BodyEncoder;
import org.apache.activemq.core.protocol.core.impl.PacketImpl; import org.apache.activemq.core.protocol.core.impl.PacketImpl;
import org.apache.activemq.utils.ByteUtil; import org.apache.activemq.utils.ByteUtil;
@ -34,7 +34,7 @@ import org.apache.activemq.utils.UUID;
/** /**
* A concrete implementation of a message * A concrete implementation of a message
* <p> * <p>
* All messages handled by HornetQ core are of this type * All messages handled by ActiveMQ core are of this type
* *
* @author <a href="mailto:ovidiu@feodorov.com">Ovidiu Feodorov</a> * @author <a href="mailto:ovidiu@feodorov.com">Ovidiu Feodorov</a>
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a> * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
@ -78,7 +78,7 @@ public abstract class MessageImpl implements MessageInternal
protected ActiveMQBuffer buffer; protected ActiveMQBuffer buffer;
protected ResetLimitWrappedHornetQBuffer bodyBuffer; protected ResetLimitWrappedActiveMQBuffer bodyBuffer;
protected volatile boolean bufferValid; protected volatile boolean bufferValid;
@ -100,7 +100,7 @@ public abstract class MessageImpl implements MessageInternal
} }
/** /**
* overridden by the client message, we need access to the connection so we can create the appropriate HornetQBuffer. * overridden by the client message, we need access to the connection so we can create the appropriate ActiveMQBuffer.
* *
* @param type * @param type
* @param durable * @param durable
@ -265,7 +265,7 @@ public abstract class MessageImpl implements MessageInternal
{ {
if (bodyBuffer == null) if (bodyBuffer == null)
{ {
bodyBuffer = new ResetLimitWrappedHornetQBuffer(BODY_OFFSET, buffer, this); bodyBuffer = new ResetLimitWrappedActiveMQBuffer(BODY_OFFSET, buffer, this);
} }
return bodyBuffer; return bodyBuffer;
@ -299,7 +299,7 @@ public abstract class MessageImpl implements MessageInternal
newBuffer.setIndex(0, getEndOfBodyPosition()); newBuffer.setIndex(0, getEndOfBodyPosition());
return new ResetLimitWrappedHornetQBuffer(BODY_OFFSET, newBuffer, null); return new ResetLimitWrappedActiveMQBuffer(BODY_OFFSET, newBuffer, null);
} }
public long getMessageID() public long getMessageID()

View File

@ -12,12 +12,12 @@
*/ */
package org.apache.activemq.core.protocol.core; package org.apache.activemq.core.protocol.core;
import org.apache.activemq.core.security.HornetQPrincipal; import org.apache.activemq.core.security.ActiveMQPrincipal;
import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.spi.core.protocol.RemotingConnection;
/** /**
* Extension of RemotingConnection for the HornetQ core protocol * Extension of RemotingConnection for the ActiveMQ core protocol
* @author Tim Fox * @author Tim Fox
*/ */
public interface CoreRemotingConnection extends RemotingConnection public interface CoreRemotingConnection extends RemotingConnection
@ -100,5 +100,5 @@ public interface CoreRemotingConnection extends RemotingConnection
* Returns the default security principal * Returns the default security principal
* @return the principal * @return the principal
*/ */
HornetQPrincipal getDefaultHornetQPrincipal(); ActiveMQPrincipal getDefaultActiveMQPrincipal();
} }

View File

@ -28,9 +28,9 @@ import org.apache.activemq.api.core.Pair;
import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.SimpleString;
import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.TransportConfiguration;
import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ClientSessionFactory;
import org.apache.activemq.api.core.client.HornetQClient; import org.apache.activemq.api.core.client.ActiveMQClient;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
import org.apache.activemq.core.client.HornetQClientMessageBundle; import org.apache.activemq.core.client.ActiveMQClientMessageBundle;
import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal; import org.apache.activemq.core.client.impl.ClientSessionFactoryInternal;
import org.apache.activemq.core.protocol.ClientPacketDecoder; import org.apache.activemq.core.protocol.ClientPacketDecoder;
import org.apache.activemq.core.protocol.core.Channel; import org.apache.activemq.core.protocol.core.Channel;
@ -48,7 +48,7 @@ import org.apache.activemq.core.protocol.core.impl.wireformat.DisconnectMessage;
import org.apache.activemq.core.protocol.core.impl.wireformat.DisconnectMessage_V2; import org.apache.activemq.core.protocol.core.impl.wireformat.DisconnectMessage_V2;
import org.apache.activemq.core.protocol.core.impl.wireformat.Ping; import org.apache.activemq.core.protocol.core.impl.wireformat.Ping;
import org.apache.activemq.core.protocol.core.impl.wireformat.SubscribeClusterTopologyUpdatesMessageV2; import org.apache.activemq.core.protocol.core.impl.wireformat.SubscribeClusterTopologyUpdatesMessageV2;
import org.apache.activemq.core.remoting.impl.netty.HornetQFrameDecoder2; import org.apache.activemq.core.remoting.impl.netty.ActiveMQFrameDecoder2;
import org.apache.activemq.core.version.Version; import org.apache.activemq.core.version.Version;
import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.spi.core.protocol.RemotingConnection;
import org.apache.activemq.spi.core.remoting.ClientProtocolManager; import org.apache.activemq.spi.core.remoting.ClientProtocolManager;
@ -71,7 +71,7 @@ import org.apache.activemq.utils.VersionLoader;
* @author Clebert Suconic * @author Clebert Suconic
*/ */
public class HornetQClientProtocolManager implements ClientProtocolManager public class ActiveMQClientProtocolManager implements ClientProtocolManager
{ {
private final int versionID = VersionLoader.getVersion().getIncrementingVersion(); private final int versionID = VersionLoader.getVersion().getIncrementingVersion();
@ -104,13 +104,13 @@ public class HornetQClientProtocolManager implements ClientProtocolManager
private final CountDownLatch waitLatch = new CountDownLatch(1); private final CountDownLatch waitLatch = new CountDownLatch(1);
public HornetQClientProtocolManager() public ActiveMQClientProtocolManager()
{ {
} }
public String getName() public String getName()
{ {
return HornetQClient.DEFAULT_CORE_PROTOCOL; return ActiveMQClient.DEFAULT_CORE_PROTOCOL;
} }
public void setSessionFactory(ClientSessionFactory factory) public void setSessionFactory(ClientSessionFactory factory)
@ -126,7 +126,7 @@ public class HornetQClientProtocolManager implements ClientProtocolManager
@Override @Override
public void addChannelHandlers(ChannelPipeline pipeline) public void addChannelHandlers(ChannelPipeline pipeline)
{ {
pipeline.addLast("hornetq-decoder", new HornetQFrameDecoder2()); pipeline.addLast("activemq-decoder", new ActiveMQFrameDecoder2());
} }
public boolean waitOnLatch(long milliseconds) throws InterruptedException public boolean waitOnLatch(long milliseconds) throws InterruptedException
@ -284,7 +284,7 @@ public class HornetQClientProtocolManager implements ClientProtocolManager
boolean preAcknowledge, int minLargeMessageSize, int confirmationWindowSize) throws ActiveMQException boolean preAcknowledge, int minLargeMessageSize, int confirmationWindowSize) throws ActiveMQException
{ {
if (!isAlive()) if (!isAlive())
throw HornetQClientMessageBundle.BUNDLE.clientSessionClosed(); throw ActiveMQClientMessageBundle.BUNDLE.clientSessionClosed();
Channel sessionChannel = null; Channel sessionChannel = null;
CreateSessionResponseMessage response = null; CreateSessionResponseMessage response = null;
@ -305,7 +305,7 @@ public class HornetQClientProtocolManager implements ClientProtocolManager
synchronized (inCreateSessionGuard) synchronized (inCreateSessionGuard)
{ {
if (!isAlive()) if (!isAlive())
throw HornetQClientMessageBundle.BUNDLE.clientSessionClosed(); throw ActiveMQClientMessageBundle.BUNDLE.clientSessionClosed();
inCreateSession = true; inCreateSession = true;
inCreateSessionLatch = new CountDownLatch(1); inCreateSessionLatch = new CountDownLatch(1);
} }
@ -369,7 +369,7 @@ public class HornetQClientProtocolManager implements ClientProtocolManager
} }
else else
{ {
throw HornetQClientMessageBundle.BUNDLE.failedToCreateSession(t); throw ActiveMQClientMessageBundle.BUNDLE.failedToCreateSession(t);
} }
} }
finally finally
@ -388,7 +388,7 @@ public class HornetQClientProtocolManager implements ClientProtocolManager
// these objects won't be null, otherwise it would keep retrying on the previous loop // these objects won't be null, otherwise it would keep retrying on the previous loop
return new HornetQSessionContext(name, connection, sessionChannel, response.getServerVersion(), confirmationWindowSize); return new ActiveMQSessionContext(name, connection, sessionChannel, response.getServerVersion(), confirmationWindowSize);
} }
@ -478,10 +478,10 @@ public class HornetQClientProtocolManager implements ClientProtocolManager
if (transportConnection.isUsingProtocolHandling()) if (transportConnection.isUsingProtocolHandling())
{ {
// no need to send handshake on inVM as inVM is not using the NettyProtocolHandling // no need to send handshake on inVM as inVM is not using the NettyProtocolHandling
String handshake = "HORNETQ"; String handshake = "ACTIVEMQ";
ActiveMQBuffer hqbuffer = connection.createBuffer(handshake.length()); ActiveMQBuffer amqbuffer = connection.createBuffer(handshake.length());
hqbuffer.writeBytes(handshake.getBytes()); amqbuffer.writeBytes(handshake.getBytes());
transportConnection.write(hqbuffer); transportConnection.write(amqbuffer);
} }
} }
@ -565,9 +565,9 @@ public class HornetQClientProtocolManager implements ClientProtocolManager
if (topMessage.isExit()) if (topMessage.isExit())
{ {
if (HornetQClientLogger.LOGGER.isDebugEnabled()) if (ActiveMQClientLogger.LOGGER.isDebugEnabled())
{ {
HornetQClientLogger.LOGGER.debug("Notifying " + topMessage.getNodeID() + " going down"); ActiveMQClientLogger.LOGGER.debug("Notifying " + topMessage.getNodeID() + " going down");
} }
if (topologyResponseHandler != null) if (topologyResponseHandler != null)

View File

@ -20,23 +20,23 @@ import org.apache.activemq.spi.core.remoting.ClientProtocolManagerFactory;
* @author Clebert Suconic * @author Clebert Suconic
*/ */
public class HornetQClientProtocolManagerFactory implements ClientProtocolManagerFactory public class ActiveMQClientProtocolManagerFactory implements ClientProtocolManagerFactory
{ {
private static final long serialVersionUID = 1; private static final long serialVersionUID = 1;
private static final HornetQClientProtocolManagerFactory INSTANCE = new HornetQClientProtocolManagerFactory(); private static final ActiveMQClientProtocolManagerFactory INSTANCE = new ActiveMQClientProtocolManagerFactory();
private HornetQClientProtocolManagerFactory() private ActiveMQClientProtocolManagerFactory()
{ {
} }
public static final HornetQClientProtocolManagerFactory getInstance() public static final ActiveMQClientProtocolManagerFactory getInstance()
{ {
return INSTANCE; return INSTANCE;
} }
public ClientProtocolManager newProtocolManager() public ClientProtocolManager newProtocolManager()
{ {
return new HornetQClientProtocolManager(); return new ActiveMQClientProtocolManager();
} }
} }

View File

@ -19,11 +19,11 @@ import org.apache.activemq.spi.core.remoting.ConsumerContext;
* @author Clebert Suconic * @author Clebert Suconic
*/ */
public class HornetQConsumerContext extends ConsumerContext public class ActiveMQConsumerContext extends ConsumerContext
{ {
private long id; private long id;
public HornetQConsumerContext(long id) public ActiveMQConsumerContext(long id)
{ {
this.id = id; this.id = id;
} }
@ -39,7 +39,7 @@ public class HornetQConsumerContext extends ConsumerContext
if (this == o) return true; if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false; if (o == null || getClass() != o.getClass()) return false;
HornetQConsumerContext that = (HornetQConsumerContext) o; ActiveMQConsumerContext that = (ActiveMQConsumerContext) o;
if (id != that.id) return false; if (id != that.id) return false;

View File

@ -31,8 +31,8 @@ import org.apache.activemq.api.core.SimpleString;
import org.apache.activemq.api.core.client.ClientConsumer; import org.apache.activemq.api.core.client.ClientConsumer;
import org.apache.activemq.api.core.client.ClientSession; import org.apache.activemq.api.core.client.ClientSession;
import org.apache.activemq.api.core.client.SendAcknowledgementHandler; import org.apache.activemq.api.core.client.SendAcknowledgementHandler;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
import org.apache.activemq.core.client.HornetQClientMessageBundle; import org.apache.activemq.core.client.ActiveMQClientMessageBundle;
import org.apache.activemq.core.client.impl.AddressQueryImpl; import org.apache.activemq.core.client.impl.AddressQueryImpl;
import org.apache.activemq.core.client.impl.ClientConsumerImpl; import org.apache.activemq.core.client.impl.ClientConsumerImpl;
import org.apache.activemq.core.client.impl.ClientConsumerInternal; import org.apache.activemq.core.client.impl.ClientConsumerInternal;
@ -50,7 +50,7 @@ import org.apache.activemq.core.protocol.core.impl.wireformat.CreateQueueMessage
import org.apache.activemq.core.protocol.core.impl.wireformat.CreateSessionMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.CreateSessionMessage;
import org.apache.activemq.core.protocol.core.impl.wireformat.CreateSharedQueueMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.CreateSharedQueueMessage;
import org.apache.activemq.core.protocol.core.impl.wireformat.DisconnectConsumerMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.DisconnectConsumerMessage;
import org.apache.activemq.core.protocol.core.impl.wireformat.HornetQExceptionMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.ActiveMQExceptionMessage;
import org.apache.activemq.core.protocol.core.impl.wireformat.ReattachSessionMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.ReattachSessionMessage;
import org.apache.activemq.core.protocol.core.impl.wireformat.ReattachSessionResponseMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.ReattachSessionResponseMessage;
import org.apache.activemq.core.protocol.core.impl.wireformat.RollbackMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.RollbackMessage;
@ -107,7 +107,7 @@ import static org.apache.activemq.core.protocol.core.impl.PacketImpl.SESS_RECEIV
* @author Clebert Suconic * @author Clebert Suconic
*/ */
public class HornetQSessionContext extends SessionContext public class ActiveMQSessionContext extends SessionContext
{ {
private final Channel sessionChannel; private final Channel sessionChannel;
private final int serverVersion; private final int serverVersion;
@ -115,7 +115,7 @@ public class HornetQSessionContext extends SessionContext
private final String name; private final String name;
public HornetQSessionContext(String name, RemotingConnection remotingConnection, Channel sessionChannel, int serverVersion, int confirmationWindow) public ActiveMQSessionContext(String name, RemotingConnection remotingConnection, Channel sessionChannel, int serverVersion, int confirmationWindow)
{ {
super(remotingConnection); super(remotingConnection);
@ -241,7 +241,7 @@ public class HornetQSessionContext extends SessionContext
{ {
long consumerID = idGenerator.generateID(); long consumerID = idGenerator.generateID();
HornetQConsumerContext consumerContext = new HornetQConsumerContext(consumerID); ActiveMQConsumerContext consumerContext = new ActiveMQConsumerContext(consumerID);
SessionCreateConsumerMessage request = new SessionCreateConsumerMessage(consumerID, SessionCreateConsumerMessage request = new SessionCreateConsumerMessage(consumerID,
queueName, queueName,
@ -345,9 +345,9 @@ public class HornetQSessionContext extends SessionContext
throw new XAException(response.getResponseCode()); throw new XAException(response.getResponseCode());
} }
if (HornetQClientLogger.LOGGER.isTraceEnabled()) if (ActiveMQClientLogger.LOGGER.isTraceEnabled())
{ {
HornetQClientLogger.LOGGER.trace("finished commit on " + ClientSessionImpl.convert(xid) + " with response = " + response); ActiveMQClientLogger.LOGGER.trace("finished commit on " + ClientSessionImpl.convert(xid) + " with response = " + response);
} }
} }
@ -386,7 +386,7 @@ public class HornetQSessionContext extends SessionContext
} }
/** /**
* HornetQ does support large messages * ActiveMQ does support large messages
* *
* @return * @return
*/ */
@ -555,7 +555,7 @@ public class HornetQSessionContext extends SessionContext
if (response.isError()) if (response.isError())
{ {
HornetQClientLogger.LOGGER.errorCallingStart(response.getMessage(), response.getResponseCode()); ActiveMQClientLogger.LOGGER.errorCallingStart(response.getMessage(), response.getResponseCode());
throw new XAException(response.getResponseCode()); throw new XAException(response.getResponseCode());
} }
} }
@ -596,9 +596,9 @@ public class HornetQSessionContext extends SessionContext
if (response.isReattached()) if (response.isReattached())
{ {
if (HornetQClientLogger.LOGGER.isDebugEnabled()) if (ActiveMQClientLogger.LOGGER.isDebugEnabled())
{ {
HornetQClientLogger.LOGGER.debug("ClientSession reattached fine, replaying commands"); ActiveMQClientLogger.LOGGER.debug("ClientSession reattached fine, replaying commands");
} }
// The session was found on the server - we reattached transparently ok // The session was found on the server - we reattached transparently ok
@ -651,7 +651,7 @@ public class HornetQSessionContext extends SessionContext
// the session was created while its server was starting, retry it: // the session was created while its server was starting, retry it:
if (e.getType() == ActiveMQExceptionType.SESSION_CREATION_REJECTED) if (e.getType() == ActiveMQExceptionType.SESSION_CREATION_REJECTED)
{ {
HornetQClientLogger.LOGGER.retryCreateSessionSeverStarting(name); ActiveMQClientLogger.LOGGER.retryCreateSessionSeverStarting(name);
retry = true; retry = true;
// sleep a little bit to avoid spinning too much // sleep a little bit to avoid spinning too much
try try
@ -752,7 +752,7 @@ public class HornetQSessionContext extends SessionContext
/** /**
* This doesn't apply to other protocols probably, so it will be a hornetq exclusive feature * This doesn't apply to other protocols probably, so it will be an ActiveMQ exclusive feature
* *
* @throws org.apache.activemq.api.core.ActiveMQException * @throws org.apache.activemq.api.core.ActiveMQException
*/ */
@ -760,7 +760,7 @@ public class HornetQSessionContext extends SessionContext
{ {
DisconnectConsumerMessage message = packet; DisconnectConsumerMessage message = packet;
session.handleConsumerDisconnect(new HornetQConsumerContext(message.getConsumerId())); session.handleConsumerDisconnect(new ActiveMQConsumerContext(message.getConsumerId()));
} }
private void handleReceivedMessagePacket(SessionReceiveMessage messagePacket) throws Exception private void handleReceivedMessagePacket(SessionReceiveMessage messagePacket) throws Exception
@ -771,7 +771,7 @@ public class HornetQSessionContext extends SessionContext
msgi.setFlowControlSize(messagePacket.getPacketSize()); msgi.setFlowControlSize(messagePacket.getPacketSize());
handleReceiveMessage(new HornetQConsumerContext(messagePacket.getConsumerID()), msgi); handleReceiveMessage(new ActiveMQConsumerContext(messagePacket.getConsumerID()), msgi);
} }
private void handleReceiveLargeMessage(SessionReceiveLargeMessage serverPacket) throws Exception private void handleReceiveLargeMessage(SessionReceiveLargeMessage serverPacket) throws Exception
@ -782,13 +782,13 @@ public class HornetQSessionContext extends SessionContext
clientLargeMessage.setDeliveryCount(serverPacket.getDeliveryCount()); clientLargeMessage.setDeliveryCount(serverPacket.getDeliveryCount());
handleReceiveLargeMessage(new HornetQConsumerContext(serverPacket.getConsumerID()), clientLargeMessage, serverPacket.getLargeMessageSize()); handleReceiveLargeMessage(new ActiveMQConsumerContext(serverPacket.getConsumerID()), clientLargeMessage, serverPacket.getLargeMessageSize());
} }
private void handleReceiveContinuation(SessionReceiveContinuationMessage continuationPacket) throws Exception private void handleReceiveContinuation(SessionReceiveContinuationMessage continuationPacket) throws Exception
{ {
handleReceiveContinuation(new HornetQConsumerContext(continuationPacket.getConsumerID()), continuationPacket.getBody(), continuationPacket.getPacketSize(), handleReceiveContinuation(new ActiveMQConsumerContext(continuationPacket.getConsumerID()), continuationPacket.getBody(), continuationPacket.getPacketSize(),
continuationPacket.isContinues()); continuationPacket.isContinues());
} }
@ -854,9 +854,9 @@ public class HornetQSessionContext extends SessionContext
{ {
// We can only log these exceptions // We can only log these exceptions
// maybe we should cache it on SessionContext and throw an exception on any next calls // maybe we should cache it on SessionContext and throw an exception on any next calls
HornetQExceptionMessage mem = (HornetQExceptionMessage) packet; ActiveMQExceptionMessage mem = (ActiveMQExceptionMessage) packet;
HornetQClientLogger.LOGGER.receivedExceptionAsynchronously(mem.getException()); ActiveMQClientLogger.LOGGER.receivedExceptionAsynchronously(mem.getException());
break; break;
} }
@ -868,7 +868,7 @@ public class HornetQSessionContext extends SessionContext
} }
catch (Exception e) catch (Exception e)
{ {
HornetQClientLogger.LOGGER.failedToHandlePacket(e); ActiveMQClientLogger.LOGGER.failedToHandlePacket(e);
} }
sessionChannel.confirm(packet); sessionChannel.confirm(packet);
@ -877,7 +877,7 @@ public class HornetQSessionContext extends SessionContext
private long getConsumerID(ClientConsumer consumer) private long getConsumerID(ClientConsumer consumer)
{ {
return ((HornetQConsumerContext)consumer.getConsumerContext()).getId(); return ((ActiveMQConsumerContext)consumer.getConsumerContext()).getId();
} }
private ClassLoader lookupTCCL() private ClassLoader lookupTCCL()
@ -918,7 +918,7 @@ public class HornetQSessionContext extends SessionContext
} }
else else
{ {
throw HornetQClientMessageBundle.BUNDLE.invalidWindowSize(windowSize); throw ActiveMQClientMessageBundle.BUNDLE.invalidWindowSize(windowSize);
} }
return clientWindowSize; return clientWindowSize;

View File

@ -25,14 +25,14 @@ import org.apache.activemq.api.core.ActiveMQBuffer;
import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.ActiveMQException;
import org.apache.activemq.api.core.ActiveMQInterruptedException; import org.apache.activemq.api.core.ActiveMQInterruptedException;
import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.Interceptor;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
import org.apache.activemq.core.client.HornetQClientMessageBundle; import org.apache.activemq.core.client.ActiveMQClientMessageBundle;
import org.apache.activemq.core.protocol.core.Channel; import org.apache.activemq.core.protocol.core.Channel;
import org.apache.activemq.core.protocol.core.ChannelHandler; import org.apache.activemq.core.protocol.core.ChannelHandler;
import org.apache.activemq.core.protocol.core.CommandConfirmationHandler; import org.apache.activemq.core.protocol.core.CommandConfirmationHandler;
import org.apache.activemq.core.protocol.core.CoreRemotingConnection; import org.apache.activemq.core.protocol.core.CoreRemotingConnection;
import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.Packet;
import org.apache.activemq.core.protocol.core.impl.wireformat.HornetQExceptionMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.ActiveMQExceptionMessage;
import org.apache.activemq.core.protocol.core.impl.wireformat.PacketsConfirmedMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.PacketsConfirmedMessage;
import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.spi.core.protocol.RemotingConnection;
@ -83,7 +83,7 @@ public final class ChannelImpl implements Channel
} }
} }
private static final boolean isTrace = HornetQClientLogger.LOGGER.isTraceEnabled(); private static final boolean isTrace = ActiveMQClientLogger.LOGGER.isTraceEnabled();
private volatile long id; private volatile long id;
@ -193,7 +193,7 @@ public final class ChannelImpl implements Channel
try try
{ {
response = new HornetQExceptionMessage(HornetQClientMessageBundle.BUNDLE.unblockingACall(cause)); response = new ActiveMQExceptionMessage(ActiveMQClientMessageBundle.BUNDLE.unblockingACall(cause));
sendCondition.signal(); sendCondition.signal();
} }
@ -237,7 +237,7 @@ public final class ChannelImpl implements Channel
if (isTrace) if (isTrace)
{ {
HornetQClientLogger.LOGGER.trace("Sending packet nonblocking " + packet + " on channeID=" + id); ActiveMQClientLogger.LOGGER.trace("Sending packet nonblocking " + packet + " on channeID=" + id);
} }
ActiveMQBuffer buffer = packet.encode(connection); ActiveMQBuffer buffer = packet.encode(connection);
@ -277,7 +277,7 @@ public final class ChannelImpl implements Channel
if (isTrace) if (isTrace)
{ {
HornetQClientLogger.LOGGER.trace("Writing buffer for channelID=" + id); ActiveMQClientLogger.LOGGER.trace("Writing buffer for channelID=" + id);
} }
@ -301,12 +301,12 @@ public final class ChannelImpl implements Channel
if (interceptionResult != null) if (interceptionResult != null)
{ {
// if we don't throw an exception here the client might not unblock // if we don't throw an exception here the client might not unblock
throw HornetQClientMessageBundle.BUNDLE.interceptorRejectedPacket(interceptionResult); throw ActiveMQClientMessageBundle.BUNDLE.interceptorRejectedPacket(interceptionResult);
} }
if (closed) if (closed)
{ {
throw HornetQClientMessageBundle.BUNDLE.connectionDestroyed(); throw ActiveMQClientMessageBundle.BUNDLE.connectionDestroyed();
} }
if (connection.getBlockingCallTimeout() == -1) if (connection.getBlockingCallTimeout() == -1)
@ -341,7 +341,7 @@ public final class ChannelImpl implements Channel
{ {
if (!failoverCondition.await(connection.getBlockingCallFailoverTimeout(), TimeUnit.MILLISECONDS)) if (!failoverCondition.await(connection.getBlockingCallFailoverTimeout(), TimeUnit.MILLISECONDS))
{ {
HornetQClientLogger.LOGGER.debug("timed-out waiting for failover condition"); ActiveMQClientLogger.LOGGER.debug("timed-out waiting for failover condition");
} }
} }
} }
@ -378,7 +378,7 @@ public final class ChannelImpl implements Channel
if (response != null && response.getType() != PacketImpl.EXCEPTION && response.getType() != expectedPacket) if (response != null && response.getType() != PacketImpl.EXCEPTION && response.getType() != expectedPacket)
{ {
HornetQClientLogger.LOGGER.packetOutOfOrder(response, new Exception("trace")); ActiveMQClientLogger.LOGGER.packetOutOfOrder(response, new Exception("trace"));
} }
if (closed) if (closed)
@ -395,12 +395,12 @@ public final class ChannelImpl implements Channel
if (response == null) if (response == null)
{ {
throw HornetQClientMessageBundle.BUNDLE.timedOutSendingPacket(packet.getType()); throw ActiveMQClientMessageBundle.BUNDLE.timedOutSendingPacket(packet.getType());
} }
if (response.getType() == PacketImpl.EXCEPTION) if (response.getType() == PacketImpl.EXCEPTION)
{ {
final HornetQExceptionMessage mem = (HornetQExceptionMessage) response; final ActiveMQExceptionMessage mem = (ActiveMQExceptionMessage) response;
ActiveMQException e = mem.getException(); ActiveMQException e = mem.getException();
@ -433,13 +433,13 @@ public final class ChannelImpl implements Channel
{ {
boolean callNext = interceptor.intercept(packet, connection); boolean callNext = interceptor.intercept(packet, connection);
if (HornetQClientLogger.LOGGER.isDebugEnabled()) if (ActiveMQClientLogger.LOGGER.isDebugEnabled())
{ {
// use a StringBuilder for speed since this may be executed a lot // use a StringBuilder for speed since this may be executed a lot
StringBuilder msg = new StringBuilder(); StringBuilder msg = new StringBuilder();
msg.append("Invocation of interceptor ").append(interceptor.getClass().getName()).append(" on "). msg.append("Invocation of interceptor ").append(interceptor.getClass().getName()).append(" on ").
append(packet).append(" returned ").append(callNext); append(packet).append(" returned ").append(callNext);
HornetQClientLogger.LOGGER.debug(msg.toString()); ActiveMQClientLogger.LOGGER.debug(msg.toString());
} }
if (!callNext) if (!callNext)
@ -449,7 +449,7 @@ public final class ChannelImpl implements Channel
} }
catch (final Throwable e) catch (final Throwable e)
{ {
HornetQClientLogger.LOGGER.errorCallingInterceptor(e, interceptor); ActiveMQClientLogger.LOGGER.errorCallingInterceptor(e, interceptor);
} }
} }
} }
@ -488,7 +488,7 @@ public final class ChannelImpl implements Channel
if (!connection.isDestroyed() && !connection.removeChannel(id)) if (!connection.isDestroyed() && !connection.removeChannel(id))
{ {
throw HornetQClientMessageBundle.BUNDLE.noChannelToClose(id); throw ActiveMQClientMessageBundle.BUNDLE.noChannelToClose(id);
} }
if (failingOver) if (failingOver)
@ -524,7 +524,7 @@ public final class ChannelImpl implements Channel
{ {
if (isTrace) if (isTrace)
{ {
HornetQClientLogger.LOGGER.trace("Replaying commands on channelID=" + id); ActiveMQClientLogger.LOGGER.trace("Replaying commands on channelID=" + id);
} }
clearUpTo(otherLastConfirmedCommandID); clearUpTo(otherLastConfirmedCommandID);
@ -664,7 +664,7 @@ public final class ChannelImpl implements Channel
if (numberToClear == -1) if (numberToClear == -1)
{ {
throw HornetQClientMessageBundle.BUNDLE.invalidCommandID(lastReceivedCommandID); throw ActiveMQClientMessageBundle.BUNDLE.invalidCommandID(lastReceivedCommandID);
} }
int sizeToFree = 0; int sizeToFree = 0;
@ -677,7 +677,7 @@ public final class ChannelImpl implements Channel
{ {
if (lastReceivedCommandID > 0) if (lastReceivedCommandID > 0)
{ {
HornetQClientLogger.LOGGER.cannotFindPacketToClear(lastReceivedCommandID, firstStoredCommandID); ActiveMQClientLogger.LOGGER.cannotFindPacketToClear(lastReceivedCommandID, firstStoredCommandID);
} }
firstStoredCommandID = lastReceivedCommandID + 1; firstStoredCommandID = lastReceivedCommandID + 1;
return; return;

View File

@ -77,7 +77,7 @@ import static org.apache.activemq.core.protocol.core.impl.PacketImpl.SUBSCRIBE_T
import java.io.Serializable; import java.io.Serializable;
import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.ActiveMQBuffer;
import org.apache.activemq.core.client.HornetQClientMessageBundle; import org.apache.activemq.core.client.ActiveMQClientMessageBundle;
import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.Packet;
import org.apache.activemq.core.protocol.core.impl.wireformat.CheckFailoverMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.CheckFailoverMessage;
import org.apache.activemq.core.protocol.core.impl.wireformat.CheckFailoverReplyMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.CheckFailoverReplyMessage;
@ -91,7 +91,7 @@ import org.apache.activemq.core.protocol.core.impl.wireformat.CreateSharedQueueM
import org.apache.activemq.core.protocol.core.impl.wireformat.DisconnectConsumerMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.DisconnectConsumerMessage;
import org.apache.activemq.core.protocol.core.impl.wireformat.DisconnectMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.DisconnectMessage;
import org.apache.activemq.core.protocol.core.impl.wireformat.DisconnectMessage_V2; import org.apache.activemq.core.protocol.core.impl.wireformat.DisconnectMessage_V2;
import org.apache.activemq.core.protocol.core.impl.wireformat.HornetQExceptionMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.ActiveMQExceptionMessage;
import org.apache.activemq.core.protocol.core.impl.wireformat.NullResponseMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.NullResponseMessage;
import org.apache.activemq.core.protocol.core.impl.wireformat.PacketsConfirmedMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.PacketsConfirmedMessage;
import org.apache.activemq.core.protocol.core.impl.wireformat.Ping; import org.apache.activemq.core.protocol.core.impl.wireformat.Ping;
@ -174,7 +174,7 @@ public abstract class PacketDecoder implements Serializable
} }
case EXCEPTION: case EXCEPTION:
{ {
packet = new HornetQExceptionMessage(); packet = new ActiveMQExceptionMessage();
break; break;
} }
case PACKETS_CONFIRMED: case PACKETS_CONFIRMED:
@ -464,7 +464,7 @@ public abstract class PacketDecoder implements Serializable
} }
default: default:
{ {
throw HornetQClientMessageBundle.BUNDLE.invalidType(packetType); throw ActiveMQClientMessageBundle.BUNDLE.invalidType(packetType);
} }
} }

View File

@ -23,14 +23,14 @@ import org.apache.activemq.api.core.ActiveMQBuffer;
import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.ActiveMQException;
import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.Interceptor;
import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.SimpleString;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
import org.apache.activemq.core.protocol.core.Channel; import org.apache.activemq.core.protocol.core.Channel;
import org.apache.activemq.core.protocol.core.CoreRemotingConnection; import org.apache.activemq.core.protocol.core.CoreRemotingConnection;
import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.Packet;
import org.apache.activemq.core.protocol.core.impl.ChannelImpl.CHANNEL_ID; import org.apache.activemq.core.protocol.core.impl.ChannelImpl.CHANNEL_ID;
import org.apache.activemq.core.protocol.core.impl.wireformat.DisconnectMessage; import org.apache.activemq.core.protocol.core.impl.wireformat.DisconnectMessage;
import org.apache.activemq.core.protocol.core.impl.wireformat.DisconnectMessage_V2; import org.apache.activemq.core.protocol.core.impl.wireformat.DisconnectMessage_V2;
import org.apache.activemq.core.security.HornetQPrincipal; import org.apache.activemq.core.security.ActiveMQPrincipal;
import org.apache.activemq.spi.core.protocol.AbstractRemotingConnection; import org.apache.activemq.spi.core.protocol.AbstractRemotingConnection;
import org.apache.activemq.spi.core.remoting.Connection; import org.apache.activemq.spi.core.remoting.Connection;
import org.apache.activemq.utils.SimpleIDGenerator; import org.apache.activemq.utils.SimpleIDGenerator;
@ -44,7 +44,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
// Constants // Constants
// ------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------
private static final boolean isTrace = HornetQClientLogger.LOGGER.isTraceEnabled(); private static final boolean isTrace = ActiveMQClientLogger.LOGGER.isTraceEnabled();
// Static // Static
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
@ -210,7 +210,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
destroyed = true; destroyed = true;
} }
HornetQClientLogger.LOGGER.connectionFailureDetected(me.getMessage(), me.getType()); ActiveMQClientLogger.LOGGER.connectionFailureDetected(me.getMessage(), me.getType());
try try
@ -219,7 +219,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
} }
catch (Throwable e) catch (Throwable e)
{ {
HornetQClientLogger.LOGGER.warn(e.getMessage(), e); ActiveMQClientLogger.LOGGER.warn(e.getMessage(), e);
} }
// Then call the listeners // Then call the listeners
@ -359,9 +359,9 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
} }
} }
public HornetQPrincipal getDefaultHornetQPrincipal() public ActiveMQPrincipal getDefaultActiveMQPrincipal()
{ {
return getTransportConnection().getDefaultHornetQPrincipal(); return getTransportConnection().getDefaultActiveMQPrincipal();
} }
// Buffer Handler implementation // Buffer Handler implementation
@ -374,7 +374,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
if (isTrace) if (isTrace)
{ {
HornetQClientLogger.LOGGER.trace("handling packet " + packet); ActiveMQClientLogger.LOGGER.trace("handling packet " + packet);
} }
if (packet.isAsyncExec() && executor != null) if (packet.isAsyncExec() && executor != null)
@ -391,7 +391,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
} }
catch (Throwable t) catch (Throwable t)
{ {
HornetQClientLogger.LOGGER.errorHandlingPacket(t, packet); ActiveMQClientLogger.LOGGER.errorHandlingPacket(t, packet);
} }
executing = false; executing = false;
@ -415,7 +415,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
} }
catch (Exception e) catch (Exception e)
{ {
HornetQClientLogger.LOGGER.errorDecodingPacket(e); ActiveMQClientLogger.LOGGER.errorDecodingPacket(e);
} }
} }

View File

@ -21,7 +21,7 @@ import org.apache.activemq.core.protocol.core.impl.PacketImpl;
* @author <a href="mailto:jmesnil@redhat.com">Jeff Mesnil</a> * @author <a href="mailto:jmesnil@redhat.com">Jeff Mesnil</a>
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a> * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
*/ */
public class HornetQExceptionMessage extends PacketImpl public class ActiveMQExceptionMessage extends PacketImpl
{ {
private ActiveMQException exception; private ActiveMQException exception;
@ -30,14 +30,14 @@ public class HornetQExceptionMessage extends PacketImpl
// Constructors -------------------------------------------------- // Constructors --------------------------------------------------
public HornetQExceptionMessage(final ActiveMQException exception) public ActiveMQExceptionMessage(final ActiveMQException exception)
{ {
super(EXCEPTION); super(EXCEPTION);
this.exception = exception; this.exception = exception;
} }
public HornetQExceptionMessage() public ActiveMQExceptionMessage()
{ {
super(EXCEPTION); super(EXCEPTION);
} }
@ -97,11 +97,11 @@ public class HornetQExceptionMessage extends PacketImpl
{ {
return false; return false;
} }
if (!(obj instanceof HornetQExceptionMessage)) if (!(obj instanceof ActiveMQExceptionMessage))
{ {
return false; return false;
} }
HornetQExceptionMessage other = (HornetQExceptionMessage)obj; ActiveMQExceptionMessage other = (ActiveMQExceptionMessage)obj;
if (exception == null) if (exception == null)
{ {
if (other.exception != null) if (other.exception != null)

View File

@ -23,9 +23,9 @@ import io.netty.handler.codec.LengthFieldBasedFrameDecoder;
* @author <a href="nmaurer@redhat.com">Norman Maurer</a> * @author <a href="nmaurer@redhat.com">Norman Maurer</a>
* @version $Revision: 7839 $, $Date: 2009-08-21 02:26:39 +0900 (2009-08-21, ) $ * @version $Revision: 7839 $, $Date: 2009-08-21 02:26:39 +0900 (2009-08-21, ) $
*/ */
public class HornetQAMQPFrameDecoder extends LengthFieldBasedFrameDecoder public class ActiveMQAMQPFrameDecoder extends LengthFieldBasedFrameDecoder
{ {
public HornetQAMQPFrameDecoder() public ActiveMQAMQPFrameDecoder()
{ {
// The interface itself is part of the buffer (hence the -4) // The interface itself is part of the buffer (hence the -4)
super(Integer.MAX_VALUE, 0, 4, -4 , 0); super(Integer.MAX_VALUE, 0, 4, -4 , 0);

View File

@ -19,8 +19,8 @@ import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.group.ChannelGroup; import io.netty.channel.group.ChannelGroup;
import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.ActiveMQException;
import org.apache.activemq.core.buffers.impl.ChannelBufferWrapper; import org.apache.activemq.core.buffers.impl.ChannelBufferWrapper;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
import org.apache.activemq.core.client.HornetQClientMessageBundle; import org.apache.activemq.core.client.ActiveMQClientMessageBundle;
import org.apache.activemq.spi.core.remoting.BufferHandler; import org.apache.activemq.spi.core.remoting.BufferHandler;
import org.apache.activemq.spi.core.remoting.ConnectionLifeCycleListener; import org.apache.activemq.spi.core.remoting.ConnectionLifeCycleListener;
@ -32,7 +32,7 @@ import org.apache.activemq.spi.core.remoting.ConnectionLifeCycleListener;
* @author <a href="mailto:nmaurer@redhat.com">Norman Maurer</a> * @author <a href="mailto:nmaurer@redhat.com">Norman Maurer</a>
* @version $Rev$, $Date$ * @version $Rev$, $Date$
*/ */
public class HornetQChannelHandler extends ChannelDuplexHandler public class ActiveMQChannelHandler extends ChannelDuplexHandler
{ {
private final ChannelGroup group; private final ChannelGroup group;
@ -42,7 +42,7 @@ public class HornetQChannelHandler extends ChannelDuplexHandler
volatile boolean active; volatile boolean active;
protected HornetQChannelHandler(final ChannelGroup group, protected ActiveMQChannelHandler(final ChannelGroup group,
final BufferHandler handler, final BufferHandler handler,
final ConnectionLifeCycleListener listener) final ConnectionLifeCycleListener listener)
{ {
@ -98,7 +98,7 @@ public class HornetQChannelHandler extends ChannelDuplexHandler
// and we don't want to spew out stack traces in that event // and we don't want to spew out stack traces in that event
// The user has access to this exeception anyway via the ActiveMQException initial cause // The user has access to this exeception anyway via the ActiveMQException initial cause
ActiveMQException me = HornetQClientMessageBundle.BUNDLE.nettyError(); ActiveMQException me = ActiveMQClientMessageBundle.BUNDLE.nettyError();
me.initCause(cause); me.initCause(cause);
synchronized (listener) synchronized (listener)
@ -110,7 +110,7 @@ public class HornetQChannelHandler extends ChannelDuplexHandler
} }
catch (Exception ex) catch (Exception ex)
{ {
HornetQClientLogger.LOGGER.errorCallingLifeCycleListener(ex); ActiveMQClientLogger.LOGGER.errorCallingLifeCycleListener(ex);
} }
} }
} }

View File

@ -24,9 +24,9 @@ import org.apache.activemq.utils.DataConstants;
* @author <a href="nmaurer@redhat.com">Norman Maurer</a> * @author <a href="nmaurer@redhat.com">Norman Maurer</a>
* @version $Revision: 7839 $, $Date: 2009-08-21 02:26:39 +0900 (2009-08-21, ) $ * @version $Revision: 7839 $, $Date: 2009-08-21 02:26:39 +0900 (2009-08-21, ) $
*/ */
public class HornetQFrameDecoder2 extends LengthFieldBasedFrameDecoder public class ActiveMQFrameDecoder2 extends LengthFieldBasedFrameDecoder
{ {
public HornetQFrameDecoder2() public ActiveMQFrameDecoder2()
{ {
super(Integer.MAX_VALUE, 0, DataConstants.SIZE_INT); super(Integer.MAX_VALUE, 0, DataConstants.SIZE_INT);
} }

View File

@ -29,8 +29,8 @@ import org.apache.activemq.api.core.ActiveMQBuffers;
import org.apache.activemq.api.core.ActiveMQInterruptedException; import org.apache.activemq.api.core.ActiveMQInterruptedException;
import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.TransportConfiguration;
import org.apache.activemq.core.buffers.impl.ChannelBufferWrapper; import org.apache.activemq.core.buffers.impl.ChannelBufferWrapper;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
import org.apache.activemq.core.security.HornetQPrincipal; import org.apache.activemq.core.security.ActiveMQPrincipal;
import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.spi.core.protocol.RemotingConnection;
import org.apache.activemq.spi.core.remoting.Connection; import org.apache.activemq.spi.core.remoting.Connection;
import org.apache.activemq.spi.core.remoting.ConnectionLifeCycleListener; import org.apache.activemq.spi.core.remoting.ConnectionLifeCycleListener;
@ -110,7 +110,7 @@ public class NettyConnection implements Connection
} }
catch (Throwable e) catch (Throwable e)
{ {
HornetQClientLogger.LOGGER.warn(e.getMessage(), e); ActiveMQClientLogger.LOGGER.warn(e.getMessage(), e);
} }
} }
} }
@ -320,7 +320,7 @@ public class NettyConnection implements Connection
if (!ok) if (!ok)
{ {
HornetQClientLogger.LOGGER.timeoutFlushingPacket(); ActiveMQClientLogger.LOGGER.timeoutFlushingPacket();
} }
break; break;
@ -369,7 +369,7 @@ public class NettyConnection implements Connection
} }
//never allow this //never allow this
public HornetQPrincipal getDefaultHornetQPrincipal() public ActiveMQPrincipal getDefaultActiveMQPrincipal()
{ {
return null; return null;
} }
@ -428,7 +428,7 @@ public class NettyConnection implements Connection
if (!sslCloseFuture.awaitUninterruptibly(10000)) if (!sslCloseFuture.awaitUninterruptibly(10000))
{ {
HornetQClientLogger.LOGGER.timeoutClosingSSL(); ActiveMQClientLogger.LOGGER.timeoutClosingSSL();
} }
} }
catch (Throwable t) catch (Throwable t)
@ -440,7 +440,7 @@ public class NettyConnection implements Connection
ChannelFuture closeFuture = channel.close(); ChannelFuture closeFuture = channel.close();
if (!closeFuture.awaitUninterruptibly(10000)) if (!closeFuture.awaitUninterruptibly(10000))
{ {
HornetQClientLogger.LOGGER.timeoutClosingNettyChannel(); ActiveMQClientLogger.LOGGER.timeoutClosingNettyChannel();
} }
} }
// Inner classes ------------------------------------------------- // Inner classes -------------------------------------------------

View File

@ -97,12 +97,12 @@ import io.netty.util.concurrent.Future;
import io.netty.util.concurrent.GlobalEventExecutor; import io.netty.util.concurrent.GlobalEventExecutor;
import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.ActiveMQException;
import org.apache.activemq.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.api.config.ActiveMQDefaultConfiguration;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
import org.apache.activemq.core.client.HornetQClientMessageBundle; import org.apache.activemq.core.client.ActiveMQClientMessageBundle;
import org.apache.activemq.core.client.impl.ClientSessionFactoryImpl; import org.apache.activemq.core.client.impl.ClientSessionFactoryImpl;
import org.apache.activemq.core.protocol.core.impl.HornetQClientProtocolManager; import org.apache.activemq.core.protocol.core.impl.ActiveMQClientProtocolManager;
import org.apache.activemq.core.remoting.impl.ssl.SSLSupport; import org.apache.activemq.core.remoting.impl.ssl.SSLSupport;
import org.apache.activemq.core.server.HornetQComponent; import org.apache.activemq.core.server.ActiveMQComponent;
import org.apache.activemq.spi.core.remoting.AbstractConnector; import org.apache.activemq.spi.core.remoting.AbstractConnector;
import org.apache.activemq.spi.core.remoting.BufferHandler; import org.apache.activemq.spi.core.remoting.BufferHandler;
import org.apache.activemq.spi.core.remoting.ClientProtocolManager; import org.apache.activemq.spi.core.remoting.ClientProtocolManager;
@ -128,22 +128,22 @@ public class NettyConnector extends AbstractConnector
public static final String JAVAX_KEYSTORE_PASSWORD_PROP_NAME = "javax.net.ssl.keyStorePassword"; public static final String JAVAX_KEYSTORE_PASSWORD_PROP_NAME = "javax.net.ssl.keyStorePassword";
public static final String JAVAX_TRUSTSTORE_PATH_PROP_NAME = "javax.net.ssl.trustStore"; public static final String JAVAX_TRUSTSTORE_PATH_PROP_NAME = "javax.net.ssl.trustStore";
public static final String JAVAX_TRUSTSTORE_PASSWORD_PROP_NAME = "javax.net.ssl.trustStorePassword"; public static final String JAVAX_TRUSTSTORE_PASSWORD_PROP_NAME = "javax.net.ssl.trustStorePassword";
public static final String HORNETQ_KEYSTORE_PROVIDER_PROP_NAME = "org.apache.activemq.ssl.keyStoreProvider"; public static final String ACTIVEMQ_KEYSTORE_PROVIDER_PROP_NAME = "org.apache.activemq.ssl.keyStoreProvider";
public static final String HORNETQ_KEYSTORE_PATH_PROP_NAME = "org.apache.activemq.ssl.keyStore"; public static final String ACTIVEMQ_KEYSTORE_PATH_PROP_NAME = "org.apache.activemq.ssl.keyStore";
public static final String HORNETQ_KEYSTORE_PASSWORD_PROP_NAME = "org.apache.activemq.ssl.keyStorePassword"; public static final String ACTIVEMQ_KEYSTORE_PASSWORD_PROP_NAME = "org.apache.activemq.ssl.keyStorePassword";
public static final String HORNETQ_TRUSTSTORE_PROVIDER_PROP_NAME = "org.apache.activemq.ssl.trustStoreProvider"; public static final String ACTIVEMQ_TRUSTSTORE_PROVIDER_PROP_NAME = "org.apache.activemq.ssl.trustStoreProvider";
public static final String HORNETQ_TRUSTSTORE_PATH_PROP_NAME = "org.apache.activemq.ssl.trustStore"; public static final String ACTIVEMQ_TRUSTSTORE_PATH_PROP_NAME = "org.apache.activemq.ssl.trustStore";
public static final String HORNETQ_TRUSTSTORE_PASSWORD_PROP_NAME = "org.apache.activemq.ssl.trustStorePassword"; public static final String ACTIVEMQ_TRUSTSTORE_PASSWORD_PROP_NAME = "org.apache.activemq.ssl.trustStorePassword";
// Constants for HTTP upgrade // Constants for HTTP upgrade
// These constants are exposed publicly as they are used on the server-side to fetch // These constants are exposed publicly as they are used on the server-side to fetch
// headers from the HTTP request, compute some values and fill the HTTP response // headers from the HTTP request, compute some values and fill the HTTP response
public static final String MAGIC_NUMBER = "CF70DEB8-70F9-4FBA-8B4F-DFC3E723B4CD"; public static final String MAGIC_NUMBER = "CF70DEB8-70F9-4FBA-8B4F-DFC3E723B4CD";
public static final String SEC_HORNETQ_REMOTING_KEY = "Sec-HornetQRemoting-Key"; public static final String SEC_ACTIVEMQ_REMOTING_KEY = "Sec-ActiveMQRemoting-Key";
public static final String SEC_HORNETQ_REMOTING_ACCEPT = "Sec-HornetQRemoting-Accept"; public static final String SEC_ACTIVEMQ_REMOTING_ACCEPT = "Sec-ActiveMQRemoting-Accept";
public static final String HORNETQ_REMOTING = "hornetq-remoting"; public static final String ACTIVEMQ_REMOTING = "activemq-remoting";
private static final AttributeKey<String> REMOTING_KEY = AttributeKey.valueOf(SEC_HORNETQ_REMOTING_KEY); private static final AttributeKey<String> REMOTING_KEY = AttributeKey.valueOf(SEC_ACTIVEMQ_REMOTING_KEY);
// Default Configuration // Default Configuration
public static final Map<String, Object> DEFAULT_CONFIG; public static final Map<String, Object> DEFAULT_CONFIG;
@ -183,7 +183,7 @@ public class NettyConnector extends AbstractConnector
private final boolean httpRequiresSessionId; private final boolean httpRequiresSessionId;
// if true, after the connection, the connector will send // if true, after the connection, the connector will send
// a HTTP GET request (+ Upgrade: hornetq-remoting) that // a HTTP GET request (+ Upgrade: activemq-remoting) that
// will be handled by the server's http server. // will be handled by the server's http server.
private final boolean httpUpgradeEnabled; private final boolean httpUpgradeEnabled;
@ -255,7 +255,7 @@ public class NettyConnector extends AbstractConnector
final Executor threadPool, final Executor threadPool,
final ScheduledExecutorService scheduledThreadPool) final ScheduledExecutorService scheduledThreadPool)
{ {
this(configuration, handler, listener, closeExecutor, threadPool, scheduledThreadPool, new HornetQClientProtocolManager()); this(configuration, handler, listener, closeExecutor, threadPool, scheduledThreadPool, new ActiveMQClientProtocolManager());
} }
@ -273,12 +273,12 @@ public class NettyConnector extends AbstractConnector
if (listener == null) if (listener == null)
{ {
throw HornetQClientMessageBundle.BUNDLE.nullListener(); throw ActiveMQClientMessageBundle.BUNDLE.nullListener();
} }
if (handler == null) if (handler == null)
{ {
throw HornetQClientMessageBundle.BUNDLE.nullHandler(); throw ActiveMQClientMessageBundle.BUNDLE.nullHandler();
} }
this.listener = listener; this.listener = listener;
@ -487,7 +487,7 @@ public class NettyConnector extends AbstractConnector
bootstrap.option(ChannelOption.SO_KEEPALIVE, true); bootstrap.option(ChannelOption.SO_KEEPALIVE, true);
bootstrap.option(ChannelOption.SO_REUSEADDR, true); bootstrap.option(ChannelOption.SO_REUSEADDR, true);
bootstrap.option(ChannelOption.ALLOCATOR, new UnpooledByteBufAllocator(false)); bootstrap.option(ChannelOption.ALLOCATOR, new UnpooledByteBufAllocator(false));
channelGroup = new DefaultChannelGroup("hornetq-connector", GlobalEventExecutor.INSTANCE); channelGroup = new DefaultChannelGroup("activemq-connector", GlobalEventExecutor.INSTANCE);
final SSLContext context; final SSLContext context;
if (sslEnabled) if (sslEnabled)
@ -507,17 +507,17 @@ public class NettyConnector extends AbstractConnector
realKeyStorePassword = System.getProperty(JAVAX_KEYSTORE_PASSWORD_PROP_NAME); realKeyStorePassword = System.getProperty(JAVAX_KEYSTORE_PASSWORD_PROP_NAME);
} }
if (System.getProperty(HORNETQ_KEYSTORE_PROVIDER_PROP_NAME) != null) if (System.getProperty(ACTIVEMQ_KEYSTORE_PROVIDER_PROP_NAME) != null)
{ {
realKeyStoreProvider = System.getProperty(HORNETQ_KEYSTORE_PROVIDER_PROP_NAME); realKeyStoreProvider = System.getProperty(ACTIVEMQ_KEYSTORE_PROVIDER_PROP_NAME);
} }
if (System.getProperty(HORNETQ_KEYSTORE_PATH_PROP_NAME) != null) if (System.getProperty(ACTIVEMQ_KEYSTORE_PATH_PROP_NAME) != null)
{ {
realKeyStorePath = System.getProperty(HORNETQ_KEYSTORE_PATH_PROP_NAME); realKeyStorePath = System.getProperty(ACTIVEMQ_KEYSTORE_PATH_PROP_NAME);
} }
if (System.getProperty(HORNETQ_KEYSTORE_PASSWORD_PROP_NAME) != null) if (System.getProperty(ACTIVEMQ_KEYSTORE_PASSWORD_PROP_NAME) != null)
{ {
realKeyStorePassword = System.getProperty(HORNETQ_KEYSTORE_PASSWORD_PROP_NAME); realKeyStorePassword = System.getProperty(ACTIVEMQ_KEYSTORE_PASSWORD_PROP_NAME);
} }
String realTrustStorePath = trustStorePath; String realTrustStorePath = trustStorePath;
@ -532,17 +532,17 @@ public class NettyConnector extends AbstractConnector
realTrustStorePassword = System.getProperty(JAVAX_TRUSTSTORE_PASSWORD_PROP_NAME); realTrustStorePassword = System.getProperty(JAVAX_TRUSTSTORE_PASSWORD_PROP_NAME);
} }
if (System.getProperty(HORNETQ_TRUSTSTORE_PROVIDER_PROP_NAME) != null) if (System.getProperty(ACTIVEMQ_TRUSTSTORE_PROVIDER_PROP_NAME) != null)
{ {
realTrustStoreProvider = System.getProperty(HORNETQ_TRUSTSTORE_PROVIDER_PROP_NAME); realTrustStoreProvider = System.getProperty(ACTIVEMQ_TRUSTSTORE_PROVIDER_PROP_NAME);
} }
if (System.getProperty(HORNETQ_TRUSTSTORE_PATH_PROP_NAME) != null) if (System.getProperty(ACTIVEMQ_TRUSTSTORE_PATH_PROP_NAME) != null)
{ {
realTrustStorePath = System.getProperty(HORNETQ_TRUSTSTORE_PATH_PROP_NAME); realTrustStorePath = System.getProperty(ACTIVEMQ_TRUSTSTORE_PATH_PROP_NAME);
} }
if (System.getProperty(HORNETQ_TRUSTSTORE_PASSWORD_PROP_NAME) != null) if (System.getProperty(ACTIVEMQ_TRUSTSTORE_PASSWORD_PROP_NAME) != null)
{ {
realTrustStorePassword = System.getProperty(HORNETQ_TRUSTSTORE_PASSWORD_PROP_NAME); realTrustStorePassword = System.getProperty(ACTIVEMQ_TRUSTSTORE_PASSWORD_PROP_NAME);
} }
context = SSLSupport.createContext(realKeyStoreProvider, realKeyStorePath, realKeyStorePassword, realTrustStoreProvider, realTrustStorePath, realTrustStorePassword); context = SSLSupport.createContext(realKeyStoreProvider, realKeyStorePath, realKeyStorePassword, realTrustStoreProvider, realTrustStorePath, realTrustStorePassword);
} }
@ -591,7 +591,7 @@ public class NettyConnector extends AbstractConnector
} }
catch (IllegalArgumentException e) catch (IllegalArgumentException e)
{ {
HornetQClientLogger.LOGGER.invalidCipherSuite(SSLSupport.parseArrayIntoCommandSeparatedList(engine.getSupportedCipherSuites())); ActiveMQClientLogger.LOGGER.invalidCipherSuite(SSLSupport.parseArrayIntoCommandSeparatedList(engine.getSupportedCipherSuites()));
throw e; throw e;
} }
} }
@ -604,7 +604,7 @@ public class NettyConnector extends AbstractConnector
} }
catch (IllegalArgumentException e) catch (IllegalArgumentException e)
{ {
HornetQClientLogger.LOGGER.invalidProtocol(SSLSupport.parseArrayIntoCommandSeparatedList(engine.getSupportedProtocols())); ActiveMQClientLogger.LOGGER.invalidProtocol(SSLSupport.parseArrayIntoCommandSeparatedList(engine.getSupportedProtocols()));
throw e; throw e;
} }
} }
@ -639,7 +639,7 @@ public class NettyConnector extends AbstractConnector
protocolManager.addChannelHandlers(pipeline); protocolManager.addChannelHandlers(pipeline);
pipeline.addLast(new HornetQClientChannelHandler(channelGroup, handler, new Listener())); pipeline.addLast(new ActiveMQClientChannelHandler(channelGroup, handler, new Listener()));
} }
}); });
@ -650,7 +650,7 @@ public class NettyConnector extends AbstractConnector
batchFlusherFuture = scheduledThreadPool.scheduleWithFixedDelay(flusher, batchDelay, batchDelay, TimeUnit.MILLISECONDS); batchFlusherFuture = scheduledThreadPool.scheduleWithFixedDelay(flusher, batchDelay, batchDelay, TimeUnit.MILLISECONDS);
} }
HornetQClientLogger.LOGGER.debug("Started Netty Connector version " + TransportConstants.NETTY_VERSION); ActiveMQClientLogger.LOGGER.debug("Started Netty Connector version " + TransportConstants.NETTY_VERSION);
} }
public synchronized void close() public synchronized void close()
@ -719,7 +719,7 @@ public class NettyConnector extends AbstractConnector
} }
} }
HornetQClientLogger.LOGGER.debug("Remote destination: " + remoteDestination); ActiveMQClientLogger.LOGGER.debug("Remote destination: " + remoteDestination);
ChannelFuture future; ChannelFuture future;
//port 0 does not work so only use local address if set //port 0 does not work so only use local address if set
@ -755,13 +755,13 @@ public class NettyConnector extends AbstractConnector
if (handshakeFuture.isSuccess()) if (handshakeFuture.isSuccess())
{ {
ChannelPipeline channelPipeline = ch.pipeline(); ChannelPipeline channelPipeline = ch.pipeline();
HornetQChannelHandler channelHandler = channelPipeline.get(HornetQChannelHandler.class); ActiveMQChannelHandler channelHandler = channelPipeline.get(ActiveMQChannelHandler.class);
channelHandler.active = true; channelHandler.active = true;
} }
else else
{ {
ch.close().awaitUninterruptibly(); ch.close().awaitUninterruptibly();
HornetQClientLogger.LOGGER.errorCreatingNettyConnection(handshakeFuture.cause()); ActiveMQClientLogger.LOGGER.errorCreatingNettyConnection(handshakeFuture.cause());
return null; return null;
} }
} }
@ -783,7 +783,7 @@ public class NettyConnector extends AbstractConnector
URI uri = new URI("http", null, host, port, null, null, null); URI uri = new URI("http", null, host, port, null, null, null);
HttpRequest request = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, uri.getRawPath()); HttpRequest request = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, uri.getRawPath());
request.headers().set(HttpHeaders.Names.HOST, host); request.headers().set(HttpHeaders.Names.HOST, host);
request.headers().set(HttpHeaders.Names.UPGRADE, HORNETQ_REMOTING); request.headers().set(HttpHeaders.Names.UPGRADE, ACTIVEMQ_REMOTING);
request.headers().set(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.UPGRADE); request.headers().set(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.UPGRADE);
final String endpoint = ConfigurationHelper.getStringProperty(TransportConstants.HTTP_UPGRADE_ENDPOINT_PROP_NAME, final String endpoint = ConfigurationHelper.getStringProperty(TransportConstants.HTTP_UPGRADE_ENDPOINT_PROP_NAME,
@ -797,10 +797,10 @@ public class NettyConnector extends AbstractConnector
// Get 16 bit nonce and base 64 encode it // Get 16 bit nonce and base 64 encode it
byte[] nonce = randomBytes(16); byte[] nonce = randomBytes(16);
String key = base64(nonce); String key = base64(nonce);
request.headers().set(SEC_HORNETQ_REMOTING_KEY, key); request.headers().set(SEC_ACTIVEMQ_REMOTING_KEY, key);
ch.attr(REMOTING_KEY).set(key); ch.attr(REMOTING_KEY).set(key);
HornetQClientLogger.LOGGER.debugf("Sending HTTP request %s", request); ActiveMQClientLogger.LOGGER.debugf("Sending HTTP request %s", request);
// Send the HTTP request. // Send the HTTP request.
ch.writeAndFlush(request); ch.writeAndFlush(request);
@ -812,14 +812,14 @@ public class NettyConnector extends AbstractConnector
} }
catch (URISyntaxException e) catch (URISyntaxException e)
{ {
HornetQClientLogger.LOGGER.errorCreatingNettyConnection(e); ActiveMQClientLogger.LOGGER.errorCreatingNettyConnection(e);
return null; return null;
} }
} }
else else
{ {
ChannelPipeline channelPipeline = ch.pipeline(); ChannelPipeline channelPipeline = ch.pipeline();
HornetQChannelHandler channelHandler = channelPipeline.get(HornetQChannelHandler.class); ActiveMQChannelHandler channelHandler = channelPipeline.get(ActiveMQChannelHandler.class);
channelHandler.active = true; channelHandler.active = true;
} }
@ -835,7 +835,7 @@ public class NettyConnector extends AbstractConnector
if (t != null && !(t instanceof ConnectException)) if (t != null && !(t instanceof ConnectException))
{ {
HornetQClientLogger.LOGGER.errorCreatingNettyConnection(future.cause()); ActiveMQClientLogger.LOGGER.errorCreatingNettyConnection(future.cause());
} }
return null; return null;
@ -852,9 +852,9 @@ public class NettyConnector extends AbstractConnector
// Inner classes ------------------------------------------------- // Inner classes -------------------------------------------------
private static final class HornetQClientChannelHandler extends HornetQChannelHandler private static final class ActiveMQClientChannelHandler extends ActiveMQChannelHandler
{ {
HornetQClientChannelHandler(final ChannelGroup group, ActiveMQClientChannelHandler(final ChannelGroup group,
final BufferHandler handler, final BufferHandler handler,
final ConnectionLifeCycleListener listener) final ConnectionLifeCycleListener listener)
{ {
@ -882,29 +882,29 @@ public class NettyConnector extends AbstractConnector
{ {
HttpResponse response = (HttpResponse) msg; HttpResponse response = (HttpResponse) msg;
if (response.getStatus().code() == HttpResponseStatus.SWITCHING_PROTOCOLS.code() if (response.getStatus().code() == HttpResponseStatus.SWITCHING_PROTOCOLS.code()
&& response.headers().get(HttpHeaders.Names.UPGRADE).equals(HORNETQ_REMOTING)) && response.headers().get(HttpHeaders.Names.UPGRADE).equals(ACTIVEMQ_REMOTING))
{ {
String accept = response.headers().get(SEC_HORNETQ_REMOTING_ACCEPT); String accept = response.headers().get(SEC_ACTIVEMQ_REMOTING_ACCEPT);
String expectedResponse = createExpectedResponse(MAGIC_NUMBER, ctx.channel().attr(REMOTING_KEY).get()); String expectedResponse = createExpectedResponse(MAGIC_NUMBER, ctx.channel().attr(REMOTING_KEY).get());
if (expectedResponse.equals(accept)) if (expectedResponse.equals(accept))
{ {
// remove the http handlers and flag the hornetq channel handler as active // remove the http handlers and flag the activemq channel handler as active
pipeline.remove(httpClientCodec); pipeline.remove(httpClientCodec);
pipeline.remove(this); pipeline.remove(this);
handshakeComplete = true; handshakeComplete = true;
HornetQChannelHandler channelHandler = pipeline.get(HornetQChannelHandler.class); ActiveMQChannelHandler channelHandler = pipeline.get(ActiveMQChannelHandler.class);
channelHandler.active = true; channelHandler.active = true;
} }
else else
{ {
HornetQClientLogger.LOGGER.httpHandshakeFailed(accept, expectedResponse); ActiveMQClientLogger.LOGGER.httpHandshakeFailed(accept, expectedResponse);
ctx.close(); ctx.close();
} }
} }
else if (response.getStatus().code() == HttpResponseStatus.FORBIDDEN.code()) else if (response.getStatus().code() == HttpResponseStatus.FORBIDDEN.code())
{ {
HornetQClientLogger.LOGGER.httpUpgradeNotSupportedByRemoteAcceptor(); ActiveMQClientLogger.LOGGER.httpUpgradeNotSupportedByRemoteAcceptor();
ctx.close(); ctx.close();
} }
latch.countDown(); latch.countDown();
@ -914,7 +914,7 @@ public class NettyConnector extends AbstractConnector
@Override @Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception
{ {
HornetQClientLogger.LOGGER.errorCreatingNettyConnection(cause); ActiveMQClientLogger.LOGGER.errorCreatingNettyConnection(cause);
ctx.close(); ctx.close();
} }
@ -1087,11 +1087,11 @@ public class NettyConnector extends AbstractConnector
private class Listener implements ConnectionLifeCycleListener private class Listener implements ConnectionLifeCycleListener
{ {
public void connectionCreated(final HornetQComponent component, final Connection connection, final String protocol) public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol)
{ {
if (connections.putIfAbsent(connection.getID(), connection) != null) if (connections.putIfAbsent(connection.getID(), connection) != null)
{ {
throw HornetQClientMessageBundle.BUNDLE.connectionExists(connection.getID()); throw ActiveMQClientMessageBundle.BUNDLE.connectionExists(connection.getID());
} }
} }
@ -1173,13 +1173,13 @@ public class NettyConnector extends AbstractConnector
InetAddress inetAddr2 = InetAddress.getByName(this.host); InetAddress inetAddr2 = InetAddress.getByName(this.host);
String ip1 = inetAddr1.getHostAddress(); String ip1 = inetAddr1.getHostAddress();
String ip2 = inetAddr2.getHostAddress(); String ip2 = inetAddr2.getHostAddress();
HornetQClientLogger.LOGGER.debug(this + " host 1: " + host + " ip address: " + ip1 + " host 2: " + this.host + " ip address: " + ip2); ActiveMQClientLogger.LOGGER.debug(this + " host 1: " + host + " ip address: " + ip1 + " host 2: " + this.host + " ip address: " + ip2);
result = ip1.equals(ip2); result = ip1.equals(ip2);
} }
catch (UnknownHostException e) catch (UnknownHostException e)
{ {
HornetQClientLogger.LOGGER.error("Cannot resolve host", e); ActiveMQClientLogger.LOGGER.error("Cannot resolve host", e);
} }
return result; return result;

View File

@ -31,7 +31,7 @@ import io.netty.util.concurrent.FutureListener;
import io.netty.util.concurrent.ImmediateEventExecutor; import io.netty.util.concurrent.ImmediateEventExecutor;
import io.netty.util.concurrent.Promise; import io.netty.util.concurrent.Promise;
import org.apache.activemq.core.client.impl.ClientSessionFactoryImpl; import org.apache.activemq.core.client.impl.ClientSessionFactoryImpl;
import org.apache.activemq.utils.HornetQThreadFactory; import org.apache.activemq.utils.ActiveMQThreadFactory;
import java.security.AccessController; import java.security.AccessController;
import java.security.PrivilegedAction; import java.security.PrivilegedAction;
@ -90,7 +90,7 @@ public class SharedNioEventLoopGroup extends NioEventLoopGroup
} }
else else
{ {
instance = new SharedNioEventLoopGroup(numThreads, new HornetQThreadFactory("HornetQ-client-netty-threads", true, getThisClassLoader())); instance = new SharedNioEventLoopGroup(numThreads, new ActiveMQThreadFactory("ActiveMQ-client-netty-threads", true, getThisClassLoader()));
} }
instance.nioChannelFactoryCount.incrementAndGet(); instance.nioChannelFactoryCount.incrementAndGet();
return instance; return instance;

View File

@ -172,7 +172,7 @@ public class TransportConstants
public static final boolean DEFAULT_HTTP_UPGRADE_ENABLED = false; public static final boolean DEFAULT_HTTP_UPGRADE_ENABLED = false;
public static final String DEFAULT_SERVLET_PATH = "/messaging/HornetQServlet"; public static final String DEFAULT_SERVLET_PATH = "/messaging/ActiveMQServlet";
public static final long DEFAULT_BATCH_DELAY = 0; public static final long DEFAULT_BATCH_DELAY = 0;

View File

@ -34,7 +34,7 @@ import org.apache.activemq.utils.ClassloadingUtil;
* @author <a href="mailto:jmesnil@redhat.com">Jeff Mesnil</a> * @author <a href="mailto:jmesnil@redhat.com">Jeff Mesnil</a>
* @author Justin Bertram * @author Justin Bertram
* *
* Please note, this class supports PKCS#11 keystores, but there are no specific tests in the HornetQ test-suite to * Please note, this class supports PKCS#11 keystores, but there are no specific tests in the ActiveMQ test-suite to
* validate/verify this works because this requires a functioning PKCS#11 provider which is not available by default * validate/verify this works because this requires a functioning PKCS#11 provider which is not available by default
* (see java.security.Security#getProviders()). The main thing to keep in mind is that PKCS#11 keystores will have a * (see java.security.Security#getProviders()). The main thing to keep in mind is that PKCS#11 keystores will have a
* null keystore path. * null keystore path.

View File

@ -13,7 +13,7 @@
/** /**
* Remoting API. * Remoting API.
* <br> * <br>
* This package defines the API used by HornetQ for remoting. * This package defines the API used by ActiveMQ for remoting.
*/ */
package org.apache.activemq.core.remoting; package org.apache.activemq.core.remoting;

View File

@ -17,13 +17,13 @@ package org.apache.activemq.core.security;
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
* 1/30/12 * 1/30/12
*/ */
public class HornetQPrincipal public class ActiveMQPrincipal
{ {
private final String userName; private final String userName;
private final String password; private final String password;
public HornetQPrincipal(String userName, String password) public ActiveMQPrincipal(String userName, String password)
{ {
this.userName = userName; this.userName = userName;
this.password = password; this.password = password;

View File

@ -21,8 +21,8 @@ import java.util.concurrent.Executor;
import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.ActiveMQBuffer;
import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.ActiveMQException;
import org.apache.activemq.api.core.ActiveMQInterruptedException; import org.apache.activemq.api.core.ActiveMQInterruptedException;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
import org.apache.activemq.core.client.HornetQClientMessageBundle; import org.apache.activemq.core.client.ActiveMQClientMessageBundle;
import org.apache.activemq.core.remoting.CloseListener; import org.apache.activemq.core.remoting.CloseListener;
import org.apache.activemq.core.remoting.FailureListener; import org.apache.activemq.core.remoting.FailureListener;
import org.apache.activemq.spi.core.remoting.Connection; import org.apache.activemq.spi.core.remoting.Connection;
@ -65,14 +65,14 @@ public abstract class AbstractRemotingConnection implements RemotingConnection
catch (ActiveMQInterruptedException interrupted) catch (ActiveMQInterruptedException interrupted)
{ {
// this is an expected behaviour.. no warn or error here // this is an expected behaviour.. no warn or error here
HornetQClientLogger.LOGGER.debug("thread interrupted", interrupted); ActiveMQClientLogger.LOGGER.debug("thread interrupted", interrupted);
} }
catch (final Throwable t) catch (final Throwable t)
{ {
// Failure of one listener to execute shouldn't prevent others // Failure of one listener to execute shouldn't prevent others
// from // from
// executing // executing
HornetQClientLogger.LOGGER.errorCallingFailureListener(t); ActiveMQClientLogger.LOGGER.errorCallingFailureListener(t);
} }
} }
} }
@ -93,7 +93,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection
// Failure of one listener to execute shouldn't prevent others // Failure of one listener to execute shouldn't prevent others
// from // from
// executing // executing
HornetQClientLogger.LOGGER.errorCallingFailureListener(t); ActiveMQClientLogger.LOGGER.errorCallingFailureListener(t);
} }
} }
} }
@ -119,7 +119,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection
{ {
if (listener == null) if (listener == null)
{ {
throw HornetQClientMessageBundle.BUNDLE.failListenerCannotBeNull(); throw ActiveMQClientMessageBundle.BUNDLE.failListenerCannotBeNull();
} }
failureListeners.add(listener); failureListeners.add(listener);
} }
@ -128,7 +128,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection
{ {
if (listener == null) if (listener == null)
{ {
throw HornetQClientMessageBundle.BUNDLE.failListenerCannotBeNull(); throw ActiveMQClientMessageBundle.BUNDLE.failListenerCannotBeNull();
} }
return failureListeners.remove(listener); return failureListeners.remove(listener);
@ -138,7 +138,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection
{ {
if (listener == null) if (listener == null)
{ {
throw HornetQClientMessageBundle.BUNDLE.closeListenerCannotBeNull(); throw ActiveMQClientMessageBundle.BUNDLE.closeListenerCannotBeNull();
} }
closeListeners.add(listener); closeListeners.add(listener);
@ -148,7 +148,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection
{ {
if (listener == null) if (listener == null)
{ {
throw HornetQClientMessageBundle.BUNDLE.closeListenerCannotBeNull(); throw ActiveMQClientMessageBundle.BUNDLE.closeListenerCannotBeNull();
} }
return closeListeners.remove(listener); return closeListeners.remove(listener);

View File

@ -110,7 +110,7 @@ public interface RemotingConnection extends BufferHandler
void setFailureListeners(List<FailureListener> listeners); void setFailureListeners(List<FailureListener> listeners);
/** /**
* creates a new HornetQBuffer of the specified size. * creates a new ActiveMQBuffer of the specified size.
* *
* @param size the size of buffer required * @param size the size of buffer required
* @return the buffer * @return the buffer

View File

@ -15,7 +15,7 @@ package org.apache.activemq.spi.core.remoting;
import io.netty.channel.ChannelFutureListener; import io.netty.channel.ChannelFutureListener;
import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.ActiveMQBuffer;
import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.TransportConfiguration;
import org.apache.activemq.core.security.HornetQPrincipal; import org.apache.activemq.core.security.ActiveMQPrincipal;
import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.spi.core.protocol.RemotingConnection;
/** /**
@ -27,7 +27,7 @@ import org.apache.activemq.spi.core.protocol.RemotingConnection;
public interface Connection public interface Connection
{ {
/** /**
* Create a new HornetQBuffer of the given size. * Create a new ActiveMQBuffer of the given size.
* *
* @param size the size of buffer to create * @param size the size of buffer to create
* @return the new buffer. * @return the new buffer.
@ -106,7 +106,7 @@ public interface Connection
*/ */
TransportConfiguration getConnectorConfig(); TransportConfiguration getConnectorConfig();
HornetQPrincipal getDefaultHornetQPrincipal(); ActiveMQPrincipal getDefaultActiveMQPrincipal();
/** /**
* the InVM Connection has some special handling as it doesn't use Netty ProtocolChannel * the InVM Connection has some special handling as it doesn't use Netty ProtocolChannel

View File

@ -13,7 +13,7 @@
package org.apache.activemq.spi.core.remoting; package org.apache.activemq.spi.core.remoting;
import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.ActiveMQException;
import org.apache.activemq.core.server.HornetQComponent; import org.apache.activemq.core.server.ActiveMQComponent;
/** /**
* A ConnectionLifeCycleListener is called by the remoting implementation to notify of connection events. * A ConnectionLifeCycleListener is called by the remoting implementation to notify of connection events.
@ -29,14 +29,14 @@ public interface ConnectionLifeCycleListener
* <p> * <p>
* Leaving this method here and adding a different one at * Leaving this method here and adding a different one at
* {@code ServerConnectionLifeCycleListener} is a compromise for a reasonable split between the * {@code ServerConnectionLifeCycleListener} is a compromise for a reasonable split between the
* hornetq-server and hornetq-client packages while avoiding to pull too much into hornetq-core. * activemq-server and activemq-client packages while avoiding to pull too much into activemq-core.
* The pivotal point keeping us from removing the method is {@link ConnectorFactory} and the * The pivotal point keeping us from removing the method is {@link ConnectorFactory} and the
* usage of it. * usage of it.
* @param component This will probably be an {@code Acceptor} and only used on the server side. * @param component This will probably be an {@code Acceptor} and only used on the server side.
* @param connection the connection that has been created * @param connection the connection that has been created
* @param protocol the messaging protocol type this connection uses * @param protocol the messaging protocol type this connection uses
*/ */
void connectionCreated(HornetQComponent component, Connection connection, String protocol); void connectionCreated(ActiveMQComponent component, Connection connection, String protocol);
/** /**
* Called when a connection is destroyed. * Called when a connection is destroyed.

View File

@ -14,7 +14,7 @@
* Remoting SPI. * Remoting SPI.
* <br> * <br>
* This package defines the Service Provide Interface that * This package defines the Service Provide Interface that
* remoting providers must implement to be supported by HornetQ. * remoting providers must implement to be supported by ActiveMQ.
*/ */
package org.apache.activemq.spi.core.remoting; package org.apache.activemq.spi.core.remoting;

View File

@ -24,7 +24,7 @@ import org.apache.activemq.api.core.ActiveMQBuffer;
* *
* *
*/ */
public class HornetQBufferInputStream extends InputStream public class ActiveMQBufferInputStream extends InputStream
{ {
/* (non-Javadoc) /* (non-Javadoc)
@ -41,7 +41,7 @@ public class HornetQBufferInputStream extends InputStream
// Public -------------------------------------------------------- // Public --------------------------------------------------------
public HornetQBufferInputStream(final ActiveMQBuffer paramByteBuffer) public ActiveMQBufferInputStream(final ActiveMQBuffer paramByteBuffer)
{ {
bb = paramByteBuffer; bb = paramByteBuffer;
} }

View File

@ -16,7 +16,7 @@ import org.apache.activemq.api.core.ActiveMQBuffer;
import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.SimpleString;
/** /**
* Helper methods to read and write from HornetQBuffer. * Helper methods to read and write from ActiveMQBuffer.
* *
* @author <a href="mailto:clebert.suconic@jboss.org">Clebert Suconic</a> * @author <a href="mailto:clebert.suconic@jboss.org">Clebert Suconic</a>
* *

View File

@ -13,8 +13,8 @@
package org.apache.activemq.utils; package org.apache.activemq.utils;
import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.ActiveMQException;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
import org.apache.activemq.core.client.HornetQClientMessageBundle; import org.apache.activemq.core.client.ActiveMQClientMessageBundle;
import java.util.HashSet; import java.util.HashSet;
import java.util.Map; import java.util.Map;
@ -76,7 +76,7 @@ public class ConfigurationHelper
} }
else if (prop instanceof Number == false) else if (prop instanceof Number == false)
{ {
HornetQClientLogger.LOGGER.propertyNotInteger(propName, prop.getClass().getName()); ActiveMQClientLogger.LOGGER.propertyNotInteger(propName, prop.getClass().getName());
return def; return def;
} }
@ -109,7 +109,7 @@ public class ConfigurationHelper
} }
else if (prop instanceof Number == false) else if (prop instanceof Number == false)
{ {
HornetQClientLogger.LOGGER.propertyNotLong(propName, prop.getClass().getName()); ActiveMQClientLogger.LOGGER.propertyNotLong(propName, prop.getClass().getName());
return def; return def;
} }
@ -142,7 +142,7 @@ public class ConfigurationHelper
} }
else if (prop instanceof Boolean == false) else if (prop instanceof Boolean == false)
{ {
HornetQClientLogger.LOGGER.propertyNotBoolean(propName, prop.getClass().getName()); ActiveMQClientLogger.LOGGER.propertyNotBoolean(propName, prop.getClass().getName());
return def; return def;
} }
@ -224,7 +224,7 @@ public class ConfigurationHelper
if (classImpl == null) if (classImpl == null)
{ {
throw HornetQClientMessageBundle.BUNDLE.noCodec(); throw ActiveMQClientMessageBundle.BUNDLE.noCodec();
} }
SensitiveDataCodec<String> codec = null; SensitiveDataCodec<String> codec = null;
@ -234,7 +234,7 @@ public class ConfigurationHelper
} }
catch (ActiveMQException e1) catch (ActiveMQException e1)
{ {
throw HornetQClientMessageBundle.BUNDLE.failedToGetDecoder(e1); throw ActiveMQClientMessageBundle.BUNDLE.failedToGetDecoder(e1);
} }
try try
@ -243,7 +243,7 @@ public class ConfigurationHelper
} }
catch (Exception e) catch (Exception e)
{ {
throw HornetQClientMessageBundle.BUNDLE.errordecodingPassword(e); throw ActiveMQClientMessageBundle.BUNDLE.errordecodingPassword(e);
} }
} }

View File

@ -12,7 +12,7 @@
*/ */
package org.apache.activemq.utils; package org.apache.activemq.utils;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
@ -105,7 +105,7 @@ public class MemorySize
// throw new IllegalStateException("Warning: JVM allocated more data what would make results invalid " + // throw new IllegalStateException("Warning: JVM allocated more data what would make results invalid " +
// totalMemory1 + ":" + totalMemory2); // totalMemory1 + ":" + totalMemory2);
HornetQClientLogger.LOGGER.jvmAllocatedMoreMemory(totalMemory1, totalMemory2); ActiveMQClientLogger.LOGGER.jvmAllocatedMoreMemory(totalMemory1, totalMemory2);
} }
return size; return size;

View File

@ -16,7 +16,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.Executor; import java.util.concurrent.Executor;
import org.apache.activemq.api.core.ActiveMQInterruptedException; import org.apache.activemq.api.core.ActiveMQInterruptedException;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
/** /**
@ -106,11 +106,11 @@ public final class OrderedExecutorFactory implements ExecutorFactory
catch (ActiveMQInterruptedException e) catch (ActiveMQInterruptedException e)
{ {
// This could happen during shutdowns. Nothing to be concerned about here // This could happen during shutdowns. Nothing to be concerned about here
HornetQClientLogger.LOGGER.debug("Interrupted Thread", e); ActiveMQClientLogger.LOGGER.debug("Interrupted Thread", e);
} }
catch (Throwable t) catch (Throwable t)
{ {
HornetQClientLogger.LOGGER.caughtunexpectedThrowable(t); ActiveMQClientLogger.LOGGER.caughtunexpectedThrowable(t);
} }
} }
} }

View File

@ -24,7 +24,7 @@ import java.util.Set;
import java.util.TreeSet; import java.util.TreeSet;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
/** /**
* A SoftValueHashMap * A SoftValueHashMap
@ -35,7 +35,7 @@ import org.apache.activemq.core.client.HornetQClientLogger;
*/ */
public class SoftValueHashMap<K, V extends SoftValueHashMap.ValueCache> implements Map<K, V> public class SoftValueHashMap<K, V extends SoftValueHashMap.ValueCache> implements Map<K, V>
{ {
private final boolean isTrace = HornetQClientLogger.LOGGER.isTraceEnabled(); private final boolean isTrace = ActiveMQClientLogger.LOGGER.isTraceEnabled();
// The soft references that are already good. // The soft references that are already good.
// too bad there's no way to override the queue method on ReferenceQueue, so I wouldn't need this // too bad there's no way to override the queue method on ReferenceQueue, so I wouldn't need this
@ -190,7 +190,7 @@ public class SoftValueHashMap<K, V extends SoftValueHashMap.ValueCache> implemen
if (isTrace) if (isTrace)
{ {
HornetQClientLogger.LOGGER.trace("Removing " + removed + " with id = " + ref.key + " from SoftValueHashMap"); ActiveMQClientLogger.LOGGER.trace("Removing " + removed + " with id = " + ref.key + " from SoftValueHashMap");
} }
if (mapDelegate.size() <= maxElements) if (mapDelegate.size() <= maxElements)

View File

@ -25,7 +25,7 @@ import java.util.List;
import java.util.Properties; import java.util.Properties;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.ActiveMQClientLogger;
import org.apache.activemq.core.version.Version; import org.apache.activemq.core.version.Version;
import org.apache.activemq.core.version.impl.VersionImpl; import org.apache.activemq.core.version.impl.VersionImpl;
@ -38,9 +38,9 @@ import org.apache.activemq.core.version.impl.VersionImpl;
*/ */
public final class VersionLoader public final class VersionLoader
{ {
public static final String VERSION_PROP_FILE_KEY = "hornetq.version.property.filename"; public static final String VERSION_PROP_FILE_KEY = "activemq.version.property.filename";
public static final String DEFAULT_PROP_FILE_NAME = "hornetq-version.properties"; public static final String DEFAULT_PROP_FILE_NAME = "activemq-version.properties";
private static String PROP_FILE_NAME; private static String PROP_FILE_NAME;
@ -63,7 +63,7 @@ public final class VersionLoader
} }
catch (Throwable e) catch (Throwable e)
{ {
HornetQClientLogger.LOGGER.warn(e.getMessage(), e); ActiveMQClientLogger.LOGGER.warn(e.getMessage(), e);
PROP_FILE_NAME = null; PROP_FILE_NAME = null;
} }
@ -77,7 +77,7 @@ public final class VersionLoader
catch (Throwable e) catch (Throwable e)
{ {
VersionLoader.versions = null; VersionLoader.versions = null;
HornetQClientLogger.LOGGER.error(e.getMessage(), e); ActiveMQClientLogger.LOGGER.error(e.getMessage(), e);
} }
} }
@ -123,19 +123,19 @@ public final class VersionLoader
{ {
if (in == null) if (in == null)
{ {
HornetQClientLogger.LOGGER.noVersionOnClasspath(getClasspathString()); ActiveMQClientLogger.LOGGER.noVersionOnClasspath(getClasspathString());
throw new RuntimeException(VersionLoader.PROP_FILE_NAME + " is not available"); throw new RuntimeException(VersionLoader.PROP_FILE_NAME + " is not available");
} }
try try
{ {
versionProps.load(in); versionProps.load(in);
String versionName = versionProps.getProperty("hornetq.version.versionName"); String versionName = versionProps.getProperty("activemq.version.versionName");
int majorVersion = Integer.valueOf(versionProps.getProperty("hornetq.version.majorVersion")); int majorVersion = Integer.valueOf(versionProps.getProperty("activemq.version.majorVersion"));
int minorVersion = Integer.valueOf(versionProps.getProperty("hornetq.version.minorVersion")); int minorVersion = Integer.valueOf(versionProps.getProperty("activemq.version.minorVersion"));
int microVersion = Integer.valueOf(versionProps.getProperty("hornetq.version.microVersion")); int microVersion = Integer.valueOf(versionProps.getProperty("activemq.version.microVersion"));
int[] incrementingVersions = parseCompatibleVersionList(versionProps.getProperty("hornetq.version.incrementingVersion")); int[] incrementingVersions = parseCompatibleVersionList(versionProps.getProperty("activemq.version.incrementingVersion"));
String versionSuffix = versionProps.getProperty("hornetq.version.versionSuffix"); String versionSuffix = versionProps.getProperty("activemq.version.versionSuffix");
int[] compatibleVersionArray = parseCompatibleVersionList(versionProps.getProperty("hornetq.version.compatibleVersionList")); int[] compatibleVersionArray = parseCompatibleVersionList(versionProps.getProperty("activemq.version.compatibleVersionList"));
List<Version> definedVersions = new ArrayList<Version>(incrementingVersions.length); List<Version> definedVersions = new ArrayList<Version>(incrementingVersions.length);
for (int incrementingVersion : incrementingVersions) for (int incrementingVersion : incrementingVersions)
{ {

Some files were not shown because too many files have changed in this diff Show More