160 likes | 538 Views
Application Server Lecture. Paulo Barroso Kris Carver Todd Kitterman Eric Silva. Today: An Application Server. Overview What is an Application Server? Why would it be used? How is it implemented? Our Project: Enterprise JavaBeans Application Server Enterprise JavaBeans
E N D
Application Server Lecture Paulo Barroso Kris Carver Todd Kitterman Eric Silva
Today: An Application Server • Overview • What is an Application Server? • Why would it be used? • How is it implemented? • Our Project: Enterprise JavaBeans Application Server • Enterprise JavaBeans • Container/Deployer CS377
What Is an Application Server? • A program in a distributed network • Provides business logic for an application program • Supports thousands of simultaneous clients • Works in a three tier networking architecture CS377
Three Tier Application CS377
Why an Application Server? • Makes distributed applications programming easier • Programmers do not have to be concerned with distributed computing (e.g. resource management, etc.) • Application server does this • Many simultaneous clients • Security for all clients CS377
Implementation of an Enterprise JavaBeans Application Server • Three Major Parts • Beans • Perform the business logic • Container • The “Operating System” of the Application Server • Deployer • Installs Beans and web components on the Application Server CS377
Enterprise JavaBeans • Enterprise JavaBeans is an architecture for setting up program components • Components are Beans • Beans run on a server as part of client/server model • Can be deployed across all major operating systems CS377
Container: Introduction • What does the container do? • Runtime Support for Beans • Lifecycle Management of Beans • Transaction & Security Management • Scalable Management of Resources CS377
Client View of Container container EJBOjects EJBHome Bean 2 client EJBOjects EJBHome Bean 1 CS377 EJB Spec 2.0
Session Bean Lifecycle does not exist ejbcreate() timeout ejbPassivate() ready passive ejbActivate() afterCompletion() afterBegin() ready in TX CS377 EJB Spec 2.0
Container Implementation • Implemented in Java • 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 CS377
Deployer: Introduction • What does the deployer do? • Installs/uninstalls enterprise applications onto the server • Manages installed applications • Can be either a command-line based or graphical tool CS377
Responsibilities of the Deployer • For each enterprise bean, the deployer: • 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) CS377
What Is JNDI? • JNDI: Java Naming and Directory Interface CS377
What is JNDI? (cont'd) • JNDI: Java Naming and Directory Interface • 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 JavaBeans' home and remote interfaces • Implemented our own naming service to accomplish this. CS377
Deployer Implementation • Makes use of standard Java tools • 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 CS377