Details
-
Bug
-
Resolution: Done
-
Critical
-
None
-
2.10.0-fuse-71-047
-
None
-
None
Description
The camel-smpp component uses jsmpp library: https://code.google.com/p/jsmpp/
The org.jsmpp.session.AbstractSessionContext uses ArrayList and also does add, remove and change items of the list. It causes ConcurrentModificationException to be thrown during runtime and as a result thread leaks.
I'll attach a new version of AbstractSessionContext.java to this ticket. Comparing to the original version, below are what I changed:
1. added synchronized(sessionStateListeners) to three methods:
addSessionStateListener
removeSessionStateListener
fireStateChanged
2. replaced ArrayList with CopyOnWriteArrayList.
Initial test result showed that it fixed the thread leak problem.