Sitemap

Member-only story

Failed Technology: Enterprise Java Beans (EJB)

An example of over-engineering.

--

Non-Medium Members: You can read this article for free on Substack.

Enterprise Java Beans (EJB) was a part of J2EE, there are three types of EJBs:

  • Session Beans
    implementation of business tasks, like a service.
  • Entity Beans
    bind to a relational database.
  • Message-Driven Beans
    receive messages from JMS queue.

Between 2002 and 2004, I worked on EJB projects as a Java Contractor programmer.

Below is a session bean interface:

public interface javax.ejb.SessionBean extends javax.ejb.EnterpriseBean {
public abstract void ejbActivate();
public abstract void ejbPassivate();
public abstract void ejbRemove();
public abstract void setSessionContext(SessionContext ctx);
}

Modern web developers might find the above completely nonsensical. Yet, unfortunately, tens of thousands of Java developers dealt with that on a daily basis in the early 2000s.

EJB is so bad, with multiple acronyms, Martin Fowler came up with a cool acronym “POJO” (Plain Old Java Object) to make using plain Java cool.

Frankly, the memory of EJB I rather forget.

  • Takes longer to develop
  • Difficult to debug
  • Difficult to test
  • Making code more complex
    developers

--

--

Zhimin Zhan
Zhimin Zhan

Written by Zhimin Zhan

Test automation & CT coach, author, speaker and award-winning software developer. Help teams succeed with Agile/DevOps by implementing real Continuous Testing.

No responses yet