floratos-lab / geworkbench-web

geWorkbench web application - the evolution of geWorkbench project into the age of cloud computing.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

problem in CNKBUI handling HttpSession

zhouji2013 opened this issue · comments

CNKBUI.java needs to get HttpSession directly to support its functionality of "CNKB user" authorization. The implementation had problem of getting null pointer in the past. The problem disappeared later and the cause has not been found out. I saw the same issue again (CNKBUI.java line 303 in method getInteractions) when I am working on other changes.

The problem probably is that that part of code is invoked from background thread so the getApplication() method should not work. What is odd is that this actually worked sometimes.

I saw similar problem in UploadDataUI.java around line 570: getApplication() returns null in some cases, and works fine in other cases. Particularly, loading exp file works ok, but loading pdb file always returns null. Until further investigating the seemingly synchronous problem, I will change the code a little to make sure the known case is fixed.

I encountered similar problem with SessionHandler.get(). We need to be cautious about whether these methods are invoked from a background thread.

Close the issue. If similar issues show up again, we will enter as new issues.