Latest Questions
Post Top Ad
Your Ad Spot
Friday, June 21, 2019

70 Top J2EE Interview Questions and Answers {Updated}

J2EE Interview Questions and Answers for experienced PDF, Read commonly asked J2EE Job Interview Questions with Answers PDF for Freshers.


Read J2EE Interview Questions and Answers

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 have its own deployment descriptor. A deployment descriptor is an XML document with a .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 the 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(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 the 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 a .ear extension, named from Enterprise ARchive file. A J2EE application with all of its modules is delivered in the 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) 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.

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 a certificate authority
A trusted organization that issues public key certificates and provides identification to the bearer.

What is context attribute
An object bound into the context associated with a servlet.

What is a deployer
A person who installs J2EE modules and applications into an operational environment.

What are the four types of J2EE modules?
1. Application client module
2. Web module
3. Enterprise JavaBeans module
4. Resource adapter module

What is the web container?
Servlet and JSP containers are collectively referred to as Web containers. It manages the execution of the JSP page and servlet components for J2EE applications. Web components and their container run on the J2EE server.

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.

What is client-certificate authentication
An authentication mechanism that uses HTTP over SSL, in which the server and, optionally, the client authenticate each other with a public key certificate
that conforms to a standard that is defined by X.509 Public Key Infrastructure.

What is context root
A name that gets mapped to the document root of a Web application.

What is deployment
The process whereby software is installed into an operational environment.

What are the types of J2EE clients?
Following are the types of J2EE clients:
? Applets
? Application clients
? Java Web Start-enabled rich clients, powered by Java Web Start technology.
? Wireless clients, based on the Mobile Information Device Profile (MIDP) technology.

What is the bean-managed transaction
A transaction whose boundaries are defined by an enterprise bean.

What is comment
In an XML document, text that is ignored unless the parser is specifically told to recognize it.

What is a conversational state
The field values of a session bean plus the transitive closure of the objects reachable from the bean’s fields. The transitive closure of a bean is defined in
terms of the serialization protocol for the Java programming language, that is, the fields that would be stored by serializing the bean instance.

What is deployment descriptor?
A deployment descriptor is an Extensible Markup Language (XML) text-based file with a .xml extension that describes a component’s deployment settings. A J2EE application and each of its modules have its own deployment descriptor. For example, an enterprise bean module deployment descriptor 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.

What does the 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.

What is binding (JavaServer Faces technology)
Wiring UI components to back-end data sources such as backing bean properties.

What is commit
The point in a transaction when all updates to any resources involved in the transaction are made permanent.

What is CORBA
Common Object Request Broker Architecture. A language-independent distributed object model specified by the OMG.

What is destination
A JMS administered object that encapsulates the identity of a JMS queue or topic. See point-to-point messaging system, publish/subscribe messaging system.

What does the 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.

What is binding (XML)
Generating the code needed to process a well-defined portion of XML data.

What is a 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.

What is a create method
A method defined in the home interface and invoked by a client to create an enterprise bean.

What is digest authentication
An authentication mechanism in which a Web application authenticates itself to a Web server by sending the server a message digest along with its HTTP request message. The digest is computed by employing a one-way hash algorithm to a concatenation of the HTTP request message and the client’s password. The digest is typically much smaller than the HTTP request and doesn’t contain the password.

What is “applet container”
A container that includes support for the applet programming model.

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.

What is component-managed sign-on
A mechanism whereby security information needed for signing on to a resource is provided by an application component.

What are credentials
The information describing the security attributes of a principal.

What is the distributed application
An application made up of distinct components running in separate runtime environments, usually on different platforms connected via a network. Typical distributed
applications are two-tier (client-server), three-tier (client-middleware-server), and multitier (client-multiple middleware-multiple servers).

What is “applet”
A J2EE component that typically executes in a Web browser but can execute in a variety of other applications or devices that support the applet programming model.

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.

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 into a container through its support for system-level contracts defined in the Connector architecture.

What is CSS
Cascading style sheet. A stylesheet used with HTML and XML documents to add a style to all elements marked with a particular tag, for the direction of browsers
or other presentation mechanisms.

What is document In general, an XML structure in which one or more elements contains text intermixed with subelements.
What is a thin client?
A thin client is a lightweight interface to the application that does not have such operations like query databases, execute complex business rules, or connect to legacy applications.

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

What is Connector architecture
An architecture for the integration of J2EE products with enterprise information systems. There are two parts to this architecture: a resource adapter provided by an
enterprise information system vendor and the J2EE product that allows this resource adapter to plug in.
This architecture defines a set of contracts that a resource adapter must support to plug into a J2EE product-for example, transactions, security, and resource management.

What is CTS
Compatibility test suite. A suite of compatibility tests for verifying that a J2EE product complies with the J2EE platform specification.

What is Enterprise JavaBeans (EJB) container?
It manages the execution of enterprise beans for J2EE applications.
Enterprise beans and their container run on the J2EE server.

What is Applet container?
IManages the execution of applets. Consists of a Web browser and Java Plugin running on the client together.

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

What is container
An entity that provides life-cycle management, security, deployment, and runtime services to J2EE components. Each type of container (EJB, Web, JSP, servlet, applet, and application client) also provides component-specific services.

What is data
The contents of an element in an XML stream, generally used when the element does not contain any subelements. When it does, the term content is generally used. When the only text in an XML structure is contained in simple elements and when elements that have subelements have little or no data mixed in, then that structure is often thought of as XML data, as opposed to an XML document.

What is JAXP?
JAXP stands for Java API for XML. XML is a language for representing and describing text-based data which can be read and handled by any program or tool that uses XML APIs. It provides standard services to determine the type of an arbitrary piece of data, encapsulates access to it, discovers the operations available on it, and create the appropriate JavaBeans component to perform those operations.

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

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.

Post Top Ad

Your Ad Spot

Pages