This commit is contained in:
Dejan Bosanac 2016-01-18 09:35:45 +01:00
parent df868fe4a3
commit a3fa0da6ec
2 changed files with 9 additions and 0 deletions

View File

@ -16,6 +16,7 @@
*/
package org.apache.activemq.command;
import java.beans.Transient;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
@ -628,6 +629,7 @@ public abstract class Message extends BaseCommand implements MarshallAware, Mess
}
@Override
@Transient
public MessageDestination getRegionDestination() {
return regionDestination;
}

View File

@ -16,8 +16,10 @@
*/
package org.apache.activemq.command;
import java.beans.Transient;
import java.io.DataOutputStream;
import java.io.IOException;
import java.lang.reflect.Method;
import javax.jms.JMSException;
import javax.jms.MessageNotReadableException;
@ -148,6 +150,11 @@ public class ActiveMQTextMessageTest extends TestCase {
setContent(nullMessage, null);
assertTrue(nullMessage.toString().contains("text = null"));
}
public void testTransient() throws Exception {
Method method = ActiveMQTextMessage.class.getMethod("getRegionDestination", null);
assertTrue(method.isAnnotationPresent(Transient.class));
}
protected void setContent(Message message, String text) throws Exception {
ByteArrayOutputStream baos = new ByteArrayOutputStream();