opened
slarson
username_0
We are doing the DataNucleus enhancement during build and for some reason it is not happening during every build; leaving the possibility in the eclipse setup case that the virgo server gets a version of the persistence bundle that can connect to the DB but not actually execute queries, and raising no exceptions.

Instead, it is possible to do the enhancement programmatically (see [this page](http://www.datanucleus.org/products/datanucleus/jdo/enhancer.html), "Programmatic API"):

```
import javax.jdo.JDOEnhancer;

JDOEnhancer enhancer = JDOHelper.getEnhancer();
enhancer.setVerbose(true);
enhancer.addPersistenceUnit("MyPersistenceUnit");
enhancer.enhance();
```

If this were done, it would be possible to catch any exceptions from `enhancer.enhance()` if the process failed, and it would be very hard for the virgo server to get out of sync because there would not be a separate build step that could produce non-enhanced classes.

This is most likely the cause of #28 .
Do DataNucleus enhancement programmatically at bundle startup
issue