[teiid-issues] [JBoss JIRA] (TEIID-4454) Close session called with null session id

Wouter de Vaal (JIRA) issues at jboss.org
Tue Sep 20 01:53:00 EDT 2016


Wouter de Vaal created TEIID-4454:
-------------------------------------

             Summary: Close session called with null session id
                 Key: TEIID-4454
                 URL: https://issues.jboss.org/browse/TEIID-4454
             Project: Teiid
          Issue Type: Bug
          Components: Query Engine
    Affects Versions: 9.0.4
            Reporter: Wouter de Vaal
            Assignee: Steven Hawkins
            Priority: Minor


When connecting locally via a JNDI resource to a vdb, we see in our audit log that an extra closeSession is logged with a null session id, just before a new session is created.

This is probably because the class LocalServerConnection.authenticate calls logoff

Logoff will execute a logoff command with swallowing all exceptions:
		try {
			//make a best effort to send the logoff
			Future<?> writeFuture = this.getService(ILogon.class).logoff();
			if (writeFuture != null) {
				writeFuture.get(5000, TimeUnit.MILLISECONDS);
			}
		} catch (Exception e) {
			//ignore
		}

And this method will call closeSession without even checking if there is a session to logoff:
		try {
			this.service.closeSession(workContext.getSessionId());
		} finally {
			this.updateDQPContext(new SessionMetadata());
		}
So fix should probably be adding an if statement to LogofImpl.logoff 




--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the teiid-issues mailing list