Around 3 months ago Todd Sharp blogged about on-the-fly class loading and persistence with db4o for ColdFusion in his <cfsilence> blog.
The blog post has generated a plethora of comments and is still active with people asking to see the source code. According to Todd his framework does the following:
- Compiles a directory of '.java' source files (and subdirectories) into a single JAR file
- Drops the JAR into a local 'lib' folder
- Loads the JAR (with Mark Mandel's JavaLoader)
- Loads db4o (an Object database)
Once all that is done (in onApplicationStart) the application can immediately do the following:
- Create an instance of any objects within the just compiled Java classes
- Set properties on that class
- Persist the object into db4o
Maybe we can all convince Todd to release the source code =) If you ask me I would love to take look at it!