You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by David Martinez <da...@gmail.com> on 2011/04/01 17:08:25 UTC

Remote Transaction Propagation (Source Code)

On Fri, Apr 1, 2011 at 3:07 PM, David Martinez <da...@gmail.com> wrote:

> Hi!
>
> Could you tell me please
>
> how to Transfer the Transaction to a Remote EJB 3.0?:
>
> ----------------------------
> -----------------------------
> |@Local or @Remote  |                               |  @Remote Bean B     |
>
> |       Bean A               |     transfers Tx1       |
>                              |
> |                                |  ---------------->        |   receives
> Tx1            |
> |    starts Tx1 :            |       invocation          |
> context                  |
> | @REQUIRES_NEW |                               | @MANDATORY         |
> ----------------------------
> -----------------------------
>
> EJB are Stateless EJB.
>
> Invocation is made through a InitialContext with (bean B) Server
> Properties.
>
> When I run this code on server openejb-3.1.4 I get a
> TransactionRequiredLocalException because no Transaction context is
> propagated from Bean A to Bean B.
>
> This works if InitialContextFactory is
>            org.apache.openejb.client.LocalInitialContextFactory
> although only local VM calls are made. ( no tcp )
>
> Thank you.
>