[jboss-jira] [JBoss JIRA] (WFLY-7554) Singleton: @AccessTimeout and @Lock on superclass method not
Stuart Douglas (JIRA)
issues at jboss.org
Sat Nov 12 15:59:00 EST 2016
[ https://issues.jboss.org/browse/WFLY-7554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stuart Douglas reassigned WFLY-7554:
------------------------------------
Assignee: Stuart Douglas
> 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: 9.0.2.Final, 10.1.0.Final
> Environment: Win7_64, Oracle Java 8/102
> Reporter: Stefan Lindner
> Assignee: Stuart Douglas
>
> {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