• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help required findByPrimaryKey

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What happens when findByPrimaryKey method is invoked. Can any body explain me the flow of the program..
One of my program calls an ejb method to display the contents from the database .It works for the values which was inserted before the Jboss server restarts. But the same code doesnot work for newly inserted values(even though it is updated in the db). Here is the code which i used for displaying the value.

Answer know = myHome.findByPrimaryKey( new AnswerPK(new Double(this.model.getID())));


v.addElement( know );

enum_ = v.elements();

this.model.getID() gives me the correct value...


Please help ......

Thanks in Advance
Peter
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the newly inserted value committed to the database or is it part of the same findByPrimaryKey transaction?
 
reply
    Bookmark Topic Watch Topic
  • New Topic