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

Invalid value can be set in setJMSExpiration method of Message class #333

Closed
glassfishrobot opened this issue Aug 9, 2013 · 5 comments
Closed

Comments

@glassfishrobot
Copy link

-1 can be set for setJMSExpiration(long expiration) method of Message class. When -1 is set and executed, no exception or error is displayed. Should it cause exception when an invalid value is set?

Environment

Glassfish 4.0.1 b02 07/24/2013
Windows

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
Reported by tak09

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
@nigeldeakin said:
A negative timestamp has no meaning, so it would be helpful if MQ threw an exception when an attempt was made to set a negative value. The JMS specification does not require that the exception that is thrown is a JMSException, but this seems to be the most appropriate exception to throw.

Note that this method is not intended for use by client applications and any value set by the client application will always be overridden (see the javadoc):

This method is for use by JMS providers only to set this field when a message is sent. This message cannot be used by clients to configure the expiration time of the message. This method is public to allow a JMS provider to set this field when sending a message whose implementation is not its own.

@glassfishrobot
Copy link
Author

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

@glassfishrobot
Copy link
Author

@pzygielo
Copy link
Contributor

pzygielo commented Sep 5, 2024

@pzygielo pzygielo closed this as completed Sep 5, 2024
@pzygielo pzygielo added this to the 6.3.0 milestone Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants