• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

BMP entity bean - create

 
Bartender
Posts: 1104
10
Netbeans IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would imagine that anything changed during an ejbPostCreate would be sync'ed up at the database with the ejbStore call.
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Container can call any time ejbStore and ejbLoad methods.
Hope this will help.
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1104
10
Netbeans IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic