Transparent Activation/Transparent Persistence (TA/TP) significantly simplifies handling of deep object graphs in db4o based applications. The flip side is that this mechanism requires your persistent domain classes to provide appropriate API hooks. These hooks can be implemented manually, alternatively the tedious task of generating this boilerplate code can be delegated to the db4o bytecode instrumentation framework. So far there have been two options to trigger instrumentation: Programmatically, or through a custom Ant task. Now there is a third option, if you happen to be developing with Eclipse: Install the db4o instrumentation plugin and have your classes instrumented in-place and on-the-fly, taking advantage of Eclipse's incremental building features.This project is still in its early incubation phase - we're counting on your feedback to get everything right before we elevate it to official distribution. Until then, you can grab the latest state from the update site located within the svn project:http://source.db4o.com/db4o/trunk/db4oplugin/db4oplugin/update-site
Note that this plugin requires Eclipse version 3.4.0 or later.
After installing the plugin, you will find a new context menu entry for Java projects, offering to add a db4o nature. This nature will install an instrumentation builder that gets triggered by all changes to .class files. A custom project properties page will allow you to specify which classes you want to instrument, based on a combination of package selection and regular expressions matching fully qualified class names. There is a (rudimentary) custom log view to keep you informed about all instrumentation activities. More detailed information is provided in the Eclipse integrated help included with the plugin.
[ImageAttachment]
This project is work in progress. We recommend to NOT use it in a production environment at this point in time, but we'd like to encourage you to try it and share bug reports, feature requests and other suggestions for improvement in the developer forum.The next missing major feature probably is support for instrumentation of jar files. (Currently the builder only handles raw class files.) This is already covered by the instrumentation core framework, so the plugin implementation main concern is what a decent UI for this feature should look like. For further pending tasks/issues, see the todo list in the project and our issue tracker (related tasks are tagged 'eclipse_plugin'). Any feedback is welcome.
If you feel adventurous enough to take a stab at the source code, note that the plugin is written in Scala, so you'll probably want to install the Scala plugin before checking out the project. (If you've ever considered doing an Eclipse plugin with Scala, just give it a try, Scala blends in surprising well with PDE development.)