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;
|
package org.apache.activemq.command;
|
||||||
|
|
||||||
|
import java.beans.Transient;
|
||||||
import java.io.DataInputStream;
|
import java.io.DataInputStream;
|
||||||
import java.io.DataOutputStream;
|
import java.io.DataOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -628,6 +629,7 @@ public abstract class Message extends BaseCommand implements MarshallAware, Mess
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transient
|
||||||
public MessageDestination getRegionDestination() {
|
public MessageDestination getRegionDestination() {
|
||||||
return regionDestination;
|
return regionDestination;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,10 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.activemq.command;
|
package org.apache.activemq.command;
|
||||||
|
|
||||||
|
import java.beans.Transient;
|
||||||
import java.io.DataOutputStream;
|
import java.io.DataOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
import javax.jms.JMSException;
|
import javax.jms.JMSException;
|
||||||
import javax.jms.MessageNotReadableException;
|
import javax.jms.MessageNotReadableException;
|
||||||
|
@ -149,6 +151,11 @@ public class ActiveMQTextMessageTest extends TestCase {
|
||||||
assertTrue(nullMessage.toString().contains("text = 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 {
|
protected void setContent(Message message, String text) throws Exception {
|
||||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||||
DataOutputStream dataOut = new DataOutputStream(baos);
|
DataOutputStream dataOut = new DataOutputStream(baos);
|
||||||
|
|
Loading…
Reference in New Issue