- EJB is a framework for writing distributed programs.
- EJB involves a standardized agreement that enables a component to run within any application server (increasing code reuse).
- The agreement is accomplished by implementing a set of Java interfaces from the EJB API.
- EJBs are not GUI components.
EJB is a heavyweight framework. Deciding to implement EJB on your next project should only be done after weighting their pros and cons versus more lightweight solutions, such as Hibernate, JDO, or straight SQL. If you need a distributed solution, consider adding RMI-IIOP or CORBA options to the mix. Following are some things to consider when making the decision of whether or not to use EJB: