EJB 3.1 asynchrony and transactions

This blog has moved to alexismp.wordpress.com
Follow the link for the most up-to-date version of this blog entry.

When presenting Java EE 6 and GlassFish v3 at the Lausanne JUG last week I was bombarded with questions (I like that) and I think I didn't do an ideal job answering the following question (paraphrasing) :

How does the new async feature in EJB 3.1 work wrt transactions?

The precise answer is easy to find in the EJB 3.1 specification itself (paragraph 4.5.3) :

Client transaction context does not propagate with an asynchronous method invocation. From the Bean Developer’s view, there is never a transaction context flowing in from the client. This means, for example, that the semantics of the REQUIRED transaction attribute on an asynchronous method are exactly the same as REQUIRES_NEW.

By the way, the entire section on EJB 3.1 asynchronous methods is only two pages.

Comments:

Great post! That's a doubt I had when I heard about assync invocation on EJB 3.1

Posted by Eduardo Costa on mai 10, 2010 at 11:59 AM CEST #

Post a Comment:
Comments are closed for this entry.
About

This blog has moved

Alexis Moussine-Pouchkine's Weblog

GlassFish - Stay Connected

Search

Archives
« avril 2014
lun.mar.mer.jeu.ven.sam.dim.
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today
Blogroll

No bookmarks in folder

News

No bookmarks in folder