http://java.net/jira/browse/EJB_SPEC-11 would work on both EJBs and MBs.
The only problem is where does the ExecutorService come from.
In an older prototype I also had:
public static <T> T async(T obj, ExecutorService executor)
Furthermore it should be possible to do either:
@Inject ExecutorService executor;
or
@Resource ExecutorService executor;
For EJB it means having an ExecutorService under
java:comp/ExecutorService for outbound asynchronous calls.
One issue remaining for MB would be cancellation.
It needs refined, but do you all think it is worth it?
Carlo
On 09/27/2011 08:47 PM, Pete Muir wrote:
> This, for me, makes it even more important. There is nothing a developer hates more than learning 3 ways to do the same thing!
>
> On 27 Sep 2011, at 18:30, Marina Vatkina wrote:
>
>> I'm not sure it'll be straight forward to add support for all managed beans - servlets and Web services already define their own approach to an asynchronous processing...
>>
>> -marina
>>
>> Antonio Goncalves wrote:
>>> Like Pete I would like to see @Asynchronous in managed beans.
>>>
>>>
>>> On Tue, Sep 27, 2011 at 12:46, Pete Muir<pmuir_at_bleepbleep.org.uk<mailto:pmuir_at_bleepbleep.org.uk>> wrote:
>>>
>>> I would like to see this too. However I see this only as a first
>>> step and would also like to add this to the list of services to
>>> extract entirely so they can be used in managed beans (similar to
>>> interceptors and our discussions around declarative transactions).
>>>
>>> Pete
>>>
>>> On 27 Sep 2011, at 02:19, Marina Vatkina wrote:
>>>
>>> > This was also voted for by 2 experts. Would anybody else like to
>>> see this change in EJB 3.2?
>>> >
>>> > thanks,
>>> > -marina
>>>
>>>
>>>
>>>
>>> --
>>> Antonio Goncalves
>>> Software architect and Java Champion
>>>
>>> Web site<http://www.antoniogoncalves.org> | Twitter<http://twitter.com/agoncal> | Blog<http://feeds.feedburner.com/AntonioGoncalves> | LinkedIn<http://www.linkedin.com/in/agoncal> | Paris JUG<http://www.parisjug.org>