Hi Ed, Paul, Robert,
Good comments on Entity Beans and the associated overhead.
Re: try running an EJB bean anywhere except in an EJB container
The reasons Ed might want to do this, would be to speed up and simplify his testing/ debugging cycle. Doubling your productivity is fun. Halving it is not. Having to jump thru hoops even to interactively debug your code is just poor; this ain't the days of line printers.
The amount of build overhead necessary for packaging, deployment, container loading, classfile mangling, and page recompilation is enormous and thoroughly intrusive into the development cycle. 'Halved productivity' is probably being generous.
Re: almost all the benefit people think they're getting from EJBs (eg connection pooling) are actually provided by the J2EE server
is exactly as I'd expect. The container provides the common services, which an EJB can use. Why would you use an EJB containers without EJB?
Clustering, Distributed Tx, and enterprise apis such as Messaging/ Mail etc are great. But you wouldn't want to touch Entity Beans with a forked stick.
What about clustering? Declarative security? Distributed transaction management? Well-understood design patterns and framework? etc.
Declarative security is partially OK. As in, OK for the most basic stuff and then not extensible for full-weight application security requirements.
Well-understood design patterns and frameworks? I believe Edwards understands these well, in a framework of avoiding these where possible...
:-)
Applications backed by large, complex schemas stored on multiple platforms is the norm where I work. I'd suggest the opposite is true - if all you are doing in "simple stuff" what's wrong with JDBC?
Many people's conclusion is that EJBs aren't right for the simple stuff, but that EJBs don't do well for the hard stuff either. (Backend mapping, relationships, inheritance, etc).
Session Beans (stateful or stateless) are the major part that *does* work and you can build a strong application with these in conjunction with a JDO or other non-ejb data layer. This gives a fundamentally more correctly structured architecture and can still participate in distributed tx, etc if needed.
Cheers,
Thomas Whitmore
www.powermapjdo.com