[jboss-jira] [JBoss JIRA] (WFLY-7554) Singleton: @AccessTimeout and @Lock on superclass method not
Stefan Lindner (JIRA)
issues at jboss.org
Thu Nov 10 10:19:00 EST 2016
Stefan Lindner created WFLY-7554:
------------------------------------
Summary: Singleton: @AccessTimeout and @Lock on superclass method not
Key: WFLY-7554
URL: https://issues.jboss.org/browse/WFLY-7554
Project: WildFly
Issue Type: Bug
Components: EJB
Affects Versions: 10.1.0.Final, 9.0.2.Final
Environment: Win7_64, Oracle Java 8/102
Reporter: Stefan Lindner
{code:java}
@AccessTimeout(value=54321)
class MySuperclass {
@AccessTimeout(value=1200000000000L)
public void whileBlocked() {....}
}
@Singleton
@Startup
@ConcurrencyManagement(ConcurrencyManagementType.CONTAINER)
@DependsOn("BenutzerControllerImpl")
@AccessTimeout(value=54321)
@Lock(LockType.READ)
class MyClass extends MySuperclass {
@Lock(LockType.WRITE)
public void myBlocker() {....}
}
{code}
Calling method {code:java}whileBlocked{code} when another thread has called {code:java}myBlocker{code} leads to Exception
javax.ejb.ConcurrentAccessTimeoutException: WFLYEJB0241: EJB 3.1 PFD2 4.8.5.5.1 concurrent access timeout on MyClass - could not obtain lock within 5000MILLISECONDS
The standard says:
{quote}The AccessTimeout annotation can be specified on a business method or on a bean class (or superclass).
{quote}
In short:
# @AccessTimeout annotations on bean's class or method work as expected
# Annotations on superclass do not
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list