TOP J2EE Interview Questions and Answers

Read Latest J2EE Interview Questions and Answers for Freshers, 2+ Years Experienced Q and A with Explanation PDF.

What is caller

Same as caller principal.

What is container-managed persistence

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

What is DDP

Document-driven programming. The use of XML to define applications.

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.

What is JTA and JTS?

JTA is the abbreviation for the Java Transaction API. JTS is the abbreviation for the Jave Transaction Service. JTA provides a standard interface and allows you to demarcate transactions in a manner that is independent of the transaction manager implementation. The J2EE SDK implements the transaction manager with JTS. But your code doesn’t call the JTS methods directly. Instead, it invokes the JTA methods, which then call the lower-level JTS routines. Therefore, JTA is a high level transaction interface that your application uses to control transaction. and JTS is a low level transaction interface and ejb uses behind the scenes (client code doesn’t directly interact with JTS. It is based on object transaction service(OTS) which is part of CORBA.

What is authorization?

The process by which access to a method or resource is determined. Authorization depends on the determination of whether the principal associated with a request

through authentication is in a given security role. A security role is a logical grouping of users defined by the person who assembles the application. A deployer maps security roles to security identities.

Security identities may be principals or groups in the operational environment.

What is caller principal

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

What is container-managed sign-on

The mechanism whereby security information needed for signing on to a resource is supplied by the container.

What is declaration

The very first thing in an XML document, which declares it as XML. The minimal declaration is . The declaration is part of the document prolog.

How do we package 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.

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 cliennt

–one-to-one logical mapping to a client. –created and destroyed by a client

–not permanent objects

–lives its EJB container(generally) does noot survive system shut down

–two types: stateless and stateful beans Entity Bean

–represents persistent data and behavior off this data

–can be shared among multiple clients

–persists across multiple invocations

–findable permanent objects

–outlives its EJB container, survives systeem shutdown

–two types: container managed persistence(CCMP) and bean managed persistence(BMP)

What is B2B

B2B stands for Business-to-business.

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.

What is container-managed transaction

A transaction whose boundaries are defined by an EJB container. An entity bean must use container-managed transactions.

What is declarative security

Mechanisms used in an application that are expressed in a declarative syntax in a deployment descriptor.

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.

What is the EAR file?

An EAR file is a standard JAR file with an .ear extension, named from Enterprise ARchive file. A J2EE application with all of its modules is delivered in EAR file.

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.

What is CDATA

A predefined XML tag for character data that means “don’t interpret these characters,” as opposed to parsed character data (PCDATA), in which the normal

rules of XML syntax apply. CDATA sections are typically used to show examples of XML syntax.

What is content

In an XML document, the part that occurs after the prolog, including the root element and everything it contains.

What is delegation

An act whereby one principal authorizes another principal to use its identity or privileges with some restrictions.

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) arre intended to hold generic libraries of Java classes, resources, auxiliary files, etc.

–War files (files with a .war extension) arre 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) arre 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.

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.

What is basic authentication

An authentication mechanism in which a Web server authenticates an entity via a user name and password obtained using the Web application’s built-in authentication mechanism.

What is certificate authority

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


Popular posts from this blog

TOP Agile Testing Interview Questions and Answers

Latest Agile Testing Interview Questions and Answers

Most Asked ADO.NET Interview Questions and Answers