Results 1 to 10 of 14

Hybrid View

  1. #1
    Senior Member
    Join Date
    Oct 2009
    Location
    cbba
    Posts
    33

    problems: DB connection,parameters,groups

    hi all, i test lightstreamer moderato on my localhost (win xp). i run the Hello World sample this work well.

    from this example the following problems arise:
    1.- i modified the code to make connection with the Data Base DB (mysql). When i do the debug the code (on eclipse) all works fine, i get info from the DB, but when i run this on a browser, i don't get any result the page gets the first messages "loading..." all the time.
    i use "mysql-connector-java-5.1.7-bin" to connect to the DB and i add this to the class path of the sistem. What is the problem??? i need to know if the solutions works on linux centos.

    2.- how can i send parameters from the browser?? the idea is to send the user name to obtain data associated with that user. Do they have an example on this? where can i get information about this?

    3.- the last questions is, how can i do to push data to a specific group of users??

    thanks for your help.
    pd. sorry for my english.
    NaiTsiR

  2. #2
    Senior Member
    Join Date
    Oct 2009
    Location
    cbba
    Posts
    33
    i again,

    about the first problem i see in the lightstreamer shell that the class can't found the driver to open a connection with the DB. i don't understand why this happend, because i add to the classpath the path of the jar file.

    i see is necessary to add the library into the LS server, i do some test to add the jar file in some folders and the problem is solved i add "mysql-connector-java-5.1.7-bin.jar" into /shared/lib/ folder and all works fine.

    about the other two questions, somebody can helpme??

    regards

  3. #3
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    hi,

    you could use the setUserName (and setPassword) method of the javascript libraries to identify your user. Such information is received by your metadata adapter in the notifyUser method.
    If the notifyUser method exits succesfully, ie the user is authenticated, (and the client subscribes to some item) you'll receive getItems calls that contain such user name. There you can customize the item names sent by the clients so that each user subscribes to a different item(s).

    I think that this answers both your questions, let me know if you have any doubt.

  4. #4
    Senior Member
    Join Date
    Oct 2009
    Location
    cbba
    Posts
    33
    Hi Mone,
    thanks for your answer, i try this today and keep you informed

    see you.

  5. #5
    Senior Member
    Join Date
    Oct 2009
    Location
    cbba
    Posts
    33
    hi Mone again

    i have a doubt, is there any way to send the username and password from apache server to lightstreamer server?? i don't like javascript working with importan data.
    perhaps a way to protect that informations is encrypted, but i would avoid manipulate it with javascript.

    see you

  6. #6
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,090
    You are not required to issue the apache credentials to Lightstreamer through javascript.

    See this FAQ for our guidelines.

  7. #7
    Senior Member
    Join Date
    Oct 2009
    Location
    cbba
    Posts
    33
    thanks for your reply,

    to see if i could understand, is possible to authenticate from my web server on lightstream server to obtain a session id, then my web server send this session id to the client (brower) and the client send the session id to lightstreamer server.

    is that correct??

    do they have a practical example of this??

    regards.

 

 

Similar Threads

  1. disconnection problems
    By magnum_rg in forum Client SDKs
    Replies: 5
    Last Post: August 12th, 2011, 10:43 AM
  2. Get data specific to each User by passing parameters
    By leonardodar in forum Adapter SDKs
    Replies: 3
    Last Post: March 16th, 2011, 10:45 AM
  3. Replies: 1
    Last Post: July 12th, 2010, 11:05 AM
  4. Replies: 5
    Last Post: September 8th, 2009, 04:07 PM
  5. Launching problems
    By mazgalici in forum General
    Replies: 1
    Last Post: June 27th, 2008, 10:30 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 02:52 PM.