As I mentioned, they ARE from a connection pool. But never mind; found the
  answer at www.jguru.com.

HttpSessionListener seems to work fine. This will be added to the JWAP
servlet infrastructure at http://virtualschool.edu/wap soon.

        static class SessionTimeoutNotifier
                implements HttpSessionBindingListener
        {
                private Ctx ctx;
                SessionTimeoutNotifier(Ctx ctx)
                {
                        super();
                        this.ctx = ctx;
                        ctx.setAttribute(notifierAttributeName, this);
                }
                public void valueBound(HttpSessionBindingEvent ev)
                {
                        Log.debug("valueBound");
                        Log.debug(" this: " + ev);
                        Log.debug(" ev: " + ev);
                }
                public void valueUnbound(HttpSessionBindingEvent ev)
                {
                        Log.debug("valueUnbound");
                        Log.debug(" this: " + ev);
                        Log.debug(" ev: " + ev);
                        try { ctx.releaseConnection(); }
                        catch (Throwable e) { Log.error("Throwable releasing 
connection",
e); }
                }
        }

On Thursday, June 14, 2001, at 12:10 PM, Christopher K. St. John wrote:

> Gokul Singh wrote:
>>
>> "Brad Cox" <[EMAIL PROTECTED]>
>>
>>> I've been storing JDBC connections from the connection pool in a named
>>> session attribute
>>
>> You should use a connection pool object
>>
>
>  Unless your jdbc drivers automagically pool (ala the
> javax.sql package), in which case you can just open and
> close the connections as normal and the pooling is handled
> by the driver. Which, annoyingly, means that the 'right'
> thing to do depends on which set of drivers you're using.
> I seem to remember PoolMan gives you the option of doing
> things either way, which is sort of neat.
>
>
> --
> Christopher St. John [EMAIL PROTECTED]
> DistribuTopia http://www.distributopia.com
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

---
For industrial age goods there were checks and credit cards.
For everything else there it http://virtualschool.edu/mybank
Brad Cox [EMAIL PROTECTED] 703 361 4751

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to