intelsmart
Hi all,
I have a realtime quotation board (stock market data) application using Struts 2. I use Servlet Variables to contain stocks info and I use web service to update these. This mean i develop a client program to read stocks info and call web service of web app to update Servlet Variables Stocks Info.
So, with lightstreamer i do not know how i can use web service for that. anyone helps me, please ??!!
Thanks so much !
Codes in ExternalFeedSimulator.java of StockListDemo sample
private void scheduleGenerator(final MyProducer producer, long waitTime) {
dispatcher.schedule(new TimerTask() {
public void run() {
long nextWaitTime;
synchronized (producer) {
producer.computeNewValues();
if (listener != null) {
listener.onEvent(producer.itemName,
producer.getCurrentValues(false),
false);
}
nextWaitTime = producer.computeNextWaitTime();
}
scheduleGenerator(producer, nextWaitTime);
}
}, waitTime);
}
producer.computeNewValues() method: get new info of stocks. I can use database to store new info and select from. But database is slower updater than i update directly from client program via web service !
Dario Crivelli
Sorry for not being familiar with Struts:
where do your "Servlet Variables" stay? On the client application or on the Web Server?
In other terms: are you talking about updates in both directions?
i.e. about clients receiving stock updates and also about the same (or different) clients supplying stock updates to your servlets?