9 Replies Latest reply: Feb 20, 2013 4:49 PM by Faliu-Oracle RSS

    "Closed Connection" occurs too much After deployment on WebSphere

    Ahmed Gamal Khamis
      "oracle.adf.controller.faces.lifecycle.Utils buildFacesMessage ADF: Adding the following JSF error message: Closed Connection
      java.sql.SQLRecoverableException: Closed Connection"

      "Closed Connection" message appears to the user too much after deploying on Websphere. How to disable this message.
        • 1. Re: "Closed Connection" occurs too much After deployment on WebSphere
          Duncan Mills
          That's obviously not a message from ADF it's probably coming from the WebSphere connection pool. So it all depends on how you are talking to the database.
          • 2. Re: "Closed Connection" occurs too much After deployment on WebSphere
            BalaKumar-Oracle
            On WAS console, navigate to "Data sources > your_datasource > Custom properties" and add a new property called "disableWASConnectionPooling", setting its value to true. Restart the server to take affect.
            • 3. Re: "Closed Connection" occurs too much After deployment on WebSphere
              Ahmed Gamal Khamis
              Hi bela
              I tried this feature but messages appeared too much more than b4. This indicates that this happens as the connection closed and the ADF BC tries to do SQL transaction but it fails and shows this message. so it reconnect on the next request. I wanna feature to do handle this closed connection.
              • 4. Re: "Closed Connection" occurs too much After deployment on WebSphere
                Ahmed Gamal Khamis
                Duncan Mills:
                I think this message appears from the adf, as it try to perform the request but it finds the connection closed so it shows the message and try to reconnect on the next request
                • 5. Re: "Closed Connection" occurs too much After deployment on WebSphere
                  BalaKumar-Oracle
                  Ahmed,
                  We had the same issue. But after setting this property we do not run into this error anymore. What's the version of ADF and websphere server that's being used?
                  • 6. Re: "Closed Connection" occurs too much After deployment on WebSphere
                    Ahmed Gamal Khamis
                    WebSphere 6 and ADF Of JDeveloper 11.1.1.5.0
                    • 7. Re: "Closed Connection" occurs too much After deployment on WebSphere
                      Faliu-Oracle
                      HI baba, I tried your suggestion of adding custom property disableWASConnectionPooling with value set to true to my datasource, and that got rid of the closed connection error. However, I am wondering what is the impact on performance or db connection pooling with this custom property?

                      I am using WebSphere ND 7.0.0.23 with ADF 11.1.1.7 RC1. I have searched online for this custom property and found an article at IBM site talking about configuring Oracle connection cache on WebSphere:

                      http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.express.doc/info/exp/ae/tdat_oracleracconnpool.html

                      But my datasource happens to be using XA driver, and the steps in that article are specific to non-XA datasources.
                      • 8. Re: "Closed Connection" occurs too much After deployment on WebSphere
                        Faliu-Oracle
                        FYI, I followed the steps listed in Administrator's Guide for Oracle Application Development Framework at
                        http://docs.oracle.com/cd/E35521_01/admin.111230/e16179/monitor.htm
                        and that resolved the Closed Connection issue.

                        3.8.1 How to Configure WebSphere to Allow Reuse of Query Result Sets

                        WebSphere Application Server closes shared database connections between application generated requests. You need to set two properties in WebSphere to allow reuse of result sets.

                        Use the WebSphere Application Server administrative console to set the non-transactional datasource and DisableMultiThreadedServletConnectionMgmt properties.

                        To set properties in WebSphere to reuse results sets:

                        Start WebSphere Application Server administrative console.

                        Navigate to Data sources > DB2 Universal JDBC Driver XA DataSource > WebSphere Application Server data source properties and set Non-transactional data source to enabled.

                        Save the configuration.

                        Navigate to Application servers > server_name > Web Container > Custom Properties and set DisableMultiThreadedServletConnectionMgmt to true.

                        Save the configuration.

                        Restart WebSphere Application Server.

                        Setting these two properties will enable your deployed application to reuse result sets across requests.
                        • 9. Re: "Closed Connection" occurs too much After deployment on WebSphere
                          Faliu-Oracle
                          FYI, I followed the steps listed in Administrator's Guide for Oracle Application Development Framework
                          at http://docs.oracle.com/cd/E35521_01/admin.111230/e16179/monitor.htm#CHDEGIAH

                          and that resolved my Closed Connection issue.

                          3.8.1 How to Configure WebSphere to Allow Reuse of Query Result Sets

                          WebSphere Application Server closes shared database connections between application generated requests. You need to set two properties in WebSphere to allow reuse of result sets.

                          Use the WebSphere Application Server administrative console to set the non-transactional datasource and DisableMultiThreadedServletConnectionMgmt properties.

                          To set properties in WebSphere to reuse results sets:

                          Start WebSphere Application Server administrative console.

                          Navigate to Data sources > DB2 Universal JDBC Driver XA DataSource > WebSphere Application Server data source properties and set Non-transactional data source to enabled.

                          Save the configuration.

                          Navigate to Application servers > server_name > Web Container > Custom Properties and set DisableMultiThreadedServletConnectionMgmt to true.

                          Save the configuration.

                          Restart WebSphere Application Server.

                          Setting these two properties will enable your deployed application to reuse result sets across requests.