-
April 10th, 2012, 02:20 AM
#1
Web Service Data Adapter ? How can I do ?
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 !
-
April 11th, 2012, 09:03 AM
#2
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?
Similar Threads
-
By awadkab in forum Adapter SDKs
Replies: 3
Last Post: February 23rd, 2012, 08:28 PM
-
By Alessandro in forum Adapter SDKs
Replies: 4
Last Post: October 24th, 2011, 09:33 AM
-
By icaiozzi in forum Adapter SDKs
Replies: 1
Last Post: November 19th, 2010, 11:52 AM
-
By latha in forum Adapter SDKs
Replies: 2
Last Post: May 20th, 2009, 12:48 PM
-
By naxelrod in forum General
Replies: 1
Last Post: October 16th, 2007, 05:42 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 08:31 PM.
Bookmarks