Simple-JNDI 0.11
August 21st, 2005 by HenThe last week has seen me diving back into the Simple-JNDI codebase.
The last chapter ended, post the release of the 0.9.1 bugfix, with the sinking realization that the Simple-JNDI codebase had finally gone as far as it could. I’d reached the point where I was making changes and hoping, rather than knowing. In short, the code was in control. A lot of this was due to the design decision to have a Context object that facaded onto the file-system.
Fortunately, the cavalry had quietly arrived and was already working to solve the problems for me. Robert Zigweid had looked at the PropertiesContext and created a separate in-memory Context, that was a lot cleaner and more importantly, did the job. By focusing on a smaller goal, he was able to support things that were an utter bitch to support in my code; most notably the important idea of being able to get a Context object out. Previously simple-jndi had only allowed leafs to be accessed, not branches.
As a complete in-memory implementation was waved under my nose repeatedly, the new simple-jndi design began to creep its way out of my sub-concious and onto my tongue. No one was listening, but that’s what you get for explaining a design to a 3 month old. Simple-JNDI-2 would be two components, an in-memory JNDI implementation and a piece of code for loading a file-system database into any JNDI implementation.
Given that we were only on 0.9, planning a 2.0 felt a bit weird. I quickly tagged and internally released a 0.10 so other projects could depend on the highly convoluted and increasingly painful latest code, then got to work. If ‘got to work’ can mean ‘lost enthusiasm to code anything’.
However, that has now passed, the late nights are being put in and Simple-JNDI 0.11 is surprisingly close. The TODO list is:
- Test two new ideas for solving the Windows can’t have : in a filename pain.
- Test System properties correctly override jndi.properties
- Convince Eric Alexander to port XmlProperties from gj-xml to DOM
- Write user-guide
The last one might sound worryingly large, but on the road to recovery a week or so ago I spent about a days worth of time writing a scraping-engine user-guide with good results, so know how I want to do it etc.
Two features have been lost. Firstly, only files from the file system are loaded currently. Classpath and URL lookup currently are not implemented, but a later release should replace those features; hopefully in addition to a lookup-plugin system. Secondly, files are no longer live. Change a file and you’ll have to restart the application. I could see that returning with the classpath/url return.
I’m very hopeful.
