Hi baalbaki,
1) The adapter constructor is called in the initialization phase of the server, looking in the server log (lightstreamer.log) you attached the relevant log lines are:
01-Feb-22 17:46:51,352|DEBUG|L.i.subscriptions |main |Found Adapter Set MARKETDATASET
01-Feb-22 17:46:51,352|DEBUG|L.i.subscriptions |main |Initializing Adapters...
01-Feb-22 17:46:51,353|INFO |L.i.subscriptions |Init for MARKETDATASET |Loading Metadata Adapter for Adapter Set MARKETDATASET
01-Feb-22 17:46:51,354|DEBUG|L.i.subscriptions |Init for MARKETDATASET |Loading Metadata Adapter class com.lightstreamer.adapters.metadata.LiteralBasedProvider for MARKETDATASET
01-Feb-22 17:46:51,354|DEBUG|L.i.subscriptions |Init for MARKETDATASET |Loading Metadata Adapter MARKETDATASET from ClassLoader / sun.misc.Launcher$ExtClassLoader / sun.misc.Launcher$AppClassLoader / Adapters / MARKETDATASET Adapter Set
01-Feb-22 17:46:51,354|DEBUG|L.i.subscriptions |Init for MARKETDATASET |Adding class com.lightstreamer.adapters.metadata.LiteralBasedProvider from / sun.misc.Launcher$ExtClassLoader / sun.misc.Launcher$AppClassLoader / com.lightstreamer.l.b.a.aa / com.lightstreamer.l.b.a.aa for metadata adapter...
01-Feb-22 17:46:51,355|DEBUG|L.i.subscriptions |Init for MARKETDATASET |Class for metadata adapter successfully added.
01-Feb-22 17:46:51,355|DEBUG|L.i.subscriptions |Init for MARKETDATASET |Initializing Metadata Adapter for Adapter Set MARKETDATASET; class = com.lightstreamer.adapters.metadata.LiteralBasedProvider; params = {item_family_1=item.*, adapters_conf.id=MARKETDATASET, modes_for_item_family_1=MERGE}; dir = /export/tbricks/nbf_java/CandealSimulator/simulator/conf/../adapters/welcome_res
01-Feb-22 17:46:51,356|INFO |L.i.subscriptions |Init for MARKETDATASET |Finished loading Metadata Adapter for Adapter Set MARKETDATASET
01-Feb-22 17:46:51,356|INFO |L.i.subscriptions |MARKETDATASET.MARKETDATASET|Loading Data Adapter MARKETDATASET.MARKETDATASET
01-Feb-22 17:46:51,356|DEBUG|L.i.subscriptions |MARKETDATASET.MARKETDATASET|Loading Data Adapter class main.java.com.lightstreamer.adapters.MarketDataSetAdapter for MARKETDATASET
01-Feb-22 17:46:51,356|DEBUG|L.i.subscriptions |MARKETDATASET.MARKETDATASET|Loading Data Adapter MARKETDATASET from ClassLoader / sun.misc.Launcher$ExtClassLoader / sun.misc.Launcher$AppClassLoader / Adapters / MARKETDATASET Adapter Set
01-Feb-22 17:46:51,356|DEBUG|L.i.subscriptions |MARKETDATASET.MARKETDATASET|Adding class main.java.com.lightstreamer.adapters.MarketDataSetAdapter from / sun.misc.Launcher$ExtClassLoader / sun.misc.Launcher$AppClassLoader / com.lightstreamer.l.b.a.aa / com.lightstreamer.l.b.a.aa for data adapter...
01-Feb-22 17:46:51,357|DEBUG|L.i.subscriptions |MARKETDATASET.MARKETDATASET|Class for data adapter successfully added.
[B]01-Feb-22 17:46:51,531|DEBUG|L.i.subscriptions |MARKETDATASET.MARKETDATASET|Initializing Data Adapter MARKETDATASET.MARKETDATASET; class = main.java.com.lightstreamer.adapters.MarketDataSetAdapter; params = {data_provider.name=MARKETDATASET, adapters_conf.id=MARKETDATASET}; dir = /export/tbricks/nbf_java/CandealSimulator/simulator/conf/../adapters/welcome_res/MarketDataSetAdapter[/B]
01-Feb-22 17:46:51,531|INFO |L.i.subscriptions |MARKETDATASET.MARKETDATASET|Finished loading Data Adapter MARKETDATASET.MARKETDATASET
So your class main.java.com.lightstreamer.adapters.MarketDataSetAdapter seems properly instantiated.So your class main.java.com.lightstreamer.adapters.MarketDataSetAdapter seems properly instantiated.
From your log I understand that you use Log4j2 for the adapter log, in that case the log configuration should be provided in a file with name log4j2.xml in the classpath.
Please consider as a reference the file log4j2.xml in the classes folder of the deploy.zip of this example (
https://github.com/Lightstreamer/Lightstreamer-example-StockList-adapter-java/releases/tag/new_deploy).
After you will get the log of your adapter we will be able to understand what is wrong with the constructor code.
2) The subscription request specifies the STATICDATA_ADAPTER Data Adapter that is non deployed based on the adapters.xml attached.
/lightstreamer/control.txt --> LS_mode=MERGE&LS_session=Sf8349f30dd39d043M777T4736262&LS_Snapshot=true&LS_id=SecSubType&LS_schema=SecurityTypeList&LS_data_adapter=STATICDATA_ADAPTER&LS_table=1&LS_op=add on "Lightstreamer HTTP Server" from 127.0.0.1:35158
3) No, the <adapters_conf id=" ... "> must be unique within the adapters.xml file as it represents the identification of the Adapter Set.
An Adapter Set is made up of a Metadata Adapter and one or multiple Data Adapters (Data Provider and Data Adapter are synonymous).
The Adapter Set is defined in the adapters.xml configuration file and in particular the Metadata Adapter in the <metadata_provider> section.
And the Data Adapters each in its own section <data_provider name=" ... ">.
You can also have several Adapters Sets deployed on the same Lightstreamer server, but you need to provide different adapters.xml in different sub-folders of <LS_HOME>/adapters/.
Regards,
Giuseppe