Liferay on weblogic doesn't invalidate portlet session -
i use liferay 6.2 ga4 portal on weblogic server 10.3.6.0 , found out 1 annoying problem.
- i log in usera.
- display portlet stores data portlet session.
- i log out.
- i log in userb.
- display same portlet stores data portlet session.
- portlet shows data of usera instead of userb.
i added ext-plugin debug log messages com.liferay.portal.kernel.servlet.portletsessionlistenermanager
, com.liferay.portal.kernel.servlet.portletsessiontracker
, found out session (sessionid) passed portletsessiontracker.add method different 1 passed invalidate method. see log messages below:
2016-01-28 10:38:34,191 [portletsessiontracker:40] adding session id=4s6hme3ldwwuudoilk7-ytjlqjh1lncitkzoeh9yvsbm2usjuxu9 2016-01-28 10:40:38,875 [portletsessionlistenermanager:187] destroying session id=s4qhmpdastlkwkmeo6gdlt4w0u-siglu_gna1ljelxttqvsaryed 2016-01-28 10:40:38,875 [portletsessiontracker:73] removing session id=s4qhmpdastlkwkmeo6gdlt4w0u-siglu_gna1ljelxttqvsaryed
session.invalidate(); in com.liferay.portal.kernel.servlet.portletsessiontracker#invalidate
not called.
there not error in portlet because on tomcat works ok. , on tomcat session.invalidate(); called.
weblogic.xml:
<weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.2/weblogic-web-app.xsd" > <jsp-descriptor> <keepgenerated>true</keepgenerated> <page-check-seconds>60</page-check-seconds> </jsp-descriptor> <session-descriptor> <debug-enabled>true</debug-enabled> <persistent-store-type>replicated_if_clustered</persistent-store-type> <cookie-secure>true</cookie-secure> </session-descriptor> <container-descriptor> <filter-dispatched-requests-enabled>false</filter-dispatched-requests-enabled> <prefer-application-packages> <package-name>antlr.*</package-name> <package-name>com.ctc.wstx.*</package-name> <package-name>org.antlr.*</package-name> <package-name>org.apache.commons.lang.*</package-name> <package-name>org.mozilla.*</package-name> <package-name>org.xmlpull.*</package-name> </prefer-application-packages> <optimistic-serialization>true</optimistic-serialization> <show-archived-real-path-enabled>true</show-archived-real-path-enabled> </container-descriptor> <context-root>/</context-root> <wl-dispatch-policy>ejbtp_liferay</wl-dispatch-policy> </weblogic-web-app>
does know problem? idea or help.
the problem had tricky reason. our customer wanted have different name session id cookie - not default jsessionid. set modified jsessionid on liferay portal war not on wars theme , portlet apps. these wars therefore used default jsessionid whereas portal used modified one. default 1 used add method, modified 1 invalidate method.
solution modify session id cookie in portlet , theme wars.
Comments
Post a Comment