150 likes | 300 Vues
This paper addresses the critical performance and scalability issues in J2EE application servers, exploring various factors influencing these parameters. Specifically, it investigates the effects of different application implementation methods, container design, communication layers, and persistence management strategies, using an auction site server benchmark similar to eBay as a case study. It provides insights into Enterprise JavaBeans (EJB) architecture, emphasizing container-managed vs. bean-managed persistence, and presents communication optimizations to improve application efficiency.
E N D
Performance and Scalability of EJB Applications Emmanuel Cecchet et al
Problem Addressed • Performance Scalability of J2EE application servers. • Test effect of: • Application Implementation Methods • Container Design • Communication Layer • Persistence Management • Using an ebay like auction site server benchmark.
What are J2EE and EJB ? • J2EE • Java 2 Platform Enterprise Edition • Java API’s to build dynamic content web sites. • Scalable run-time infrastructure to host. • EJB • Enterprise JavaBeans • Managed server-side component architecture for modular construction of enterprise applications. • Encapsulates the business logic of the application. • Specifically for multi-tier client/server systems. • Containers are responsible for providing: • Component pooling and lifecycle management • Client session management • Database connection pooling • Persistence • Transaction management • Authentication and access control.
Figure 1. Enterprise Java Beans in the J2EE framework. Apache; Tomcat; JBoss,JOnAS; MySQL
Persistence Management • Bean developer decides to manage persistence by: • Bean-Managed Persistence (BMP) • SQL is embedded in bean code. • Only database connection pooling and transaction management services of the container are used. • Container-Managed Persistence (CMP) • A deployment descriptor contains a one-to-one mapping between bean instance variables and database columns. • The container uses the descriptor to generate the necessary SQL statements and ensure concurrency control in the database.
Communication Layers • Test both with and without optimizations.
Types of Persistence • Entity beans that map data stored in the database. • (usually one entity bean instance per database table row) • Session beans that are used to: • Perform temporary operations (stateless session beans). • Represent temporary objects (stateful session beans).
EJB Container Design (2) • Dynamic Proxy approach ( Jboss ). • Container Classes are generated at run time making extensive use of reflection. • Pre-Compilation ( JOnAS and most commercial implementations ). • Classes are generated during deployment reducing run time reflection.
Application Implementations (5) • Java servlets-only (for comparison) • EJB • Stateless Session Beans • Entity Beans • Container-managed persistence • Bean-managed persistence • Session Façade beans • EJB 2.0 Local Interfaces(entity beans with only local interfaces and session beans with remote interfaces)
Figure 4. Session façade design pattern. Session Façade & EJB 2.0 local interfaces