Details
Description
Each time a user logs into Liferay Portal and visits a portal page with an ICEfaces portlet, a session-based instance of that portlet is allocated by the servlet container. When the session expires or is invalidated, the instance should be deallocated by the servlet container but this isn't happening.
This can be reproduced with Tomcat 6 or JBoss 4.2.1, but when JBoss is used, some extra error messages appear in the console that I think are related, but might actually be a separate bug -- I'm not sure.
1. Copy the attached SampleAjaxPush1.war_ file to your $HOME/YourUserName/liferay/deploy folder
2. Rename SampleAjaxPush1.war_ to SampleAjaxPush1.war
3. Start Liferay-4.3.4-JBoss-4.2.1-Tomcat bundle
4. Watch the JBoss console and make sure the WAR hot deploys properly
5. Start IE7 (should be reproducible with any browser though)
6. Login to Liferay Portal as test@liferay.com
7. Create a new portal page named "Ajax Push"
8. Add the "Customers" and "Bookings" portlets from under the "Samples" category
9. Click on each customer and make sure Ajax Push is working
10. Monitor the JBoss console and make sure there are no errors at this point
11. Sign-out of Liferay Portal
12. Sign back in to Liferay Portal as test@liferay.com
13. Click on the "Ajax Push" portal page
14. Click on one of the customers
15. Note that in the JBoss console, there should be "Session already invalidated" error messages
16. Note that killing IE7 browser and signing back in doesn't fix this problem
17. Repeat steps 11-14 in order to create yet another session "instance" of these portlets
18. Run the "jboss/bin/shutdown.bat ---shutdown" command
19. Note that in the JBoss console, each instance of these portlets have not yet been deallocated.
The instances actually never get deallocated unless the portal shuts down. And the default connection pool size in worker.properties is 10 so not very many sessions can get created before the server gets bogged down.
Also note the error java.lang.IllegalStateException: getAttributeNames: Session already invalidated after all the sessions are deallocated.
This can be reproduced with Tomcat 6 or JBoss 4.2.1, but when JBoss is used, some extra error messages appear in the console that I think are related, but might actually be a separate bug -- I'm not sure.
1. Copy the attached SampleAjaxPush1.war_ file to your $HOME/YourUserName/liferay/deploy folder
2. Rename SampleAjaxPush1.war_ to SampleAjaxPush1.war
3. Start Liferay-4.3.4-JBoss-4.2.1-Tomcat bundle
4. Watch the JBoss console and make sure the WAR hot deploys properly
5. Start IE7 (should be reproducible with any browser though)
6. Login to Liferay Portal as test@liferay.com
7. Create a new portal page named "Ajax Push"
8. Add the "Customers" and "Bookings" portlets from under the "Samples" category
9. Click on each customer and make sure Ajax Push is working
10. Monitor the JBoss console and make sure there are no errors at this point
11. Sign-out of Liferay Portal
12. Sign back in to Liferay Portal as test@liferay.com
13. Click on the "Ajax Push" portal page
14. Click on one of the customers
15. Note that in the JBoss console, there should be "Session already invalidated" error messages
16. Note that killing IE7 browser and signing back in doesn't fix this problem
17. Repeat steps 11-14 in order to create yet another session "instance" of these portlets
18. Run the "jboss/bin/shutdown.bat ---shutdown" command
19. Note that in the JBoss console, each instance of these portlets have not yet been deallocated.
The instances actually never get deallocated unless the portal shuts down. And the default connection pool size in worker.properties is 10 so not very many sessions can get created before the server gets bogged down.
Also note the error java.lang.IllegalStateException: getAttributeNames: Session already invalidated after all the sessions are deallocated.
Activity
Neil Griffin
created issue -
Neil Griffin
made changes -
Field | Original Value | New Value |
---|---|---|
Attachment | SampleAjaxPush1.war_ [ 10979 ] |
Ken Fyten
made changes -
Component/s | Framework [ 10013 ] | |
Fix Version/s | 1.7.1 [ 10122 ] | |
Assignee Priority | P1 | |
Assignee | Greg Dick [ greg.dick ] |
Greg Dick
made changes -
Assignee | Greg Dick [ greg.dick ] | Mircea Toma [ mircea.toma ] |
Mircea Toma
made changes -
Attachment | ICE-3073.patch [ 11022 ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #16760 | Fri May 30 15:49:08 MDT 2008 | greg.dick | |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/SessionDispatcher.java
|
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #16761 | Fri May 30 15:49:44 MDT 2008 | greg.dick | |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/core/src/com/icesoft/faces/util/event/servlet/ContextEventRepeater.java
|
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #16763 | Fri May 30 15:52:26 MDT 2008 | greg.dick | |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/View.java
|
Ken Fyten
made changes -
Assignee | Mircea Toma [ mircea.toma ] | Greg Dick [ greg.dick ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #16769 | Fri May 30 16:35:58 MDT 2008 | greg.dick | |
Files Changed | ||||
MODIFY
/icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/SessionDispatcher.java
|
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #16771 | Fri May 30 16:36:57 MDT 2008 | greg.dick | |
Files Changed | ||||
MODIFY
/icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/util/event/servlet/ContextEventRepeater.java
|
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #16772 | Fri May 30 16:37:56 MDT 2008 | greg.dick | |
Files Changed | ||||
MODIFY
/icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/context/View.java
|
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #16780 | Mon Jun 02 15:11:09 MDT 2008 | greg.dick | |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java
|
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #16825 | Fri Jun 06 15:07:44 MDT 2008 | greg.dick | |
Files Changed | ||||
MODIFY
/icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java
|
Greg Dick
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Assignee Priority | P1 | |
Assignee | Greg Dick [ greg.dick ] |
When the user opens the "Ajax Push" portlet page, two portletProxySessions are created, and those are associated with an HttpSession from the user. When the user logs out, he/she is logging out from the Portal Web application. The HttpSession is invalidated, but the SessionDispatcher is not informed via callback, and therefore the ICEfaces core never disposes of the Session.
When a user application logs out, and that's done entirely from within an ICEfaces servlet, the incoming HttpServlet is wrapped in an InterceptingServletSession, which overrides invalidate() and uses this to notify the SessionDispatcher. In the Portlet example, the request to log out is handled by the Portal application, outside the ICEfaces servlet path which is why this mechanism is subverted.
The ContextEventRepeater gets notified of the SessionDestroyed event, but the SessionDispatcher is not a client of the repeater. It may be possible to make the Dispatcher an event listener but care must be taken and difficult to verify differences in timing may occur, since the ContextEventRepeater is downstream of the events generated by the SessionDispatcher.