• Post Reply Bookmark Topic Watch Topic
  • New Topic

Doubts in BMP Entity Bean  RSS feed

 
Mike Thomson
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a doubt in BMP Entity Bean (EJB 2.1).
When the client is calling create(id,name) in home interface, the following sequence will occur: (thanks to HFEJB)
1. Client calls the create() in home stub
2. create() invocation passed to Home Object
3. get the bean out of the pool.
4. ejbCreate() will be called. (I have printed sysout and it's coming)
5. Insert data to DB (inserting properly)
6. EJB Object created
7. ejbPostCreate will be called. (I have printed sysout and it's coming)

Here comes my doubt, after ejbPostCreate(), why ths contanier is calling ejbStore()? I have put sysout in all the callback methods. After insering the data into the DB, after ejbPostCreate() called, ejbStore() is also getting called. Why..?
I am using JBoss Application server.

Another doubt:
Suppose the container fail to insert the data into DB, whether ejbPosteCreate() will be called? If so, it will behave same for both BMP and CMP.
Becuase, Even though the data is not inserted into DB, ejbPostCreate() is getting called in BMP entity bean
 
Mike Thomson
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any help :P
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!