Results 1 to 2 of 2
  1. #1

    Basic Stock Demo in DISTINCT mode

    Hi,

    I am trying to implement a custom java data adapter on eclipse for the basic stock demo example. I am publishing all my messages under one item ie. item1. I want to be able to see all my messages one below the other and not just the current message, so I intend to use DISTINCT mode. Can you tell me where all & what all changes should I make to change the sample from MERGE mode? I have tried it implementing it on my own but I think I am missing out on something. Kindly do help.

    Thanks

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,089
    Hi, In general, the use of a subscription mode when subscribing to an item involves two components:
    - On the client side, the subscription request must specify the mode.
    - On the server side, the Metadata Adapter must allow the mode for that item.

    I suppose that the latter is the missing step.
    In general, the Metadata Adapter gives allowance to a mode through two callbacks: modeMayBeAllowed and isModeAllowed.
    As far as the Basic Demo is concerned, you don't need to modify the Metadata Adapter, but only its configuration, which is in the adapters.xml file.
    You should find lines like the following:
    <param name="item_family_1">item.*</param>
    <param name="modes_for_item_family_1">MERGE</param>
    and you can specify the desired mode (i.e. DISTINCT) there.
    Note that this will take effect for all items; if the change should regard one item only, a fine-tuning of this configuration would be needed.

    Consider that using a mode for an item is not a free choice, because each mode may put restrictions on the updates that the Data Adapter should provide.
    In this case, you shouldn't have any problem; but, for instance, you cannot set COMMAND, where the updates are supposed to provide the special "key" and "command" fields.

 

 

Similar Threads

  1. Replies: 1
    Last Post: April 30th, 2015, 09:51 AM
  2. Basic stock-list demo
    By sheik in forum Adapter SDKs
    Replies: 3
    Last Post: May 8th, 2013, 10:35 AM
  3. dotnet demo Portfolio-Basic not work fine
    By lisicnu in forum Adapter SDKs
    Replies: 3
    Last Post: December 8th, 2011, 03:41 AM
  4. Difference between DISTINCT and MERGE mode?
    By hungtt in forum General
    Replies: 1
    Last Post: January 4th, 2011, 01:07 PM
  5. DISTINCT not supported in Stock Demo
    By gmccone in forum Client SDKs
    Replies: 1
    Last Post: March 30th, 2007, 11:41 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 06:51 AM.