studying/testing Sun's Java Blueprint's Java Petstore 2EA5 version from
https://blueprints.dev.java.net/servlets/ProjectDocumentList?folderID=5315&expandFolder=5315&folderID=0
<
https://blueprints.dev.java.net/servlets/ProjectDocumentList?folderID=5315&expandFolder=5315&folderID=0>
The program/webapp works fine on gfv2ur2 using Toplink JPA, but get
exceptions on gfv301 using
Toplink or Eclipselink2.0 JPA.
the following code fragment from CatalogFacade.java, method AddItem,
utx.begin();
em.joinTransaction();
...
em.persist(item);
System.out.println("contains item : " + em.contains(item)); -- always FALSE
System.out.println("itemId : " + item.getItemID()); -- always NULL
for both gfv2ur2 and gfv301,
but later in the code the fragment,
utx.commit();
System.out.println("contains item : " + em.contains(item)); -- always FALSE
System.out.println("itemId : " + item.getItemID()); -- always NULL for
gfv301, returns a valid PKey on gfv2ur2
The "null" for the PKey on gfv301 means the PKey field is null in item,
and results in exceptions later in the application.
can someone explain WHY em.contains(item) would always return FALSE on
glassfish,
-- in pojo JPA apps it returns TRUE when using the same Entity classes;
Have i discovered some kind of bug in glassfish with JPA ?
Is there some other mailing list i should ask this question -- so i will
get an answer ???
thanks
Gary