Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ejbLoad is not getting called

 
Pradeep Bhat
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying out the Entity Bean Example with BMP from Mastering EJB...3rd Edition

This is my client code


It prints null is all 4 cases....
There is no other error while deploying the bean or running the client code.
Also I have put a print statement within each bean method ...
I see that ejbLoad is not getting called at all....but ejbStore is.
I am using JBoss....
What could be the reason for this?
 
Pradeep Bhat
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is my bean code....

 
Pradeep Bhat
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actually the problem is that even though EJBStore is called, the database entry is not updated. The return value of preparedStatement.executeUpdate() is 0.
That is because the bean's 'accountId' attribute is not getting populated.

Also consider the client code :



acc.getAccountId() is displayed as null. But other attributed are populated.
Any idea why this happens ??


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic