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
MetadataProviderinterface (
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:
[highlight=xml]
<param name="item_family_1">item.*</param>
<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_MetadataAdapters\javadoc\com\lightstreamer\adapters\metadata\LiteralBasedProvider.html