So, I want to share my experience and compare EclipseLink and Hibernate. Comparison EclipseLink and Hibernate as ORM framweworks for Oracle
Well, I don't like ORM in general, but it often required by management or so on... and in this case, if you have vendor lock in, and this vendor is Oracle, you have to think about EclipseLink as a perfect alternative to Hibernate.
EclipseLinks is beter because... It's choosend by Sun Microsystems as standard JPA 2 implementation. It's a better support, bugs are fixed much more quickly; let's look at statistic (as for July 26, 2011):
|Name||Number of bugs||Number of blockers||The oldest blocker|
It's Oracle-oriented additions which are incredible useful if you create Oracle oriented s/w and want to have all power of oracle in your orm.
The most important Oracle features in EclipseLink are:
1) Built-in Oracle hints support
Hints are important for sql optimization in Oracle and with EclipseLink you can add them through API. Also, EclipseLink will be automatically insert Hints if needs and their usage is clear for orm
2) Hierarchical Queries Support
PL/SQL has a useful featurs as Hierarchical Queries which can help you a lot if you work with hierarchical structures intensive. So, you don't need to write native sql anymore, just use API
3) Oracle Flashback Transaction Query
Historical queries during transaction available just from ORM
4) Stored Procedures/Functions Support
Well, Hibernate/JPA also have it. However, in EclipseLink you can use another way (JPA way is still available) with StoredFunctionCall class and related API. In others words, you can build stored procedure/function dynamical invocation. I guess, it is the easiest way to call SP from your java code
Next cool feature is Report Queries that means you can build queries with "reporting" possibilities (AVG, SUM, ROLL UP) with API instead of writing native SQL.
Summarize topic, I can recommend EclipseLink as a perfect ORM for Oracle lock-in project, because a lot of features will be available in this case. However you must keep in mind Hibernate has a lot of own features (versioning, shards, search, etc) and you must to think about your project requirements and pick up the most convenience tool.