You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2007/02/07 15:03:18 UTC

DO NOT REPLY [Bug 41558] New: - Unnecessary synchronization caused by JspFactory.getDefaultFactory while servicing JSPs

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41558>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41558

           Summary: Unnecessary synchronization caused by
                    JspFactory.getDefaultFactory while servicing JSPs
           Product: Tomcat 6
           Version: unspecified
          Platform: All
        OS/Version: Solaris
            Status: NEW
          Severity: enhancement
          Priority: P4
         Component: Jasper
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: arvind.srinivasan@sun.com


Tomcat version: 6.0.x trunk

Every generated JSP has 

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html");

in its _jspService method.

The use of JspFactory.getDefaultFactory during request processing should be
avoided as it is a *static synchronized* method.

I have a diff that addresses this and will attach it to this bug.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 41558] - Unnecessary synchronization caused by JspFactory.getDefaultFactory while servicing JSPs

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41558>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41558


remm@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From remm@apache.org  2007-02-07 14:55 -------
I did not realize this method was synchronized, so thanks for mentioning it.
There doesn't seem to be any reason for that.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 41558] - Unnecessary synchronization caused by JspFactory.getDefaultFactory while servicing JSPs

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41558>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41558





------- Additional Comments From arvind.srinivasan@sun.com  2007-02-07 06:08 -------
Created an attachment (id=19538)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19538&action=view)
Difference in the generated code for hello_jsp.java before and after the patch


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 41558] - Unnecessary synchronization caused by JspFactory.getDefaultFactory while servicing JSPs

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41558>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41558





------- Additional Comments From arvind.srinivasan@sun.com  2007-02-07 06:06 -------
Created an attachment (id=19537)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19537&action=view)
Patch to avoid invoking JspFactory.getDefaultFactory in jspService

The attached patch changes the .jsp-->.java generator so that
JspFactory.getDefaultFactory is invoked as a one-time operation.

The patch also consolidates JspFactory initialization in JspRuntimeContext.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org