21.What are the tasks performed by J2EE web component developer?
Web Component Developer is related to the web services provided to the client for their use and functionality. The WAR file consists of the web component and performs various tasks on them.
The tasks that are performed as follows:
- Writing and compiling the servlet code that allow the errors and warnings to be removed so that the application can run properly everywhere else.
- HTML and JSP files are written using the servlets as well to allow the application to have the proper functionality that is being required by the client.
- Deployment descriptor specifications are given for the web development environment. It includes the bundled files for the deployment descriptor such as the WAR files and allow the application to run after taking the data from the server and given to the client.
22.What is the procedure for the application assembler used in J2EE?
Application assembler is used to receive the application component from the client in a JAR file and then assembling of the file take place using the J2EE component facilities. Various functionalities are used to assemble the application components.
Assembler is also known as the deployed that is allowed to modify the deployment descriptor. The modification can be performed directly or by using the tool correctly that allow the XML tags to be modified using the graphical user interfaces.
The assembler works as:
- Assembles the JAR and WAR files that is being created already before coming in this phase and turned into the EAR file.
- Deployment descriptor specification is provided by using the J2EE application component.
- Verification of the content is being done by the use of EAR file and using the specification that is being given already.
23.What is the process of deploying and administrating the application?
The application deploying and administrating allow the user to configure and deploy the application components in the J2EE application. The administration of the computing can be done to find out the infrastructure that is being used. The networking resources are also included in this, which allows the server to get the configuration for it and allow the client to request the application that is required. It allows the applications to run in the environment that is provided. The models that are used in this include the transaction control, security control models that allow the specification to be provided for the use of database connection. This allow the communication be done between the different components.
24.What is the procedure to deploy the administrating policies for an application?
When the configuration that has to be applied is set then the content that is provided with it is used to resolve the dependencies that are coming from outside and allow user to modify the security setting and assign transactions parameters to make it more secure.
The steps that are involved in installing and configuring the J2EE application requires:
- J2EE application uses EAR file that is added when it is created in the phases before.
- Configuration of the environment is being done by modifying the setting of it that allow the application to compatible with the environment. This is having a descriptor that allows describing the component that is in use.
- The contents of EAR file are verified and specifications are checked to meet the requirements. • Installation or the deployment of the services takes place in the J2EE application file that is deployed on the server.
25.How is the J2EE API integration being performed?
The J2EE API allows the system and applications to integrate the components that are being provided with it.
It enables this by the following methods and ways:
- The application that is used using the API gets incorporated on all the tiers of the enterprise bean. This follows the unified application model.
- The J2EE API provides the request and response in a simplified manner. This is the mechanism that allows the JSP page and servlet to be represented in an easy way so that it can be implemented on the server.
- It also follows the reliable security model that uses JAAS and it enables the security mechanism to be used with the entire application model.
- It allows easy integration of the APIs using the JAXP that is an XML-based data interchange model which is simplified and added to provide the extra properties and manage them from one place.
- It provides interoperability between the connector and uses the J2EE Connector Architecture in a simplified manner.
- It allows connectivity of the database between many database systems using the JDBC APIs.
26.What are the features that are provided by different components of J2EE?
J2EE provides a reference to all the components that it is using to allow an application deployment tool to be used for various purposes.
The deployment tool is used to assemble, verify, and deploy the J2EE applications.
These tools are used to automate the procedure of writing and compiling a code. The tools can be used using the command line or the graphical user interface.
The interface is used as graphical and allows configuring different components of the J2EE as :
- J2EE applications can be chosen to configure, package and deploy those applications on the server. These provide easy integration properties and can be used to create an API.
- J2EE provides enterprise beans that allow the same operations to be used which is provided in the application part. It also provides the same functionality for the web components, application clients and the resource adaptors that provide resources to the application for execution.
27.What is the procedure to be followed to create a J2EE application?
To create the application in J2EE it requires to have predefined components that need to be used in order to successfully execute the application. The components that are used, enterprise bean, application client and the web component. To build the component it is necessary to create an application. This file name can be given according to the requirement and this will get stored in the EAR file like file-name.ear. The procedure that is followed for this is :
- The tool that is used is the deploy-tool. This can be done by selecting the file and then new and then application in the new.
- The browse option can be selected to select the application that needs to be included.
- Enter the field name and save the file with the name that is entered by the user.
- Save and exit and a new application gets created.
28.What do you understand by the JTA and JTS in reference to J2EE?
JTA (Java Transaction API) :
The JTA is responsible for providing an interface that allows the user to segregate transactions in a way that it does not depend on the transaction manger implementation. The transaction processing monitor is responsible for coordinating the transactions across various resources. Every resource has its own manager. The JTA architecture makes it mandatory for each resource manager to implement the interface so that it can be managed by the TP monitor.
JTS (Java Transaction Service) :
The JTS is used for the implementation of the transaction manager. It is responsible for providing services related to transaction to the various parties involved in distributed transactions. These can be the application server, the communication resource manager or a standalone transactional application.
The JTA can be considered to be a high level transaction interface used by an application to control a transaction whereas the JTS can be considered to be a low level API used in the background processes.
29.Why is J2EE the choice for distributed multi-tiered Applications?
J2EE is a platform that uses multi-tiered distributed application divided into components that are divided on the basis of function, applications and other components that gets installed with the platform.
There are different parts that are used for this multi-tiered application :
- Client-tier components :This is the component that is used to run on the client machine.
- Web-tier components :They are executed and maintained on a J2EE server.
- Business-tier components :These are also executed and maintained on a J2EE server.
- Enterprise Information System (EIS) :This tire of software executes specifically on EIS servers.
30.How can user package J2EE components?
The J2EE components of an application are packaged separately and then are bundled into a J2EE application. All the related files of a component such as the html, server utility classes etc. are clubbed together along with a deployment descriptor and assembled into a module. This module can be added to a J2EE application. The deployment descriptor is made using an xml file and it defines a components deployment settings. A J2EE application comprises of one or multiple enterprise bean, web or client component modules. Every J2EE application and the modules that make it have their own deployment descriptor file. Depending upon the design requirements the final enterprise solution may consist of one or more J2EE applications.
31.What is the J2EE module?
A J2EE module consists of one or more J2EE components for the same container type and one component deployment descriptor of that type.
32. What are the components of J2EE application?
A J2EE component is a self-contained functional software unit that is assembled into a J2EE application with its related classes and files and communicates with other components. The J2EE specification defines the following J2EE components:
Application clients and applets are client components.
Java Servlet and JavaServer PagesTM (JSPTM) technology components are web components.
Enterprise JavaBeansTM (EJBTM) components (enterprise beans) are business components.
Resource adapter components provided by EIS and tool vendors
33.What are the four types of J2EE modules?
- Application client module
- Web module
- Enterprise JavaBeans module
- Resource adapter module
34.What does application client module contain?
The application client module contains:
- class files,
- an application client deployment descriptor.
Application client modules are packaged as JAR files with a .jar extension.
35.What are the differences between Ear, Jar and War files? Under what circumstances should we use each one?
There are no structural differences between the files; they are all archived using zip-jar compression. However, they are intended for different purposes.
- Jar files (files with a .jar extension) are intended to hold generic libraries of Java classes, resources, auxiliary files, etc.
- War files (files with a .war extension) are intended to contain complete Web applications. In this context, a Web application is defined as a single group of files, classes, resources, .jar files that can be packaged and accessed as one servlet context.
- Ear files (files with a .ear extension) are intended to contain complete enterprise applications. In this context, an enterprise application is defined as a collection of .jar files, resources, classes, and multiple Web applications.
Each type of file (.jar, .war, .ear) is processed uniquely by application servers, servlet containers, EJB containers, etc
36.What is JSESSIONID in Java? When does JSESSIONID gets created ?
One of my favourite Servlet JSP Interview question for 2 to 4 years experience programmers on web development. JSESSION id is a cookie which is used to manage session in Java web application. JSESSIONID is created by Web Container whenever a new session is created.
37.?
38.?
39.?
40.?
|