struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Benedict (JIRA)" <j...@apache.org>
Subject [jira] Commented: (STR-3190) RequestProcessor synchronized block getting hanged in Sun One Server
Date Fri, 18 Sep 2009 17:19:48 GMT

    [ https://issues.apache.org/struts/browse/STR-3190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46761#action_46761
] 

Paul Benedict commented on STR-3190:
------------------------------------

We do not have access to a Sun server. Have you used another version? This can't be solved
without your active investigation.

> RequestProcessor synchronized block getting hanged in Sun One Server
> --------------------------------------------------------------------
>
>                 Key: STR-3190
>                 URL: https://issues.apache.org/struts/browse/STR-3190
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.1.0
>         Environment: Application server  - Sun One Application server 8.1 , Sun solaris
OS.
>            Reporter: Moushmi Bhattacharya
>            Assignee: Paul Benedict
>            Priority: Critical
>             Fix For: Pending Review
>
>
> We have incidents of the Application server hanging for a few minutes and then coming
back to normal. Sun Analyzed the code and came back with the analysis that the hang is likely
happening in the synchronized block of the RequestProcessor.java [ processActionCreate method
] .
> We are using the struts 1.1 . Has this issue been resolved in the later releases of struts.
Will Moving to a later release solve this issue. 
> The hang is likely happening in the synchronized block below:
> 247     protected Action processActionCreate(HttpServletRequest request,
> 248                                          HttpServletResponse response,
> 249                                          ActionMapping mapping)
> 250         throws IOException {
> 251 
> 252         // Acquire the Action instance we will be using (if there is one)
> 253         String className = mapping.getType();
> 254         if (log.isDebugEnabled()) {
> 255             log.debug(" Looking for Action instance for class " + className);
> 256         }
> 257 
> 258         // :TODO: If there were a mapping property indicating whether
> 259         // an Action were a singleton or not ([true]),
> 260         // could we just instantiate and return a new instance here?
> 261 
> 262         Action instance = null;
> 263         synchronized (actions) {
> 264 
> 265             // Return any existing Action instance of this class
> 266             instance = (Action) actions.get(className);
> 267             if (instance != null) {
> 268                 if (log.isTraceEnabled()) {
> 269                     log.trace("  Returning existing Action instance");
> 270                 }
> 271                 return (instance);
> 272             }
> 273 
> 274             // Create and return a new Action instance
> 275             if (log.isTraceEnabled()) {
> 276                 log.trace("  Creating new Action instance");
> 277             }
> 278             
> 279             try {
> 280                 instance = (Action) RequestUtils.applicationInstance(className);
> 281                 // :TODO: Maybe we should propagate this exception
> 282                 // instead of returning null.
> 283             } catch (Exception e) {
> 284                 log.error(
> 285                     getInternal().getMessage("actionCreate", mapping.getPath()),
> 286                     e);
> 287                     
> 288                 response.sendError(
> 289                     HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
> 290                     getInternal().getMessage("actionCreate", mapping.getPath()));
> 291                     
> 292                 return (null);
> 293             }
> 294             
> 295             instance.setServlet(this.servlet);
> 296             actions.put(className, instance);
> 297         }
> 298 
> 299         return (instance);
> 300 
> 301     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message