enthuware.oce-ejbd.v6.2.409

Moderator: admin

Post Reply
newEJB

enthuware.oce-ejbd.v6.2.409

Post by newEJB »

"Note that putting @Asynchronous annotation in the interface does not give any error on Glassfish but it is not the right place for this annotation"

I have seen a couple times on the test mention that @Asynchronous annotation can't be put in the interface. From the spec, @Asynchronous annotation can be on either the bean class or interface. Can you please double check ? Thanks.

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

Re: enthuware.oce-ejbd.v6.2.409

Post by admin »

As per Section 4.5.1 of EJB 3.1 Specification:
@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) . If @Asynchronous is applied at the class level, all business methods declared on that specific class are asynchronous.
It doesn't mention interface anywhere.

HTH,
Paul.
If you like our products and services, please help us by posting your review here.

newEJB

Re: enthuware.oce-ejbd.v6.2.409

Post by newEJB »

Thanks Paul for quick response. It's my fault. I am not sure how I got this spec. It's an old version. The date on the spec is 2/24/09. I just checked on the 11/5/09 11:00am version and it doesn't mention the same thing. I hope this is the most accurate one. Thanks for clarification.

Post Reply

Who is online

Users browsing this forum: No registered users and 85 guests