|
|
|
|
I bumped into this post from David dscribing his experiences migrating his app from JBoss 4.0.4-GA to GlassFish.
|
David covers 3 issues:
• JBoss EJBQL != GF (J2EE Spec) EJBQL
Beyond this, it was a successful experience; for details, check out David's writeup. And keep the migration stories going... |
Nice writeup. I myself have had some problems with JPQL variations between Hibernate and Toplink when migrating applications from JBoss to GlassFish. Especially with native queries using bind variables i.e:
--
Query query = em.createNativeQuery("select * from users where username = :username);
query.setParameter("username", "johndoe");
--
this works beautifully on Hibernate (as it should according to the JPA standard) but fails on Toplink.
Posted by Lars Tackmann on March 24, 2008 at 02:43 AM PDT #
Actually only positional parameters are portable in native queries in the JPA 1.0 Specification (Section 3.6.6). Using named parameters in native queries is undefined.
--Gordon
Posted by Gordon Yorke on March 24, 2008 at 07:05 PM PDT #
Thanks for clearing this up Gordon. And shame on me for not reading the specification. Bill Burkes excellent EJB3 book (http://www.amazon.com/Enterprise-JavaBeans-3-0-Bill-Burke/dp/059600978X)
section 9.3 let me to belive that this was indeed a part of the standard.
Any chance that this will be a part of JPA 2.0 ?
Posted by Lars Tackmann on March 25, 2008 at 01:54 AM PDT #