You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Xiaoming Shi (JIRA)" <ji...@apache.org> on 2011/02/24 03:22:38 UTC

[jira] Created: (OWB-527) JspFactory.getDefaultFactory() is synchronized, We can cache the return value to improve performance

JspFactory.getDefaultFactory() is synchronized, We can cache the return value to improve performance
----------------------------------------------------------------------------------------------------

                 Key: OWB-527
                 URL: https://issues.apache.org/jira/browse/OWB-527
             Project: OpenWebBeans
          Issue Type: Bug
    Affects Versions: 1.0.0
            Reporter: Xiaoming Shi
            Assignee: Gurkan Erdogdu


In the file:

./openwebbeans-1.0.0/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/WebContainerLifecycle.java       line:86

The value returned by JspFactory.getDefaultFactory()  can be cached to reduce race and improve performance
 (Similar to the Apache Bug, https://issues.apache.org/bugzilla/show_bug.cgi?id=44408)

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

        

[jira] Assigned: (OWB-527) JspFactory.getDefaultFactory() is synchronized, We can cache the return value to improve performance

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-527?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg reassigned OWB-527:
---------------------------------

    Assignee: Mark Struberg  (was: Gurkan Erdogdu)

> JspFactory.getDefaultFactory() is synchronized, We can cache the return value to improve performance
> ----------------------------------------------------------------------------------------------------
>
>                 Key: OWB-527
>                 URL: https://issues.apache.org/jira/browse/OWB-527
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Lifecycle
>    Affects Versions: 1.0.0
>            Reporter: Xiaoming Shi
>            Assignee: Mark Struberg
>
> In the file:
> ./openwebbeans-1.0.0/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/WebContainerLifecycle.java       line:86
> The value returned by JspFactory.getDefaultFactory()  can be cached to reduce race and improve performance
>  (Similar to the Apache Bug, https://issues.apache.org/bugzilla/show_bug.cgi?id=44408)

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

        

[jira] Commented: (OWB-527) JspFactory.getDefaultFactory() is synchronized, We can cache the return value to improve performance

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12998750#comment-12998750 ] 

Mark Struberg commented on OWB-527:
-----------------------------------

Hi!
Thanks for the catch. Of course I fear we cannot go the easy route and introduce a static field like tomcat did, because in fat EE servers, different webapps might get different JspFactories, isn't? David Jencks, any opinion here?
Safe bet would be to store it as once per webapp.

> JspFactory.getDefaultFactory() is synchronized, We can cache the return value to improve performance
> ----------------------------------------------------------------------------------------------------
>
>                 Key: OWB-527
>                 URL: https://issues.apache.org/jira/browse/OWB-527
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Lifecycle
>    Affects Versions: 1.0.0
>            Reporter: Xiaoming Shi
>            Assignee: Gurkan Erdogdu
>
> In the file:
> ./openwebbeans-1.0.0/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/WebContainerLifecycle.java       line:86
> The value returned by JspFactory.getDefaultFactory()  can be cached to reduce race and improve performance
>  (Similar to the Apache Bug, https://issues.apache.org/bugzilla/show_bug.cgi?id=44408)

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

        

[jira] Commented: (OWB-527) JspFactory.getDefaultFactory() is synchronized, We can cache the return value to improve performance

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12999110#comment-12999110 ] 

Mark Struberg commented on OWB-527:
-----------------------------------

Nope, sadly it is not ok. In an EE server it might happen that one WAR gets served via e.g. jetty and another one via tomcat. But both might get served by the same OWB jar...

> JspFactory.getDefaultFactory() is synchronized, We can cache the return value to improve performance
> ----------------------------------------------------------------------------------------------------
>
>                 Key: OWB-527
>                 URL: https://issues.apache.org/jira/browse/OWB-527
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Lifecycle
>    Affects Versions: 1.0.0
>            Reporter: Xiaoming Shi
>            Assignee: Mark Struberg
>
> In the file:
> ./openwebbeans-1.0.0/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/WebContainerLifecycle.java       line:86
> The value returned by JspFactory.getDefaultFactory()  can be cached to reduce race and improve performance
>  (Similar to the Apache Bug, https://issues.apache.org/bugzilla/show_bug.cgi?id=44408)

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

        

[jira] Commented: (OWB-527) JspFactory.getDefaultFactory() is synchronized, We can cache the return value to improve performance

Posted by "Xiaoming Shi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12999125#comment-12999125 ] 

Xiaoming Shi commented on OWB-527:
----------------------------------

I see. Thanks Mark ;-)

> JspFactory.getDefaultFactory() is synchronized, We can cache the return value to improve performance
> ----------------------------------------------------------------------------------------------------
>
>                 Key: OWB-527
>                 URL: https://issues.apache.org/jira/browse/OWB-527
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Lifecycle
>    Affects Versions: 1.0.0
>            Reporter: Xiaoming Shi
>            Assignee: Mark Struberg
>
> In the file:
> ./openwebbeans-1.0.0/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/WebContainerLifecycle.java       line:86
> The value returned by JspFactory.getDefaultFactory()  can be cached to reduce race and improve performance
>  (Similar to the Apache Bug, https://issues.apache.org/bugzilla/show_bug.cgi?id=44408)

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

        

[jira] Resolved: (OWB-527) JspFactory.getDefaultFactory() is synchronized, We can cache the return value to improve performance

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-527?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg resolved OWB-527.
-------------------------------

       Resolution: Won't Fix
    Fix Version/s: 1.1.0

already works as good as it gets...

> JspFactory.getDefaultFactory() is synchronized, We can cache the return value to improve performance
> ----------------------------------------------------------------------------------------------------
>
>                 Key: OWB-527
>                 URL: https://issues.apache.org/jira/browse/OWB-527
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Lifecycle
>    Affects Versions: 1.0.0
>            Reporter: Xiaoming Shi
>            Assignee: Mark Struberg
>             Fix For: 1.1.0
>
>
> In the file:
> ./openwebbeans-1.0.0/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/WebContainerLifecycle.java       line:86
> The value returned by JspFactory.getDefaultFactory()  can be cached to reduce race and improve performance
>  (Similar to the Apache Bug, https://issues.apache.org/bugzilla/show_bug.cgi?id=44408)

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

        

[jira] Updated: (OWB-527) JspFactory.getDefaultFactory() is synchronized, We can cache the return value to improve performance

Posted by "Xiaoming Shi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-527?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xiaoming Shi updated OWB-527:
-----------------------------

    Component/s: Lifecycle

> JspFactory.getDefaultFactory() is synchronized, We can cache the return value to improve performance
> ----------------------------------------------------------------------------------------------------
>
>                 Key: OWB-527
>                 URL: https://issues.apache.org/jira/browse/OWB-527
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Lifecycle
>    Affects Versions: 1.0.0
>            Reporter: Xiaoming Shi
>            Assignee: Gurkan Erdogdu
>
> In the file:
> ./openwebbeans-1.0.0/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/WebContainerLifecycle.java       line:86
> The value returned by JspFactory.getDefaultFactory()  can be cached to reduce race and improve performance
>  (Similar to the Apache Bug, https://issues.apache.org/bugzilla/show_bug.cgi?id=44408)

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

        

[jira] Commented: (OWB-527) JspFactory.getDefaultFactory() is synchronized, We can cache the return value to improve performance

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12999064#comment-12999064 ] 

David Jencks commented on OWB-527:
----------------------------------

I'm looking at trunk code where the JspFactory.getDefaultFactory() is called at most once per web app in afterStartApplication line 117.  Since the result may be different for every web app I don't understand how anything can be cached or speeded up.

> JspFactory.getDefaultFactory() is synchronized, We can cache the return value to improve performance
> ----------------------------------------------------------------------------------------------------
>
>                 Key: OWB-527
>                 URL: https://issues.apache.org/jira/browse/OWB-527
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Lifecycle
>    Affects Versions: 1.0.0
>            Reporter: Xiaoming Shi
>            Assignee: Mark Struberg
>
> In the file:
> ./openwebbeans-1.0.0/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/WebContainerLifecycle.java       line:86
> The value returned by JspFactory.getDefaultFactory()  can be cached to reduce race and improve performance
>  (Similar to the Apache Bug, https://issues.apache.org/bugzilla/show_bug.cgi?id=44408)

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

        

[jira] Commented: (OWB-527) JspFactory.getDefaultFactory() is synchronized, We can cache the return value to improve performance

Posted by "Xiaoming Shi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12999108#comment-12999108 ] 

Xiaoming Shi commented on OWB-527:
----------------------------------

Hi David,

I think it's OK to share the JspFactory  between different web apps. What specific to web app is the "JspApplicationContext".

Thanks

> JspFactory.getDefaultFactory() is synchronized, We can cache the return value to improve performance
> ----------------------------------------------------------------------------------------------------
>
>                 Key: OWB-527
>                 URL: https://issues.apache.org/jira/browse/OWB-527
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Lifecycle
>    Affects Versions: 1.0.0
>            Reporter: Xiaoming Shi
>            Assignee: Mark Struberg
>
> In the file:
> ./openwebbeans-1.0.0/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/WebContainerLifecycle.java       line:86
> The value returned by JspFactory.getDefaultFactory()  can be cached to reduce race and improve performance
>  (Similar to the Apache Bug, https://issues.apache.org/bugzilla/show_bug.cgi?id=44408)

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