Jump to Navigation

toplink

Toplink and Hibernate differences prt2

Toplink is real sucky. This works in Hibernate but throws an error in Toplink.

"Select s from SalesOrder s where s.status.code not like 'Unconfirmed' and ( s.id in (714,653,-1))"

The error thrown is really stupid. 

" expecting RIGHT_ROUND_BRACKET, found 'in'

Toplink has some way to go to catch up to hibernate.

Toplink and JNDI configuration on Glassfish and Tomcat

JNDI setup and configuration is one of those parts of java where the differences between container implementations are just enough to be a barrier to porting your application to a different server. This combined with the incompatibilities with JPA between implementations can lead to vendor or stack lock-in, hopefully this get better with the next release of JPA.

One of the issues with JPA is using JNDI datasources for your persistenceContext.

Glassfish JNDI setup and persistence.xml

Glassfish does not require any special handlng for its JNDI entry.

Java: 

Differences between Hibernate JPA and Toplink JPA

On one of our projects we decided to switch JPA providers from Hibernate to Toplink. The main reason for this was that Hibernate depends on so many core open source libraries that other open source projects also use, that there are all kinds of version problems when the application is deployed in a JEE container, such as Tomcat or Glassfish, that uses different versions internally. Basically jar hell with all kinds of issues with classloaders loading the wrong version of the jar.

Subscribe to RSS - toplink


by Dr. Radut.