[PJUG Javamail] Why EJB?
Richard Johnson
richardj at lingosys.com
Thu Sep 11 10:20:24 EDT 2008
Hi all,
At the risk of--no, make that desire to--start an argument ...
How many of you have seen *in practice* a genuine need for JEE style
data beans as opposed to jdbc, or jdbc with O/R mapping (like
hibernate?)
My experience says that in most cases JEE is overkill, with hundreds of
lines of code in dozens of objects and deployment artifacts, when three
or four straightforward classes would do. In almost every system I've
seen, the DB box is on the same local network as the middleware server,
behind the same firewall. Often it's on the same physical machine as
the app server. We specify the DB connection on the (remote but local)
machine in the db.xml file without issue. The DB manages its own
connection pool. The O/R mapping tool handles reference<-->value issues,
and threading is handled in the straightforward POJO way.
Of course, I've never had the um ... "pleasure" of working on a system
that required an intermediary cache and/or JMS for data-to-program
information flow, where my imagination tells me that beans really
belong.
...
Please, someone tell me some reasons why the next project I spec should
have JEE or EJB in it instead of JDBC and hibernate.
--
Richard Johnson
More information about the Javamail
mailing list