FileDocCategorySizeDatePackage
SessionTestSoapBindingImpl.javaAPI DocApache Axis 1.41635Sat Apr 22 18:57:28 BST 2006test.wsdl.session

SessionTestSoapBindingImpl

public class SessionTestSoapBindingImpl extends Object implements test.wsdl.session.SessionTestServer
Class SessionTestSoapBindingImpl

Fields Summary
private int
sessionCallers
count simultaneous session callers
Constructors Summary
Methods Summary
private synchronized intcountDown()
Count down one caller

return
Number of callers left.

        sessionCallers--;
        return sessionCallers;
    
private synchronized intcountUp()
Count one caller

return
Number of simultaneous session callers.

        sessionCallers++;
        return sessionCallers;
    
public booleandoSomething()
Method doSomething

return
throws
java.rmi.RemoteException


        // if this is my session only then the data will be 0
        boolean succeeded = true;
        int count = countUp();

        if (count != 1) {
            System.out.println("Failed with count=" + count);
            succeeded = false;
        }
        try {
            // simulate some busy processing
            Thread.currentThread().sleep(999);
        } catch (InterruptedException e) {
            // ignore
        }

        // check exit count
        count = countDown();
        if (count != 0) {
            System.out.println("Failed with count=" + count);
            succeeded = false;
        }
        return succeeded;