[
https://jira.jboss.org/jira/browse/JBPM-1139?page=com.atlassian.jira.plug...
]
Alejandro Guizar resolved JBPM-1139.
------------------------------------
Fix Version/s: (was: jBPM 3.2.x)
Resolution: Out of Date
Assignee: Alejandro Guizar
Issue fixed independently on or before the 3.2.5 release.
The ClassUtil class is not thread-safe
--------------------------------------
Key: JBPM-1139
URL:
https://jira.jboss.org/jira/browse/JBPM-1139
Project: jBPM
Issue Type: Bug
Components: Runtime Engine
Affects Versions: jBPM 3.2.3
Reporter: Wojciech Gdela
Assignee: Alejandro Guizar
Attachments: ClassUtil-concurrency-issue.zip
The ClassUtil class is not thread-safe. The exception will occur when two thread
simultanously try do deserialize variables from two different process definitions. Look at
the code:
{code}
public ContextObjectInputStream(final InputStream in,
ProcessInstance processInstance) throws IOException {
super(in);
this.setProcessInstance(processInstance);
ClassUtil.setProcessInstance(processInstance);
}
...
protected Class resolveClass(final ObjectStreamClass desc)
throws IOException, ClassNotFoundException {
return ClassUtil.forName(desc.getName(), ContextObjectInputStream.class);
}
...
ContextObjectInputStream cois = new ContextObjectInputStream(bais,
definition.createProcessInstance());
// when here another thread tries to execute the same code with another process instance
there will be a problem
return cois.readObject();
{/code}
Further description of issue is in attached test case.
--
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