Commit 1f26b4b5 authored by Andre Freyssinet's avatar Andre Freyssinet

Minor changes.

parent 58b99247
......@@ -482,6 +482,7 @@ public class ManagedConnectionImpl
handle = (OutboundConnection) it.next();
handle.cleanup();
}
// JORAM-335: This session is registered in XAResource.
// try {
// if (session != null)
......@@ -491,6 +492,7 @@ public class ManagedConnectionImpl
// logger.log(BasicLevel.WARN, e);
// }
// session = null;
try {
// Clear the handles.
handles.clear();
......@@ -505,8 +507,7 @@ public class ManagedConnectionImpl
*
* @exception ResourceException Never thrown.
*/
public synchronized void destroy()
throws ResourceException {
public synchronized void destroy() throws ResourceException {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, this + " destroy()");
......
......@@ -101,7 +101,7 @@ public class OutboundSession implements javax.jms.Session {
*/
public boolean getTransacted() throws JMSException {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, this + " getTransacted() = " + sess.getTransacted());
logger.log(BasicLevel.DEBUG, this + " getTransacted() = " + ((sess == null)?"invalid":sess.getTransacted()));
checkValidity();
return sess.getTransacted();
......@@ -441,17 +441,21 @@ public class OutboundSession implements javax.jms.Session {
void checkValidity() throws IllegalStateException {
boolean validity;
if ((cnx == null) || (sess == null))
throw new IllegalStateException("Invalid state: session is invalid.");
if (! valid)
validity = false;
else
validity = cnx.valid;
if (! validity)
throw new IllegalStateException("Invalid state: session is closed.");
if (! validity)
throw new IllegalStateException("Invalid state: session is closed.");
}
public String toString() {
return "Outbound [" + sess.toString() + "]@" + hashCode();
return "Outbound [" + sess + "]@" + hashCode();
}
/**
......
......@@ -2219,13 +2219,12 @@ public class Session implements javax.jms.Session, SessionMBean {
}
/**
* Final stage after calling the reply has been returned
* by the roxy. It releases the session and enables another
* thread to call it.
* Final stage after calling the reply has been returned by the proxy.
* It releases the session and enables another thread to call it.
*/
private synchronized void postReceive() {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "Session.postReceive()");
logger.log(BasicLevel.DEBUG, "Session.postReceive(" + pendingMessageConsumer + ')');
singleThreadOfControl = null;
pendingMessageConsumer = 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