Since createSession are ignored in EJB 3.1, I think that the "right" answer (When you create a session, you specify whether it is transacted.) is wrong.
From the spec:
"
Because the container manages the transactional enlistment of JMS sessions on behalf of a bean, the parameters of the createSession(boolean transacted, int acknowledgeMode), createQueueSession(boolean transacted, int acknowledgeMode) and createTopicSession(boolean transacted, int acknowledgeMode) methods are ignored. It is recommended that the Bean Provider specify that a session is transacted, but provide 0 for the value of the acknowledgment mode.
"
createSession arguments are ignored in EJB 3.1
Moderator: admin
-
- Site Admin
- Posts: 10386
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: createSession arguments are ignored in EJB 3.1
zfvit, What you've quoted ( Section 13.3.5 ) is applicable only for CMT beans. Since the container manages transactions for a CMT bean the parameters don't make sense. But they do make sense for BMT beans. So in a situation where you are in fact able to control the transactions, you need to use the session and not the connection. That is why this option is marked correct.
HTH,
Paul.
HTH,
Paul.
Who is online
Users browsing this forum: No registered users and 5 guests