Page 1 of 1

Re: About Question enthuware.oce-ejbd.v6.2.409 :

Posted: Sun Jul 10, 2016 5:43 am
by lveto15
I have doubts about this question and answer. According to specification (4.5.1):
@Asynchronous can be applied to a business method of a bean class OR to a method of a Local/Remote business interface.
annotation can be applied to a method of a business interface. But when I put it there and // NO CODE HERE on bean method answer is incorrect.

I have checked all combinations:
-- only on interface method
-- only on bean method
-- on both methods
and in all these cases my test is passed.

P.S.
Explanation doubt: shouldn't Thread.sleep be avoided (also according to specification):
The enterprise bean must not attempt to manage threads.
.

Re: About Question enthuware.oce-ejbd.v6.2.409 :

Posted: Sun Jul 10, 2016 7:00 am
by admin
Not sure where you are looking but EJB 3.1 specification section 4.5.1 says:
@Asynchronous can be applied to a particular business method of a bean class(or superclass), or at
the class level of a bean-class (or superclass) .
It doesn't talk about interface.
-Paul.

Re: About Question enthuware.oce-ejbd.v6.2.409 :

Posted: Sun Jul 10, 2016 7:43 am
by lveto15
My mistake - the first position in google search is not final specification. I didn't pay attention to title :). Thank you for pointing it :).