You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Dingwen Yuan (JIRA)" <ji...@apache.org> on 2007/08/21 03:05:22 UTC
[jira] Created: (AMQ-1366) Stomp property "expires" not properly
supported
Stomp property "expires" not properly supported
-----------------------------------------------
Key: AMQ-1366
URL: https://issues.apache.org/activemq/browse/AMQ-1366
Project: ActiveMQ
Issue Type: Bug
Components: Transport
Affects Versions: 5.0.0
Environment: JDK1.6.0 WinXP Pro
Reporter: Dingwen Yuan
Fix For: 4.1.1
Attachments: difffile.txt
When a stomp queue message sent with "expires" property set to non-zero, AMQ will not route it to the destination.
I have added a function to the unit test class org.apache.activemq.transport.stomp.StompTest, to expose that bug.
public void testStompExpireProperty() throws Exception
It connects to a stomp server (AMQ) and subscribes for a queue. Then it sends a SEND frame to this queue with "expires" set to non-zero value. On version 5.0, you will get this exception:
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.net.SocketInputStream.read(SocketInputStream.java:182)
at org.apache.activemq.transport.stomp.StompConnection.receiveFrame(StompConnection.java:64)
at org.apache.activemq.transport.stomp.StompConnection.receiveFrame(StompConnection.java:56)
at org.apache.activemq.transport.stomp.StompTest.testStompExpireProperty(StompTest.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at org.apache.activemq.CombinationTestSupport.runBare(CombinationTestSupport.java:98)
at org.apache.activemq.CombinationTestSupport.runBare(CombinationTestSupport.java:104)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Attached is a diff file for the unit test.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [jira] Created: (AMQ-1366) Stomp property "expires" not properly supported
Posted by Dingwen Yuan <pd...@gmail.com>.
Could any developer help to solve the problem?
2007/8/21, Dingwen Yuan (JIRA) <ji...@apache.org>:
>
> Stomp property "expires" not properly supported
> -----------------------------------------------
>
> Key: AMQ-1366
> URL: https://issues.apache.org/activemq/browse/AMQ-1366
> Project: ActiveMQ
> Issue Type: Bug
> Components: Transport
> Affects Versions: 5.0.0
> Environment: JDK1.6.0 WinXP Pro
> Reporter: Dingwen Yuan
> Fix For: 4.1.1
> Attachments: difffile.txt
>
> When a stomp queue message sent with "expires" property set to non-zero,
> AMQ will not route it to the destination.
>
> I have added a function to the unit test class
> org.apache.activemq.transport.stomp.StompTest, to expose that bug.
>
> public void testStompExpireProperty() throws Exception
> It connects to a stomp server (AMQ) and subscribes for a queue. Then it
> sends a SEND frame to this queue with "expires" set to non-zero value. On
> version 5.0, you will get this exception:
>
> java.net.SocketTimeoutException: Read timed out
> at java.net.SocketInputStream.socketRead0(Native Method)
> at java.net.SocketInputStream.read(SocketInputStream.java:129)
> at java.net.SocketInputStream.read(SocketInputStream.java:182)
> at org.apache.activemq.transport.stomp.StompConnection.receiveFrame
> (StompConnection.java:64)
> at org.apache.activemq.transport.stomp.StompConnection.receiveFrame
> (StompConnection.java:56)
> at
> org.apache.activemq.transport.stomp.StompTest.testStompExpireProperty(
> StompTest.java:141)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at org.apache.activemq.CombinationTestSupport.runBare(
> CombinationTestSupport.java:98)
> at org.apache.activemq.CombinationTestSupport.runBare(
> CombinationTestSupport.java:104)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(
> JUnit3TestReference.java:128)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(
> TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
> RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
> RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
> RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
> RemoteTestRunner.java:196)
>
>
>
>
> Attached is a diff file for the unit test.
>
>
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
[jira] Closed: (AMQ-1366) Stomp property "expires" not properly
supported
Posted by "Dingwen Yuan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-1366?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dingwen Yuan closed AMQ-1366.
-----------------------------
Resolution: Fixed
Sorry, this is a miss-report. The expires property should be set to the time of expiration (in millis) instead of the span to now.
test function like this worked all right:
public void testStompExpireProperty() throws Exception {
String frame = "CONNECT\n" + "login: brianm\n" + "passcode: wombats\n\n" + Stomp.NULL;
stompConnection.sendFrame(frame);
frame = stompConnection.receiveFrame();
assertTrue(frame.startsWith("CONNECTED"));
frame = "SUBSCRIBE\n" + "destination:/queue/" + getQueueName() + "\n" + "ack:auto\n\n" + Stomp.NULL;
stompConnection.sendFrame(frame);
long expires = 10;
frame = "SEND\n" + "destination:/queue/" + getQueueName() +"\n"+"expires:"+System.currentTimeMillis()+expires+"\n\n" + "Hello World" + Stomp.NULL;
stompConnection.sendFrame(frame);
frame = stompConnection.receiveFrame();
assertTrue(frame.startsWith("MESSAGE"));
}
> Stomp property "expires" not properly supported
> -----------------------------------------------
>
> Key: AMQ-1366
> URL: https://issues.apache.org/activemq/browse/AMQ-1366
> Project: ActiveMQ
> Issue Type: Bug
> Components: Transport
> Affects Versions: 5.0.0
> Environment: JDK1.6.0 WinXP Pro
> Reporter: Dingwen Yuan
> Fix For: 4.1.1
>
> Attachments: difffile.txt
>
>
> When a stomp queue message sent with "expires" property set to non-zero, AMQ will not route it to the destination.
> I have added a function to the unit test class org.apache.activemq.transport.stomp.StompTest, to expose that bug.
> public void testStompExpireProperty() throws Exception
> It connects to a stomp server (AMQ) and subscribes for a queue. Then it sends a SEND frame to this queue with "expires" set to non-zero value. On version 5.0, you will get this exception:
> java.net.SocketTimeoutException: Read timed out
> at java.net.SocketInputStream.socketRead0(Native Method)
> at java.net.SocketInputStream.read(SocketInputStream.java:129)
> at java.net.SocketInputStream.read(SocketInputStream.java:182)
> at org.apache.activemq.transport.stomp.StompConnection.receiveFrame(StompConnection.java:64)
> at org.apache.activemq.transport.stomp.StompConnection.receiveFrame(StompConnection.java:56)
> at org.apache.activemq.transport.stomp.StompTest.testStompExpireProperty(StompTest.java:141)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at org.apache.activemq.CombinationTestSupport.runBare(CombinationTestSupport.java:98)
> at org.apache.activemq.CombinationTestSupport.runBare(CombinationTestSupport.java:104)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>
> Attached is a diff file for the unit test.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.