Mine is similar to frankthedm's: In a prison built to hold undead, have the doors powered by negative energy. They get stronger the more the wraith/spectre/vampire whatever tries to open them, but a burst of positive energy unlocks them, either temporarily or permanently (depending on the roll). To open more secure locks you need to get a higher roll, of course. The most secure area requires a hefty "destroy" attempt. Either a Sun domain usage, or an epic cleric. The doors can be broken down, of course (durn adamantine weapons!) but I have the negative energy soften any weapons used against them.
The nice thing about all this is that it makes PCs use up turn attempts as they negotiate the prison. Which makes fewer turn attempts to deal with the undead prisoners they release.