Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JMSRA ActivationSpec property endpointPoolResizeTimeout should allow zero value #103

Closed
glassfishrobot opened this issue Jun 27, 2011 · 6 comments · Fixed by #1572
Closed

Comments

@glassfishrobot
Copy link

glassfishrobot commented Jun 27, 2011

This fix is needed as part of the solution to GLASSFISH-4629

Currently, com.sun.messaging.jms.ra.ActivationSpec.setEndpointPoolResizeTimeout(int endpointPoolResizeTimeout) will throw an IllegalArgumentException if a value of 0 is supplied, meaning "infinite timeout".

JMSRA does not use this value. The current behaviour is that endpoints do not timeout, so in fact a value of 0 corresponds to the current behaviour but is not allowed.

Affected Versions

[4.5]

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
Reported by @nigeldeakin

@glassfishrobot
Copy link
Author

glassfishrobot commented Jun 28, 2011

@glassfishrobot Commented
@nigeldeakin said:
Now fixed in MQ 4.6

C:\mq\MQ4.6>hg diff src\share\java\com\sun\messaging\jms\ra\ActivationSpec.java
diff -r 2abfe80d30b1 src/share/java/com/sun/messaging/jms/ra/ActivationSpec.java
--- a/src/share/java/com/sun/messaging/jms/ra/ActivationSpec.java       Tue Jun 21 13:46:22 2011 -0700
+++ b/src/share/java/com/sun/messaging/jms/ra/ActivationSpec.java       Tue Jun 28 10:00:49 2011 +0100
@@ -717,9 +717,10 @@
     setEndpointPoolResizeTimeout(int endpointPoolResizeTimeout)
     {
         _loggerIM.entering(_className, "setEndpointPoolResizeTimeout()", Integer.toString(endpointPoolResizeTimeout));
-        if (endpointPoolResizeTimeout < 1) {
+        // MQ-103 Allow a value of 0, which means no timeout
+        if (endpointPoolResizeTimeout < 0) {
             IllegalArgumentException iae = new IllegalArgumentException(_lgrMID_EXC+"setEndpointPoolResizeTimeout:"+
-    "Value must be greater than 0:"+
+    "Value must not be negative:"+
     "Invalid value="+endpointPoolResizeTimeout);
             _loggerIM.warning(iae.getMessage());
             _loggerIM.throwing(_className, "setEndpointPoolResizeTimeout()", iae);
}}

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
saradak said:
The bug is not fixed. I am still seeing the following error when trying to set endpointPoolResizeTimeout on activationspec.

Mar 29, 2013 5:14:20 PM com.sun.messaging.jms.ra.ActivationSpec setEndpointPoolResizeTimeout
WARNING: MQJMSRA_AS4001: setEndpointPoolResizeTimeout:Value must be greater than 0:Invalid value=0
java.lang.IllegalArgumentException: MQJMSRA_AS4001: setEndpointPoolResizeTimeout:Value must be greater than 0:Invalid
value=0
at com.sun.messaging.jms.ra.ActivationSpec.setEndpointPoolResizeTimeout(ActivationSpec.java:733)
at test.jmsclient.ra.SerialMessageDeliveryTest001.test(SerialMessageDeliveryTest001.java:81)
at test.jmsclient.ra.SerialMessageDeliveryTest001.main(SerialMessageDeliveryTest001.java:47)

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
This issue was imported from java.net JIRA MQ-103

@glassfishrobot
Copy link
Author

@pzygielo
Copy link
Contributor

Hi @edbratt - could you please check - and if it was fixed - let's close this issue, if it wasn't fixed - let's unbind this from 5.0 milestone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants