Enterprise JavaBeans

   

Although this book is targeted toward the Java 2 Standard Edition (J2SE), a brief crossover into the enterprise side is necessary to make some terminology clear. With the increasing emphasis on server-side Java development, you will likely hear the term Enterprise JavaBeans, or EJB, as often, if not more so, than JavaBeans itself. Both technologies are based on components, but their uses are quite different. EJB is a component model for building and deploying Java in a distributed multitier environment. This technology extends the JavaBeans component model to support server components .

Partitioning Your Applications

Modern object-oriented designs typically split application design into three pieces. These pieces are the user interface, the business logic, and the data. Client/server applications combine the user interface and business logic code of an application, but multitier applications split the functionality of a system into three or more pieces. In either case, the persistent data used by the system is maintained by a database management system (DBMS), which the application communicates with but isn't actually part of the application itself. In a multitier architecture, the client application contains only user interface functionality. The business logic is implemented in one or more middle tiers by components deployed on a corresponding number of servers.

The result of moving the business and data logic to a server is that your application can take advantage of the power of multithreaded and multiprocessing systems. In addition, server components can pool and share scarce resources across users and even applications. As system demands increase, components that are heavily used can be replicated and distributed across multiple systems. This means that there is almost no limit to the scalability of a multitier system. As system resources become overtaxed, you can replicate another system to handle more of the load. In addition to providing enhanced performance, this replication can be used for redundancy. Redundant systems help to eliminate any single points of failure, which is of great concern for Internet applications that are expected to be available around the clock.

Server Components

EJBs fill the role of server components in multi- tier applications. Although different from standard JavaBeans in many ways, EJBs are still reusable software building blocks that can be assembled to efficiently create new applications. Because you always develop EJBs to run on a server, they never have a visual appearance. They instead are created to manage persistent data and to provide functionality that can be exposed to multiple client applications simultaneously .

Beyond reuse, the EJB architecture provides a framework that frees you from coding intricate transaction management and security logic for each application you develop. You might instead focus on the business logic required by your systems while taking advantage of a robust and scalable infrastructure that is capable of being run on every platform supported by Java.

The subject of EJB goes well beyond this brief introduction. The important point here is that you understand the differences between standard JavaBeans and EJBs. You should take a look at the Java 2 Enterprise Edition (J2EE) information on Sun's Web site to go more in depth on the subject.

   


Special Edition Using Java 2 Standard Edition
Special Edition Using Java 2, Standard Edition (Special Edition Using...)
ISBN: 0789724685
EAN: 2147483647
Year: 1999
Pages: 353

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net