-
Type:
Improvement
-
Status: Resolved
-
Priority:
Critical
-
Resolution: Cannot Reproduce
-
Affects Version/s: 1.1.0
-
Fix Version/s: None
-
Component/s: Core
-
Labels:None
-
Environment:Application server - Sun One Application server 8.1 , Sun solaris OS.
-
Flags:Important
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())
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())
271 return (instance);
272 }
273
274 // Create and return a new Action instance
275 if (log.isTraceEnabled())
278
279 try
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 }