Archive for June, 2009

Customizing Spring Security with Legacy Transactions and Authorization

A few months ago at work I got stuck with a rather daunting assignment: to make Spring Security work alongside our legacy security model.

The rationale was sound. We have a legacy UI and we want a smooth transition to the new one. Which means that as much of their information, including their credentials need to carry over. Furthermore, our application runs load-balanced in the production environment and we can’t make use of sticky sessions. Which means that the solution needs to integrate with our database-backed sessions. If that was not complicated enough, there was also a lot of hidden authorization code that relied on specific properties being set in ThreadLocal.

After a few months of trial and error, I think I finally have a solution that both works and doesn’t lock the database. There are quite a few steps and the process is somewhat lengthy. For that reason, the rest of this tutorial is under the fold.
Read more

  • Share/Bookmark

Hiking in Fort Mountain

Sonali and I haven’t been to North Georgia in forever so we decided to brave the heat and head some place new. When we lived in Alpharetta, we frequented the Northeast side of our state a lot. Lately we’ve been trying to see what’s there on the Eastern parts.

Fort Mountain has a lot of trails, but most of them seem somewhat unused and infrequently traveled. We traveled on portions of the Guhati Trail, which is an 8.2 mile loop. The trail was well marked, but could have used a little more attention. There were lengthy sections that were nearly overgrown and more than a few trees blocking the path.

The trail also didn’t seem that popular, we didn’t see another soul while walking. We ended up taking the main road back instead of walking back down the trail to make up some time.

Powered by Flickr Gallery
  • Share/Bookmark

Colorbox: A customizable JQuery Lightbox

As soon as someone mentions Web 2.0, you know that you’re going to need a modal dialog. If a designer is involved, then you know that it’s going to have to look nothing like any of the standard lightbox clones.

The de-facto standard for modal dialogs with JQuery is Thickbox. However, if anything above sounds familiar, I recommend giving Colobox a try.

Colorbox is missing a few features of Thickbox. The Colorbox does not resize automatically and doesn’t change position on screen when the user-resizes their page. However, that wasn’t a big issue for my needs, since users probably couldn’t use the app unless they had maximized their browser anyway.

Where the developer of colorbox focused his time is allowing the developer using Colorbox to customize it however they want. Take a look at the css. Every element that you need to change has an ID and represented in the file.

One missing feature that would be nice to have is the ability to add custom buttons. In the app I’m building, I had to manually add them into the JS file. Which wasn’t hard, but it breaks the ability to upgrade.

However, the most important thing is the ability to make the product fit the design and colorbox does deliver on that.

  • Share/Bookmark
Return top

About

This is my blog about programming. For random stuff, checkout my Twitter or Tumblr