[
https://jira.jboss.org/browse/JBESB-3470?page=com.atlassian.jira.plugin.s...
]
Pavel Macik reopened JBESB-3470:
--------------------------------
Magesh,
the SOAPProcessor is still not thread safe even after your patch.
There is following problem:
When second thread tries to lookup the 'java:comp/env' context while the first
thread (which is suppose to create the nonexisting subcontext) is between the lookup call
(that causes the NNFE) and creating the 'env' subcontext of 'java:comp'
context the second thread will again throw the NNFE that is catched and the second new
'env' subcontext is being created. But since the first thread already created the
subcontext, the "javax.naming.NameAlreadyBoundException; remaining name
'env'" (NABE)exception is thrown...
So my suggestion is to catch the NABE on 'enc.createSubContext("env")'
method call and either ignore it or at least log it on WARN/DEBUG level..
Thanks
Pavel
SOAPProcessor isn't thread-safe
-------------------------------
Key: JBESB-3470
URL:
https://jira.jboss.org/browse/JBESB-3470
Project: JBoss ESB
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 4.9
Reporter: Pavel Macik
Assignee: Magesh Kumar B
Priority: Blocker
Fix For: 4.9 CP1
Attachments: SOAPProcessor.java.diff
The SOAPProcessor during message processing creates and destroys a subcontext named
"env" which is fine when the ESB service is configured as single-threaded. But
when the ESB service's action pipeline is configured as multi-threaded (maxThreads
> 1) one of the following exceptions will occure:
javax.naming.NameNotFoundException: env not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.unbind(NamingServer.java:349)
at org.jnp.interfaces.NamingContext.unbind(NamingContext.java:871)
at org.jnp.interfaces.NamingContext.destroySubcontext(NamingContext.java:1193)
at org.jnp.interfaces.NamingContext.destroySubcontext(NamingContext.java:1185)
at org.jboss.soa.esb.actions.soap.SOAPProcessor.process(SOAPProcessor.java:231)
at
org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:649)
at
org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:603)
at
org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:433)
at
org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:540)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
or
javax.naming.NameAlreadyBoundException; remaining name 'env'
at org.jnp.server.NamingServer.createSubcontext(NamingServer.java:619)
at org.jnp.interfaces.NamingContext.createSubcontext(NamingContext.java:1116)
at org.jnp.interfaces.NamingContext.createSubcontext(NamingContext.java:1096)
at org.jboss.soa.esb.actions.soap.SOAPProcessor.process(SOAPProcessor.java:229)
... 7 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira