File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes BMP entity bean - create Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "BMP entity bean - create" Watch "BMP entity bean - create" New topic
Author

BMP entity bean - create

Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1076
    
  10

Hello,
I am testing a BMP entity bean on JBoss. As we all know, in a BMP entity bean, we write "insert" statement in ejbCreate and "update" statement in ejbStore. When I test the bean by creating a record, the following sequence is shown :

1.setEntityContext
2.ejbCreate
3.ejbPostcreate
4.ejbStore

The first 3 steps are ok. But why is ejbStore called during create? or is it implementation specific?

Thanks,
Ranga.


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
James Turner
Ranch Hand

Joined: May 10, 2004
Posts: 194
I would imagine that anything changed during an ejbPostCreate would be sync'ed up at the database with the ejbStore call.


James<br />SCJP 1.4 - 92%<br />SCJD - 93%<br />SCWCD 1.4 - 95%<br />SCBCD 1.3 - 100%<br />SCEA - 92%
raghu vadranam
Greenhorn

Joined: Sep 01, 2004
Posts: 23
Container can call any time ejbStore and ejbLoad methods.
Hope this will help.


Raghu Nadh<br />SCJP 1.2,SCBCD
Rahul Devgan
Greenhorn

Joined: Aug 04, 2004
Posts: 24
Why are you writing update in ejbStore? Why not create a bizmethod of your own for the same and call update from there and then container can call ejbStore/ejbLoad as its own wish or fancies and you are not affected by the same.


Rahul Devgan<br />SCJP<br />--- one must be willing to let go of small pleasures in life to achieve greater things ---
Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1076
    
  10

I am developing a BMP bean for the first time. And in the book, it was shown to write updated statements in ejbStore method. For BMP, I think that would be the right way. Even otherwise, let's say I write a CMP. So, even in CMP, will ejbStore be called during create?

or will ejbStore be defenitely called during create? can I rely on that part?

Thanks,
Ranga.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: BMP entity bean - create
 
Similar Threads
Doubts in BMP Entity Bean
ejbCreate( ) + ejbRemove( )
ejbcreate() and ejbStore()
Hard ICE question 2
IBM 287 questions to Howard