Friday, March 13, 2009

I am developing a BMP Entity bean. I have noticed that whenever the

Question :I am developing a BMP Entity bean. I have noticed that whenever the
create method is invoked, the ejbLoad() and the ejbStore() methods are
also invoked. I feel that once my database insert is done, having to do a
select and update SQL queries is major overhead. is this behavior typical of
all EJB containers? Is there any way to suppress these invocations? (EJB)

Answer :This is the default behaviour for EJB. The specification states that
ejbLoad() will be called before every transaction and ejbStore() after every
transaction. Each Vendor has optimizations, which are proprietary for this
scenario.

No comments: