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

Moderator: admin

Post Reply
lveto15
Posts: 27
Joined: Tue Sep 22, 2015 1:01 pm
Contact:

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

Post 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.
.

admin
Site Admin
Posts: 10043
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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.
If you like our products and services, please help us by posting your review here.

lveto15
Posts: 27
Joined: Tue Sep 22, 2015 1:01 pm
Contact:

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

Post 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 :).

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests