-
October 5th, 2009, 05:16 PM
#1
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
-
October 5th, 2009, 09:14 PM
#2
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
-
October 6th, 2009, 09:34 AM
#3
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.
-
October 6th, 2009, 01:38 PM
#4
Hi Mone,
thanks for your answer, i try this today and keep you informed
see you.
-
October 6th, 2009, 02:59 PM
#5
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
-
October 7th, 2009, 11:14 AM
#6
You are not required to issue the apache credentials to Lightstreamer through javascript.
See this FAQ for our guidelines.
-
October 7th, 2009, 04:24 PM
#7
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.
-
October 8th, 2009, 11:02 AM
#8
Yes, I forgot to mention that the general concepts document,
that you can find in Lightstreamer package in DOCS-SDKs,
also covers this topic in paragraph 4.1.
It's not a practical example, but there is a diagram to illustrate the scenario.
I'm not sure we are saying the same thing.
The Web Server does not authenticate on Lightstreamer Server: it's the other way round.
The temporary session id supplied by the Web Server to the pages is visible and can be manipulated by javascript and sent to Lightstreamer Server as a username or password.
In order to validate it, the Metadata Adapter has to inquiry the Web Server.
-
October 8th, 2009, 01:53 PM
#9
thanks, i will review the documents that mention me, i have a few doubt about this, i'll see if i can solve and they discussed the results.
see you
-
October 8th, 2009, 11:42 PM
#10
i checked the documentation and i'm not happy to send the username and password via javascript
is there a way to protect this information? i thought about sending this information encrypted and decrypt this in the java adapter. but i prefer there is another safer way.
see you and thanks for your help.
Similar Threads
-
By magnum_rg in forum Client SDKs
Replies: 5
Last Post: August 12th, 2011, 09:43 AM
-
By leonardodar in forum Adapter SDKs
Replies: 3
Last Post: March 16th, 2011, 09:45 AM
-
By dalmy in forum Adapter SDKs
Replies: 1
Last Post: July 12th, 2010, 10:05 AM
-
By mnenchev in forum General
Replies: 5
Last Post: September 8th, 2009, 03:07 PM
-
By mazgalici in forum General
Replies: 1
Last Post: June 27th, 2008, 09:30 AM
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 05:51 AM.
Bookmarks