-
@Target(value={METHOD,TYPE}) @Retention(value=RUNTIME) public @interface AccessTimeout
Specifies the amount of time in a given time unit that a concurrent access attempt should block before timing out.This annotation may be applied to a stateful session bean or to a singleton session bean that uses container managed concurrency.
By default, clients are allowed to make concurrent calls to a stateful session object and the container is required to serialize such concurrent requests. The
AccessTimeout
annotation is used to specify the amount of time a stateful session bean request should block in the case that the bean instance is already processing a different request. Use of theAccessTimeout
annotation with a value of 0 specifies to the container that concurrent client requests to a stateful session bean are prohibited.The
AccessTimeout
annotation can be specified on a business method or a bean class. If it is specified on a class, it applies to all business methods of that class. If it is specified on both a class and on a business method of the class, the method-level annotation takes precedence for the given method.Access timeouts for a singleton session bean only apply to methods eligible for concurrency locks. The
AccessTimeout
annotation can be specified on the singleton session bean class or on an eligible method of the class. IfAccessTimeout
is specified on both a class and on a method of that class, the method-level annotation takes precedence for the given method.The semantics of the
value
element are as follows:- A value
>
0 indicates a timeout value in the units specified by theunit
element. - A value of 0 means concurrent access is not permitted.
- A value of -1 indicates that the client request will block indefinitely until forward progress it can proceed.
- Since:
- EJB 3.1
- A value
-
-
Required Element Summary
Required Elements Modifier and Type Required Element and Description long
value
The semantics of thevalue
element are as follows: A value>
0 indicates a timeout value in the units specified by theunit
element.
-
-
-
Element Detail
-
value
public abstract long value
The semantics of thevalue
element are as follows:- A value
>
0 indicates a timeout value in the units specified by theunit
element. - A value of 0 means concurrent access is not permitted.
- A value of -1 indicates that the client request will block indefinitely until forward progress it can proceed.
- A value
-
-
-
unit
public abstract TimeUnit unit
Units used for the specified value.- Default:
- java.util.concurrent.TimeUnit.MILLISECONDS
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
21/08/2025 17:22:15 Cette version de la page est en cache (à la date du 21/08/2025 17:22:15) afin d'accélérer le traitement.Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la version plus récente de la page.
Document créé le 11/06/2005, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/ejb/AccessTimeout.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.