On Nov 8, 2011, at 1:50 PM, Adam Bien wrote:
> HI *,
>
> @AccessTimeout works exclusively for @Singletons.
> @Stateless Session Beans could run to similar problems e.g. you can call a blocking method and block the particular instance forever.
> This situation could be resolved with transaction-timeout, but only in case you are invoking the method in the scope of a transaction.
It works for @Stateful as well and is part of the TCK.
I'm not sure if it's in the spec but I know at least OpenEJB supports it for @Stateless. Would be interesting to hear if others did the same.
There aren't tests for @Stateless/_at_AccessTimeout in the TCK I know -- there aren't any pooling related tests. Sort of good and bad. Pooling isn't strictly required and there are advantages to that.
Sometimes I wonder how a "pooling options" annotation might look. I can see pros and cons to doing something like that. Among the pros would be we could finally TCK test some things like this (@Stateless w/ @AccessTimeout). In the cons would be that it could make configuration actually harder and more confusing. In OpenEJB for example we have around 8 different pooling options that can be combined to tune up three distinctly different kinds of stateless instance management.
-David