Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Jun 2008
    Location
    HCM
    Posts
    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 !

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,090
    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

  1. Let's understand Data Adapter
    By awadkab in forum Adapter SDKs
    Replies: 3
    Last Post: February 23rd, 2012, 09:28 PM
  2. Replies: 4
    Last Post: October 24th, 2011, 10:33 AM
  3. .NET web service as Data Feed
    By icaiozzi in forum Adapter SDKs
    Replies: 1
    Last Post: November 19th, 2010, 12:52 PM
  4. Query in data adapter
    By latha in forum Adapter SDKs
    Replies: 2
    Last Post: May 20th, 2009, 01:48 PM
  5. INTERACTIONDEMO Data Adapter?
    By naxelrod in forum General
    Replies: 1
    Last Post: October 16th, 2007, 06:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 02:44 PM.