]
Jay Balunas commented on RF-8134:
---------------------------------
Note this patch will update RichFaces to a base of 3.3.1.GA + the fix. QE should spend
some time verifying general behavior and migration ( should not be any migration issues ).
This is the base for all patches and 3.3.X enterprise branches moving forward so it will
be time well spent.
Memory leak in the in-process template compiler.
------------------------------------------------
Key: RF-8134
URL:
https://jira.jboss.org/jira/browse/RF-8134
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: performance
Affects Versions: 3.3.2.SR1
Reporter: Alexander Smirnov
Assignee: Alexander Smirnov
Priority: Critical
Fix For: 3.3.3.BETA1, ENT_3.3.1.SP1
In-proces compiled templates are widely used by dynamic stylesheets or complonents like
suggestionBox. These templates are compiled into in-memory object structures what usually
have only one instance in application. These objects are called with special context to
generate request output ( lightweight object pattern ).
<f:call element > caches call parameter values in its instance, even FacesContext
or current component references that are short-time objects. As a results, memory leaks
are occured in the org.ajax4jsf.rendercit.compiler.MethodCallElement class. The source of
problem are inner Signature1 and Signature2 classes:
Signature1(int size) {
arguments = new Object[size + 1];
}
void update(TemplateContext context, Object[] parameters) {
arguments[0] = context;
System.arraycopy(parameters, 0, arguments, 1, parameters.length);
}
}
class Signature2 extends Signature {
Signature2(int size) {
arguments = new Object[size + 2];
}
void update(TemplateContext context, Object[] parameters) {
arguments[0] = context.getFacesContext();
arguments[1] = context.getComponent();
System.arraycopy(parameters, 0, arguments, 2, parameters.length);
}
To avoid memory leaks, only types of the target method should be cached ( not object
instances ).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: