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

Moderator: admin

Post Reply
jaypi
Posts: 8
Joined: Sun Feb 03, 2013 9:47 am
Contact:

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

Post by jaypi »

To enable asynchronous invocation on a method that returns a value, two things must be done:
1. The method's return type must be return Future<V> in the bean class as well as in the interface.
Quote from specs: 4.5.2.2
Alternatively, the bean-class method of an asynchronous method that is exposed via a Local or Remote business interface can be written without explicit use of the Future<V> API. In this case, the bean-class method declares a return type of V, where the same type appears as the parameterized type of Future<V> in the corresponding business interface method signature.
2. Put @Asynchronous annotation on the method definition in the bean class code. There is no need to apply this annotation in the method declaration in the remote interface.
Quote from specs: 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.
Line 10 should be a correct answer too

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

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

Post by admin »

I just checked section 4.5.2.2 of EJB 3.1 Final Release specification. It doesn't contain the statement that you've quoted i.e. "Alternatively, ...".
Can you please see which exact version of the specification are you using?
Paul.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests