Migration to JPA: experts wanted
Matt Ryall, Confluence Developer talks about ConfluenceMarch 27, 2007
In the Confluence team, we're investigating an upgrade of our data access layer of Hibernate 2 with Spring 1.1 to a shiny new OpenJPA and Spring 2.0 implementation.
If you have experience with a migration of a large enterprise application from Hibernate to OpenJPA or another JPA implementation, please get in touch. We're looking for experts in these technologies who could help us in a migration, probably through a short-term contract.
The areas of interest for Confluence specifically are: session-in-view pattern for transaction management, schema creation and upgrades, using Tangosol caches for query and second-level caches, in-application connection pooling, and runtime configuration of data sources.


12 Comment(s)
Why do you want migrate to OpenJPA?
Migrating to Hibernate 3.x would be way easier.
By Alex Panchenko at March 27, 2007 3:59 AM
Any chance that while you're at it, you could fix the bug http://jira.atlassian.com/browse/CONF-7303 so that organizations with more than a few users could use Confluence without continuous crashes and busylooping? I mean, going to get every single user from the database one at a time just to make a few comparisons you could make in the SELECT doesn't seem like an obvious choice.
By Mikael Gueck at March 27, 2007 4:31 AM
Just curious - can you share your thinking behind the decision to use OpenJPA ahead of Hibernate 3 with JPA annotations? Thanks - ct
By ct at March 27, 2007 6:20 AM
Hi Matt,
Atlassian is one of the company I look highly upon. If they are evaluating to switch from Hibernate to say JPA, there must be some pretty substaintial reasons. Do you mind sharing it? :-)
Cheers
By tmjee at March 27, 2007 8:05 AM
We've actually been pretty happy with Hibernate, in general. We're investigating a switch not for technical reasons, but for legal ones. Hibernate's LGPL license is becoming an issue for some of our customers, and so we're investigating our options. (That also explains why HIbernate3 won't solve our problems.)
By Jonathan Nolen at March 27, 2007 2:04 PM
Thanks for the responses.
Part of the reason behind the move is to avoid code licensed under the LGPL. I can't explain the exact issues with the LGPL (because I actually don't understand them), but it's based on legal advice related to redistribution of LGPL code. Hibernate 3 is still LGPL, so using it doesn't fix that problem. That's a shame, because by reputation it's a fairly good JPA implementation and an easy upgrade path from Hibernate 2.
@Mikael: Unfortunately, the solution isn't as easy as you describe because Confluence supports many different user management systems. If you're experiencing crashes and severe performance problems, please raise a support request, and we'll see what we can do until that bug is fixed.
By Matt Ryall at March 27, 2007 2:15 PM
We are using hibernate 3 with mostly JPA annotations. The only place we are forced to use hibernate annotations is when specifying cascade-delete-orphan which JPA doesnt seem to explicitly state in its CascadeType
By sreeni ananth at March 28, 2007 3:26 AM
Cripes, remind me not to upgrade to that version!
I think it would be a big shame to destroy the relative stability of confluence by a big architectural change for the sake of legalese.
Do it on a long lived branch, so that those of us who don't care about it can keep getting new features without the big risk of new defects that the move will undoubtably cause.
By Jon Nermut at March 28, 2007 3:55 AM
Thanks for the comments.
Jon, if we go ahead with this, we'll definitely be working out the least disruptive way to implement it, keeping in mind all our existing customers. A branch is one option, absolutely.
By Matt Ryall at March 28, 2007 4:43 PM
Mikael - The bug you mentioned ( http://jira.atlassian.com/browse/CONF-7303 ) has a fix already available. Migrating to Atlassian user will avoid the slow search problem. As Matt mentioned, if your Confluence instance is unstable, please have it examined via a support request.
By Anonymous at March 28, 2007 5:36 PM
Theoretically, it should be possible to implement such an effort in a way that allows the end-user to select between the various JPA implementations supported by Confluence.
By Patrick Linskey at April 18, 2007 11:20 AM
Theoretically, yes. Practically no. There are certain things we need that are not included in the JPA standard, such as schema migration. These will require implementation-specific code.
By Charles Miller at April 18, 2007 6:13 PM