EclipseLink

EclipseLink Performance Summary

The following charts show the performance of EclipseLink (in green) relatively to other JPA/DBMS combinations (in gray).

Position #1 on the X-Axis (the fastest) is about 100 times faster than position #32 (the slowest).
In the chart below the Y-Axis represents result score (maximum 100) in logarithmic scale - higher is better:
JPA performance benchmark comparision Hibernate, EclipseLink, OpenJPA, DataNucleus, ObjectDB
In the chart below the Y-Axis represents result score (maximum 100) in linear scale - higher is better:
JPA performance benchmark comparision Hibernate, EclipseLink, OpenJPA, DataNucleus, ObjectDB


The configurations in which EclipseLink has been tested are listed in the following table:

 Database + JPA ProviderNormalized Score
100 - Best,  0 - Worst
Final Position
1 - Best,  32 - Worst
Failed Tests
1EclipseLink with H2 embedded16.43  (out of 32)2
2EclipseLink with HSQLDB embedded14.64  (out of 32)2
3EclipseLink with PostgreSQL server13.55  (out of 32)3
4EclipseLink with Derby embedded12.96  (out of 32)2
5EclipseLink with MySQL server6.117  (out of 32)2
6EclipseLink with Derby server5.421  (out of 32)2
7EclipseLink with H2 server3.326  (out of 32)2
8EclipseLink with SQLite embedded1.831  (out of 32)35

About EclipseLink

EclipseLink is a persistence framework that includes also object-relational mapping (ORM), based on Orcale's TopLink object-relational mapping product. EclipseLink is developed in the Eclipse organization. It is also the reference implementation of JPA 2.0.

EclipseLink is available as open source under the Eclipse Public License (EPL) and the Eclipse Distribution License (EDL).

In this benchmark EclipseLink 2.1.1 (which was released in 2010) has been tested.

EclipseLink Performance Tuning

The EclipseLink default configuration is generally optimized for high performance, and works very well also with no tuning.

To maximize performance we followed the Using EclipseLink JPA Extensions instructions:

  • The eclipselink.cache.size.default property was set to 5000 to support large transactions.
  • The eclipselink.flush-clear.cache property was set to Drop, which according to the instructions is "the fastest and uses the least memory".
  • Target databases have been defined using the eclipselink.target-database property.
  • The eclipselink.jdbc.native-sql property was set to true.
  • The eclipselink.jdbc.batch-writing property was set to Oracle-JDBC.
  • The eclipselink.jdbc.cache-statements property was set to true and the eclipselink.jdbc.cache-statements.size property was set to 100.
  • All the entity classes have been woven (enhanced) by running the tests with a Java Agent (javaagent:eclipselink.jar). Class enhancement time was completely excluded from the test time measurement.
  • Logging was disabled by setting the eclipselink.logging.level property to false.

Note: Database schema generation was completed before time measurement started.

Solved Problems and Issues

The stack traces below demonstrate some exceptions that have been thrown when using EclipseLink in previous runs of this benchmark and have been fixed by upgrading software and setting.

javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.1.v20100817-r8050): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: user lacks privilege or object not found: PERSON
Error Code: -5501
Call: INSERT INTO PERSON (ID, MIDDLENAME, LASTNAME, ZIP, PHONE, LASTLOGINDATE, STREET, STATE, LOGINCOUNT, CITY, COUNTRY, JOINDATE, EMAIL, BIRTHDATE, FIRSTNAME) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
	bind => [1, CIPUPKQIKER, QGSHJQRJRQY, 708733964, 134036188972027, 1983-01-05, NYMIGRADOXLQ, ZT, 94, QEJSJKOIVRYODJXSU, KTJPTPAIWD, 1950-03-07, QXRE@EFM.YI, 1947-10-31, SLCIBTPWESS]
Query: InsertObjectQuery(SLCIBTPWESS CIPUPKQIKER QGSHJQRJRQY)
	at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:102)
	at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:63)
	at org.jpab.Test.persist(Test.java:216)
	at org.jpab.Test.persist(Test.java:199)
	at org.jpab.Runner$PersistAction.run0(Runner.java:528)
	at org.jpab.Runner$TestAction.run(Runner.java:507)
	at java.lang.Thread.run(Thread.java:619)
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.1.v20100817-r8050): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: user lacks privilege or object not found: PERSON
Error Code: -5501
Call: INSERT INTO PERSON (ID, MIDDLENAME, LASTNAME, ZIP, PHONE, LASTLOGINDATE, STREET, STATE, LOGINCOUNT, CITY, COUNTRY, JOINDATE, EMAIL, BIRTHDATE, FIRSTNAME) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
	bind => [1, CIPUPKQIKER, QGSHJQRJRQY, 708733964, 134036188972027, 1983-01-05, NYMIGRADOXLQ, ZT, 94, QEJSJKOIVRYODJXSU, KTJPTPAIWD, 1950-03-07, QXRE@EFM.YI, 1947-10-31, SLCIBTPWESS]
Query: InsertObjectQuery(SLCIBTPWESS CIPUPKQIKER QGSHJQRJRQY)
	at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:683)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:526)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeCall(AbstractSession.java:980)
	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:206)
	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:192)
	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.insertObject(DatasourceCallQueryMechanism.java:341)
	at org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:162)
	at org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:177)
	at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:465)
	at org.eclipse.persistence.queries.InsertObjectQuery.executeCommit(InsertObjectQuery.java:80)
	at org.eclipse.persistence.queries.InsertObjectQuery.executeCommitWithChangeSet(InsertObjectQuery.java:90)
	at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:290)
	at org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58)
	at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:736)
	at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:643)
	at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:108)
	at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:85)
	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2909)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1291)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1273)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1233)
	at org.eclipse.persistence.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:224)
	at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:123)
	at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:3348)
	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1422)
	at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:546)
	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1527)
	at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:200)
	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:1148)
	at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:84)
	... 6 more
Caused by: java.sql.SQLException: user lacks privilege or object not found: PERSON
	at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
	at org.hsqldb.jdbc.JDBCPreparedStatement.(Unknown Source)
	at org.hsqldb.jdbc.JDBCConnection.prepareStatement(Unknown Source)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1401)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1350)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:652)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:576)
	... 35 more
Caused by: org.hsqldb.HsqlException: user lacks privilege or object not found: PERSON
	at org.hsqldb.error.Error.error(Unknown Source)
	at org.hsqldb.SchemaManager.getTable(Unknown Source)
	at org.hsqldb.ParserDQL.readTableName(Unknown Source)
	at org.hsqldb.ParserDML.compileInsertStatement(Unknown Source)
	at org.hsqldb.ParserCommand.compilePart(Unknown Source)
	at org.hsqldb.ParserCommand.compileStatement(Unknown Source)
	at org.hsqldb.Session.compileStatement(Unknown Source)
	at org.hsqldb.StatementManager.compile(Unknown Source)
	at org.hsqldb.Session.execute(Unknown Source)
	... 41 more