Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Anyone using HSQLDB embedded in a plugin? How would I initialize it?

Jim Bethancourt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 6, 2012

We're currently pulling data from our LDAP server to populate our People Directory with information from LDAP. We're caching some of the critical data, but if no users have used the People Directory in a while, the cache expires and then the LDAP server gets hammered rather suddenly.

I noticed that Confluence ships with HSQLDB, and I'd like to be able to use it to store the LDAP data in / on our Confluence instance (refreshing it periodically using a Job) to prevent round trips and excessive load on our LDAP server. I'm particularly interested because the ActiveObjects plugin isn't yet ready for primetime, and this seems like it could be a viable option.

Has anyone used HSQLDB as an embedded database for their plugin? I'm thinking I'd need to hook into the plugin lifecycle to initialize it using the Lifecycle Module type (or more likely make it State Aware), but I'd appreciate an outside opinion.

Any tips / hints / warnings would be welcomed as well.

Thanks,

Jim

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Brendan Patterson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 6, 2012

Hi Jim,

I've used the HSQL DB quite a bit in the past (though not launched from an individual plugin) and it certainly could be a viable option, but I think you'd be better served by ActiveObjects. A.O. might not be officially released yet but does have Atlassian's backing and some degree of support. Technically HSQL is not really prime time either and can/does get corrupted - relatively rare but does definitely happen.

The other option that I think would solve your issue pretty much instantly and probably more reliably would be to insert Crowd in the middle - point Confluence to Crowd and Crowd to your LDAP server. I don't know what size licenses you're dealing with but I think the cost of Crowd factored over the long term, custome devel, upgrading this new customization to work with Confluence updates, etc, will probably ultimately be a cheaper solution.

Crowd now does incremental synchronizations among other more advanced things.

Hope that helps.

Brendan

Jim Bethancourt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 6, 2012

Hi Brendan,

Thanks for the fast response and the skinny on HSQL DB! We already have a Crowd unlimited user license, and we'd go against that, but it looks like only a limited set of LDAP attributes are being imported into Crowd, and we need more than what's there right now. I think I will continue to investigate the HSQLDB solution, at least at this time.

Thanks,

Jim

Brendan Patterson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 7, 2012

Ah very good. I didn't realize that about extra attributes from LDAP.

Well as a cheap work around you could write a plugin containting a trigger and job modules (basically a cron job) and then just periodically have it open a URL connection.

Or if the server is unix/linux something use a cronjob + curl to ping that url. you can create a dummy user and pass in the params ?os_username=dummy&os_password=pass to bypass the login screen.

That way the cache presumably wouldn't expire or at least a user wouldn't be the one experiencing the slowdown...it would be the cron job.

OK that's a left field solution which also doesn't really answer your question so I'll be quiet now :)

Jim Bethancourt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 12, 2012

Thanks for the suggestion! I was already planning on running a Confluence job to update the database periodically. I'll have to experiment around a bit to see what makes the most sense.

Jim

TAGS
AUG Leaders

Atlassian Community Events