This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Fix the threading model for jsp parser | ||
---|---|---|---|
Product: | javaee | Reporter: | Tomasz Slota <tslota> |
Component: | JSP Parser | Assignee: | issues@javaee <issues> |
Status: | NEW --- | ||
Severity: | blocker | CC: | dkonecny, pjiricka, tslota |
Priority: | P1 | Keywords: | RANDOM |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | TASK | Exception Reporter: |
Description
Tomasz Slota
2007-10-26 15:17:36 UTC
The problem happens because of the indentation infrastrucure writeLocks the document before calling the invidual formatters. The java reformatter calls to SimplifiedJSPServlet which calls to jsp parser to get the parse data for the page. Unfortunatelly the jsp parser runs in a task in different thread and the caller is blocked until the task finishes. In the parser task CloneableEditorSupport.getInputStream() is called which then causes another call to writeLock() on the document. The thread is blocked on the writeLock() and hence the two threads never finishes. A solution seems to be to call the jsp parser synchrnously in the EDT thread so the subsequent writeLock() will not block. I try to fix it. workarounded, just downgrading since the proper fix still needs to be do in TagLibParseSupport as described in my last comment. Checking in SimplifiedJSPServlet.java; /cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/SimplifiedJSPServlet.java,v <-- SimplifiedJSPServlet.java new revision: 1.29; previous revision: 1.28 done the applied fix seems to be sufficient, changing to task, no user impact now |