Loading

Tag Archives: openjpa

OpenJPA, HSQLDB and proper shutdown

I’m starting to get tired of OpenJPA/HSQLDB setup that I’ve trying: it seems to give more problems than it solves. Now I discovered that the HSQL db wasn’t been properly shutdown and for reasons that I’m investigating, if the HSQL db is not propertly closed (SHUTDOWN command) it’s impossible to reopen it again. It [...]

OpenJPA: Generated SQL contains extra UPDATEs

I’m trying to use OpenJPA to insert some entries in the database and I’m getting a strange number of UPDATEs beside the INSERTs.
I isolated the problem to the following snippet of code

private void start() {
EntityManagerFactory emf = Persistence.createEntityManagerFactory("persistencexmltest1PU");
[...]

OpenJPA Enhancer Ant task in a Netbeans project

In the build.xml of the project (likely this will be a Java Class Library project), override -post-compile or -pre-jar and invoke <openjpac/>. You will need to add the build/classes and the openjpa jars to <taskdef/> and <openjpac/>. The <openjpac/> will enhance all classes mentioned in persistence.xml (which has to be in the classpath)

<?xml version="1.0" [...]