[jboss-jira] [JBoss JIRA] (WFLY-7554) Singleton: @AccessTimeout and @Lock on superclass method not
Stefan Lindner (JIRA)
issues at jboss.org
Fri Nov 25 08:26:01 EST 2016
[ https://issues.jboss.org/browse/WFLY-7554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13328276#comment-13328276 ]
Stefan Lindner commented on WFLY-7554:
--------------------------------------
Thank you! That's it.
Our dependencies were managed through Manifest.MF and there is noch way to specify this.
Now with jboss-deployment-structure.xml everything works fine.
> 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