-
May 19th, 2023, 09:45 AM
#3
Hi Vinayak Singh,
For such a simple example like HelloWorld, the configuration file of the AdapterSet is equally simple, and you can find it described here: https://github.com/Lightstreamer/Lig...-configuration
In fact, the adapters.xml file can be completely identical to the one from the Java project from which the above extension is derived.
But please let me to add two considerations.
The first one is that one (and only one) Metadata Adapter is mandatory for each Adapter Set. In fact, every client request, whether it's for opening a client session, subscribing or unsubscribing to items, or sending messages, is subject to authentication and/or authorization by the Metadata Adapter.
For this reason, in order to make examples like this one simpler, we have developed a simple full implementation of Metadata Adapter in Java, LiteralBasedProvider, made available as sample for inspiration and/or extension and enbedded in the Lightstreamer Java Adapter libraries.
Please refer here for more details: https://github.com/Lightstreamer/Lig...tadata-adapter
The second one is that since this example adds a connection to the database from which to retrieve messages to send to clients, it would be a natural extension to add configurations to avoid hardcoding all the parameters of the database connection string in the code.
For example you could add to the <data_provider> section something like these:
<param name="db_hostname">localhost</param>
<param name="db_user">root</param>
<param name="db_password">xxx</param>
<param name="jdbc_driver">com.mysql.jdbc.Driver</param>
And any other parameter that you deem necessary, such as table names or column names, etc.
Regards,
Giuseppe
Similar Threads
-
By zschmidt in forum Adapter SDKs
Replies: 2
Last Post: April 30th, 2014, 04:14 PM
-
By V S Suresh in forum Adapter SDKs
Replies: 2
Last Post: October 25th, 2012, 08:11 AM
-
By Alessandro in forum Adapter SDKs
Replies: 4
Last Post: October 24th, 2011, 09:33 AM
-
By k.mcc2009 in forum Adapter SDKs
Replies: 1
Last Post: May 21st, 2009, 09:41 AM
-
By khalil78 in forum Adapter SDKs
Replies: 2
Last Post: April 22nd, 2008, 11:46 AM
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 01:38 AM.
Bookmarks