Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2012

    Let's understand Data Adapter

    I want to know steps to do chat like chat demo .
    When I compare it with Hello World tutorial I didn't find class files just jar file in lib folder .

    I can understand client side but server side is harder.

    After do client side then we must do data adapter,ok.

    Do I have to work DataAdapterand metadataAdapter for each application?
    what should I write in every one of them?
    what is important methods we must write it in each one?


    Sorry for my bad English.

  2. #2
    Join Date
    Jul 2006
    In general, you don't need to write a Metadata Adapter in order to run a simple demo, like the StockListDemo or the Hello World demo, as leaning on the LiteralBasedProvider is enough.
    The Metadata Adapter is needed only when the application involves more complex use cases, like:
    - user identification;
    - handling messages sent by the client.

    This is the case for the Chat Demo.
    User identification is needed to associate each client to an identity in the chat room;
    usually, user indentification involves the notifyUser method;
    we kept it simple and used notifyNewSession instead, which yields information on the client context that we could use to identify her (this also involves using notifySessionClose).
    Processing client-originated messages is obviously needed, in order to push them to all other clients in the chat room; this involves notifyUserMessage.

    The only other important method is modeMayBeAllowed;
    In the Chat Demo Metadata Adapter, we lean on the implementation in the base class (LiteralBasedProvider), which requires suitable configuration parameters (look for "item_family" in DOCS-SDKs\sdk_adapter_java\examples\Chat_Adapters\Deplo yment_LS\Chat\adapters.xml).

    All other methods of the Metadata Adapter deal with restrictions on what users can get and should be taken into consideration only for production deployment.

    On the Data Adapter side, all methods are important, as they deal with real-time update delivery.
    The Chat Demo has the further complication that the Metadata Adapter and the Data Adapter have to communicate to each other, because the real-time updates to be pushed are based on the client-originated messages.

    You can deploy the Adapters either as class files or as jars.

  3. #3
    Join Date
    Feb 2012
    Thanks for response

    Now its not bad but also not good

    I think make a some tutorials(step by step ) like Hello World will help us(I wish find book to learn this good service or viedo toturial

    ok, yesterday I try make jar file by eclips and after that when I try start server
    it give me error like this)

    23-Feb-12 16:59:29,187|INFO |LightstreamerLogger.license      |main                       |Checking license file: C:\Lightstreamer\conf\EtWXOcwHsB8VmYn8xEOdZ.lic
    23-Feb-12 16:59:30,765|INFO |LightstreamerLogger.license      |main                       |Starting MAC address check
    23-Feb-12 16:59:30,796|INFO |LightstreamerLogger.license      |main                       |Found MAC address 00:12:f0:d9:e0:a9
    23-Feb-12 16:59:30,796|INFO |LightstreamerLogger.license      |main                       |Found MAC address 00:c0:ca:30:14:6e
    23-Feb-12 16:59:30,796|INFO |LightstreamerLogger.license      |main                       |MAC address check successful
    23-Feb-12 16:59:30,796|INFO |LightstreamerLogger.license      |main                       |License correctly bound with the following parameter(s):
    23-Feb-12 16:59:30,796|INFO |LightstreamerLogger.license      |main                       |        Client ID       : EtWXOcwHsB8VmYn8xEOdZ
    23-Feb-12 16:59:30,796|INFO |LightstreamerLogger.license      |main                       |        Mac Address     : 00:c0:ca:30:14:6e
    23-Feb-12 16:59:30,796|INFO |LightstreamerLogger.init         |main                       |Lightstreamer Server starting in Moderato edition
    23-Feb-12 16:59:30,906|WARN |LightstreamerLogger.monitoring   |main                       |Only minimal JMX management support is available with the current license
    23-Feb-12 16:59:30,984|INFO |LightstreamerLogger.init         |main                       |Started JMXMP Connector for JMX on port 9999
    23-Feb-12 16:59:30,984|INFO |LightstreamerLogger.init         |main                       |SERVER pool size set by default at 10
    23-Feb-12 16:59:31,078|INFO |LightstreamerLogger.init         |Init for DEMO              |Loading Metadata Adapter DEMO
    23-Feb-12 16:59:31,093|INFO |LightstreamerLogger.init         |Init for DEMO.MONITOR      |Loading Data Adapter DEMO.MONITOR
    23-Feb-12 16:59:31,093|INFO |LightstreamerLogger.init         |Init for DEMO.QUOTE_ADAPTER|Loading Data Adapter DEMO.QUOTE_ADAPTER
    23-Feb-12 16:59:31,093|INFO |LightstreamerLogger.init         |Init for DEMO.CHAT_ROOM    |Loading Data Adapter DEMO.CHAT_ROOM
    23-Feb-12 16:59:31,093|INFO |LightstreamerLogger.init         | for DEMO.PORTFOLIO_ADAPTER|Loading Data Adapter DEMO.PORTFOLIO_ADAPTER
    23-Feb-12 16:59:31,109|ERROR|LightstreamerLogger.init         |Init for DEMO.CHAT_ROOM    |Data Adapter DEMO.CHAT_ROOM init error: java.lang.NoClassDefFoundError: org/apache/log4j/xml/DOMConfigurator
    23-Feb-12 16:59:31,187|ERROR|LightstreamerLogger.init         |main                       |Error while loading the Adapters: java.lang.Exception: Unexpected error in Data Adapters initialization
    23-Feb-12 16:59:31,187|ERROR|LightstreamerLogger.init         |main                       |Error while loading the Adapters: Unexpected error in Data Adapters initialization
    23-Feb-12 16:59:31,187|FATAL|LightstreamerLogger.init         |main                       |Adapters initialization failed
    23-Feb-12 16:59:31,187|INFO |LightstreamerLogger.init         |main                       |Exiting.....
    23-Feb-12 16:59:31,234|INFO |LightstreamerLogger.init         |Init for DEMO.QUOTE_ADAPTER|Finished loading Data Adapter DEMO.QUOTE_ADAPTER
    23-Feb-12 16:59:31,234|INFO |LightstreamerLogger.init         | for DEMO.PORTFOLIO_ADAPTER|Finished loading Data Adapter DEMO.PORTFOLIO_ADAPTER
    23-Feb-12 16:59:31,187|INFO |LightstreamerLogger.init         |Init for DEMO.MONITOR      |Finished loading Data Adapter DEMO.MONITOR
    23-Feb-12 16:59:31,187|INFO |LightstreamerLogger.init         |t for DEMO.SIMPLE_MESSENGER|Loading Data Adapter DEMO.SIMPLE_MESSENGER
    23-Feb-12 16:59:31,281|INFO |LightstreamerLogger.init         |Init for DEMO              |Finished loading Metadata Adapter DEMO
    23-Feb-12 16:59:31,281|INFO |LightstreamerLogger.init         |t for DEMO.SIMPLE_MESSENGER|Finished loading Data Adapter DEMO.SIMPLE_MESSENGER
    23-Feb-12 16:59:32,953|INFO |LightstreamerMonitorText         |Timer-0                    |Total threads = 22, Total heap = 64880640 (free = 55602976), Sessions = 0 (max = 0), New sessions = [+0, -0], Connections = 0 (max = 0), New connections = [+0, -0], In-pool threads = 10, Active threads = 0, Available threads = 10, Queued tasks = 0, Pool queue wait = 0, NIO write queue = 0, NIO write queue wait = 0, NIO active write selectors = 0, NIO total selectors = 0, Subscribed items = 0, Inbound throughput = 0 updates/s, (pre-filtered = 0), Outbound throughput = 0 updates/s, (0kbit/s, max = 0), Lost updates = 0 (total = 0), Total bytes sent = 0, Extra sleep = 0, Notify delay = 0
    before that it worked

    thanks again

  4. #4
    Join Date
    Feb 2012

    I found the problem.
    I was copy LS_chat_data_adapter.jar and LS_chat_metadata_adapter.jar then post it to my java folder (C:\Program Files\Java\jre6\lib\ext)

    because that I had that problem and when I delete it from there the server work now.

    I wish see tutorial like step by step to let me start use this great project




Similar Threads

  1. JDBC Data Adapter [Java]
    By Alessandro in forum Adapter SDKs
    Replies: 0
    Last Post: January 27th, 2012, 03:56 PM
  2. Replies: 4
    Last Post: October 24th, 2011, 09:33 AM
  3. Error in Data Adapter
    By wwatts in forum Adapter SDKs
    Replies: 1
    Last Post: July 9th, 2009, 08:38 AM
  4. Tibco Rv data adapter
    By ericrosevear in forum General
    Replies: 3
    Last Post: June 18th, 2008, 10:41 AM
  5. INTERACTIONDEMO Data Adapter?
    By naxelrod in forum General
    Replies: 1
    Last Post: October 16th, 2007, 05:42 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 09:41 AM.