Results 1 to 10 of 17

Hybrid View

  1. #1
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,091
    The code shown is still internal to your Data Adapter and does not reference anything in Lightstreamer Adapter interface.
    I mean that SubscriptionInfo, subscribedItems, and onDelete are still defined in your code.
    So, it is difficult for us to devise any needed change.
    This is furtherly complicated by the fact that the code is inspired in part to our StockQuotesDataAdapter.java code sample (which defines SubscriptionInfo and subscribedItems) and in part by the PortfolioDataAdapter.java code sample (which defines onDelete).

    Anyway, if you manage to invoke onDelete and the implementation of onDelete is the one included in our PortfolioDataAdapter.java, this should correctly send the DELETE command.
    However, we didn't see that reported in the log.
    So, please debug your Adapter to ensure that
    • onDelete is invoked,
    • onDelete invokes listener.smartUpdate with the correct parameters,
    • after the invocation, the Server logs the update as expected (on LightstreamerLogger.subscriptions at DEBUG level).

    If you dump the parameters upon the invocation of listener.smartUpdate, together with the current time, we can help you in comparing those with the log.

  2. #2
    Power Member
    Join Date
    Sep 2013
    Location
    Coimbatore
    Posts
    121
    Hi,
    I have updated code to clear snapshot while I delete the stock the below code will execute. After I cleared the snapshot still the deleted commodity displaying in client screen. Is there any other storage available in LS.

    public void clearStatus() {
    synchronized (subscribedItems) {
    Set<String> keys = subscribedItems.keySet();
    for (String itemName : keys) {
    listener.clearSnapshot(itemName);
    }
    }
    }

    @Override
    public void onDeleteStatus(String itemName) {
    SubscriptionInfo si;
    synchronized (subscribedItems) {
    si = new SubscriptionInfo(new Boolean(false), new Boolean(true));
    subscribedItems.remove(itemName, si);
    onDelete(this.handle, itemName);
    clearStatus();
    }
    }

  3. #3
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi rvkvino,

    I am not sure that the piece of code you posted, can work since the clearStatus method is called after the itemName is removed from the subscribedItems map.
    Maybe there is some confusion between the COMMAND table keys and the ItemName representing the whole table.
    While DELETE commands are executed on individual row keys, clearStatus must specify the name of the Item of entire table, the one you received with subscribe call.

    Regards,
    Giuseppe

 

 

Similar Threads

  1. Replies: 4
    Last Post: October 24th, 2011, 09:33 AM
  2. TIBCO AMS-GI data adapter issue
    By ganeshk in forum Adapter SDKs
    Replies: 1
    Last Post: September 22nd, 2010, 06:52 PM
  3. Replies: 3
    Last Post: January 7th, 2010, 08:57 AM
  4. Replies: 4
    Last Post: January 3rd, 2010, 08:03 AM
  5. Problem running JMS stocks demo
    By mnenchev in forum General
    Replies: 3
    Last Post: August 10th, 2009, 03:22 PM

Tags for this Thread

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 11:28 AM.