File tree Expand file tree Collapse file tree
axis-rt-core/src/main/java/org/apache/axis/client
integration/src/test/java/test/wsdl/multithread Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -432,11 +432,14 @@ public Service _getService() {
432432 * @return
433433 */
434434 public Call _createCall () throws ServiceException {
435- _call = (Call ) service .createCall ();
435+ // A single stub instance may be used concurrently by multiple threads; therefore we need
436+ // to return the value of the local call variable instead of reading the _call attribute.
437+ Call call = (Call ) service .createCall ();
438+ _call = call ;
436439
437440 // TODO: There is a lot of code in the generated stubs that
438441 // can be moved here.
439- return _call ;
442+ return call ;
440443 }
441444
442445 /**
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public AddressBook getStub() throws Exception {
4646 private void testMultithreading (StubSupplier stubSupplier ) throws Throwable {
4747 Report report = new Report ();
4848 final int numThreads = 50 ;
49- final int numInvocations = 4 ;
49+ final int numInvocations = 10 ;
5050 CountDownLatch readyLatch = new CountDownLatch (numThreads );
5151 CountDownLatch startLatch = new CountDownLatch (1 );
5252 Thread [] threads = new Thread [numThreads ];
You can’t perform that action at this time.
0 commit comments