[
https://jira.jboss.org/browse/EJBTHREE-2183?page=com.atlassian.jira.plugi...
]
jaikiran pai resolved EJBTHREE-2183.
------------------------------------
Fix Version/s: depchain-1.0.0
Resolution: Done
Fixed. AccessTimeout value of 0 will now throw ConcurrentAccessException (as mandated by
spec). A negative access timeout value will default to 5 MINUTES (violation of spec!),
since we don't want to wait indefinitely.
@AccessTimeout with values 0 or -1 should be treated differently than
positive values
-------------------------------------------------------------------------------------
Key: EJBTHREE-2183
URL:
https://jira.jboss.org/browse/EJBTHREE-2183
Project: EJB 3.0
Issue Type: Bug
Components: concurrency
Affects Versions: depchain-1.0.0-alpha-4
Reporter: jaikiran pai
Assignee: jaikiran pai
Fix For: depchain-1.0.0
The EJB3.1 spec, section Section 4.8.5.5.1 says:
"An @AccessTimeout value of -1 indicates that the client request will block
indefinitely until forward progress can be made.
An @AccessTimeout value of 0 indicates that concurrent access is not allowed. Access
attempts on methods with a timeout value of 0 result in a
javax.ejb.ConcurrentAccessException."
We currently don't handle these values and just pass them to Lock.tryLock(), which as
per its javadoc says:
"If the time is less than or equal to zero, the method will not wait at all. "
This breaks the EJB3.1 spec expectation.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira