Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2006

    DISTINCT not supported in Stock Demo

    Took the StockListDemo under pages and changed the subscription mode for the OverwriteTable to DISTINCT. When the page is loaded an alert tells me that "DISTINCT is not supported for item item1 code (24)".

    The jsdoc for OverwriteTable shows that DISTINCT is supported for this table type, what else needs to be changed to use DISTINCT mode?

  2. #2
    Join Date
    Jul 2006
    The problem you're facing is not client side and is not related to the table class you used.
    There is a method in the MetadataProvider interface ( modeMayBeAllowed ) that lets you specify which subscription modes are admitted for a certain item.
    (Moreover you can specify this setting on a per-user basis with the isModeAllowed method)

    In the distributed StockListDemo adapter, the MetadataProvider implementation used is the LiteralBasedProvider. This class has not a fixed behaviour for the modeMayBeAllowed method but it can be configured within the adapters.xml file. The current configuration:
    Code xml:
    1. <param name="item_family_1">item.*</param>
    2. <param name="modes_for_item_family_1">MERGE</param>
    means that all items whose name matches the item.* pattern are only allowed in MERGE mode and all other items are not allowed in any mode.

    Change MERGE with DISTINCT on the second line and restart the Server in order to perform your test. Note that no item should be allowed in both MERGE and DISTINCT mode.
    The details of this simple configuration language are explained in
    DOCS-SDKs\sdk_adapter_java\examples\Reusable_MetadataAd apters\javadoc\com\lightstreamer\adapters\metadata \LiteralBasedProvider.html



Similar Threads

  1. adapting the stock demo adapter
    By in forum Adapter SDKs
    Replies: 3
    Last Post: January 19th, 2012, 08:46 AM
  2. Difference between DISTINCT and MERGE mode?
    By hungtt in forum General
    Replies: 1
    Last Post: January 4th, 2011, 12:07 PM
  3. DISTINCT updates are NULL with recent LS server
    By rsouissi in forum Client SDKs
    Replies: 4
    Last Post: March 6th, 2008, 01:59 PM
  4. Power PC supported?
    By lhotch in forum General
    Replies: 0
    Last Post: September 27th, 2007, 06:53 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
All times are GMT +1. The time now is 11:01 AM.