I ran debug test and see that the commit is not actually being done , its being skipped at
Code:
// Commit necessary - but avoid commit call within a JTA transaction.
if (isSessionLocallyTransacted(session)) { skips }
returns back..
within
Code:
protected void commitIfNecessary(Session session, Message message) throws JMSException {
// Commit session or acknowledge message.
if (session.getTransacted()) {
// Commit necessary - but avoid commit call within a JTA transaction.
if (isSessionLocallyTransacted(session)) {
// Transacted session created by this container -> commit.
JmsUtils.commitIfNecessary(session);
}
}
else if (isClientAcknowledge(session)) {
message.acknowledge();
}
}
The actual code that denies commit seems to be
Code:
protected boolean isSessionLocallyTransacted(Session session) {
return super.isSessionLocallyTransacted(session) &&
!ConnectionFactoryUtils.isSessionTransactional(session, getConnectionFactory());
}