For Client 1, I am getting the following entries in the log. The item that I am subscribing is MW#1#1#1:
16-Dec-10 17:13:38,218 |TRACE|LightstreamerLogger.preprocessor |SERVER POOLED THREAD 1 |No frequency prefilter for item MW#1#1#1
16-Dec-10 17:13:38,218 |TRACE|LightstreamerLogger.preprocessor |SERVER POOLED THREAD 1 |Snapshot buffer size for DISTINCT item MW#1#1#1 set to 0
16-Dec-10 17:13:38,218 |TRACE|LightstreamerLogger.subscriptions|SERVER POOLED THREAD 1 |Subscribing item MW#1#1#1 on BrowserToLSToTWS.DEFAULT
16-Dec-10 17:13:38,218 |DEBUG|LightstreamerLogger.subscriptions|SERVER POOLED THREAD 1 |Manager: com.lightstreamer.c.fb@bc5596
For Client 2, I am getting like this:
16-Dec-10 17:14:54,328 |TRACE|LightstreamerLogger.preprocessor |SNAPSHOT POOLED THREAD 1 |Sending DISTINCT snapshot to session Sc1cd7da17bb316adT1451625 for item MW#1#1#1: Snapshot end signal for item MW#1#1#1 on BrowserToLSToTWS.DEFAULT
The code that I have written:
Client Side:
$wnd.pushtable_messages = new $wnd.NonVisualTable(jsonEntries.split(" "), new Array("instancesAndSecurities"), "DISTINCT");
$wnd.pushtable_messages.setSnapshotRequired(true);
Server Side:
1. In Meta data data Adapter
public boolean isSnapshotAvailable(String itemName)
throws SubscriptionException {
return true;
}
public int getDistinctSnapshotLength(String item)
{
return 1;
}
itemEventListener.smartUpdate(itemHandle, data, false);
3. In Adapter.XML:
<param name="distinct_snapshot_length">1</param>
Can you please let me know what I have done wrong?
Note:
1. I also tried $wnd.pushtable_messages.setSnapshotRequired(1); This is also not working.
2. For Data Adapter I have implemented:
public class InstancesAndSecuritiesDataAdapter implements SmartDataProvider
{
}
3. For Meta Data Adapter I have implemented:
public class ActiveTraderMetaData extends LiteralBasedProvider
{
}