Hi everyone,
I just got back from a BEA class on creating J2EE applications.  The class
was great, but the one thing it didn't cover was design: not _how_ to do
things, but why and when to do things.
Can anyone recommend good sites or books of design tips and pointers?
So far I have
http://www.weblogic.com/docs/classdocs/API_ejbdesign.html
and the O'Reilly EJB book, chapter 9
and maybe (theserverside.com and javasuccess.com - I saw others suggesting
those in previous posts to this list)
Are there other big obvious important sources of info? (or even not so big
or obvious)

Also, I have a story and a related question:
The guy who designed our first round of Entity beans put JDBC code in every
set() method which calls a corresponding set-stored procedure in the
database. The ejbStore() method he left blank. His explanation for this was
that Oracle does everything faster and better (he's pretty db focused), and
that Store() wastes time and increases the likelihood that dirty data will
be put back in the database. In his vision, the JSP's check which values
from any given form the user has changed, and then only calls set() for
those values.  He also has no session bean facade to the entity bean,
because he says that just wastes server time, and that any
development-time-gain we might get is far offset by the loss in server
speed.
Then I went to the BEA course, and everyone practically passed out at the
idea of doing separate db set() calls for each column value. They all said
we should do aggregate updates as frequently as possible (setData(),
followed by ejbStore()).  They also said that JSPs should never call the
entity beans directly, but should always go through session beans.  Also, I
heard a lot of arguments for CMP at the course, though since then I seem to
hear a lot of talk floating around to the effect that CMP is terribly slow.

My questions are:
 How bad an idea is putting JDBC code in each set() method, and leaving
ejbStore() blank?
 Does putting Session beans in front of things like ejbCreate and ejbStore
slow things down enough to make that technique a bad practice, even if it
will theoretically save coding time later?
 Is CMP really slower than BMP, and if so, under what conditions and why?
Can we use CMP to do some work in a bean, but not other work, and if so,
how?

I realize this is a lot, so any help, even just an answer to one of my
questions, would be greatly appreciated.....

Thanks!

-Adena Galinskyx

===========================================================================
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