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

Jacopo Cappellato commented on OFBIZ-4289:
------------------------------------------

Jacques,

there are so many things that I still don't like in your patch, I am sorry (if 
you think I am becoming too picky, please ask for the review of someone else, 
it would actually be good to get others' opinion).

A) this should be logged as info rather than error (deploying on tomcat is not 
mandatory):
{code}+                    Debug.logError(e, "No catalina-container 
configuration found in container config!");{code}

B)
I am still confused by the usage of the usage of the "distributableApplication" 
variable; the way I understand its meaning is the following:
* distributableApplication should match the value of the xml field 
"apps-distributable"
* when this value is set to true then the application will be distributed and 
the sessions will be serialized

If the two sentences are correct then there are issues in your code.

C) 
And your last patch is, by default, not setting the fields in session and this 
will *again* generate the error that I fixed a few days ago (introduced when 
you first implemented this feature).

D) 
The steps to recreate the error are listed in a previous comment in this 
task... if you simply set to null (as you still are suggesting) the fields when 
apps-distributable is set to true then the error will happen again so your 
proposed patch doesn't fix the issue.

E)
A final note; what is the purpose of this comment:

{code}+        // NOTE2: it would have been more helpful to know the why than 
the what (only few words)!{code}

? I hope you are not proposing to commit it

                
> 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 10.04, Release Branch 11.04, SVN trunk
>
>         Attachments: OFBIZ-4289_Login_out_on_a 
> cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a 
> cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a 
> cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a 
> cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a 
> cluster_handled_by_DeltaManager_causes_a_NPE.patch, OFBIZ-4289_Login_out_on_a 
> cluster_handled_by_DeltaManager_causes_a_NPE.patch, 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.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to