I'm new to writing web services, so please bear that in mind.
On the server machine I need to run a business simulation, which has dynamic state. Let's use a very simple example
An instance of this object must be *running at all times* on the server so that it's state is kept updated.
I also require a SOAP based web service that exposes Simulator::getState() so that remote machines can query the simulator's state.
I've been reading 'Java Web Services Up and Running' and have modified his very simple example that utilizes an Endpoint object to publish the web service (this also utilizes a thread pool) and run the simulator at the same time. This works great and looks like this:
I now need to do the same thing but deploy the WS in a web container such as Jetty. Unfortunately I haven't a clue how to do that (and run the sim at the same time) since main() is never called when Jetty starts the service.
I've tried calling simulator.Run() in the SimServerImpl constructor but that seems to hang the client when i go to test it.
I would very much appreciate it if someone could outline how I can solve this problem. I've been stumped for days now and I'm getting overwhelmed with all the options.
Many thanks and apologies for the long post.
I just had the craziest dream. This tiny ad was in it.
the new thread boost feature: great for the advertiser and smooth for the coderanch user