79294252

Date: 2024-12-19 12:22:12
Score: 0.5
Natty:
Report link

I have find how to do it

public void commit(JmsTemplate jmsTemplate) {
        jmsTemplate.execute((SessionCallback<Void>) session -> {
            try {
                JmsUtils.commitIfNecessary(session);
            } catch (JMSException e) {
                log.warn("Sending to MQ failed");
            }
            return null;
        });
    }
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: mamol