http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/SimpleWaitIOCallback.java ---------------------------------------------------------------------- diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/SimpleWaitIOCallback.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/SimpleWaitIOCallback.java index b33512d..5b17ddd 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/SimpleWaitIOCallback.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/SimpleWaitIOCallback.java @@ -15,8 +15,8 @@ package org.apache.activemq.core.journal.impl; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.journal.HornetQJournalLogger; /** @@ -57,7 +57,7 @@ public final class SimpleWaitIOCallback extends SyncIOCompletion } @Override - public void waitCompletion() throws InterruptedException, HornetQException + public void waitCompletion() throws InterruptedException, ActiveMQException { while (true) { @@ -67,19 +67,19 @@ public final class SimpleWaitIOCallback extends SyncIOCompletion if (errorMessage != null) { - throw HornetQExceptionType.createException(errorCode, errorMessage); + throw ActiveMQExceptionType.createException(errorCode, errorMessage); } return; } - public boolean waitCompletion(final long timeout) throws InterruptedException, HornetQException + public boolean waitCompletion(final long timeout) throws InterruptedException, ActiveMQException { boolean retValue = latch.await(timeout, TimeUnit.MILLISECONDS); if (errorMessage != null) { - throw HornetQExceptionType.createException(errorCode, errorMessage); + throw ActiveMQExceptionType.createException(errorCode, errorMessage); } return retValue;
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/TimedBuffer.java ---------------------------------------------------------------------- diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/TimedBuffer.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/TimedBuffer.java index 2370518..50d71d1 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/TimedBuffer.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/TimedBuffer.java @@ -21,9 +21,9 @@ import java.util.TimerTask; import java.util.concurrent.Semaphore; import java.util.concurrent.atomic.AtomicLong; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQInterruptedException; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; +import org.apache.activemq.api.core.ActiveMQInterruptedException; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.journal.IOAsyncTask; import org.apache.activemq.core.journal.impl.dataformat.ByteArrayEncoding; @@ -55,7 +55,7 @@ public class TimedBuffer private final int bufferSize; - private final HornetQBuffer buffer; + private final ActiveMQBuffer buffer; private int bufferLimit = 0; @@ -110,7 +110,7 @@ public class TimedBuffer } // Setting the interval for nano-sleeps - buffer = HornetQBuffers.fixedBuffer(bufferSize); + buffer = ActiveMQBuffers.fixedBuffer(bufferSize); buffer.clear(); @@ -146,7 +146,7 @@ public class TimedBuffer } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } timerRunnable = new CheckTimer(); @@ -193,7 +193,7 @@ public class TimedBuffer } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } @@ -262,7 +262,7 @@ public class TimedBuffer } } - public synchronized void addBytes(final HornetQBuffer bytes, final boolean sync, final IOAsyncTask callback) + public synchronized void addBytes(final ActiveMQBuffer bytes, final boolean sync, final IOAsyncTask callback) { addBytes(new ByteArrayEncoding(bytes.toByteBuffer().array()), sync, callback); } @@ -447,7 +447,7 @@ public class TimedBuffer } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } } @@ -472,7 +472,7 @@ public class TimedBuffer } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } catch (Exception e) { @@ -535,7 +535,7 @@ public class TimedBuffer } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } spinning = false; http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/ByteArrayEncoding.java ---------------------------------------------------------------------- diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/ByteArrayEncoding.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/ByteArrayEncoding.java index 1e3a389..63f67c7 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/ByteArrayEncoding.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/ByteArrayEncoding.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.journal.impl.dataformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.EncodingSupport; /** @@ -34,12 +34,12 @@ public class ByteArrayEncoding implements EncodingSupport // Public -------------------------------------------------------- - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { throw new IllegalStateException("operation not supported"); } - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { buffer.writeBytes(data); } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalAddRecord.java ---------------------------------------------------------------------- diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalAddRecord.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalAddRecord.java index 05cafd9..c08ef69 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalAddRecord.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalAddRecord.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.journal.impl.dataformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.journal.impl.JournalImpl; @@ -51,7 +51,7 @@ public class JournalAddRecord extends JournalInternalRecord } @Override - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { if (add) { http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalAddRecordTX.java ---------------------------------------------------------------------- diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalAddRecordTX.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalAddRecordTX.java index e565264..d04ec5e 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalAddRecordTX.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalAddRecordTX.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.journal.impl.dataformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.journal.impl.JournalImpl; @@ -60,7 +60,7 @@ public class JournalAddRecordTX extends JournalInternalRecord } @Override - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { if (add) { http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalCompleteRecordTX.java ---------------------------------------------------------------------- diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalCompleteRecordTX.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalCompleteRecordTX.java index d59c5f4..c302609 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalCompleteRecordTX.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalCompleteRecordTX.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.journal.impl.dataformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.journal.impl.JournalImpl; @@ -55,7 +55,7 @@ public class JournalCompleteRecordTX extends JournalInternalRecord } @Override - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { if (txRecordType == TX_RECORD_TYPE.COMMIT) { http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalDeleteRecord.java ---------------------------------------------------------------------- diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalDeleteRecord.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalDeleteRecord.java index fc8cf1a..dc03af5 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalDeleteRecord.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalDeleteRecord.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.journal.impl.dataformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.impl.JournalImpl; /** @@ -35,7 +35,7 @@ public class JournalDeleteRecord extends JournalInternalRecord this.id = id; } - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { buffer.writeByte(JournalImpl.DELETE_RECORD); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalDeleteRecordTX.java ---------------------------------------------------------------------- diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalDeleteRecordTX.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalDeleteRecordTX.java index 8f62b06..149297c 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalDeleteRecordTX.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalDeleteRecordTX.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.journal.impl.dataformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.journal.impl.JournalImpl; @@ -47,7 +47,7 @@ public class JournalDeleteRecordTX extends JournalInternalRecord } @Override - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { buffer.writeByte(JournalImpl.DELETE_RECORD_TX); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalInternalRecord.java ---------------------------------------------------------------------- diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalInternalRecord.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalInternalRecord.java index 36d8027..0dd05f0 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalInternalRecord.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalInternalRecord.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.journal.impl.dataformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.EncodingSupport; /** @@ -39,7 +39,7 @@ public abstract class JournalInternalRecord implements EncodingSupport this.fileID = fileID; } - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalRollbackRecordTX.java ---------------------------------------------------------------------- diff --git a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalRollbackRecordTX.java b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalRollbackRecordTX.java index d8ba571..b97a8a7 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalRollbackRecordTX.java +++ b/activemq-journal/src/main/java/org/apache/activemq/core/journal/impl/dataformat/JournalRollbackRecordTX.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.journal.impl.dataformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.journal.impl.JournalImpl; /** @@ -32,7 +32,7 @@ public class JournalRollbackRecordTX extends JournalInternalRecord } @Override - public void encode(final HornetQBuffer buffer) + public void encode(final ActiveMQBuffer buffer) { buffer.writeByte(JournalImpl.ROLLBACK_RECORD); buffer.writeInt(fileID); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-journal/src/main/java/org/apache/activemq/journal/HornetQJournalBundle.java ---------------------------------------------------------------------- diff --git a/activemq-journal/src/main/java/org/apache/activemq/journal/HornetQJournalBundle.java b/activemq-journal/src/main/java/org/apache/activemq/journal/HornetQJournalBundle.java index dfbcee6..39a2adf 100644 --- a/activemq-journal/src/main/java/org/apache/activemq/journal/HornetQJournalBundle.java +++ b/activemq-journal/src/main/java/org/apache/activemq/journal/HornetQJournalBundle.java @@ -13,7 +13,7 @@ package org.apache.activemq.journal; -import org.apache.activemq.api.core.HornetQIOErrorException; +import org.apache.activemq.api.core.ActiveMQIOErrorException; import org.jboss.logging.annotations.Message; import org.jboss.logging.annotations.MessageBundle; import org.jboss.logging.Messages; @@ -34,15 +34,15 @@ public interface HornetQJournalBundle HornetQJournalBundle BUNDLE = Messages.getBundle(HornetQJournalBundle.class); @Message(id = 149000, value = "failed to rename file {0} to {1}", format = Message.Format.MESSAGE_FORMAT) - HornetQIOErrorException ioRenameFileError(String name, String newFileName); + ActiveMQIOErrorException ioRenameFileError(String name, String newFileName); @Message(id = 149001, value = "Journal data belong to a different version", format = Message.Format.MESSAGE_FORMAT) - HornetQIOErrorException journalDifferentVersion(); + ActiveMQIOErrorException journalDifferentVersion(); @Message(id = 149002, value = "Journal files version mismatch. You should export the data from the previous version and import it as explained on the user''s manual", format = Message.Format.MESSAGE_FORMAT) - HornetQIOErrorException journalFileMisMatch(); + ActiveMQIOErrorException journalFileMisMatch(); @Message(id = 149003, value = "File not opened", format = Message.Format.MESSAGE_FORMAT) - HornetQIOErrorException fileNotOpened(); + ActiveMQIOErrorException fileNotOpened(); } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-native/README ---------------------------------------------------------------------- diff --git a/activemq-native/README b/activemq-native/README index 63404ef..a40400f 100644 --- a/activemq-native/README +++ b/activemq-native/README @@ -37,7 +37,8 @@ if you are missing any dependencies, autoconf would tell you what you're missing COMPILED FILE -The produced file will be under ./src/.libs/libHornetQLibAIO.so +The produced file will be under the ./target/nar (example: ./target/nar/activemq-native-6.0.0-SNAPSHOT-amd64-Linux-gpp-jni/lib/amd64-Linux-gpp/jni/libactivemq-native-6.0.0-SNAPSHOT.so) +and you will have to rename it manually under ./bin following the appropriate pattern. DOCUMENTATION http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-native/bin/libactivemqAIO64.so ---------------------------------------------------------------------- diff --git a/activemq-native/bin/libactivemqAIO64.so b/activemq-native/bin/libactivemqAIO64.so new file mode 100755 index 0000000..86689f2 Binary files /dev/null and b/activemq-native/bin/libactivemqAIO64.so differ http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-native/pom.xml ---------------------------------------------------------------------- diff --git a/activemq-native/pom.xml b/activemq-native/pom.xml index b5a55e3..827385c 100644 --- a/activemq-native/pom.xml +++ b/activemq-native/pom.xml @@ -41,7 +41,7 @@ <resource> <directory>bin/</directory> <includes> - <include>libHornetQAIO32.so</include> + <include>libActiveMQAIO32.so</include> </includes> </resource> </resources> @@ -59,7 +59,7 @@ <resource> <directory>bin/</directory> <includes> - <include>libHornetQAIO64.so</include> + <include>libActiveMQAIO64.so</include> </includes> </resource> </resources> http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-native/src/main/c/JNI_AsynchronousFileImpl.cpp ---------------------------------------------------------------------- diff --git a/activemq-native/src/main/c/JNI_AsynchronousFileImpl.cpp b/activemq-native/src/main/c/JNI_AsynchronousFileImpl.cpp index c8bc16e..178a398 100644 --- a/activemq-native/src/main/c/JNI_AsynchronousFileImpl.cpp +++ b/activemq-native/src/main/c/JNI_AsynchronousFileImpl.cpp @@ -21,7 +21,7 @@ #include <time.h> #include <sys/file.h> -#include "org.apache.activemq6_core_libaio_Native.h" +#include "org_apache_activemq_core_libaio_Native.h" #include "JavaUtilities.h" @@ -48,7 +48,7 @@ inline AIOController * getController(JNIEnv *env, jobject & controllerAddress) * Method: openFile * Signature: (Ljava/lang/String;)I */ -JNIEXPORT jint JNICALL Java_org.apache.activemq6_core_libaio_Native_openFile +JNIEXPORT jint JNICALL Java_org_apache_activemq_core_libaio_Native_openFile (JNIEnv * env , jclass , jstring jstrFileName) { std::string fileName = convertJavaString(env, jstrFileName); @@ -61,7 +61,7 @@ JNIEXPORT jint JNICALL Java_org.apache.activemq6_core_libaio_Native_openFile * Method: closeFile * Signature: (I)V */ -JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_closeFile +JNIEXPORT void JNICALL Java_org_apache_activemq_core_libaio_Native_closeFile (JNIEnv * , jclass , jint handle) { close(handle); @@ -72,7 +72,7 @@ JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_closeFile * Method: flock * Signature: (I)Z */ -JNIEXPORT jboolean JNICALL Java_org.apache.activemq6_core_libaio_Native_flock +JNIEXPORT jboolean JNICALL Java_org_apache_activemq_core_libaio_Native_flock (JNIEnv * , jclass , jint handle) { return flock(handle, LOCK_EX | LOCK_NB) == 0; @@ -85,7 +85,7 @@ JNIEXPORT jboolean JNICALL Java_org.apache.activemq6_core_libaio_Native_flock * Method: init * Signature: (Ljava/lang/String;Ljava/lang/Class;)J */ -JNIEXPORT jobject JNICALL Java_org.apache.activemq6_core_libaio_Native_init +JNIEXPORT jobject JNICALL Java_org_apache_activemq_core_libaio_Native_init (JNIEnv * env, jclass, jclass controllerClazz, jstring jstrFileName, jint maxIO, jobject logger) { AIOController * controller = 0; @@ -94,14 +94,14 @@ JNIEXPORT jobject JNICALL Java_org.apache.activemq6_core_libaio_Native_init std::string fileName = convertJavaString(env, jstrFileName); controller = new AIOController(fileName, (int) maxIO); - controller->done = env->GetMethodID(controllerClazz,"callbackDone","(Lorg.apache.activemq/core/asyncio/AIOCallback;JLjava/nio/ByteBuffer;)V"); + controller->done = env->GetMethodID(controllerClazz,"callbackDone","(Lorg/apache/activemq/core/asyncio/AIOCallback;JLjava/nio/ByteBuffer;)V"); if (!controller->done) { throwException (env, -1, "can't get callbackDone method"); return 0; } - controller->error = env->GetMethodID(controllerClazz, "callbackError", "(Lorg.apache.activemq/core/asyncio/AIOCallback;JLjava/nio/ByteBuffer;ILjava/lang/String;)V"); + controller->error = env->GetMethodID(controllerClazz, "callbackError", "(Lorg/apache/activemq/core/asyncio/AIOCallback;JLjava/nio/ByteBuffer;ILjava/lang/String;)V"); if (!controller->done) { throwException (env, -1, "can't get callbackError method"); @@ -133,7 +133,7 @@ JNIEXPORT jobject JNICALL Java_org.apache.activemq6_core_libaio_Native_init * objThis here is passed as a parameter at the java layer. It used to be a JNI this and now it's a java static method where the intended reference is now passed as an argument */ -JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_read +JNIEXPORT void JNICALL Java_org_apache_activemq_core_libaio_Native_read (JNIEnv *env, jclass, jobject objThis, jobject controllerAddress, jlong position, jlong size, jobject jbuffer, jobject callback) { try @@ -165,7 +165,7 @@ JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_read // Fast memset on buffer -JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_resetBuffer +JNIEXPORT void JNICALL Java_org_apache_activemq_core_libaio_Native_resetBuffer (JNIEnv *env, jclass, jobject jbuffer, jint size) { void * buffer = env->GetDirectBufferAddress(jbuffer); @@ -180,7 +180,7 @@ JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_resetBuffer } -JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_destroyBuffer +JNIEXPORT void JNICALL Java_org_apache_activemq_core_libaio_Native_destroyBuffer (JNIEnv * env, jclass, jobject jbuffer) { if (jbuffer == 0) @@ -192,7 +192,7 @@ JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_destroyBuffe free(buffer); } -JNIEXPORT jobject JNICALL Java_org.apache.activemq6_core_libaio_Native_newNativeBuffer +JNIEXPORT jobject JNICALL Java_org_apache_activemq_core_libaio_Native_newNativeBuffer (JNIEnv * env, jclass, jlong size) { try @@ -230,7 +230,7 @@ JNIEXPORT jobject JNICALL Java_org.apache.activemq6_core_libaio_Native_newNative * objThis here is passed as a parameter at the java layer. It used to be a JNI this and now it's a java static method where the intended reference is now passed as an argument */ -JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_write +JNIEXPORT void JNICALL Java_org_apache_activemq_core_libaio_Native_write (JNIEnv *env, jclass, jobject objThis, jobject controllerAddress, jlong sequence, jlong position, jlong size, jobject jbuffer, jobject callback) { try @@ -255,7 +255,7 @@ JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_write } } -JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_writeInternal +JNIEXPORT void JNICALL Java_org_apache_activemq_core_libaio_Native_writeInternal (JNIEnv * env, jclass, jobject controllerAddress, jlong positionToWrite, jlong size, jobject jbuffer) { try @@ -278,7 +278,7 @@ JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_writeInterna } -JNIEXPORT void Java_org.apache.activemq6_core_libaio_Native_internalPollEvents +JNIEXPORT void Java_org_apache_activemq_core_libaio_Native_internalPollEvents (JNIEnv *env, jclass, jobject controllerAddress) { try @@ -292,7 +292,7 @@ JNIEXPORT void Java_org.apache.activemq6_core_libaio_Native_internalPollEvents } } -JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_stopPoller +JNIEXPORT void JNICALL Java_org_apache_activemq_core_libaio_Native_stopPoller (JNIEnv *env, jclass, jobject controllerAddress) { try @@ -306,7 +306,7 @@ JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_stopPoller } } -JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_closeInternal +JNIEXPORT void JNICALL Java_org_apache_activemq_core_libaio_Native_closeInternal (JNIEnv *env, jclass, jobject controllerAddress) { try @@ -322,7 +322,7 @@ JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_closeInterna } -JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_fill +JNIEXPORT void JNICALL Java_org_apache_activemq_core_libaio_Native_fill (JNIEnv * env, jclass, jobject controllerAddress, jlong position, jint blocks, jlong size, jbyte fillChar) { try @@ -341,7 +341,7 @@ JNIEXPORT void JNICALL Java_org.apache.activemq6_core_libaio_Native_fill /** It does nothing... just return true to make sure it has all the binary dependencies */ -JNIEXPORT jint JNICALL Java_org.apache.activemq6_core_libaio_Native_getNativeVersion +JNIEXPORT jint JNICALL Java_org_apache_activemq_core_libaio_Native_getNativeVersion (JNIEnv *, jclass) { @@ -349,7 +349,7 @@ JNIEXPORT jint JNICALL Java_org.apache.activemq6_core_libaio_Native_getNativeVer } -JNIEXPORT jlong JNICALL Java_org.apache.activemq6_core_libaio_Native_size0 +JNIEXPORT jlong JNICALL Java_org_apache_activemq_core_libaio_Native_size0 (JNIEnv * env, jclass, jobject controllerAddress) { try http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-native/src/main/c/JavaUtilities.cpp ---------------------------------------------------------------------- diff --git a/activemq-native/src/main/c/JavaUtilities.cpp b/activemq-native/src/main/c/JavaUtilities.cpp index 700bad2..5065b21 100644 --- a/activemq-native/src/main/c/JavaUtilities.cpp +++ b/activemq-native/src/main/c/JavaUtilities.cpp @@ -26,7 +26,7 @@ void throwRuntimeException(JNIEnv * env, const char * message) void throwException(JNIEnv * env, const int code, const char * message) { - jclass exceptionClass = env->FindClass("org.apache.activemq/api/core/HornetQException"); + jclass exceptionClass = env->FindClass("org/apache/activemq/api/core/ActiveMQException"); if (exceptionClass==NULL) { std::cerr << "Couldn't throw exception message:= " << message << "\n"; http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-native/src/main/java/org/apache/activemq/core/libaio/Native.java ---------------------------------------------------------------------- diff --git a/activemq-native/src/main/java/org/apache/activemq/core/libaio/Native.java b/activemq-native/src/main/java/org/apache/activemq/core/libaio/Native.java index 726339b..79da4c3 100644 --- a/activemq-native/src/main/java/org/apache/activemq/core/libaio/Native.java +++ b/activemq-native/src/main/java/org/apache/activemq/core/libaio/Native.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.libaio; import java.nio.ByteBuffer; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; /** * @author Clebert Suconic @@ -38,7 +38,7 @@ public class Native public static native void newInit(Class someClass); - public static native ByteBuffer init(Class controllerClass, String fileName, int maxIO, Object logger) throws HornetQException; + public static native ByteBuffer init(Class controllerClass, String fileName, int maxIO, Object logger) throws ActiveMQException; public static native long size0(ByteBuffer handle); @@ -47,17 +47,17 @@ public class Native long position, long size, ByteBuffer buffer, - Object aioPackageCallback) throws HornetQException; + Object aioPackageCallback) throws ActiveMQException; /** a direct write to the file without the use of libaio's submit. */ - public static native void writeInternal(ByteBuffer handle, long positionToWrite, long size, ByteBuffer bytes) throws HornetQException; + public static native void writeInternal(ByteBuffer handle, long positionToWrite, long size, ByteBuffer bytes) throws ActiveMQException; /** *This is using org.apache.activemq.core.asyncio.AIOCallback */ - public static native void read(Object thisObject, ByteBuffer handle, long position, long size, ByteBuffer buffer, Object aioPackageCallback) throws HornetQException; + public static native void read(Object thisObject, ByteBuffer handle, long position, long size, ByteBuffer buffer, Object aioPackageCallback) throws ActiveMQException; - public static native void fill(ByteBuffer handle, long position, int blocks, long size, byte fillChar) throws HornetQException; + public static native void fill(ByteBuffer handle, long position, int blocks, long size, byte fillChar) throws ActiveMQException; public static native void closeInternal(ByteBuffer handler); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/HornetQProtonRemotingConnection.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/HornetQProtonRemotingConnection.java b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/HornetQProtonRemotingConnection.java index f8c5f51..fec1eac 100644 --- a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/HornetQProtonRemotingConnection.java +++ b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/HornetQProtonRemotingConnection.java @@ -15,8 +15,8 @@ package org.apache.activemq.core.protocol.proton; import java.util.concurrent.Executor; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.spi.core.protocol.AbstractRemotingConnection; import org.apache.activemq.spi.core.remoting.Connection; @@ -52,7 +52,7 @@ public class HornetQProtonRemotingConnection extends AbstractRemotingConnection /* * This can be called concurrently by more than one thread so needs to be locked */ - public void fail(final HornetQException me, String scaleDownTargetNodeID) + public void fail(final ActiveMQException me, String scaleDownTargetNodeID) { if (destroyed) { @@ -132,7 +132,7 @@ public class HornetQProtonRemotingConnection extends AbstractRemotingConnection } @Override - public void bufferReceived(Object connectionID, HornetQBuffer buffer) + public void bufferReceived(Object connectionID, ActiveMQBuffer buffer) { amqpConnection.inputBuffer(buffer.byteBuf()); super.bufferReceived(connectionID, buffer); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/ProtonProtocolManager.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/ProtonProtocolManager.java b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/ProtonProtocolManager.java index 8fa332c..cf5bb9a 100644 --- a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/ProtonProtocolManager.java +++ b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/ProtonProtocolManager.java @@ -16,7 +16,7 @@ package org.apache.activemq.core.protocol.proton; import java.util.concurrent.Executor; import io.netty.channel.ChannelPipeline; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.client.HornetQClient; import org.apache.activemq.core.protocol.proton.converter.ProtonMessageConverter; import org.apache.activemq.core.protocol.proton.plug.HornetQProtonConnectionCallback; @@ -94,7 +94,7 @@ public class ProtonProtocolManager implements ProtocolManager, NotificationListe } @Override - public void handleBuffer(RemotingConnection connection, HornetQBuffer buffer) + public void handleBuffer(RemotingConnection connection, ActiveMQBuffer buffer) { HornetQProtonRemotingConnection protonConnection = (HornetQProtonRemotingConnection)connection; @@ -114,7 +114,7 @@ public class ProtonProtocolManager implements ProtocolManager, NotificationListe } @Override - public void handshake(NettyServerConnection connection, HornetQBuffer buffer) + public void handshake(NettyServerConnection connection, ActiveMQBuffer buffer) { } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSMapMessage.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSMapMessage.java b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSMapMessage.java index a757ca8..36b9c96 100644 --- a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSMapMessage.java +++ b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSMapMessage.java @@ -20,7 +20,7 @@ import java.util.Enumeration; import java.util.HashSet; import java.util.Set; -import org.apache.activemq.api.core.HornetQPropertyConversionException; +import org.apache.activemq.api.core.ActiveMQPropertyConversionException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.message.impl.MessageInternal; @@ -131,7 +131,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe { TypedProperties.setObjectProperty(new SimpleString(name), value, map); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -143,7 +143,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe { return map.getBooleanProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -155,7 +155,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe { return map.getByteProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -167,7 +167,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe { return map.getShortProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -179,7 +179,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe { return map.getCharProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -191,7 +191,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe { return map.getIntProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -203,7 +203,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe { return map.getLongProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -215,7 +215,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe { return map.getFloatProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -227,7 +227,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe { return map.getDoubleProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -247,7 +247,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe return str.toString(); } } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } @@ -259,7 +259,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe { return map.getBytesProperty(new SimpleString(name)); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSMessage.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSMessage.java b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSMessage.java index c90120f..ab2d2b4 100644 --- a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSMessage.java +++ b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSMessage.java @@ -20,7 +20,7 @@ import javax.jms.Message; import java.util.Collections; import java.util.Enumeration; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.message.impl.MessageInternal; import org.apache.activemq.jms.client.HornetQDestination; @@ -87,7 +87,7 @@ public class ServerJMSMessage implements Message { MessageUtil.setJMSCorrelationIDAsBytes(message, correlationID); } - catch (HornetQException e) + catch (ActiveMQException e) { throw new JMSException(e.getMessage()); } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSStreamMessage.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSStreamMessage.java b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSStreamMessage.java index fcd3deb..8c9ce31 100644 --- a/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSStreamMessage.java +++ b/activemq-protocols/activemq-amqp-protocol/src/main/java/org/apache/activemq/core/protocol/proton/converter/jms/ServerJMSStreamMessage.java @@ -17,7 +17,7 @@ import javax.jms.MessageEOFException; import javax.jms.MessageFormatException; import javax.jms.StreamMessage; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.Pair; import org.apache.activemq.core.message.impl.MessageInternal; @@ -394,7 +394,7 @@ public final class ServerJMSStreamMessage extends ServerJMSMessage implements St getBuffer().clear(); } - private HornetQBuffer getBuffer() + private ActiveMQBuffer getBuffer() { return message.getBodyBuffer(); } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-protocols/activemq-amqp-protocol/src/test/java/org/apache/activemq/core/protocol/proton/TestConversions.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-amqp-protocol/src/test/java/org/apache/activemq/core/protocol/proton/TestConversions.java b/activemq-protocols/activemq-amqp-protocol/src/test/java/org/apache/activemq/core/protocol/proton/TestConversions.java index b46a44d..a03c2ac 100644 --- a/activemq-protocols/activemq-amqp-protocol/src/test/java/org/apache/activemq/core/protocol/proton/TestConversions.java +++ b/activemq-protocols/activemq-amqp-protocol/src/test/java/org/apache/activemq/core/protocol/proton/TestConversions.java @@ -21,6 +21,7 @@ import java.util.Map; import io.netty.buffer.ByteBuf; import io.netty.buffer.PooledByteBufAllocator; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.qpid.proton.amqp.Binary; import org.apache.qpid.proton.amqp.messaging.AmqpSequence; import org.apache.qpid.proton.amqp.messaging.AmqpValue; @@ -30,7 +31,6 @@ import org.apache.qpid.proton.jms.EncodedMessage; import org.apache.qpid.proton.message.Message; import org.apache.qpid.proton.message.ProtonJMessage; import org.apache.qpid.proton.message.impl.MessageImpl; -import org.apache.activemq.api.core.HornetQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.journal.EncodingSupport; import org.apache.activemq.core.protocol.proton.converter.ProtonMessageConverter; @@ -260,7 +260,7 @@ public class TestConversions extends Assert } - class EmptyBuffer implements HornetQBuffer + class EmptyBuffer implements ActiveMQBuffer { @Override public ByteBuf byteBuf() @@ -407,19 +407,19 @@ public class TestConversions extends Assert } @Override - public void getBytes(int index, HornetQBuffer dst) + public void getBytes(int index, ActiveMQBuffer dst) { } @Override - public void getBytes(int index, HornetQBuffer dst, int length) + public void getBytes(int index, ActiveMQBuffer dst, int length) { } @Override - public void getBytes(int index, HornetQBuffer dst, int dstIndex, int length) + public void getBytes(int index, ActiveMQBuffer dst, int dstIndex, int length) { } @@ -485,19 +485,19 @@ public class TestConversions extends Assert } @Override - public void setBytes(int index, HornetQBuffer src) + public void setBytes(int index, ActiveMQBuffer src) { } @Override - public void setBytes(int index, HornetQBuffer src, int length) + public void setBytes(int index, ActiveMQBuffer src, int length) { } @Override - public void setBytes(int index, HornetQBuffer src, int srcIndex, int length) + public void setBytes(int index, ActiveMQBuffer src, int srcIndex, int length) { } @@ -635,31 +635,31 @@ public class TestConversions extends Assert } @Override - public HornetQBuffer readBytes(int length) + public ActiveMQBuffer readBytes(int length) { return null; } @Override - public HornetQBuffer readSlice(int length) + public ActiveMQBuffer readSlice(int length) { return null; } @Override - public void readBytes(HornetQBuffer dst) + public void readBytes(ActiveMQBuffer dst) { } @Override - public void readBytes(HornetQBuffer dst, int length) + public void readBytes(ActiveMQBuffer dst, int length) { } @Override - public void readBytes(HornetQBuffer dst, int dstIndex, int length) + public void readBytes(ActiveMQBuffer dst, int dstIndex, int length) { } @@ -767,13 +767,13 @@ public class TestConversions extends Assert } @Override - public void writeBytes(HornetQBuffer src, int length) + public void writeBytes(ActiveMQBuffer src, int length) { } @Override - public void writeBytes(HornetQBuffer src, int srcIndex, int length) + public void writeBytes(ActiveMQBuffer src, int srcIndex, int length) { } @@ -797,31 +797,31 @@ public class TestConversions extends Assert } @Override - public HornetQBuffer copy() + public ActiveMQBuffer copy() { return null; } @Override - public HornetQBuffer copy(int index, int length) + public ActiveMQBuffer copy(int index, int length) { return null; } @Override - public HornetQBuffer slice() + public ActiveMQBuffer slice() { return null; } @Override - public HornetQBuffer slice(int index, int length) + public ActiveMQBuffer slice(int index, int length) { return null; } @Override - public HornetQBuffer duplicate() + public ActiveMQBuffer duplicate() { return null; } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/DataInputWrapper.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/DataInputWrapper.java b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/DataInputWrapper.java index 6c260e9..87da62d 100644 --- a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/DataInputWrapper.java +++ b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/DataInputWrapper.java @@ -16,7 +16,7 @@ import java.io.DataInput; import java.io.IOException; import java.nio.ByteBuffer; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.utils.UTF8Util; import org.apache.activemq.utils.UTF8Util.StringUtilBuffer; @@ -66,7 +66,7 @@ public class DataInputWrapper implements DataInput internalBuffer.reset(); } - public void receiveData(HornetQBuffer buffer) + public void receiveData(ActiveMQBuffer buffer) { int newSize = buffer.readableBytes(); byte[] newData = new byte[newSize]; http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireConnection.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireConnection.java b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireConnection.java index e9b9c3a..6005b3d 100644 --- a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireConnection.java +++ b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireConnection.java @@ -30,6 +30,10 @@ import java.util.concurrent.locks.ReentrantReadWriteLock; import javax.jms.JMSSecurityException; import javax.jms.ResourceAllocationException; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQSecurityException; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQMessage; import org.apache.activemq.command.BrokerInfo; @@ -75,10 +79,6 @@ import org.apache.activemq.thread.TaskRunnerFactory; import org.apache.activemq.transport.TransmitCallback; import org.apache.activemq.util.ByteSequence; import org.apache.activemq.wireformat.WireFormat; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQSecurityException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.openwire.amq.AMQBrokerStoppedException; import org.apache.activemq.core.protocol.openwire.amq.AMQConnectionContext; @@ -196,7 +196,7 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor } @Override - public void bufferReceived(Object connectionID, HornetQBuffer buffer) + public void bufferReceived(Object connectionID, ActiveMQBuffer buffer) { try { @@ -436,13 +436,13 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor } @Override - public HornetQBuffer createBuffer(int size) + public ActiveMQBuffer createBuffer(int size) { - return HornetQBuffers.dynamicBuffer(size); + return ActiveMQBuffers.dynamicBuffer(size); } @Override - public void fail(HornetQException me) + public void fail(ActiveMQException me) { HornetQServerLogger.LOGGER.connectionFailureDetected(me.getMessage(), me.getType()); @@ -527,7 +527,7 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor { } - private void callFailureListeners(final HornetQException me) + private void callFailureListeners(final ActiveMQException me) { final List<FailureListener> listenersClone = new ArrayList<FailureListener>( failureListeners); @@ -586,7 +586,7 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor try { ByteSequence bytes = wireFormat.marshal(command); - HornetQBuffer buffer = OpenWireUtil.toHornetQBuffer(bytes); + ActiveMQBuffer buffer = OpenWireUtil.toHornetQBuffer(bytes); synchronized (sendLock) { getTransportConnection().write(buffer, false, false); @@ -1115,7 +1115,7 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor } catch (Exception e) { - if (e instanceof HornetQSecurityException) + if (e instanceof ActiveMQSecurityException) { resp = new ExceptionResponse(new JMSSecurityException(e.getMessage())); } @@ -1225,7 +1225,7 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor } catch (Exception e) { - if (e instanceof HornetQSecurityException) + if (e instanceof ActiveMQSecurityException) { resp = new ExceptionResponse(new JMSSecurityException(e.getMessage())); } @@ -1416,7 +1416,7 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor } catch (Exception e) { - if (e instanceof HornetQSecurityException) + if (e instanceof ActiveMQSecurityException) { resp = new ExceptionResponse(new JMSSecurityException(e.getMessage())); } @@ -1743,7 +1743,7 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor } @Override - public void fail(HornetQException e, String message) + public void fail(ActiveMQException e, String message) { destroy(); } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireMessageConverter.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireMessageConverter.java b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireMessageConverter.java index 74c5ce4..08d67ee 100644 --- a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireMessageConverter.java +++ b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireMessageConverter.java @@ -24,6 +24,8 @@ import java.util.Map.Entry; import javax.jms.JMSException; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQPropertyConversionException; import org.apache.activemq.command.ActiveMQBytesMessage; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQMapMessage; @@ -45,8 +47,6 @@ import org.apache.activemq.util.ByteSequence; import org.apache.activemq.util.MarshallingSupport; import org.apache.activemq.wireformat.WireFormat; import org.fusesource.hawtbuf.UTF8Buffer; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQPropertyConversionException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.openwire.amq.AMQConsumer; import org.apache.activemq.core.server.ServerMessage; @@ -118,7 +118,7 @@ public class OpenWireMessageConverter implements MessageConverter ByteSequence contents = messageSend.getContent(); if (contents != null) { - HornetQBuffer body = coreMessage.getBodyBuffer(); + ActiveMQBuffer body = coreMessage.getBodyBuffer(); switch (coreType) { case org.apache.activemq.api.core.Message.TEXT_TYPE: @@ -320,7 +320,7 @@ public class OpenWireMessageConverter implements MessageConverter { coreMessage.putObjectProperty(ent.getKey(), value); } - catch (HornetQPropertyConversionException e) + catch (ActiveMQPropertyConversionException e) { coreMessage.putStringProperty(ent.getKey(), value.toString()); } @@ -460,7 +460,7 @@ public class OpenWireMessageConverter implements MessageConverter } amqMsg.setBrokerInTime(brokerInTime); - HornetQBuffer buffer = coreMessage.getBodyBuffer(); + ActiveMQBuffer buffer = coreMessage.getBodyBuffer(); if (buffer != null) { buffer.resetReaderIndex(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireProtocolManager.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireProtocolManager.java b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireProtocolManager.java index 1bc5a40..65a8d71 100644 --- a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireProtocolManager.java +++ b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireProtocolManager.java @@ -28,6 +28,7 @@ import javax.jms.InvalidClientIDException; import io.netty.channel.ChannelPipeline; import org.apache.activemq.advisory.AdvisorySupport; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQMessage; import org.apache.activemq.command.ActiveMQTopic; @@ -57,7 +58,6 @@ import org.apache.activemq.state.SessionState; import org.apache.activemq.util.IdGenerator; import org.apache.activemq.util.InetAddressUtil; import org.apache.activemq.util.LongSequenceGenerator; -import org.apache.activemq.api.core.HornetQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.journal.IOAsyncTask; import org.apache.activemq.core.protocol.openwire.amq.AMQConnectionContext; @@ -150,7 +150,7 @@ public class OpenWireProtocolManager implements ProtocolManager } @Override - public void handleBuffer(RemotingConnection connection, HornetQBuffer buffer) + public void handleBuffer(RemotingConnection connection, ActiveMQBuffer buffer) { } @@ -196,7 +196,7 @@ public class OpenWireProtocolManager implements ProtocolManager } @Override - public void handshake(NettyServerConnection connection, HornetQBuffer buffer) + public void handshake(NettyServerConnection connection, ActiveMQBuffer buffer) { // TODO Auto-generated method stub http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireUtil.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireUtil.java b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireUtil.java index cc5a6bb..603c5c6 100644 --- a/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireUtil.java +++ b/activemq-protocols/activemq-openwire-protocol/src/main/java/org/apache/activemq/core/protocol/openwire/OpenWireUtil.java @@ -13,18 +13,18 @@ package org.apache.activemq.core.protocol.openwire; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.util.ByteSequence; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; import org.apache.activemq.api.core.SimpleString; public class OpenWireUtil { - public static HornetQBuffer toHornetQBuffer(ByteSequence bytes) + public static ActiveMQBuffer toHornetQBuffer(ByteSequence bytes) { - HornetQBuffer buffer = HornetQBuffers.fixedBuffer(bytes.length); + ActiveMQBuffer buffer = ActiveMQBuffers.fixedBuffer(bytes.length); buffer.writeBytes(bytes.data, bytes.offset, bytes.length); return buffer; http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompConnection.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompConnection.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompConnection.java index 49b3450..733faf6 100644 --- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompConnection.java +++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompConnection.java @@ -20,9 +20,9 @@ import java.util.Set; import java.util.StringTokenizer; import java.util.concurrent.CopyOnWriteArrayList; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.client.HornetQClient; import org.apache.activemq.core.protocol.stomp.v10.StompFrameHandlerV10; import org.apache.activemq.core.protocol.stomp.v12.StompFrameHandlerV12; @@ -93,7 +93,7 @@ public final class StompConnection implements RemotingConnection private int minLargeMessageSize; - public StompFrame decode(HornetQBuffer buffer) throws HornetQStompException + public StompFrame decode(ActiveMQBuffer buffer) throws HornetQStompException { StompFrame frame = null; try @@ -248,9 +248,9 @@ public final class StompConnection implements RemotingConnection } @Override - public HornetQBuffer createBuffer(int size) + public ActiveMQBuffer createBuffer(int size) { - return HornetQBuffers.dynamicBuffer(size); + return ActiveMQBuffers.dynamicBuffer(size); } public void destroy() @@ -285,7 +285,7 @@ public final class StompConnection implements RemotingConnection manager.cleanup(this); } - public void fail(final HornetQException me) + public void fail(final ActiveMQException me) { synchronized (failLock) { @@ -306,7 +306,7 @@ public final class StompConnection implements RemotingConnection internalClose(); } - public void fail(final HornetQException me, String scaleDownTargetNodeID) + public void fail(final ActiveMQException me, String scaleDownTargetNodeID) { fail(me); } @@ -352,7 +352,7 @@ public final class StompConnection implements RemotingConnection return destroyed; } - public void bufferReceived(Object connectionID, HornetQBuffer buffer) + public void bufferReceived(Object connectionID, ActiveMQBuffer buffer) { manager.handleBuffer(this, buffer); } @@ -387,7 +387,7 @@ public final class StompConnection implements RemotingConnection this.valid = valid; } - private void callFailureListeners(final HornetQException me) + private void callFailureListeners(final ActiveMQException me) { final List<FailureListener> listenersClone = new ArrayList<FailureListener>(failureListeners); @@ -792,7 +792,7 @@ public final class StompConnection implements RemotingConnection public void physicalSend(StompFrame frame) throws Exception { - HornetQBuffer buffer = frame.toHornetQBuffer(); + ActiveMQBuffer buffer = frame.toHornetQBuffer(); synchronized (sendLock) { getTransportConnection().write(buffer, false, false); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompDecoder.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompDecoder.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompDecoder.java index fbeb208..e7d15c2 100644 --- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompDecoder.java +++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompDecoder.java @@ -15,7 +15,7 @@ package org.apache.activemq.core.protocol.stomp; import java.util.HashMap; import java.util.Map; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import static org.apache.activemq.core.protocol.stomp.HornetQStompProtocolMessageBundle.BUNDLE; @@ -188,7 +188,7 @@ public class StompDecoder * unsupported EOLs ("\r\n" valid for 1.2 only). The StompConnection will switch * to proper version decoders on catching such exceptions. */ - public synchronized StompFrame decode(final HornetQBuffer buffer) throws HornetQStompException + public synchronized StompFrame decode(final ActiveMQBuffer buffer) throws HornetQStompException { int readable = buffer.readableBytes(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompFrame.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompFrame.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompFrame.java index 5e978bf..46aa639 100644 --- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompFrame.java +++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompFrame.java @@ -17,8 +17,8 @@ import java.util.Arrays; import java.util.LinkedHashMap; import java.util.Map; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; /** * Represents all the data in a STOMP frame. @@ -38,7 +38,7 @@ public class StompFrame protected byte[] bytesBody; - protected HornetQBuffer buffer = null; + protected ActiveMQBuffer buffer = null; protected int size; @@ -97,17 +97,17 @@ public class StompFrame isPing = ping; } - public HornetQBuffer toHornetQBuffer() throws Exception + public ActiveMQBuffer toHornetQBuffer() throws Exception { if (buffer == null) { if (bytesBody != null) { - buffer = HornetQBuffers.dynamicBuffer(bytesBody.length + 512); + buffer = ActiveMQBuffers.dynamicBuffer(bytesBody.length + 512); } else { - buffer = HornetQBuffers.dynamicBuffer(512); + buffer = ActiveMQBuffers.dynamicBuffer(512); } if (isPing()) http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompProtocolManager.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompProtocolManager.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompProtocolManager.java index afbf0c2..9e1a0b4 100644 --- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompProtocolManager.java +++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompProtocolManager.java @@ -23,8 +23,8 @@ import java.util.concurrent.Executor; import io.netty.channel.ChannelPipeline; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.HornetQClient; @@ -137,7 +137,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener { } - public void handleBuffer(final RemotingConnection connection, final HornetQBuffer buffer) + public void handleBuffer(final RemotingConnection connection, final ActiveMQBuffer buffer) { StompConnection conn = (StompConnection) connection; @@ -185,7 +185,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener } @Override - public void handshake(NettyServerConnection connection, HornetQBuffer buffer) + public void handshake(NettyServerConnection connection, ActiveMQBuffer buffer) { //Todo move handshake to here } @@ -333,7 +333,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener HornetQServerLogger.LOGGER.errorProcessingIOCallback(errorCode, errorMessage); HornetQStompException e = new HornetQStompException("Error sending reply", - HornetQExceptionType.createException(errorCode, errorMessage)); + ActiveMQExceptionType.createException(errorCode, errorMessage)); StompFrame error = e.getFrame(); send(connection, error); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompSession.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompSession.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompSession.java index cdc0b3f..30baf56 100644 --- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompSession.java +++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompSession.java @@ -18,7 +18,7 @@ import java.util.Map.Entry; import java.util.concurrent.ConcurrentHashMap; import java.util.zip.Inflater; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; @@ -127,7 +127,7 @@ public class StompSession implements SessionCallback if (serverMessage.getBooleanProperty(Message.HDR_LARGE_COMPRESSED)) { //decompress - HornetQBuffer qbuff = newServerMessage.getBodyBuffer(); + ActiveMQBuffer qbuff = newServerMessage.getBodyBuffer(); int bytesToRead = qbuff.writerIndex() - MessageImpl.BODY_OFFSET; Inflater inflater = new Inflater(); inflater.setInput(qbuff.readBytes(bytesToRead).toByteBuffer().array()); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/VersionedStompFrameHandler.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/VersionedStompFrameHandler.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/VersionedStompFrameHandler.java index 93a7c06..8057a18 100644 --- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/VersionedStompFrameHandler.java +++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/VersionedStompFrameHandler.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.protocol.stomp; import java.nio.charset.StandardCharsets; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.message.impl.MessageImpl; @@ -58,7 +58,7 @@ public abstract class VersionedStompFrameHandler this.connection = connection; } - public StompFrame decode(HornetQBuffer buffer) throws HornetQStompException + public StompFrame decode(ActiveMQBuffer buffer) throws HornetQStompException { return decoder.decode(buffer); } @@ -349,7 +349,7 @@ public abstract class VersionedStompFrameHandler subscription.getID()); } - HornetQBuffer buffer = serverMessage.getBodyBufferCopy(); + ActiveMQBuffer buffer = serverMessage.getBodyBufferCopy(); int bodyPos = serverMessage.getEndOfBodyPosition() == -1 ? buffer .writerIndex() : serverMessage.getEndOfBodyPosition(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v11/StompFrameV11.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v11/StompFrameV11.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v11/StompFrameV11.java index e7e67b2..2fef54e 100644 --- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v11/StompFrameV11.java +++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v11/StompFrameV11.java @@ -17,8 +17,8 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.core.protocol.stomp.Stomp; import org.apache.activemq.core.protocol.stomp.StompFrame; @@ -43,17 +43,17 @@ public class StompFrameV11 extends StompFrame } @Override - public HornetQBuffer toHornetQBuffer() throws Exception + public ActiveMQBuffer toHornetQBuffer() throws Exception { if (buffer == null) { if (bytesBody != null) { - buffer = HornetQBuffers.dynamicBuffer(bytesBody.length + 512); + buffer = ActiveMQBuffers.dynamicBuffer(bytesBody.length + 512); } else { - buffer = HornetQBuffers.dynamicBuffer(512); + buffer = ActiveMQBuffers.dynamicBuffer(512); } StringBuffer head = new StringBuffer(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v12/StompFrameV12.java ---------------------------------------------------------------------- diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v12/StompFrameV12.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v12/StompFrameV12.java index 2f96e05..6754232 100644 --- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v12/StompFrameV12.java +++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v12/StompFrameV12.java @@ -17,8 +17,8 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; import org.apache.activemq.core.protocol.stomp.Stomp; import org.apache.activemq.core.protocol.stomp.StompFrame; @@ -43,17 +43,17 @@ public class StompFrameV12 extends StompFrame } @Override - public HornetQBuffer toHornetQBuffer() throws Exception + public ActiveMQBuffer toHornetQBuffer() throws Exception { if (buffer == null) { if (bytesBody != null) { - buffer = HornetQBuffers.dynamicBuffer(bytesBody.length + 512); + buffer = ActiveMQBuffers.dynamicBuffer(bytesBody.length + 512); } else { - buffer = HornetQBuffers.dynamicBuffer(512); + buffer = ActiveMQBuffers.dynamicBuffer(512); } StringBuffer head = new StringBuffer(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRABundle.java ---------------------------------------------------------------------- diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRABundle.java b/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRABundle.java index a882469..79979b7 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRABundle.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRABundle.java @@ -13,7 +13,7 @@ package org.apache.activemq.ra; -import org.apache.activemq.api.core.HornetQIllegalStateException; +import org.apache.activemq.api.core.ActiveMQIllegalStateException; import org.jboss.logging.annotations.Cause; import org.jboss.logging.annotations.Message; import org.jboss.logging.annotations.MessageBundle; @@ -42,7 +42,7 @@ public interface HornetQRABundle HornetQRABundle BUNDLE = Messages.getBundle(HornetQRABundle.class); @Message(id = 159000, value = "Error decoding password using codec instance", format = Message.Format.MESSAGE_FORMAT) - HornetQIllegalStateException errorDecodingPassword(@Cause Exception e); + ActiveMQIllegalStateException errorDecodingPassword(@Cause Exception e); @Message(id = 159001, value = "MDB cannot be deployed as it has no Activation Spec. Please provide an Activation!", format = Message.Format.MESSAGE_FORMAT) NotSupportedException noActivationSpec(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAProperties.java ---------------------------------------------------------------------- diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAProperties.java b/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAProperties.java index 1371069..c0f1d9b 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAProperties.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAProperties.java @@ -15,7 +15,7 @@ package org.apache.activemq.ra; import java.io.Serializable; import java.util.Hashtable; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.utils.DefaultSensitiveStringCodec; import org.apache.activemq.utils.PasswordMaskingUtil; import org.apache.activemq.utils.SensitiveDataCodec; @@ -300,7 +300,7 @@ public class HornetQRAProperties extends ConnectionFactoryProperties implements ", userName=" + userName + ", password=****]"; } - public synchronized void init() throws HornetQException + public synchronized void init() throws ActiveMQException { if (initialized) return; http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAXAResource.java ---------------------------------------------------------------------- diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAXAResource.java b/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAXAResource.java index fb9e51c..773d065 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAXAResource.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQRAXAResource.java @@ -16,7 +16,7 @@ import javax.transaction.xa.XAException; import javax.transaction.xa.XAResource; import javax.transaction.xa.Xid; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.core.client.impl.ClientSessionInternal; import org.apache.activemq.core.client.impl.HornetQXAResource; @@ -74,7 +74,7 @@ public class HornetQRAXAResource implements HornetQXAResource //this resets any tx stuff, we assume here that the tm and jca layer are well behaved when it comes to this sessionInternal.resetIfNeeded(); } - catch (HornetQException e) + catch (ActiveMQException e) { HornetQRALogger.LOGGER.problemResettingXASession(); } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQResourceAdapter.java ---------------------------------------------------------------------- diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQResourceAdapter.java b/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQResourceAdapter.java index 23a3b03..508c533 100644 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQResourceAdapter.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/HornetQResourceAdapter.java @@ -34,9 +34,9 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.BroadcastEndpointFactoryConfiguration; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; -import org.apache.activemq.api.core.HornetQException; import org.apache.activemq.api.core.JGroupsBroadcastGroupConfiguration; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.UDPBroadcastGroupConfiguration; @@ -161,7 +161,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable { setup(); } - catch (HornetQException e) + catch (ActiveMQException e) { throw new ResourceException("Unable to create activation", e); } @@ -255,7 +255,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable { setup(); } - catch (HornetQException e) + catch (ActiveMQException e) { throw new ResourceAdapterInternalException("Unable to create activation", e); } @@ -1777,7 +1777,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable /** * Setup the factory */ - protected void setup() throws HornetQException + protected void setup() throws ActiveMQException { raProperties.init(); defaultHornetQConnectionFactory = createHornetQConnectionFactory(raProperties); @@ -1798,7 +1798,7 @@ public class HornetQResourceAdapter implements ResourceAdapter, Serializable { setup(); } - catch (HornetQException e) + catch (ActiveMQException e) { throw new ResourceException("Unable to create activation", e); }
