Java Enterprise Edition (J2EE/JEE) Interview Preparation Guide
Download PDF

J2EE Interview Questions and Answers will guide us now that Java Platform, Enterprise Edition or Java EE is a widely used platform for server programming in the Java programming language. The Java platform (Enterprise Edition) differs from the Java Standard Edition Platform (Java SE) in that it adds libraries which provide functionality to deploy fault-tolerant, distributed, multi-tier Java software, so learn J2EE with the help of this J2EE Interview Questions with Answers guide

112 J2EE Questions and Answers:

Table of Contents

J2EE Interview Questions and Answers
J2EE Interview Questions and Answers

1 :: What is J2EE?

J2EE is an environment for developing and deploying enterprise applications. The J2EE platform consists of a set of services, application programming interfaces (APIs), and protocols that provide the functionality for developing multitiered, web-based applications.

2 :: 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.

3 :: What are the four types of J2EE modules?

1. Application client module
2. Web module
3. Enterprise JavaBeans module
4. Resource adapter module

4 :: What does web module contain?

The web module contains:
--JSP files,
--class files for servlets,
--GIF and HTML files, and
--a Web deployment descriptor.
Web modules are packaged as JAR files with a .war (Web ARchive) extension.

5 :: What is the difference between Session bean and Entity bean?one?

The Session bean and Entity bean are two main parts of EJB container.
Session Bean
--represents a workflow on behalf of a client
--one-to-one logical mapping to a client.
--created and destroyed by a client
--not permanent objects
--lives its EJB container(generally) does not survive system shut down
--two types: stateless and stateful beans
Entity Bean
--represents persistent data and behavior of this data
--can be shared among multiple clients
--persists across multiple invocations
--findable permanent objects
--outlives its EJB container, survives system shutdown
--two types: container managed persistence(CMP) and bean managed persistence(BMP)

6 :: What is applet container?

A container that includes support for the applet programming model.

7 :: What is application client?

A first-tier J2EE client component that executes in its own Java virtual machine. Application clients have access to some J2EE platform APIs.

8 :: What is application client module?

A software unit that consists of one or more classes and an application client deployment descriptor.

9 :: What is application configuration resource file?

An XML file used to configure resources for a JavaServer Faces application, to define navigation rules for the application, and to register converters, validators, listeners, renderers, and components with the application.

10 :: What is asant?

A Java-based build tool that can be extended using Java classes. The configuration files are XML-based, calling out a target tree where various tasks get executed.

11 :: What is authorization constraint?

An authorization rule that determines who is permitted to access a Web resource collection.

12 :: What is backing bean?

A JavaBeans component that corresponds to a JSP page that includes JavaServer Faces components. The backing bean defines properties for the components on the page and methods that perform processing for the component. This processing includes event handling, validation, and processing associated with navigation.

13 :: What is bean-managed persistence?

The mechanism whereby data transfer between an entity bean's variables and a resource manager is managed by the entity bean.

14 :: What is binding (XML)?

Generating the code needed to process a well-defined portion of XML data.

15 :: What is build file?

The XML file that contains one or more asant targets. A target is a set of tasks you want to be executed. When starting asant, you can select which targets you want to have executed. When no target is given, the project's default target is executed.

16 :: What is business method?

A method of an enterprise bean that implements the business logic or rules of an application.

17 :: What is caller?

Same as caller principal.

18 :: What is cascade delete?

A deletion that triggers another deletion. A cascade delete can be specified for an entity bean that has container-managed persistence.

19 :: What is connector?

A standard extension mechanism for containers that provides connectivity to enterprise information systems. A connector is specific to an enterprise information system and consists of a resource adapter and application development tools for enterprise information system connectivity. The resource adapter is plugged in to a container through its support for system-level contracts defined in the Connector architecture.

20 :: What is component contract?

The contract between a J2EE component and its container. The contract includes life-cycle management of the component, a context interface that the instance uses to obtain various information and services from its container, and a list of services that every container must provide for its components.

21 :: What is certificate authority?

A trusted organization that issues public key certificates and provides identification to the bearer.

22 :: What is caller principal?

The principal that identifies the invoker of the enterprise bean method.

23 :: What is callback methods?

Component methods called by the container to notify the component of important events in its life cycle.

24 :: What is business logic?

The code that implements the functionality of an application. In the Enterprise JavaBeans architecture, this logic is implemented by the methods of an enterprise bean.

25 :: What is binding (JavaServer Faces technology)?

Wiring UI components to back-end data sources such as backing bean properties.