This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ejbLoad is not getting called

 
Pradeep Bhat
Greenhorn
Posts: 29
  • 0
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is my bean code....

 
Pradeep Bhat
Greenhorn
Posts: 29
  • 0
  • 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 ??


 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic