Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Oct 2010
    Location
    Campinas
    Posts
    1

    Question PushTable seekEngine Disconnect Problem

    Hello,

    I am subscribing to a created engine and adding some tables and everything works great until the engine gets disconnected (connection dropped and reestablished). At this point the engine successfully reconnects but only the last table added to the pushTable is working. Also I was wondering, shouldn´t the onEngineLost of my pushTable be called when this happens? No event is called nor when the connections is dropped or when the connection is restablished.

    Just to make it more clear, until the point of disconnect, everything works as expected!


    The code I am using is this:

    var pushPage = new PushPage();
    pushPage.context.setDebugAlertsOnClientError(true) ; // (set false in production)
    pushPage.context.setDomain("xxx.com"); // (set the domain when deploying on web server)

    pushPage.onEngineCreation = function(lsEngine) {
    alert("onEngineCreation");
    };

    pushPage.onEngineLost = function() {
    alert("onEngineLost");
    };
    pushPage.onEngineReady = function(lsEngine) {
    alert("onEngineReady");
    };

    pushPage.bind();
    pushPage.seekEngine("DemoCommonEngine"); //Same name as used on CreateEngine

    //Add several tables on a loop like this

    var schema = ["c1", "c2"];
    var tableName = "xxx";
    var dataAdapter = "yyy";

    for(var i=0; i<3; i++)
    {

    var table = new NonVisualTable(tableName + i, schema, "MERGE");
    table.setDataAdapter(dataAdapter);
    table.setSnapshotRequired(true);

    //Set the event to be consumed on update
    table.onItemUpdate = function()
    {
    alert("onItemUpdate");
    }

    // bring the table to running state
    pushPage.addTable(table, "T_" + tableName + i);

    }

    Am I missing something?

    Regards,

    Sebastian Andres

  2. #2
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    Also I was wondering, shouldn´t the onEngineLost of my pushTable be called when this happens? No event is called nor when the connections is dropped or when the connection is restablished.
    no that's not strange, the status changes are notified through the LightstreamerEngine's onStatusChange callback:



    onEngineLost is called in case the whole engine is lost: e.g.: open our StockListDemo, then click a stock name, a popup will open; now close the main page, and you'll see the popup receiving the onEngineLost callback (the sources of the StockListDemo are included in our distribution)

    . At this point the engine successfully reconnects but only the last table added to the pushTable is working.
    this is strange and I wasn't able to reproduce it;
    please attach a server log taken during the issue (ensure to have the LightstreamerLogger.requests set at least to INFO)

 

 

Similar Threads

  1. Callback for detecting internet disconnect
    By mnenchev in forum Client APIs
    Replies: 1
    Last Post: March 8th, 2012, 10:25 AM
  2. How to disconnect a connected session from MetaAdapter?
    By LS_Developer in forum Adapter APIs
    Replies: 2
    Last Post: April 19th, 2011, 12:03 PM
  3. Difference between createEngine and seekEngine
    By webfg in forum Client APIs
    Replies: 2
    Last Post: April 13th, 2009, 12:07 PM
  4. SeekEngine &Push Host
    By ddhanis in forum Client APIs
    Replies: 1
    Last Post: April 3rd, 2008, 04:08 PM
  5. Gracefully disconnect standalone .NET adapters
    By riaanj in forum Adapter APIs
    Replies: 15
    Last Post: September 26th, 2007, 10:30 AM

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 09:47 AM.