Author: techfox9

JBoss vs WebLogic notes – persistence..

Friday, June 11th, 2010 @ 4:44 pm

In JBoss, this works:

List someBooks = em.createQuery("FROM Book b WHERE")
    .setParameter("name", "Sebastian").getResultList();

In WebLogic, I had to specify SELECTs:

List someBooks = em.createQuery("SELECT b FROM Book b WHERE")
    .setParameter("name", "Sebastian").getResultList();

If I have time, I will dig further and see why they behave differently but I suspect
that JBoss CMP is used automatically while in WebLogic, OpenJPA is used which
requires the “SELECT” syntax.

Good example on client transaction setup:

JBoss, Weblogic


Comments are closed.