Commit 95fa9ecc authored by Andre Freyssinet's avatar Andre Freyssinet

Adds a WARN on setTransacted if the session is closed (JORAM-335).

parent bcbcfa4f
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2001 - 2017 ScalAgent Distributed Technologies
* Copyright (C) 2001 - 2019 ScalAgent Distributed Technologies
* Copyright (C) 1996 - 2000 Dyade
*
* This library is free software; you can redistribute it and/or
......@@ -965,15 +965,15 @@ public class Session implements javax.jms.Session, SessionMBean {
public void setTransacted(boolean t) {
if (status != Status.CLOSE) {
transacted = t;
// if (!t) {
// autoAck = true;
// }
// if (!t) autoAck = true;
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG,
"Session.setTransacted transacted = " + transacted + ", autoAck = " + autoAck);
} else {
// Should throw an exception but not expected in the connector.
logger.log(BasicLevel.WARN,
"Session.setTransacted: session " + ident + "closed.");
}
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "Session.setTransacted transacted = " + transacted + ", autoAck = "
+ autoAck);
// else should throw an exception but not expected in
// the connector.
}
/**
......@@ -2111,8 +2111,8 @@ public class Session implements javax.jms.Session, SessionMBean {
javax.jms.Message receive(long requestTimeToLive, long waitTimeOut, MessageConsumer mc, String targetName,
String selector, boolean queueMode) throws JMSException {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "Session.receive(" + requestTimeToLive + ',' + waitTimeOut + ','
+ targetName + ',' + selector + ',' + queueMode + ')');
logger.log(BasicLevel.DEBUG,
"Session.receive(" + requestTimeToLive + ',' + waitTimeOut + ',' + targetName + ',' + selector + ',' + queueMode + ')');
preReceive(mc);
try {
ConsumerMessages reply = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment