Saturday 15 March 2014

java - jstl forEach tag in jBoss 7, memory leak? -



java - jstl forEach tag in jBoss 7, memory leak? -

the yourkit profiler used analyze snapshot.

steps have been performed (for user):

generation number has been increased. some actions on application page have been done. of them entities , display them via jstl foreach tag. the logout has been performed (session.invalidate()) the session timeout set 5 minutes. consequently i've waited 6-8 minutes create sure in session invalidated. the snapshot via yourkit profiler made.

what i've discovered:

someentity #3: captured snapshot jboss-2014-10-07-1.snapshot 11m 37s - 21m 43s 183 4392 7896 <all objects> 183 7896 java.lang.object[] 182 7832 java.util.arraylist 182 7832 somepath.someimpl 167 7208 java.lang.object[] 164 7016 java.util.arraylist 164 7016 org.apache.taglibs.standard.tag.rt.core.foreachtag 164 7016 somepath.someanotherimpl 3 192 java.lang.object[] 3 192 java.util.arraylist 3 192 org.apache.taglibs.standard.tag.rt.core.foreachtag 3 192

what can see here (please prepare me, if i'm wrong) foreachtag tag holds 164+3 instances of someentity. i've investigated jstl issues , found problem had been reproduced. illustration here, , here.

but @ first it's said don't nullable objects in doendtag ok, according jsp spec (please prepare me if i'm wrong). , sec problems have been resolved in lastly 1.2 jstl version. in jboss 7 1.2 version used, so, seems problem still exists.

one of solution - nullable objects in doendtag() considered bad practice. see here reason

next, i've repeated actions described 4 different users. find number of object hold org.apache.taglibs.standard.tag.rt.core.foreachtag 539+12.

as me, - it's memory leak. if i'm wrong, please prepare me. if not can in case? nullable objects in doendtag method?

i don't have reply you, we're seeing similar jboss 6 , foreach tag. we're continuing investigate (when found post) , allow know if find anything.

--- edit ---

we added fix, resolved memory leak issue, , seems have resolved foreach 1 well.

for jboss, updated:

class="snippet-code-html lang-html prettyprint-override"><subsystem xmlns="urn:jboss:domain:web:1.4" default-virtual-server="default-host" instance-id="${jvmroute}" native="false"> <configuration> <jsp-configuration trim-spaces="true" tag-pooling="false"/> </configuration>

i believe in standalone.xml file.

java memory-leaks jstl profiling jboss7.x

No comments:

Post a Comment