aspose file tools*
The moose likes Servlets and the fly likes Question on Session Event Listeners Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Question on Session Event Listeners" Watch "Question on Session Event Listeners" New topic
Author

Question on Session Event Listeners

chandru ram
Greenhorn

Joined: Jul 03, 2002
Posts: 18
Hi All,
Are the Session listener events synchronous or asynchronous??.

Can the Listener event class be used to interact with the database.

For example, when i set an attribute to a session, the container will invoke the attributeAdded method of the listener class. Now i want to store the session data in a database.
can this process of saving to the DB be done inside the attributeAdded method of the listener. is this a proper design.
Also do the container call the listener's method from the same thread of execution of the client. (i.e) a request will have a thread to access the servlet. If we set a value in session, the container has to invoke the listener. So does the container do this within the same thread or it uses different threads to invoke the listeners asynchronously??
Thanks in advance,
Chandru ram
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question on Session Event Listeners