These pieces of software are generalized into distributed object services . This is important for things like e-commerce. When you transfer money from one bank account to another, you want the debit of one account and the credit to another account to occur as a single transaction. Real-world applications almost always need transactions. EJB containers provide built in support for transactions.
Security Distributed applications involve running code on remote machines.
There are some complicated issues involving what code has permission to run other code. EJB has a carefully crafted security architecture, firmly rooted in the Java 2 security model. The EJB server, not your application, worries about security. Scaling Distributed applications often have objects that are accessed by multiple users, possibly thousands of users, at the same time. Scaling simply refers to the ability of an application to respond well to large numbers of users.