What exactly is an EJB? Why was it invented? I've tried to go through some Sun tutorials but I wasn't convinced. I have used JSP/Servlets and it seems that it can do the same job (corrections very welcome), along with Struts. This is the only area of J2EE that leaves me bewildered. Is it some way of encapsulating all the business logic into a class? Don't we do that anyway (e.g. ShoppingCart.java for an ecommerce application)? Any simple guides on this?