EJB Dead? Did Spring Kill It? Here is an interesting conversation on the subject.
I’ve been having an interesting conversation with a co-worker. First, let me state my bias. I am the co-leader of a user group dedicated to promoting the Spring Framework. So I’ll say things like, “there really isn’t any reason to use EJBs” or “with the Spring Framework EJBs are pointless” or “EJBs suck and are irrelevant.” Yeah, I’m leaning to one extreme and being a bit biased. And I’m sure there are a number of EJB success stories, and there might even be a number of Spring failures (I doubt it).
A conversation with my co-worker last week lead to WHO is using Spring. I pointed him to the Spring Framework page that lists users/industries. I also mentioned that back at The Spring Experience there was a lot of talk about various financial institutions in Europe that were successfully using Spring. I also mentioned that BEA gave some talks about Spring and using Spring with BEA.
Anyhow, my co-worker really hasn’t heard much about Spring, except from me. I find that hard, but I guess he doesn’t read blogs, Java related websites, or any recent J2EE design books that might have mentioned Spring. My co-worker said he would talk to his buddy that does a lot of Java/J2EE work (especially EJB work) and see what he thinks about Spring.
Here is their interesting conversation. I am replacing business names with something generic.
My co-worker sent this message:
I work with the head of the Dallas Java Spring Users group. We keep getting into an argument. He insists that EJBs are dead. There is no reason to code EJBs anymore because all you need is a J2EE web container (maybe an app container) and the Spring framework. He claims that all the banks in Europe have completely dropped EJBs. I have no reason to doubt this but if EJBs have died no one told me about it. Why are Weblogic and IBM still selling their app servers?
Is this true? Am I THAT far out of the Java loop right now that EJBs have died and I didn’t notice?
I didn’t say ALL banks in Europe have dropped EJBs, but I DID say that some banks in Europe are successfully using Spring.
His friend’s response:
First, is what do they mean by EJB. If they mean EJB entity beans, then I completely agree (at least until EJB 3.0). If they mean EJB MDB’s then I completely disagree. If they mean EJB Stateless Session Beans it’s a mixed bag as companies will use it if creating a shared API if in a homogenous Java environment. EJB MDB’s are still highly attractive and a key reason standalone containers are being sold. To be honest in our platform we will probably use Spring proxying EJB SLSB calls. The reason is that initially it will reside in a single container, but we are building it so that it can be split into multiple containers. Cost is a driver for this architecture as Process servers, etc. are highly expensive and we wouldn’t want to horizontally scale that solution.
There are two stories in the industry. The first is to explicitly use lightweight containers like Spring. The second is to go with a full blown platform. I think it comes down to the type of application. If it’s a standalone application than I think lightweight containers like Spring are a strong candidate. If it’s not a standalone application (which is the staple of corporate America) then more heavy platforms are used.
An example is at Company A we have to integrate case management of Documentum as well as BPM of Documentum with a 3270 Emulation of IBM HATS with Business Objects reporting as well as LDAP user profiles with a .NET application and the local data in our application. The local data in our application is a very small subset of the problem. To build an application like this with integration from all these services as well as to handle store/forward practices so the application is not dependent on the other systems actually being available is a huge engineering task to build on your own. We are looking at using a Process/Integration server as well as really intrigued by the Data Services product from BEA. Even at a million dollar price tag I believe this is right way to go for the savings in time to market, reliability, etc.
Now at Company B where we had a cluster of 20 servers for the UI and a cluster of 3 servers for asynchronous calls we went the lightweight approach as everything was a standalone application. Here the price tag would have been 10 million dollars had we followed the same practices.
Like anything I think it depends.
BTW, BEA’s largest customers in the EU are banks, and they all are using BEA integration products. I’m guessing there’s similar with IBM.
More Commentary by me:
Interesting response by my co-workers friend. I’m very interested to hear what other people out there think. My problem is this co-worker isn’t interested in Spring and thinks EJB is fine.