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 » Sun Jul 10, 2016 5:43 am

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: 8622
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin » Sun Jul 10, 2016 7:00 am

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 » Sun Jul 10, 2016 7:43 am

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 1 guest