MC7501 WEB APPLICATION DEVELOPMENT2&6 MARK’S QUESTION BANK 1. Explain J2EE architecture. The JEE platform provides the environment to develop enterprise applications / services using multitier architecture. The highly intensified technology made the need for scalable, efficient, faster solutions for information management. The JEE technology is rightly apt for meeting these requirements. JEE provides a programming development environment which improves the productivity of development, standards for hosting / deploying enterprise applications. The following are the tiers in JEE application Client Tier: The client tier includes the web components such as Servlets, JSP or standalone Java Desktop applications. This tier provides dynamic interfaces to the middle tier. Middle Tier: This also called as the server tier. In the middle tier enterprise beans and web services encapsulate distributable business logic for the applications which are reusable. The JEE application server contains the server-tier components which provides the platform for these web components for actions to be performed and data to be stored / persisted. Enterprise data tier: The enterprise level data is stored / persisted preferably or typically in a relational database, in this tier. The JEE applications comprises of components, containers and services. All the web components (Servlets, JSP) provide dynamic requests and responses from a web page. The EJB components contain the server-side business logic for enterprise applications. 2. J2EE is a container centric architecture. Explain. A container acts as an interface between a platform-specific functionality and a component. The component must be assembled before a web or enterprise bean or application client component execution, into a JEE application and deployed into its container. The settings of a container can be customized for underlying support provided by the JEE server. These include security, transaction management, and Java Naming and Directory Interface lookups. The management of non-configurable services such as servlet life cycle, enterprise bean life cycle, database connection, data persistence, database connection pooling also can be done by the container. 3. Explain the four types of container that the J2EE specification defines. A container is a runtime support of a system level entity [Applet, Servlet/JSP, EJB] The four types of container that the J2EE specification defines are applet container, application-client container, web container and EJB container. Applet Container : An applet is a java program that can be embedded into a web page. Most of the web pages are authored in HTML. To use an applet in HTML document , the tags <APPLET> and </APPLET> are used. They are used to indicate to the browser that a java applet should be loaded. “These tags act as a container for the java applet definition. “ Applet container manages the execution of applet, and contains the web browser. V.DAYALARASU AP/MCA 7133-SNSCE MC7501 WEB APPLICATION DEVELOPMENT2&6 MARK’S QUESTION BANK Application-client Container : The Application Client Container (ACC) is a combination of Java classes, libraries, and other files. They are used to distribute along with Java client programs that execute on their own JVM. The execution of the application client components is managed by the application-client container. The ACC can take the responsibility to collect user name and password which is treated as authentication data. Web Container : A web container is a part of web server. It provides the run time environment to execute a web application such as a servlet, JSP. A servlet container translates the URL requests into servlet requests. The JSP implicit objects such as request, response, out, page, pageContext etc., are exposed by JSP container. EJB Container : The EJB container, like other containers provides run-time environment to execute EJB components such as enterprise beans. An EJB Container manages transactions, state management details, multi-threading, connection pooling. The applications are provided with security using EJB container. All database access required by the entity bean will be handled by the EJB container. 4. Explain the J2EE container architecture. J2EE Container Architecture: The J2EE application component needs support at runtime. This support is provided by J2EE containers. They use protocols, methods of the containers to access other application components. The containers of J2EE are 1) Web container 2) EJB container. 1) The web container is used to host web applications. It provides the run time environment to execute Servlet and JSP component types. 2) The business logic is dealt by the server components called EJB components. The access to local and remote enterprise beans is provided by the EJB container. The operations of the three beans namely Entity Bean, Session Bean and Message-driven bean are handled by the EJB Container. 5. Explain the technologies that J2EE platform provides for developing components. 1) Servlet Technology: It is considered as the foundation of web technologies. It overcomes the limitations of CGI technology. It is a server side component to serve the clients and to generate dynamic content. Servlets interacts with web clients using the paradigm ‘request-response’. All client requests are sent through web servers to the servlet container. The servelt then process the request and sends the response back to the client. Servlets are reliable, scalable, efficient and reusable server side components. 2) JSP Technology: It is the extension of servlet technology. It is easy to author JSP without much knowledge of the supporting API. JSP can be used to work with HTTP requests and HTTP responses, session management and so on. It is easy to combine both static and dynamic content with JSP. The factor to develop JSP technology is to use regular HTML tags. The JSP author can place servlet or simple java code in the page by using special designated tags. The entire JSP will be translated into Servlet and the servlet related code is communicated to container to run. V.DAYALARASU AP/MCA 7133-SNSCE MC7501 WEB APPLICATION DEVELOPMENT2&6 MARK’S QUESTION BANK 3) EJB Technology: EJB is a server-side web component. It depends on other Java technologies for proper functionality such as Remote Method Invocation. RMI is used as a protocol between 2 enterprise beans and between an enterprise bean and its client. EJB encapsulates the business logic. All EJBs are developed, deployed and run only in an EJB container. This is similar to servlets and JSP run in a web container. EJB applications are easy to develop because the applications developer can concentrate on business logic. The developer can utilize the services provided by the EJB container, like connection pooling and transactions. 6. Explain the J2EE APIs, i.e. RMI/IIOP, JNDI, JDBC, Java Mail and JMS. RMI/IIOP: RMI stands for Remote Method Invocation. IIOP stands for Inter Internet-ORB Protocol. ORB RMI/IIOP API is used to write distributed objects using Java technology, which enables communication between objects in the memory, across JVM and also physical devices. RMI/IIOP yields the benefits of OOP such as inheritance, polymorphism and encapsulation and is platform independent. In RMI/IIOP, the code related to network is written by applying the interface but not the implementations. The operation can solely on the interface that object’s class. RMI-IIOP relies on object serialization for passing parameters via remote method invocations. JNDI ( Java Naming and Directory Interface) API : To enable java programs to access the naming and directory services, the JNDI API is utilized. Naming services emphasizes on the services that are to associate names with objects. We are familiar with naming systems such as the file system which has a directory or path associated it. Surfing web is associated a name that is the URL called Domain Naming System. EJB components of a J2EE application server, user profiles are associated in LDAP (Lightweight Directory Access Protocol) directory. For example, JNDI is the best API to write a java application that is used for search utility over network-enabled desktop, class-browser or an address book search utility. JDBC (Java Database Connectivity) API:Many java applications use a database and database accessing and programming is a significant role in web application development. JDBC is an API that enables the accessibility to a database in order to manipulate the database. The JDBC API supports both two-tier and three-tier models for database access. Two-tier model -- a Java application interacts directly with the database. Three-tier model -- introduces a middle-level server for execution of business logic: the middle tier to maintain control over data access. V.DAYALARASU AP/MCA 7133-SNSCE MC7501 WEB APPLICATION DEVELOPMENT2&6 MARK’S QUESTION BANK The application that uses the JDBC implements the following sequence. 1. Importing Packages 2. Registering the JDBC Drivers 3.Opening a Connection to a Database 4.Creating a Statement Object 5. Executing a query and Returning a Result Set Object 6. Processing the Result Set 7. Closing the Result Set and Statement Objects 8. Closing the Connection Java Mail API: Mailing and Messaging applications can be modeled or developed using Java Mail. The e-mail messaging applications can be developed for both high-level implementation and lowlevel implementation. That is, a small company which is heading towards growth can develop solutions which ensure the accessing to their mail server in an efficient manner. A blue-chip company can focus on providing the access to industry-level access which is a wider reach and provides vast support. JMS: Java Message Services is an API that enables the components of an application, could it be JSE or JEE component to provide messaging services such as create, send, receive and read messages. Using the loosely coupled, reliable and asynchronous communications are enabled by JMS. The JMS application contains the following parts: 1.JMS Provider : It implements the JMS interface and provides the administration and control services for the messages. J2EE 1.3 includes the JMS Provider service. 2.JMS Clients : These are the java applications that produces or consumes the messages. 3. Messages : These are the objects that communicate the messages between clients. 4. Administered Objects : They are the JMS objects created by the administrator that can be used by the clients. They are namely destinations and connection factories. 5. Native Clients :These are the applications that use message client’s native client API instead of JMS API. 7. What are the 3 different Java platform editions? Explain them. Java 2 Platform, Standard Edition (J2SE) Java 2 Platform, Enterprise Edition (J2EE) Java 2 Platform, MicroEdition (J2ME) Java 2 Platform, Standard Edition (JSE): J2SE is used to develop stand alone / desktop portable java applications. J2SE consists of two components. Core component and desktop component. Core component provides back end functionality. Desktop component provides GUI functionality. J2SE consists of Java Development Kit and Java Runtime Environment. JDK consists of java compiler and other related tools to enable the users to create Java Applications. Java Runtime Environment consists of java virtual machine, libraries and all other components that are necessary to run a java application. V.DAYALARASU AP/MCA 7133-SNSCE MC7501 WEB APPLICATION DEVELOPMENT2&6 MARK’S QUESTION BANK Java 2 Platform, Enterprise Edition (JEE): J2EE is a platform to develop multi-tier enterprise applications. JEE includes Servlets API, Java Server Pages and Enterprise Java Beans. It was built on J2SE technology. Java 2 Platform, Micro Edition (JME): JME is the technology for micro electronic devices like PDAs, Mobile phones etc. JME supports the flexibility for user interfaces, provides the security and uses the built-in network protocols for networked applications.JME applications can be ported across different devices. 8. Provide an overview of web container. The web container is used to implement the web components functionality. The functionality specifies an environment, called as runtime environment which the web components security, deployment, life-cycle management transaction management, request-response services. A container manages the servlet / JSP/ EJB functionality. J2EE server runs the components and the containers. A web container will also manage the database connection pooling, data persistence and access to the J2EE API. 9. Explain the Java Servlet programming model. The servlets are server side components in a web application. These components platform independent and on any server as the java technology is platform independence. The servlets are dynamically loaded by the JRE of servlets. When a request is received from a client the web container / web server will ignite the servlet. The servlet processes the request the sends the response back to the container / web server which in turn sends the response back to the client. 10. Describe in brief about deployment descriptors. A deployment descriptor describes the configuration information to deploy a web application. For a web application, it directs the deployment tool that is to deploy a module for a specific container such as ejb container / servlet/jsp container. For web applications the deployment descriptor is web.xml and must be placed in a WEB-INF directory of a web application root directory. For EE deployment descriptor the name should be application.xml and must be placed in a META-INF directory at the top level of the application .ear file. 11. Explain the J2EE container architecture. J2EE Container Architecture: The J2EE application components needs support at runtime. This support is provided by J2EE containers. They use protocols, methods of the containers to access other application components. The containers of J2EE are 1) Web container 2) EJB container. 1) The web container is used to host web applications. It provides the run time environment to execute Servlet and JSP component types. 2) The business logic is dealt by the server components called EJB components. The access to local and remote enterprise beans is provided by the EJB container. The operations of the three beans namely Entity Bean, Session Bean and Message-driven bean are handled by the EJB Container. V.DAYALARASU AP/MCA 7133-SNSCE MC7501 WEB APPLICATION DEVELOPMENT2&6 MARK’S QUESTION BANK 12. Explain the components of J2EE architecture, i.e. Application components, containers and J2EE APIs J2EE Components: Application components: Every JEE application is made up of different components. A component can be defined as software that is self-contained functionality that is a part of JEE application related in terms of classes, files and perform communication with other components. The JEE components are Applets, Application clients are client components Servlets and JSP technologies are referred as web components The EJB components that comprise enterprise beans are referred as business components. JEE components are authored using java programming language and compiled just like a simple java desktop applications. JEE components are deployed according to the production requirement and managed by the JEE server. JEE containers: All JEE components are installed in the respective containers while deploying the web applications. All the components are supposed to be assembled into a JEE application and then deployed in the respective container, before the execution of a web, an enterprise bean or even application client component execution. Container Types The deployment process is container specific. An EJB container manages the execution of all enterprise beans for a specific JEE application. The enterprise beans and their container will be run on JEE server. A web container is responsible for the execution of all servlets components and JSP for a specific JEE web application. These web components and the corresponding container will be run on JEE server. The execution of all application client components for a JEE applications is managed / executed by an application client container. The application clients and their applications run on the client machines. A container by name applet container is a web browser. The applet container along with Java plug-in combination runs on the client machine. JEE API: In order to run all the JEE SDK for web applications, the JSE SDK is needed. The JSE SDK provides the entire required core API for writing JEE components and the JVM. The following are the JEE APIs that are to be used in JEE applications. EJB API - This API enables the fast, simplified distributed application development at enterprise level. JDBC API – Enables the relational database accessibility for java applications V.DAYALARASU AP/MCA 7133-SNSCE MC7501 WEB APPLICATION DEVELOPMENT2&6 MARK’S QUESTION BANK Servlet API – Provides simple consistent mechanism to manage the application at web server level. JSP API - Provides simple and fastest dynamic web page development JMS API – Provides the mechanism for simple messaging services Java Transaction API – An interface between transaction manager and the others involved in distributed transaction system. Java Mail API – Provides platform and protocol independent mailing services 13. Explain the Java Servlets. Explain its lifecycle. A servlet is a java class that provides a powerful mechanism for developing server side application programs. It provides the component-based, platform-independent methods for building any web based applications by overcoming the performance limitations of CGI programs. A servlet application can run on any servlet enabled web container. It runs completely in a JVM. Browser compatibility is not an issue as the servlet run at the server side. The set of HTML-based calls can also be accessed by the servlets. For interactive web applications, servlets is the right choice. Servlet life cycle: The servlet life cycle includes four stages: Loading and Instantiation : The servlet container loads the servlet during and startup of a web application and or when the first request is made. The container creates the servlet instances after loading the servlet . Initialization: Soon after the creation of the instance of a servlet, the container invokes the init() method and passes the servelt’s the initialization information to the init() method. The init() must be called by the servelt container before performing any requests by the servlet. Responding for the requests: Once the initialization is properly done, the servlet is ready to service the requests. The servlet creates separate threads for each and every request. The servlet container invokes the service() method which in turn invokes the appropriate doGet() or doPost() methods for handling the requests and sending responses to the client using response objects. Destroying the servlet: If the servlet is not needed for processing the requests, the destroy() method will be invoked by the container. This method also invoked only once through out the life cycle of a servlet. Invoking the destroy() method indicates the servlet container not to send any requests for the service and the servlet will release the resources that are associated with it. JVM will claim the memory with the resources for garbage collections. 14. Explain JSP. Describe JSP lifecycle. Java Server Pages (JSP): A JSP is used for the development of dynamic web pages. JSP provides the server side scripting support for creating web applications that uses database. JSP encourages the developers to directly insert the java code into .jsp file. This process is very simple to develop and maintain. JSP are loaded into the web servers’ memory as soon as receiving the request in the very first time. The subsequent calls are served within a very short span of time. The usage of JSP in combination with JDBC is very easy to efficient to develop the database specific applications. JSP are platform independence as java is and any JSPage can be ported to any platform. V.DAYALARASU AP/MCA 7133-SNSCE MC7501 WEB APPLICATION DEVELOPMENT2&6 MARK’S QUESTION BANK JSP Life Cycle: JSP services the requests from clients as that of a servlet. At the time of the JSP request mapping, the request is handled by a special servlet. This servlet first checks whether the first JSP servlet is older than the JSP. If it is so, the translation of JSP into servlet class and compilation of this class is done. And then the request is handled by the servlet like an ordinary servlet. 15. Explain the following java graphical interface framework. Abstract windows toolkit (AWT) Swing Standard widget toolkit (SWT) Abstract Windows Toolkit (AWT): AWT provides the interface between the user and different windowing toolkits, such as buttons, checkboxes, radio buttons and menus etc. AWT establishes the connection between java applications and the Graphical User Interface. It is adequate to develop many applications. For example, the menus on the TV sets and other remote controls were developed using AWT (may be with Swings). AWT uses the basic GUI operating systems controls. AWT is a part of Java Foundation Classes(JFC). Swing: A Swing toolkit includes much more rich set of GUI tools compared to AWT. Few more high-level component sets are available in Swing such as (tree view, list boxes, tabbed panes, pop up windows, tooltips, icons). To leverage cross-platform capabilities, Swing supports more similar look and feel of the components. Swing is more flexible the all swing components are light weight, thereby reduces the loading time. Standard Widget Toolkit (SWT): SWT is an open source widget tool kit for developing rich, efficient and portable GUI applications. It was originally developed by IBM and being maintained by Eclipse Foundation along with Eclipse IDE. It is an alternative to AWT and Swing. To display the elements, it implements the operating system GUI libraries by using Java Native Interface. The SWT applications are portable and unique for each platform. The need of SWT is to provide a common API for accessing different operating system / platform specific widgets. The goal for designing of SWT is high performance, native OS look and feel, and platform integration. Swing on the other hand, designed to allow for a highly customizable look and feel that is common across different platforms. 16. List out components by AWT? Explain each in brief. •Button •Canvas •Choice •Checkbox •Container -Panel -Scrollpane -Windows V.DAYALARASU AP/MCA 7133-SNSCE MC7501 WEB APPLICATION DEVELOPMENT2&6 MARK’S QUESTION BANK •Label •List •Scrollbar •TextComponent -TextArea -TextField Button: A component that is used to display the command button on the canvas. By clicking on the button, an action is performed Canvas: A blank rectangular area on the screen on which an application can draw other components or on which an action can be trapped. Choice: A component that pop ups a menu of choices and the current choice is displayed as the title of the menu. Checkbox: A component that represents a check box that represents either true or false state. If the option is true, then a tick mark appears in the box. Container: A component that can contain another set of components. All these components are tracked in a list. Panel: It is one of the simplest container classes. A panel provides space to place other components including other panels. Scrollpane: A container which implements the scrolling that can be horizontal or vertical for a child component. Windows: Represents a top level window that has no borders and no menubar. A window must have a frame, a dialog box or another window as its owner window. Label: A component to place text in a container that is displayed as read only text containing a single line List: A component that specifies a list of items of text with a provision for the user to select a single or multiple items. Scrollbar: A component that is used basically for moving the visible area, where the components / contents are not enough to appear in a single screen page. Text Components: TextArea: A component where multiple lines of text can be typed / visible. It can make to appear as read-only area or to appear for editing. TextField: A component where a single line of text can be typed / visible. V.DAYALARASU AP/MCA 7133-SNSCE MC7501 WEB APPLICATION DEVELOPMENT2&6 MARK’S QUESTION BANK 17. Packaging J2EE Components J2EE components are packaged separately and bundled into a J2EE application for deployment. Each component, its related files such as GIF and HTML files or server-side utility classes, and a deployment descriptor are assembled into a module and added to the J2EE application. A J2EE application is composed of one or more enterprise bean, Web, or application client component modules. The final enterprise solution can use one J2EE application or be made up of two or more J2EE applications, depending on design requirements. A J2EE application and each of its modules has its own deployment descriptor. A deployment descriptor is an XML document with an .xml extension that describes a component's deployment settings. An enterprise bean module deployment descriptor, for example, declares transaction attributes and security authorizations for an enterprise bean. Because deployment descriptor information is declarative, it can be changed without modifying the bean source code. At run time, the J2EE server reads the deployment descriptor and acts upon the component accordingly. A J2EE application with all of its modules is delivered in an Enterprise Archive (EAR) file. An EAR file is a standard Java Archive (JAR) file with an .ear extension. In the GUI version of the J2EE SDK application deployment tool, you create an EAR file first and add JAR and Web Archive (WAR) files to the EAR. If you use the command line packager tools, however, you create the JAR and WAR files first and then creates the EAR. · Each EJB JAR file contains a deployment descriptor, the enterprise bean files, and related files. · Each application client JAR file contains a deployment descriptor, the class files for the application client, and related files. · Each WAR file contains a deployment descriptor, the Web component files, and related resources. Using modules and EAR files makes it possible to assemble a number of different J2EE applications using some of the same components. No extra coding is needed; it is just a matter of assembling various J2EE modules into J2EE EAR files. 18. Overview of Assembly (Packaging) and Deployment Application assembly (also known as packaging) is the process of combining discrete components of an application into a single unit that can be deployed to a J2EE-compliant application server. A package can be classified either as a module or as a full-fledged application. Modules A J2EE module is a collection of one or more J2EE components of the same container type (for example, web or EJB) with deployment descriptors of that type. One descriptor is J2EE standard, the other is Sun Java System Application Server specific. Types of J2EE modules are as follows: V.DAYALARASU AP/MCA 7133-SNSCE MC7501 WEB APPLICATION DEVELOPMENT2&6 MARK’S QUESTION BANK Web Application Archive (WAR): A web application is a collection of servlets, HTML pages, classes, and other resources that can be bundled and deployed to several J2EE application servers. A WAR file can consist of the following items: servlets, JSPs, JSP tag libraries, utility classes, static pages, client-side applets, beans, bean classes, and deployment descriptors (web.xml and optionally sun-web.xml). EJB JAR File: The EJB JAR file is the standard format for assembling enterprise beans. This file contains the bean classes (home, remote, local, and implementation), all of the utility classes, and the deployment descriptors (ejb-jar.xml and sun-ejb-jar.xml). If the EJB component is an entity bean with container managed persistence, a .dbschema file and a CMP mapping descriptor, sun-cmp-mapping.xml, must be included as well. Application Client Container JAR File: An ACC client is a Sun Java System Application Server specific type of J2EE client. An ACC client supports the standard J2EE Application Client specifications, and in addition, supports direct access to the Sun Java System Application Server. Its deployment descriptors are application-client.xml and sunapplication-client.xml. Resource RAR File: RAR files apply to J2EE CA connectors. A connector module is like a device driver. It is a portable way of allowing EJB components to access a foreign enterprise system. Each Sun Java System Application Server connector has a J2EE XML file, ra.xml. Figure Module Assembly and Deployment V.DAYALARASU AP/MCA 7133-SNSCE MC7501 WEB APPLICATION DEVELOPMENT2&6 MARK’S QUESTION BANK Applications A J2EE application is a logical collection of one or more J2EE modules tied together by application deployment descriptors. Components can be assembled at either the module or the application level. Components can also be deployed at either the module or the application level. The following diagram illustrates how components are assembled into modules and then assembled into a Sun Java System Application Server application EAR file ready for deployment. Figure: Application Assembly and Deployment V.DAYALARASU AP/MCA 7133-SNSCE MC7501 WEB APPLICATION DEVELOPMENT2&6 MARK’S QUESTION BANK Each module has a Sun Java System Application Server deployment descriptor and a J2EE deployment descriptor. The Sun Java System Application Server Administration Console uses the deployment descriptors to deploy the application components and to register the resources with the Sun Java System Application Server. An application consists of one or more modules, an optional Sun Java System Application Server deployment descriptor, and a required J2EE application deployment descriptor. All items are assembled, using the Java ARchive (.jar) file format, into one file with an extension of .ear. J2EE Standard Descriptors The J2EE platform provides assembly and deployment facilities. These facilities use WAR, JAR, and EAR files as standard packages for components and applications, and XML-based deployment descriptors for customizing parameters. J2EE standard deployment descriptors are described in the J2EE specification, v1.4. The following table shows where to find more information about J2EE standard deployment descriptors. Table : J2EE Standard Descriptors Deployment Descriptor Where to Find More Information application.xml Java 2 Platform Enterprise Edition Specification, v1.4, “Application Assembly and Deployment - J2EE:application XML DTD” web.xml Java Servlet Specification, v2.3 , “Deployment Descriptor,” and JavaServer Pages Specification, v1.2, “JSP Pages as XML Documents,” and “Tag Extensions” ejb-jar.xml Enterprise JavaBeans Specification, v2.1, “Deployment Descriptor” applicationclient.xml Java 2 Platform Enterprise Edition Specification, v1.4, “Application Clients J2EE:application-client XML DTD” ra.xml Java 2 Enterprise Edition, J2EE Connector Architecture Specification, v1.0, “Packaging and Deployment.” V.DAYALARASU AP/MCA 7133-SNSCE MC7501 WEB APPLICATION DEVELOPMENT2&6 MARK’S QUESTION BANK Runtime Environments Whether you deploy an individual module or an application, deployment affects both the file system and the server configuration. See the following Module runtime environment and Application runtime environment figures. Module Runtime Environment The following figure illustrates the environment for individually deployed module-based deployment. Figure: Module runtime environment For file system entries, modules are extracted as follows: domain_dir/applications/j2ee-modules/module_name domain_dir/generated/ejb/j2ee-modules/module_name domain_dir/generated/jsp/j2ee-modules/module_name The applications directory contains the directory structures described in Directory Structure. The generated/ejb directory contains the stubs and ties that an ACC client needs to access the module; the generated/jsp directory contains compiled JSPs. Lifecycle modules (see Chapter 10, "Developing Lifecycle Listeners") are extracted as follows: domain_dir/applications/lifecycle-modules/module_name Configuration entries are added in the domain.xml file as follows: <server> <applications> <type-module> ...module configuration... </type-module> </applications> </server> V.DAYALARASU AP/MCA 7133-SNSCE MC7501 WEB APPLICATION DEVELOPMENT2&6 MARK’S QUESTION BANK The type of the module in domain.xml can be lifecycle, ejb, web, or connector. For details about domain.xml, see the Sun Java System Application Server Reference. Application Runtime Environment The following figure illustrates the environment for application-based deployment. Figure: Application runtime environment For file system entries, applications are extracted as follows: domain_dir/applications/j2ee-apps/app_name domain_dir/generated/ejb/j2ee-apps/app_name domain_dir/generated/jsp/j2ee-apps/app_name The applications directory contains the directory structures described in Directory Structure. The generated/ejb directory contains the stubs and ties that an ACC client needs to access the module; the generated/jsp directory contains compiled JSPs. Configuration entries are added in the domain.xml file as follows: <server> <applications> <j2ee-application> ...application configuration... </j2ee-application> </applications> </server> For details about domain.xml, see the Sun Java System Application Server Reference. Classloaders Understanding Sun Java System Application Server classloaders can help you determine where and how you can position supporting JAR and resource files for your modules and applications. V.DAYALARASU AP/MCA 7133-SNSCE MC7501 WEB APPLICATION DEVELOPMENT2&6 MARK’S QUESTION BANK In a Java Virtual Machine (JVM), the classloaders dynamically load a specific java class file needed for resolving a dependency. For example, when an instance of java.util.Enumeration needs to be created, one of the classloaders loads the relevant class into the environment. The Classloader Hierarchy Classloaders in the Sun Java System Application Server runtime follow a hierarchy that is illustrated in the following figure. Figure: Classloader runtime hierarchy V.DAYALARASU AP/MCA 7133-SNSCE