//some lines of code
//...........................
//call to below method involves call to a webservice hosted on other machine
response = osmBO.createOrder(arg);
}
}
Now problem is before call to createOrder (in turn webservices) is finished that is response is received another thread(probably created by app server where this code is running) invokes this method.
My requirement is untill processOrder() invocation gets completed by one thread another thread must not be able to access it. i have method the synchronized but of no help.