right (thought you didn't need JTA), so just use a stateful as main bean or
as wrapper.

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/6/27 Mark Struberg <[email protected]>

> If you use the EMF to create an EM then you will not get the same. You
> will miss all the JTA management. Thus no joinTransaction, etc - isn't?
>
> LieGrue,
> strub
>
>
>
> ----- Original Message -----
> > From: Romain Manni-Bucau <[email protected]>
> > To: [email protected]
> > Cc: [email protected]
> > Sent: Thursday, 27 June 2013, 8:28
> > Subject: Re: em.find outside of a JTA transaction
> >
> >g uys if you just get the emf and create your own em that's the same and
> you
> > keep EXTENDED for stateful which is clearly better otherwise you could
> get
> > issue if the stateful is removed but the em uses a wrong scope etc....
> >
> > *Romain Manni-Bucau*
> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > *Blog:
> > **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > *Github: https://github.com/rmannibucau*
> >
> >
> >
> > 2013/6/27 DonatasCiuksys <[email protected]>
> >
> >>  Hi Mark, Romain,
> >>
> >>  This is exactly the problem I registered JIRA issue once:  TOMEE-509
> >>  <https://issues.apache.org/jira/browse/TOMEE-509>   (Injected
> > extended
> >>  EntityManager is not registered (cannot be used for DB operations))
> >>
> >>  As specs do not allow/disallow this explicitly, I tried to contact
> EJB/JPA
> >>  spec experts. The answer was that future EJB/JPA specs should define
> this
> >>  more clearly:
> >>
> >>  JPA_SPEC-46 <https://java.net/jira/browse/JPA_SPEC-46>   Explicitly
> > allow
> >>  or
> >>  disallow use of Entity Manager with extended Persistence Context for
> CDI
> >>  injection
> >>
> >>  JPA_SPEC-3 <https://java.net/jira/browse/JPA_SPEC-3>   Allow
> > components
> >>  other than stateful sessions beans to initiate container-managed
> extended
> >>  persistence contexts
> >>
> >>  I really hope this will get resolved positively (i.e. it should be
> allowed
> >>  behaviour).
> >>
> >>  Cheers,
> >>  Donatas
> >>
> >>
> >>
> >>  --
> >>  View this message in context:
> >>
> >
> http://openejb.979440.n4.nabble.com/em-find-outside-of-a-JTA-transaction-tp4663929p4663969.html
> >>  Sent from the OpenEJB Dev mailing list archive at Nabble.com.
> >>
> >
>

Reply via email to