Hi Howard, many thanks. I will review the threads you suggest.

I think my question here is whether this is (a) a bug, (b) expected
behavior, (c) expected and configurable behavior, or (c) undefined
behavior, because Tomee does not support the use of asynchronous biz
methods. It is at least odd behavior (why specifically three beans?)

As far as asynchronous biz methods on a stateless bean, at minimum I don't
think the Java EE spec excludes this (it is in fact a useful feature), and
my guess is other Java EE containers support it.

A workaround is to use a Singleton (as mentioned previously) but I do hope
to know what the Tomee container can and can't do. : )

Best,
Stuart


On Tue, Jan 7, 2014 at 3:34 PM, Howard W. Smith, Jr. <[email protected]
> wrote:

> Stuart,
>
> On Tue, Jan 7, 2014 at 3:03 PM, Stuart Easterling <
> [email protected]> wrote:
>
> > Romain, if you add the annotation @Asynchronous to your foo() business
> > method in TestBean it reproduces the behavior I have been having.
> >
>
> I'm definitely not one of the committers (or expert users), but your
> questions/threads, today, remind me of some related topics discussed on
> this tomee user list.
>
> Recent (possibly related) topics are:
>
> @Asynchronous And TransactionRequiredException
>
> and
>
> initial size of pool of stateless beans
>
> You can search google + tomee user list for those topic titles, above, and
> read them. In one of those topics, I think I stated that I would never add
> @Asynchronous to @Stateless bean. As a java EE newbie that learned java EE
> via Java EE 6 tutorial and NetBeans, I never seen the two married together
> in tutorial or in any working examples, but I've seen others on this list
> marry the two together.
>
> In my understanding/experience of @Asynchronous... use the same (@Stateless
> test) bean, but execute the @Asynchronous 'method'...later, and hope it
> executes. I think I've even heard David Blevins (TomEE lead/committer)
> state that @Asynchronous is not always/fully reliable. I think Romain will
> disagree with that though. :)
>
> I use @Asynchronous only with @SessionScoped beans...as
> documented/demonstrated/suggested in Java EE 6 tutorial. I think TomEE
> allows @Asynchronous + @Stateless, because of the DeltaSpike/OpenEJB
> features in TomEE. :)
>

Reply via email to