The advantages of J2EE to the developer are well documented and understood. Authorization to invoke EJB methods is controlled by the deployer afterwards. Contrast this with the fact that most applications today are still being deployed without any effective security measures against internal attack and you soon realize how important EJB is. Other examples of the advantages range from automatic persistence of state, declarative transaction demarcation and guaranteed application scalability. But that's still only half the story.
Applications become quicker to deploy and quicker to adapt to changes in the operating environment.
This is the result of building a portability layer between applications and the IT infrastructures that support them. This is an example of a J2EE application distributed by Sun for demonstration purposes. Let's pretend we wrote Duke's Pet Store in Java, but not as a J2EE application. Imagine how we would usually deploy the finished application. The application uses a catalogue of products stored in a database.