EJB 3.1 asynchrony and transactions

May 9, 2010 § 1 Comment

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.

§ One Response to EJB 3.1 asynchrony and transactions

What’s this?

You are currently reading EJB 3.1 asynchrony and transactions at Bistro! 2.0.



Get every new post delivered to your Inbox.

%d bloggers like this: