valueUnbound(HttpSessionBindingEvent evt) not called when i close my close jsp or tomcat Server

2002-03-23 Thread Nwalal mi Nyom

Hi,
I use Tomcat4.0.1,Apache1.3.22.
in my jsp file i use class which implements HtppSessionBindingListener and I have 
implement valueBound() and valueUnbound(..) methods.

 when i load my jsp  valueBound(... ) is called correctly
But when l close my jsp or  when i stop Tomcat Server,  valueUnbound(...) method  is 
not called 

can somebody help me 

Thanks

Martin

==To 
unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: valueUnbound(HttpSessionBindingEvent evt) not called when i close my close jsp or tomcat Server

2002-03-23 Thread Hans Bergsten

Nwalal mi Nyom wrote:

 Hi,
 I use Tomcat4.0.1,Apache1.3.22.
 in my jsp file i use class which implements HtppSessionBindingListener and I have
 implement valueBound() and valueUnbound(..) methods.

  when i load my jsp  valueBound(... ) is called correctly
 But when l close my jsp or  when i stop Tomcat Server,  valueUnbound(...) method  is 
not called

 can somebody help me


I'm not sure what you mean by close my jsp, but if you mean close
the browser, this will not trigger a valueUnbound() call. The
valueUnbound() method is called when the session terminates (either
due to an explicit call to invalidate() or a time-out) and when the
object is removed (or replaced) from the session (the removeAttribute()
method is called).

If you stop Tomcat gracefully, e.g. using the showdown script instead
of just killing the process with Ctrl-C, it terminates all sessions
so the valueUnbound() method is called. If it isn't, it's a Tomcat
bug.

Hans
--
Hans Bergsten   [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
JavaServer Pageshttp://TheJSPBook.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



valueUnbound(HttpSessionBindingEvent event) !

2000-12-08 Thread G.Nagarajan

Hi everyone,

This is regarding tracking of login and logout actions of users.

I am recording the session creation time and end time using the
HttpSessionBindingListener class. The two methods valueBound() and
valueUnbound() are
invoked. But the getAtrribute() method in the session object returned by
event.getSession()
always give null.

I am storing the userid and a string in the session to indicate if the user
has logged out.
By checking this string's value I can find out if the user has logged out or
the session has timed out.

Has anyone implemented anything similar to this.

Thanks,
Nagaraj.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: HttpSessionBindingEvent

2000-05-22 Thread Crook, Charles

Why are you maintaining open connections while waiting for the user?  Use a
connection pool, connect only whem needed and close when done.

-Original Message-
From: George Klimes [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 22, 2000 11:32 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: HttpSessionBindingEvent


Hi everyone, quick question.

I have an object that has two methods, which do the following:
1)  create a connection
2)  close the connection (clean up after connection
is not needed.
Let's call it connection object.

  This connection object is initialized from a servlet and as soon as
the client has a valid HttpSession object.
Under ideal circumstances, the connection remains opened as long as
the a session is valid. When the client closes the browser or the
session
times out, the connection object calls the method that closes the
connection
and cleans up.

   Here's the problem.
If the client opens another browser window, or the layout has
frame set, the new browser window initializes  the connection object.
This
means the the first browser window reference points to the connection
object initialized by the second window. The implication is,
the first window cannot close the connection (when the session
is invalid), since it doesn't reference the connection object
it originally initiated.  How could I avoid this  ?

HttpSessionBindingEvent and HttpSessionBindingListener might do
the magic, however, I wouldn't mind second opinion from the masses.

 Thank you for your time.
GK.
BTW: I am running JServ1.1 (JSDK2.0)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: HttpSessionBindingEvent

2000-05-22 Thread George Klimes

Actually, the connection IS initialized from the pool
and when "con.close()" is called, the connection
is recycled/returned to the pool.  Sorry about
the confusion, I wanted keep the question abstract
with focus on the multiple browser window issue.

   gK.

 Why are you maintaining open connections while waiting for the user?  Use a
 connection pool, connect only whem needed and close when done.

 -Original Message-
 From: George Klimes [mailto:[EMAIL PROTECTED]]
 Sent: Monday, May 22, 2000 11:32 AM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: HttpSessionBindingEvent

 Hi everyone, quick question.

 I have an object that has two methods, which do the following:
 1)  create a connection
 2)  close the connection (clean up after connection
 is not needed.
 Let's call it connection object.

   This connection object is initialized from a servlet and as soon as
 the client has a valid HttpSession object.
 Under ideal circumstances, the connection remains opened as long as
 the a session is valid. When the client closes the browser or the
 session
 times out, the connection object calls the method that closes the
 connection
 and cleans up.

Here's the problem.
 If the client opens another browser window, or the layout has
 frame set, the new browser window initializes  the connection object.
 This
 means the the first browser window reference points to the connection
 object initialized by the second window. The implication is,
 the first window cannot close the connection (when the session
 is invalid), since it doesn't reference the connection object
 it originally initiated.  How could I avoid this  ?

 HttpSessionBindingEvent and HttpSessionBindingListener might do
 the magic, however, I wouldn't mind second opinion from the masses.

  Thank you for your time.
 GK.
 BTW: I am running JServ1.1 (JSDK2.0)

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



HttpSessionBindingEvent

2000-05-22 Thread George Klimes

Hi everyone, quick question.

I have an object that has two methods, which do the following:
1)  create a connection
2)  close the connection (clean up after connection
is not needed.
Let's call it connection object.

  This connection object is initialized from a servlet and as soon as
the client has a valid HttpSession object.
Under ideal circumstances, the connection remains opened as long as
the a session is valid. When the client closes the browser or the
session
times out, the connection object calls the method that closes the
connection
and cleans up.

   Here's the problem.
If the client opens another browser window, or the layout has
frame set, the new browser window initializes  the connection object.
This
means the the first browser window reference points to the connection
object initialized by the second window. The implication is,
the first window cannot close the connection (when the session
is invalid), since it doesn't reference the connection object
it originally initiated.  How could I avoid this  ?

HttpSessionBindingEvent and HttpSessionBindingListener might do
the magic, however, I wouldn't mind second opinion from the masses.

 Thank you for your time.
GK.
BTW: I am running JServ1.1 (JSDK2.0)

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets