mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-6130 - java beans @Transient annotation
This commit is contained in:
parent
df868fe4a3
commit
a3fa0da6ec
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
@ -149,6 +151,11 @@ public class ActiveMQTextMessageTest extends TestCase {
|
|||
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();
|
||||
DataOutputStream dataOut = new DataOutputStream(baos);
|
||||
|
|
Loading…
Reference in New Issue