Thanks for the reply Romain ... out of curiosity does Tomee allow it?

Regards
LF
On Jun 16, 2016 13:02, "Romain Manni-Bucau" <rmannibu...@gmail.com> wrote:

> You read it right but spec also states this  an be removed in fiture
> releases.
>
> Not sure why it has been done this way to be honest
> Le 16 juin 2016 12:34, "Lars-Fredrik Smedberg" <itsme...@gmail.com> a
> écrit :
>
> > Hi
> >
> > Some parts of this is WELD specific and I know Tomee uses OWB but other
> > parts are questions more to whats in the specs....
> >
> > In the EJB 3.2 spec in section 7.1 I can read
> >
> > "It is illegal to associate JTA transactional interceptors (see [8]) with
> > Enterprise JavaBeans. The EJB
> > Container should fail deployment of such applications.[39]"
> >
> > And when starting the my container (I have tried it in WLP) I get an
> error
> > when trying to use @Transactional on a @MessageDriven bean which seems
> okay
> > according to the EJB spec.
> >
> > However when reading the WELD reference section 15.4 (
> >
> >
> http://docs.jboss.org/weld/reference/latest/en-US/html_single/#_calling_a_bean_from_a_message_driven_bean
> > )
> > I see the following example:
> >
> > @Transactional @MessageDriven
> > public class ProcessOrder implements MessageListener {
> >    @Inject Inventory inventory;
> >    @PersistenceContext EntityManager em;
> >
> >    public void onMessage(Message message) {
> >       ...
> >    }
> > }
> >
> > The text however does not mention the @Transactional interceptor
> > specifically but rather state that:
> >
> > "You can even use interceptor bindings for message-driven Beans."
> >
> > *Question:*
> >
> > - Is the example using @Transactional not a good example since this is
> not
> > permitted according to the EJB spec or is MDBs a special case where it
> > should be permitted?
> >
> > Regards
> > Lars-Fredrik
> >
> >
> >
> > --
> > Med vänlig hälsning / Best regards
> >
> > Lars-Fredrik Smedberg
> >
> > STATEMENT OF CONFIDENTIALITY:
> > The information contained in this electronic message and any
> > attachments to this message are intended for the exclusive use of the
> > address(es) and may contain confidential or privileged information. If
> > you are not the intended recipient, please notify Lars-Fredrik Smedberg
> > immediately at itsme...@gmail.com, and destroy all copies of this
> > message and any attachments.
> >
>

Reply via email to