Hey

Since I couldnt get my web service to really support multiple users, Ive thought of simply implementing a FIFO kinda of queue like this:

(The code is made up on the spot right now. Therefore, ; may be missing, some variable declared wrong, etc. Ignore that. Just concentrate on the logic)

public class somename
{

private int users;

/*Alternative:*/
// private static int users;

public void somewebservice(String somevariable)
{

if (users>0)
{
      do
            {
                  system.out.println("please wait")
            }while (users>0);
}
users=1;
system.out.println("bla");
system.out.println("bla");
system.out.println("bla");
system.out.println("bla");
/*more code here*/
//End of code:
users=0;

}



}

Would this work when multiple users call the web services at the same time to make the queue?

Thanks

It works for 2 users :)

But not for 6 (3 browsers on each PC calling the web service)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.