tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: Injection of objet created by interceptor (per request)
Date Wed, 09 May 2012 10:54:40 GMT
Hi,

isn't ThreadLocal adapted?

if you really want to use @Inject because that's fancy or because that's
the API you want to expose you can  @Produces a proxy looking in your
threadlocal.

- Romain


2012/5/9 Eric Chatellier <chatellier@codelutin.com>

> Hi,
>
> I'm currently using openejb 4.0 as embedded ejb container.
>
> I'm also trying to find a proper way to create object
> in interceptor and getting access to them in EJB.
>
> Is there any way to:
> - create an object (in this case a transaction to a custum persistence
> framefork)
> - put it somewhere
> - inject it on EJB using @Inject or @Resource
>
> Note: the created object must be unique per transaction, so can't be
> defined in container configuration.
>
> Thanks in advance.
>
> --
> √Čric Chatellier <chatellier@codelutin.com>
> Tel: 02.40.50.29.28
> http://www.codelutin.com
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message