Global Variable with tomcat doesn't work, why?

hi all,

i've following question:

i'm calling a Client (in Server A) which calls a Webservice on Server B. Then i'm waiting in the Client for a response which comes from Server B to a Webservice on Server A. The Webservice on Server A should change a global Variable, which it's in the Client defined.

But it seems, that tomcat doesn't allow changing global Variables. Maybe the re must be a permisson flag given for writing global variables in tomcat?

Server A:

-

Client + Webservice (Webservice change a global Variable in the Client)

Server B:

-

Calls the Webservice on Server A

Code snippet:

Server A:

public class Client

{

public static boolean technOk=false;

public static int main(String[] args) throws Exception

{

while (technOk == false)

{

//wait 5 seconds then break...

}

}

}

public class Server

{

//change global variable

Client.technok = true

}

Server B:

calls the Webservice "Server" on Server A

Thanks for all reply!!!!!!!!!!!!!!!!

[1162 byte] By [maxpadea] at [2007-11-27 4:16:13]
# 1
in another forum i was getting a reply. it seems that there is a closed environment for all webservices so that they cant reach variables defined out of the webservice itself.....
maxpadea at 2007-7-12 9:22:42 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

it goes far deeper than that, in your understanding of what a webservice (or any distributed system) actually does.

How the heck do you expect a process running on another computer to magically change anything on your computer without some process on your computer actively helping it by doing the actual change?

If that were possible networking computers would be impossible. I'd be able to see and change anything on every computer anywhere in the world and so would everyone else.

No information would be safe anywhere on any system that's attached to any network that has a connection to any other network.

jwentinga at 2007-7-12 9:22:42 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3

hi jwenting,

NO i don't want to change anything on a remote webservice.

i wrote that i want to change by my own webservice a global variable in my own client. so the client and webservice are on the same computer.

my intent is that after receiving a message through my own webservice to set a global variable in the client. after that the client would know that a message sending by it was received.....

.....

maxpadea at 2007-7-12 9:22:42 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...