1. What makes J2EE suitable for distributed multi-tiered Applications?
Answer: The application model followed by a J2EE platform is distributed and multi-tiered. Based on the function the application logic is divided into several components. These are installed on different machines according to the tier which they belong to. The different J2EE application parts are Client-Tier -  running at the clients end/machine, ES or Enterprise information system- It is the software that specifically runs on the EIS server, Web-Tier which runs at the server end i.e. the J2EE server, Business Tier component- running at the J2EE server

2. What is J2EE?
Answer: J2EE is a server side programming environment using which dynamic web applications, web services are developed. J2EE was designed by Sun Microsystems now a part of oracle, consists of rich set of Application Programming Interface (APIs), services and different protocols that all together make it a robust system. Together they are manipulated by a programmer to create multi-tiered web-based applications/services.

3. What are the components of J2EE application?
Answer: J2EE components are independent functional set of software that are installed in a distributed environment and work in conjunction with each other. Each of such components is used for the different level of tier functioning. A component consists of its own classes and files and can communicate with other components. J2EE specified components are Application clients and applets (client components), Java Servlet and Java Server Pages (web components), EJB or Enterprise JavaBeans as business components, Resource adapter components.

4.  What is the difference between Session Bean and Entity Bean?
: A session is restricted to only one client which it represents inside in an Application server. Sessions are not shared and are very similar to interactive sessions in which only one user is dealt with. Session beans are light weight and require fewer resources from server. Whereas Entity beans requires more server resources as the data in it are stored in a database for permanency. These are global data that are persistently stored in an application server resembling multiple clients.

5. What is Deployment Descriptor?
: Deployment Descriptor is an extensible markup language XML file. This xml file contains configurations which describes or directs the deployment of the components of a web or enterprise application. A deployment tool reads this file to customize its course of action to deploy a component module with other configurations and container dependant options. In case of web applications the deployment descriptor web.xml residing in the WEB-INF folder of the root application directory is used. While in Java EE application, the appliaction.xml is used as the deployment descriptor.

6. What do you understand by JTA and JTS?
  Answer:  JTA or Java Transaction API is a managed transaction organized by J2EE platform.  JTA enables applications to independently access transaction management without the hindrance of specific implementation.  It can span across enterprise information systems (EIS) and multiple components.  JTS stands for Java Transaction Service which is never called directly by the code written by programmers instead a JTA invokes the JTS routines. As together JTA and JTS control and invoke a transaction from an application.

7. Provide an overview of web container.
Answer: The web component contract of the J2EE architecture is implemented by a web container. For web component runtime environment it specifies contract that includes security, life-cycle management, transaction, concurrency, deployment, and also other services. A J2EE server is required to run the containers and the components. The database connection pooling process is also managed by a web container. Some of the examples of web containers are Sun Java System Application Server, Sun Java System Web Server and Tomcat for Java WSDP.

8. Explain the Java Servlet programming model.
: A Java Servlet is platform independent server side component. The JRE of a servlet loads them dynamically into the server memory. When a request is made to the web server the web container triggers the servlet. The servlet then processes the request which triggered it and then passes the processed result back to the web server/container which only after then sends the result back in http format to that specific client. This result/response consists of status and describing information of the response which is known as meta of that response.

9. Explain the J2EE container architecture.
Answer: J2EE containers provide support to the J2EE applications at run time. There are certain protocols and methods through which containers accesses other application components. Web containers and the EJB containers are main containers of J2EE. A Web container provides the run time execute to JSP and servlet component types and hence a web container is used for hosting web applications. The server component which deals with the business logic is known as EJB component. The EJB container provides access to local and remote enterprise beans.

10. What is JAAS?
Answer: The Java Authentication and Authorization Service (JAAS) is a Pluggable Authentication Module (PAM) framework which provides a way by which J2EE applications are authorized and authenticated for a specific user or group of users who can run it. Java 2 platform security architecture is extended by the framework in order to facilitate the user-based authorization; the main purpose of JAAS is to secure web application it has two different packages namely declarative security and programmatic security.

11. What is Form based authentication?
Answer:Form Authentication is a web application securing mechanism which is implemented in an application specific login form through which users are authenticated. It allows only registered users to access the application otherwise it redirects to the authentication form for log in. This prevents a third party url threat (a user accesses secured area of an application by its url without login in) by automatically redirecting to the login form by cookie checking. This form of authentication uses Base6 encoding scheme to provide security to user inputs.

Related Posts:

Sandeep Joshi
Mathematics, Technology and Programming are my passion. I am a part of Java Ecosystem and through this blog, I contribute to it. I am here to blog about my interests, views and experiences.
I am on Google+ and Facebook.
I feel proud to be listed as a "National Memory Record Holder" in the Limca Book of Records, 2009 and have attempted for an International Memory record in the Guiness Book of Records. I can remember the value of PI upto 10,000 digits after the decimal (3.1415.....). You can contact me on javagenious.com(At)gmal.com ; I would like to hear from you :)