> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Dave Wolf

> Which means you would be even MORE chatty then a normal EntityBean.
> Normally ejbStore() would only be called on a tx boundry.  If you do this,
> you will call ejbStore() for every changed property.  ALOT more chatty then
> a normal EntityBean.

I'm not sure I follow you. The bitmask is updated when a field is modified,
that doesn't mean that ejbStore() will be called right after that. It will
typically be called, as you point out, on transaction boundary. If the mask is
null, ejbStore() returns right away. If it's not, it's a simple matter of
testing bits and generating the prepared statement.

Depending on the profile of the application, it is possible to mix and match
this pattern, based on

- the ratio "number of setXXX()/calls to ejbStore()"
- the absolute number of calls to ejbStore()

There might be cases where you will be better off skipping the mask trick and
start preparing the statement in each setter, especially if you notice that
you almost never call setFoo() twice in the same transaction.

In any case, I absolutely recommend using getters and setters, it will make it
much easier to transition to EJB 2.0.

And I agree with William: BMP is most likely doomed to extinction as CMP 2.0
solutions start emerging. Soon, writing a BMP bean will be as compelling as
writing assembly code :-)

--
Cedric
http://beust.com/cedric

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to