File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Help required findByPrimaryKey Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Help required findByPrimaryKey" Watch "Help required findByPrimaryKey" New topic

Help required findByPrimaryKey

Peter Perere

Joined: Sep 27, 2006
Posts: 8
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
Vinay Raj
Ranch Hand

Joined: Jun 19, 2006
Posts: 81
Is the newly inserted value committed to the database or is it part of the same findByPrimaryKey transaction?
I agree. Here's the link:
subject: Help required findByPrimaryKey
It's not a secret anymore!