How to Use JPOX in NetBeans 4.0

JPOX is the most popular implementation of the JDO specifications. However, the downside of using JPOX for object-relational mapping is the need to enhance classes after they have been compiled. Thankfully, developers can take advantage of the Ant-based nature of NetBeans projects to automate this task. Here, I show you how to do this.

First, download JPOX Core and JPOX Enhancer.

Next, copy JPOX Enhancer and its dependencies to a folder of your choice, and copy JPOX Core to the library folder within your NetBeans project (which is usually /lib).

Last, override the -pre-dist target in build.xml with the JDO enhancement task. This instructs Ant to enhance the compiled classes before packaging the project.

Once this is done, the meta-data for the object-relational mapping of your classes can be modified at will, and the next time the project is built, the compiled classes will automatically be enhanced.

Technorati Tags:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: