1 Reply Latest reply on Apr 30, 2015 7:55 AM by shawkins

    question about Session may already be closed

    gadeyne.bram

      Hi,

       

      I'm using teiid 8.9.1.

       

      In a tomcat server I've configured teiid as a jndi jdbc data source. This all works fine. However if I make changes to my vdb file then tomcat is not providing a new connection.

       

      The error that is shown is org.teiid.client.security.InvalidSessionException Session may have already been terminated.

       

      I'm not sure but I think InvalidSessionException is not a subclass of SQLException so I guess that is the reason why connections do not get refreshed. Is there a way to change the behaviour so that de data connection would be reset?

       

      This is how my configuration looks like:

       

      <Resource name="jdbc/Teiid" auth="Container" type="javax.sql.DataSource"

                     maxActive="100" maxIdle="30" maxWait="10000"

                     username="xxx" password="xxx" driverClassName="org.teiid.jdbc.TeiidDriver"

                     url="jdbc:teiid:vdb3@mm://cosara3:31000"

                      removeAbandoned="true" removeAbandonedTimeout="60" />

       

      With kind regards

      Bram

        • 1. Re: question about Session may already be closed
          shawkins

          > I'm not sure but I think InvalidSessionException is not a subclass of SQLException so I guess that is the reason why connections do not get refreshed. Is there a way to change the behaviour so that de data connection would be reset?

           

          InvalidSessionException will be converted to a SQLException with the SQL State 08S01.  It may need an error handler to know what the sql state means.  Alternatively you should be able to configure a test query or have the pool use the isValid check on the connection.