Posts tagged 'hibernate'



Roller 5 and JBoss 6

JBoss logo In my quest to make Roller work on Java EE 6, the next server that I tackled was JBoss 6. In this blog I'll describe how I approached the problem what I learned along the way.

Tested with Hibernate JPA

Roller uses JPA for database storage and specifically the Apache OpenJPA implementation. I knew that JBoss uses the Hibernate JPA implementation and I suspected that there would be JPA portability problems, so I decided to run Roller's JUnit tests against Hibernate JPA. There were many test failures and fortunately, the failures were easy to fix.

[Read More]

Powered by Struts2 and OpenJPA

I stayed up a little too late last night upgrading this site (rollerweblogger.org) to the latest Roller 4.0 code base, which includes the new Struts2 based Admin UI and a new OpenJPA based back-end. No more Hibernate for me. The upgrade was a bit of a rocky road, but the site seems to be working OK now.


JPA JPA JPA

That's three JPAs. I've been fighting to get a new Roller back-end running, one that uses the Java Persistence API (JPA) rather than the native Hibernate API that we use now.

Craig Russell and Mitesh Meswani wrote the new JPA back-end and tested it against Toplink/JPA (JPA #1) and the Derby database. I've been refactoring it, updating it for Roller 4.0 and testing it against various other databases and JPA implementations with mixed results.

I tried to run it against MySQL, ran into a bunch of problems and fixed those. Allen switched out Toplink/JPA for Hibernate/JPA (JPA #2), ran into problems and fixed those. I switched out Toplink for Apache OpenJPA-incubating (JPA #3), ran into problems and fixed those. So now we have a back-end implementation that runs against OpenJPA, but requires two small code changes to work against Toplink -- not exactly an ideal situation.

I'm a JPA newbie for sure and still trying to figure this stuff out, but it does seem that switching JPA implementations is not as easy as it ought to be.

In other JPA news...

I didn't realize that the open source version of Toplink that Oracle contributed to Glassfish, Toplink Essentials, is the pee-wee version of the full and still closed source Toplink product. That's why I was somewhat surprised to hear that Oracle is open sourcing and donating the full version of Toplink to the Eclipse foundation.

Two observations about that news. First, this move appears to be a fork that will result in a CDDL licensed version of Toplink Essentials in Glassfish and an EPL version in Eclipse -- I hope I'm wrong about that. And second: apparently IBM will be soon be supporting two versions of JPA: OpenJPA via Geronimo and Toplink/JPA via Eclipse.