This is out of the scope of the question.
According to the spec , the parameters of createQueueSession (false, Session.AUTO_ACKNOWLEDGE) are ignored by the container.
So, regardless the first parameter transacted is true or false, it is still ignored?
If it is ignored, is createQueueSession implemented in a transaction or not?
About Question enthuware.oce-ejbd.v6.2.421 :
Moderator: admin
-
- Posts: 358
- Joined: Fri Nov 29, 2013 8:26 pm
- Contact:
-
- Site Admin
- Posts: 10036
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.421 :
As per 13.3.5:
I am not sure I understand your question, "is createQueueSession implemented in a transaction or not?"
-Paul.
So yes, the parameters are ignored.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.
I am not sure I understand your question, "is createQueueSession implemented in a transaction or not?"
-Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 358
- Joined: Fri Nov 29, 2013 8:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.421 :
Hi, admin. Thanks.
createQueueSession (false, ....) means the session is a not a transaction. But when this boolean false is ignored by EJB container, is this queue session still in a transaction or not?
createQueueSession (false, ....) means the session is a not a transaction. But when this boolean false is ignored by EJB container, is this queue session still in a transaction or not?
-
- Site Admin
- Posts: 10036
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.421 :
No, a parameter of false means nothing. As the spec says, it is ignored. Whether the sending of the message will be a part of a transaction depends on the transaction type of the bean. That is what the spec says, "the container manages the transactional enlistment of JMS sessions on behalf of a bean"
If you like our products and services, please help us by posting your review here.
-
- Posts: 358
- Joined: Fri Nov 29, 2013 8:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.421 :
I see.
Like one of the questions:
The sending of the message is part of the bean managed transaction.
Or, in CMT, sending is not in a transaction:
Like one of the questions:
Code: Select all
ut.begin();
//send the message to the queue here.....
ut.setRollback();
Or, in CMT, sending is not in a transaction:
Code: Select all
@TransactionAttribute(NOT_SUPPORTED)
void send (){
//send message to a queue
}
Who is online
Users browsing this forum: No registered users and 29 guests