powered by Jive Software

How to access the embedded database from outside?

To automate user and group creation, we have to access the embedded database with our application. We will stop JM to avoid synchronization issues.

If not using a java application, can the database be accessed through ODBC? How (I really need some hints, or documentation)?

Thanks!

Not exactly what you asked for, but you could have a look at the user import/export plugin. ( http://www.jivesoftware.org/messenger/plugins/userimportexport/readme.html ). That’‘d work for any type of database you’'re using.

AFAIK there is no ODBC driver for HSQLDB. The closes you could come is a ODBC-JDBC bridge, but using those is usually not very pleasant (or stable. or fast…).

I wouldn’'t recommend it, but you can access the script file directly - HSQLdb ‘‘databases’’ basically consist of a series of SQL statements in the .script file (and, if it exists, the .log file).

You could just edit that file directly (take care - if a log file exists, it is executed after the .script file is read, so make sure you take that one into account as well.). It’'s a bit finicky, but I have done this on occasion.

All in all, I think the best way would be to write a server plugin. It’‘s really not difficult due to the nice API (and example source) that’‘s available. I’‘ve written a ‘‘remote register’’ plugin (to create users from a webpage, rather than from a chat client or from the admin interface), that might be part of what you’'re looking for? What version of the server are you using?

Regards,

Edwin

I’‘m now using 2.3.0 (still beta?) and I’'m keeping updating when bug fixes are announced.

We don’‘t need a remote registering really. It has to be automated because there’'s already 200 users that need to be set up (registered and put into the right shared groups).

Sure, I would be willing to write a plugin.

  • Could it be run on certain times (everyday at night)?

  • Can I trigger the plugin from outside?

  • Can a plugin safely mess with the database (no transaction or synchronization issues)?

  • What I’'d have to do is have the plugin read the data from somewhere else (like a text file, or even a dbase table (7) through the BDE)…

-> I’'d better start reading the API documentation it seems.

Thanks for the hints. Is there any documentation about the ODBC-JDBC bridge using hsql? I looked at their website, but I can’‘t find any info on that (that’'s why I started this thread)…

Message was edited by:

Op3racional

Hi!

I have used HSQLDB in few of my applications - this is nice portalble solution for demo systems. And it is very fast of course. To access the HSQL try using iSQL Viewer. Available on http://isqlviewer.com.

We don’'t need a remote registering really. It has to

be automated because there’'s already 200 users that

Well, I called it ‘‘remote register’’ because it allows you to register a user from a different machine, rather than on the machine where JiveMessenger is running. (’‘remote’’ to JiveMessenger) I implemented this as a simple servlet that can be called from another webpage, but you could easily do a post from a script, or even upload a file, and process that in the plugin.

The big advantage is that you would be using the ‘‘native’’ api of JiveMessenger, so you do not have to worry about caching/synchronization/transaction issues. etc.

Thanks for the hints. Is there any documentation

about the ODBC-JDBC bridge using hsql? I looked at

HSQL itself only does ‘‘straight’’ JDBC.You would need a third-party product - check Sun’‘s site, they probably have some info. - but I really don’'t recommend it…

Regards,

Edwin

Thanks clattuc!

I will look into plugins.