Jira AXIS2-1053 created.
Regards,
Michele
On 18 Aug 2006, at 20:07, Eran Chinthaka wrote:
Can you create an issue out of this, explaining or better attaching
some
tests or code for us to re-gen the problem?
Thanks,
Chinthaka
Michele Mazzucco wrote:
Hi again,
unfortunately I cannot found a suitable solution for my problem. [1]
provides two possible solutions:
1 - use a single sender object for all threads: this is not possible
since I want to send messages concurrently
2 - create multiple senders using the same configuration context.
According to the second option, the configuration context I'm
using is
ConfigurationContext configurationContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(
null,
null);
HttpClient httpClient = new HttpClient(new
MultiThreadedHttpConnectionManager());
configurationContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,
Boolean.TRUE);
configurationContext.setProperty(HTTPConstants.CACHED_HTTP_CLIENT,
httpClient);
Now all senders should be able to send messages concurrently
(theoretically), but unfortunately they incur in a
ConcurrentModificationException
when they try to engage the addressing module (there is no way, at
least
on first instance, to synchronize this operation):
Exception in thread "pool-1-thread-1"
java.util.ConcurrentModificationException
[java] at
java.util.AbstractList$Itr.checkForComodification
(AbstractList.java:449)
[java] at java.util.AbstractList$Itr.next
(AbstractList.java:420)
[java] at org.apache.axis2.engine.Phase.addHandler
(Phase.java:136)
[java] at
org.apache.axis2.phaseresolver.PhaseHolder.addHandler
(PhaseHolder.java:64)
[java] at
org.apache.axis2.phaseresolver.PhaseResolver.engageModuleToOperation(
PhaseResolver.java:191)
[java] at
org.apache.axis2.description.AxisOperation.engageModuleToOperation
(AxisOperation.java:154)
[java] at
org.apache.axis2.description.AxisOperation.engageModule
(AxisOperation.java:128)
[java] at
org.apache.axis2.description.AxisService.engageModule
(AxisService.java:479)
[java] at
org.apache.axis2.client.ServiceClient.engageModule
(ServiceClient.java:271)
[java] at
ncl.qosp.test.functional.client.Sender.run(Sender.java:138)
[java] at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask
(ThreadPoolExecutor.java:650)
[java] at
java.util.concurrent.ThreadPoolExecutor$Worker.run
(ThreadPoolExecutor.java:675)
[java] at java.lang.Thread.run(Thread.java:613)
Is this a bug?
Regards,
Michele
[1] http://www.wso2.net/kb/165
On 17 Aug 2006, at 15:32, Michele Mazzucco wrote:
Hi all,
I have to spare some threads, and each of them creates a new
ServiceClient object in order to send messages. Now the problem
is that
they fail, since they try to use the same port (I guess). Is
there any
possibility to specify which port should they use?
Thanks,
Michele
--------------------------------------------------------------------
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]