[
https://jira.jboss.org/jira/browse/JBMESSAGING-1775?page=com.atlassian.ji...
]
Howard Gao commented on JBMESSAGING-1775:
-----------------------------------------
Hi Justin,
This probably is caused by improper use of JMS API.
The JMS spec says (2.8) that Session doesn't support concurrent use. The problem shows
only if Session are shared among threads. Connections have no such problem.
In ConnectionState you can see it uses SyncSet to guarantee the concurrency. But in
SessionState it uses HashSet.
So if a user uses multiple threads to create producers from one same session, it will
result in concurrent access to the same HashSet. Correct usage would be using a different
session for each thread.
Howard
Unsynchronized access to java.util.Set causing high CPU utilization
-------------------------------------------------------------------
Key: JBMESSAGING-1775
URL:
https://jira.jboss.org/jira/browse/JBMESSAGING-1775
Project: JBoss Messaging
Issue Type: Bug
Components: Messaging Core
Affects Versions: 1.4.0.SP3.CP08
Reporter: Justin Bertram
Assignee: Howard Gao
Fix For: 1.4.0.SP3.CP10, 1.4.6.GA.SP1, 1.4.7.GA
Unsynchronized access to java.util.Set in
org.jboss.jms.client.state.HierarchicalStateSupport causes high CPU utilization.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira