× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This is a multipart message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Hello folks!

Please consider following approach to execute web-apps:

1) Login
   This servlet creates a new connection (a QZDASOINIT-session is
activated).
   The connection is stored in a 'connectionholder' (implementing
'HttpSessionBindingListener ')
   This 'connectionholder' is stored in the users 'HTTPsession'
(session.setAttribute(cName, cHolder)

   The idea is to use same connection through the whole HTTPSession to
avoid opening/closing connections

2) Execute web-apps

3) Close web-browser
   This will end the HttpSession and launches the ' valueUnbound'-method
of the 'connectionholder'

public void valueUnbound(javax.servlet.http.HttpSessionBindingEvent arg1)
{
        java.util.Date holderUnboundDate = new java.util.Date();
        // Roll back changes when remove from a Session or Session
Expires!
        try
        {
                if (conn != null)
                {
                        conn.rollback();
                        conn.close();
                        System.out.println(sessionId + "
ConnectionHolder(ValueUnbound): Completed Normally'");
                        System.out.println(sessionId + " conn.rollback()
executed");
                        System.out.println(sessionId + "      conn.close()
executed");
                        System.out.println(sessionId + "    at :" +
holderUnboundDate);
                }
        }
        catch (SQLException e)
        {
                System.out.println(" ConnectionHolder(ValueUnbound)
terminated abnormally'");
        }
}


Question:
When I create a connection, do some stuff and close the connection in a
javaclass, the 'QZDASOINIT'-job is started and ended.  (Not in the active
jobs anymore).  In above approach,   the stdout_log shows that the
valueUnbound is excecuted but the connection is still there.  Why isn't it
removed from the active jobs?


thanks
Patrick Goovaerts
IT/Clipper Support nv


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.