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;
|
||||
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue