Daniel Murygin [
http://community.jboss.org/people/n2] created the discussion
"Spring integration, memory leaks"
To view the discussion, visit:
http://community.jboss.org/message/582960#582960
--------------------------------------------------------------
I noticed a memory leak in jBPM Spring integration while profiling my application.
I'm using jBPM 4.4 and Spring 2.5.6.
jBPM calls +org.jbpm.pvm.internal.env.SpringContext.get(Class<T> type)+ to retrieve
Spring beans. This method calls
+org.springframework.context.ApplicationContext.getBeanNamesForType(type+) everytime to
get the bean anme for the class. These calls causes 30 MB memory usage after short runtime
with only one user.
Nebeans Profiler snapshot:
https://dl.dropbox.com/u/342869/SpringContext.png
https://dl.dropbox.com/u/342869/SpringContext.png
Since +getBeanNamesForType(type+) reads names from the static Spring configuration
+SpringContext.get+ should cache the names after reading. I added a simple static
+Hashmap+ to SpringContext which saved 25 MB ram.
I added a patch for maven module +pvm+ of the jBPM-4.4 sources. A more sophisticated cache
solution may be required in other environment with multiple Spring +ApplicationContexts+
in one JVM.
- Daniel
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/582960#582960]
Start a new discussion in jBPM Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]