I was trying to execute the following code simultaneously using two threads. But it executed only the first thread and it got stuck with the second thread while it was exceuting the line stub.beginSession(). Please comment on this.