dev@jax-ws.java.net

SOAPHandlers and transactions

From: Behrang Saeedzadeh <behrangsa_at_gmail.com>
Date: Tue, 23 Aug 2011 14:46:52 +1000

Hi,

When an EJB method with container-managed transaction and a transaction
attribute such as "REQUIRED" is exposed as a Web Service, and a handler
chain is defined for that Web Service, it makes sense for the code inside
the handler chain to be executed in the same transaction as the EJB method
itself. After all SOAPHandlers are just like interceptors and CDI
interceptors are executed withing the same transaction as their target EJB
methods.

In short, there should be a way to specify that an EJB-based Web Service's
SOAPHandlers have to be executed within the same context as the EJB itself.

Cheers,
Behrang Saeedzadeh
http://www.behrang.org