Re: [Wicket-user] Problem with wicket's WebSession objects. Memory leakage?
WicketSession.invalidate triggers the httpsession.invalidate that triggers the destroy So the destroy shouldn't trigger wicketsession.invalidate because its the other way around what you can do is listen to the SessionStore.unbind() or have a special HttpSessionUnbinding listener that calls your close() method on the wicket session or something like that. but SessionStore.unbind() shouldn't call WicketSession.invalidate() thats like driving the wrong way johan On 5/22/07, -Vlad- <[EMAIL PROTECTED]> wrote: Ok, but I need my wicket session invalidate() method to be called when httpSession expires. I had a look at the source (1.2.6) and what I saw(AbstractHttpSessionStore.class, line 97) is a call 'SessionStore.unbind(String sessionId)' when HttpSession expires. This method (in the AbstractHttpSessionStore.class) calls Application.sessionDestroyed than call empty 'onUnbind(sessionId)' method. So there are no calls to httpSession.invalidate() method and to wicketSession.invalidate(); My wicket session overrides invalidate method: public void invalidate() { super.invalidate(); close(); } super is the WebSession class, and its invalidate method is: public void invalidate() { sessionInvalidated = true; } So as far as I understand there is no extra call 'httpSession.invalidate ()'. What do you think about this? -- View this message in context: http://www.nabble.com/Problem-with-wicket%27s-WebSession-objects.-Memory-leakage--tf3796071.html#a10740481 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Problem with wicket's WebSession objects. Memory leakage?
Ok, but I need my wicket session invalidate() method to be called when httpSession expires. I had a look at the source (1.2.6) and what I saw(AbstractHttpSessionStore.class, line 97) is a call 'SessionStore.unbind(String sessionId)' when HttpSession expires. This method (in the AbstractHttpSessionStore.class) calls Application.sessionDestroyed than call empty 'onUnbind(sessionId)' method. So there are no calls to httpSession.invalidate() method and to wicketSession.invalidate(); My wicket session overrides invalidate method: public void invalidate() { super.invalidate(); close(); } super is the WebSession class, and its invalidate method is: public void invalidate() { sessionInvalidated = true; } So as far as I understand there is no extra call 'httpSession.invalidate()'. What do you think about this? -- View this message in context: http://www.nabble.com/Problem-with-wicket%27s-WebSession-objects.-Memory-leakage--tf3796071.html#a10740481 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Problem with wicket's WebSession objects. Memory leakage?
pagemaps are also stored in the httpsession (not in the wicket session) if the httpsession is destroyed then invalidate on the wicket session shouldn't be called because invalidate call on the wicket session does invalidate on the http session, thats its purpose but the http session is already invalidated (or it is busy invalidating/destroying itself) that call back is purely so that we can cleanup something that we store by the session id (the response buffers but that is very unlikely that they are kept around and the request logger is notified) use yourkit to profile:http://www.yourkit.com/ On 5/22/07, -Vlad- <[EMAIL PROTECTED]> wrote: Thanks for the help, Johan. I know that you stores wicket session in HttpSession(as atribute), provided by container. JProfiler shows that some PageMap keeps this. I've tried to get the root of reference chain but failed due to constant JProfiler error. Can it be possible that some pagemap instance is stored not in the wicket Session? I have my custom transient object in wicket session, it is detached and attached when the corresponing methods of the session is called. This object contains some components(extends Component) and models(extends Model), which I use on different pages (Is it a good practice?). And I also mentioned that 'sessionDestroyed' method doesn't involve calling to 'session.invalidate()' method! But... I've overriden SessionStore, and I call session.invalidate() forcedly when my SessionStore.onUnbind(String sessionId) method is invoked. After that session is GC-ed. But I don't understand why? -- View this message in context: http://www.nabble.com/Problem-with-wicket%27s-WebSession-objects.-Memory-leakage--tf3796071.html#a10739385 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Problem with wicket's WebSession objects. Memory leakage?
Thanks for the help, Johan. I know that you stores wicket session in HttpSession(as atribute), provided by container. JProfiler shows that some PageMap keeps this. I've tried to get the root of reference chain but failed due to constant JProfiler error. Can it be possible that some pagemap instance is stored not in the wicket Session? I have my custom transient object in wicket session, it is detached and attached when the corresponing methods of the session is called. This object contains some components(extends Component) and models(extends Model), which I use on different pages (Is it a good practice?). And I also mentioned that 'sessionDestroyed' method doesn't involve calling to 'session.invalidate()' method! But... I've overriden SessionStore, and I call session.invalidate() forcedly when my SessionStore.onUnbind(String sessionId) method is invoked. After that session is GC-ed. But I don't understand why? -- View this message in context: http://www.nabble.com/Problem-with-wicket%27s-WebSession-objects.-Memory-leakage--tf3796071.html#a10739385 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Problem with wicket's WebSession objects. Memory leakage?
who does keep the websessions? Can't you see that in your profiler? we don't hold reference to the object itself anywhere in the code except when handling a request itself. johan On 5/22/07, -Vlad- <[EMAIL PROTECTED]> wrote: Hi,all. I've just noted the fact that after the session timeout time there is a call to the MyWebApplication.sessionDestroyed(String sessionId) method, as it is supposed to be. This method removes data from responce buffer, and that is all. WebSession object remains in the JVM heap(Tested by means of JProfiler). And the number of these objects grows as users' http sessions expire. How can I remove all references to the wicket's webSession object when it expires? -- View this message in context: http://www.nabble.com/Problem-with-wicket%27s-WebSession-objects.-Memory-leakage--tf3796071.html#a10736960 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user