You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2011/05/21 10:42:47 UTC

[jira] [Issue Comment Edited] (OFBIZ-4289) Login out on a cluster handled by DeltaManager causes a NPE

    [ https://issues.apache.org/jira/browse/OFBIZ-4289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13037285#comment-13037285 ] 

Jacques Le Roux edited comment on OFBIZ-4289 at 5/21/11 8:41 AM:
-----------------------------------------------------------------

I first wrote a changeset_2510.diff patch which works locally and on cluster but does not take into account the Manager type. I think it's ok but to be sure I have also created a patch with no possible regression: OFBIZ-4289_Login out on a cluster handled by DeltaManager causes a NPE.patch

So changeset_2510.diff is not intended for inclusion. But I'm curious to know why it works. Tough I have no time to digg in further on why we need to put delegator, dispatcher, security and authorization in session. So if someone is interested...

      was (Author: jacques.le.roux):
    I first wrote a changeset_2510.diff patch which works locally and on cluster but does not take into account the Manager type. I think it's ok but to be sure I have also created a patch with no possible regression: OFBIZ-4289 Login out on a cluster handled by DeltaManager causes a NPE.patch

So changeset_2510.diff is not intended for inclusion. But I'm curious to know why it works. Tough I have no time to digg in further on why we need to put delegator, dispatcher, security and authorization in session. So if someone is interested...
  
> Login out on a cluster handled by DeltaManager causes a NPE
> -----------------------------------------------------------
>
>                 Key: OFBIZ-4289
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4289
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 4.0, Release Branch 09.04, Release Branch 10.04, Release Branch 11.04, SVN trunk
>         Environment: Ubuntu
>            Reporter: Jacques Le Roux
>            Assignee: Jacques Le Roux
>            Priority: Critical
>              Labels: cluster, logout
>             Fix For: Release Branch 09.04, Release Branch 10.04, Release Branch 11.04, SVN trunk
>
>         Attachments: OFBIZ-4289 Login out on a cluster handled by DeltaManager causes a NPE.patch, changeset_2510.diff
>
>
> It works locally but not on clusters. You simply get a NPE.
> h3. Problem
>     * When we logout we cross an issue due to Tomcat sessions persistence.
>     * Because we set distributable to true, to allow sessions failover,
>     * and use and DeltaManager for replication.
>     * Delegator and other main Classes (notably Dispatcher) are not serialized in OFBiz. This is the origin of the problem 
> h3. Tried solutions
> By default DeltaManager save active sessions on disk. It uses a private String variable pathname for that (default to "SESSIONS.ser"). You can set it to null, to avoid session persistence, using a context.xml file in the WEB-INF folder with content like below. But I tried it in webtools app on staging qs001 (only) and it did not work (with distributable set to false). And we have no other means to set it from OFBiz (OOTB).
> {code}
>     <Context>
>      <Manager className="org.apache.catalina.session.DeltatManager" pathname="">
>      </Manager>
>     </Context>
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira