On 1/25/06, Ryan Bowman <[EMAIL PROTECTED]> wrote: > We are using ejbs, I meant to say that I don't know anything about > them so I'm not qualified to say if we NEED them, but we are using > them..
There are three types of EJBs and three marketed benefits: 1) Entity beans make accessing a database easy. 2) Session beans make distributing an application across the network trivial. 3) Message driven beans make using message-oriented-middleware a snap. The truth is that: 1) Entity beans suck hard. Performance is really bad. You should use an ORM solution such as Hibernate or iBATIS. 2) Distributing applications across a network is a sure fire recipe for a poor performing application. Some services must be located on another physical box. In those cases, nothing beats EJBs. The remoting support is great. However, most apps don't need to communicate with a remote box (other than a database) -- or they will communicate over the Internet and use SOAP or XML-RPC. 3) Message driven beans do rock. Super simple and message-oriented software is powerful and has a proven track record. However, you can use the underlying Java Messaging API without the need of an EJB container. Spring provides a refreshingly simple "light-weight" container that can be used with a stand-alone java app or a hugh enterprise app. It scales up to big projects AND down to simple ones. Often it is used with a WAR deployed to tomcat to provide the component or "services" benefit of an EJB container without the clunky-ness of EJBs. If you guys aren't remoting (and I doubt you are) you should dump EJBs and write standard classes and components is plain-old Java. Ryan, I'm sure that politically you don't have the power to alter your applications chosen architecture. I'm just sharing some advice for what a superior infrastructure/architecture would look like. By and large in the industry, no one uses EJBs when they can avoid it. EJB 3.0 is a whole other story though. It's actually really great -- they've incorporated the concepts of Spring :-). -Bryan /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
