Application Server Lecture Paulo Barroso Kris Carver Todd
Application Server Lecture Paulo Barroso Kris Carver Todd Kitterman Eric Silva
Today: An Application Server w Overview n n n What is an Application Server? Why would it be used? How is it implemented? w Our Project: Enterprise Java. Beans Application Server n n Enterprise Java. Beans Container/Deployer CS 377 2
What Is an Application Server? w A program in a distributed network w Provides business logic for an application program w Supports thousands of simultaneous clients w Works in a three tier networking architecture CS 377 3
Three Tier Application CS 377 4
Why an Application Server? w Makes distributed applications programming easier n n Programmers do not have to be concerned with distributed computing (e. g. resource management, etc. ) Application server does this w Many simultaneous clients w Security for all clients CS 377 5
Implementation of an Enterprise Java. Beans Application Server w Three Major Parts n Beans l n Container l n Perform the business logic The “Operating System” of the Application Server Deployer l Installs Beans and web components on the Application Server CS 377 6
Enterprise Java. Beans w Enterprise Java. Beans is an architecture for setting up program components w Components are Beans w Beans run on a server as part of client/server model w Can be deployed across all major operating systems CS 377 7
Container: Introduction w What does the container do? n n Runtime Support for Beans Lifecycle Management of Beans Transaction & Security Management Scalable Management of Resources CS 377 8
Client View of Container container EJBOjects EJBHome client Bean 2 EJBOjects EJBHome CS 377 Bean 1 EJB Spec 2. 0 9
Session Bean Lifecycle ejbcreate() does not exist timeout ejb. Passivate() ready after. Begin() ejb. Activate() passive after. Completion() ready in TX CS 377 EJB Spec 2. 0 10
Container Implementation w Implemented in Java n n n Multiple instances of a Java Bean may be instantiated Running or active Java Beans are managed in a thread pool Passive or waiting beans are managed separately CS 377 11
Deployer: Introduction w What does the deployer do? n n n Installs/uninstalls enterprise applications onto the server Manages installed applications Can be either a command-line based or graphical tool CS 377 12
Responsibilities of the Deployer w For each enterprise bean, the deployer: n n n Reads bean properties from deployment descriptor Generates and compiles RMI stubs/skeletons Sets up the bean's security environment Sets up the bean's transaction environment Registers the bean in JNDI space (see next slide) CS 377 13
What Is JNDI? w JNDI: Java Naming and Directory Interface CS 377 14
What is JNDI? (cont'd) w JNDI: Java Naming and Directory Interface n n API that provides a standard for connection and use of various naming services (e. g. DNS, LDAP) Used in a Java Application Server to locate Enterprise Java. Beans' home and remote interfaces l Implemented our own naming service to accomplish this. CS 377 15
Deployer Implementation w Makes use of standard Java tools n n Generates Java source files Uses javac and rmic to compile, create stubs and skeletons Binds remote and home interfaces using JNDI service provider Support for security, transactions not yet implemented CS 377 16
- Slides: 16