aspose file tools*
The moose likes Servlets and the fly likes sessionDestroyed() not called Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "sessionDestroyed() not called" Watch "sessionDestroyed() not called" New topic
Author

sessionDestroyed() not called

spratap singh
Greenhorn

Joined: Aug 27, 2004
Posts: 5
Hi,

I have a web application.
The sessionDestroyed() is not called even after session timeout.
I have following settings in my web.xml and weblgic.xml :
web.xml :
<session-config>
<session-timeout>2</session-timeout>
</session-config>

weblogic.xml :
<session-descriptor>
<session-param>
<param-name>CookieMaxAgeSecs</param-name>
<param-value>120</param-value>
</session-param>
<session-param>
<param-name>InvalidationIntervalSecs</param-name>
<param-value>5</param-value>
</session-param>
<session-param>
<param-name>PersistentStoreType</param-name>
<param-value>replicated_if_clustered</param-value>
</session-param>
<session-param>
<param-name>TimeoutSecs</param-name>
<param-value>120</param-value>
</session-param>
</session-descriptor>

I am in a Cluster environment.
Please help why the function has not been called as ideally it shuould be called.

Please help me.


Thanks,
-Spratap
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29261
    
140

You need to add something like the following in your web.xml


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
spratap singh
Greenhorn

Joined: Aug 27, 2004
Posts: 5
Jeanne,

Thanks a lot for you suggestion.
Actually I am already using that .
What is surprising is sessionCreated() is called from the same listener but
sessionDestroyed() is not called.

Please help.


Thanks,
Spratap
Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
I'm facing the same problem when the application gets undeployed, but it works well when session timed out or session gets invalidated ..
[ October 06, 2004: Message edited by: srini vasan ]

Thanks & regards, Srini
MCP, SCJP-1.4, NCFM (Financial Markets), Oracle 9i - SQL ( 1Z0-007 ), ITIL Certified
Rahul kapoor
Greenhorn

Joined: Sep 21, 2004
Posts: 16
Adeel,

Please check. These two statements are made by two different people.

Let clarity prevail.
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
yeah thanks rahul deleted my post.

Hey Spratap,
Have you tried to invalidate the session inside sessionCreated()? just give it a try.

Hey Srini,
Are you too in a clustered environment? if yes then you can help him, because it is working with you on sessionTimeOut and even with session.invalidate().
[ October 07, 2004: Message edited by: adeel ansari ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sessionDestroyed() not called
 
Similar Threads
Add init parameter to listerner from web.xml
HttpSessionListener is not getting invoked
Modifying JSP pages
Cannot retrieve init parameter through JSP file
Session Management Problem