Java EE Interview Questions
Q1) Improvements to Java EE compared to J2EE?
Answer:
Java EE uses conventions in the place of configurations and also
replaces XML files with Annotations. Components are defined as POJO.
also to simplify the EJB’s dependency injections where introduced and
this also empowers POJO’s with enterprise features. The persistence
layer was fully replaced by Java persistence API’s. This is the most
common Java EE Interview Questions asked in an interview.
Q2) Difference between Core Java, Java EE and Java ME?
Answer:
Java SE (Core Java): Java SE used for Developing a Standalone
application, System Software that Runs in System only. In The Java SE,
you can gain knowledge of the Basic of Java Like Inheritance,
Polymorphism, Strings etc.
Java EE (Advance Java): Java EE is used for developing Web
Applications that Run with the assist of Web Browser. In Java EE you can
gain knowledge of the Advance topics Like Servlet, Java Server
Pages(JSP), Enterprise Java Beans(EJB) etc.
Java ME (Mobile Development with Java): Application that runs on the
mobile phones are designed using Java ME.
Q3) Key Features of Java Enterprise edition?
Answer:
Availability: The Java EE system is made-up to be up and ready at any
given point in time. several times the user demands could be too high. If a
system cannot grip the given load, system downtime will be hit and the
business performance of the company will be hardly impacted. The is
supposed to be supporting 24×7 services hence the availability of an
Enterprise System is critical.
Scalability: The way that businesses are handled and operated is
changing. Enterprise Systems must have a flexible structural design,
which can reply to fast changes that often happen in the organizations.
These systems are highly scalable in order to adopt new changes
happening in the organizations.
Performance: In order to improve business workflow, data control, as
well as customer responsiveness, client management all Organizations
and Enterprises often invest heavily, The spending in Enterprise Systems
enlarge and ultimately turns as a significant part of the total business
cost.
Security: Security is one of the most important requirements in
Enterprise Systems. The systems have to be secured in order to ensure
continued system availability and data confidentiality.
Manageability: A huge proportion of Enterprise Systems be unsuccessful
mostly because of their elevated complexity which leads to the statement
that the systems not easy to control and manage. In this case, the
Enterprise Systems Management (ESM) specialists include supervising
the operations of the system as well as the concert so as to track the
source of problems and then identify and fix the problems in the
fundamental layers.
Data Integrity: One of the primary design considerations for the
Enterprise Systems is data integrity. Data integrity means that data in the
systems should not be lost or corrupted.
Interoperability: Interoperability is the ability of Enterprise System (or
any general IT system) to use information and functionality of another
system. depicts data exchange between two systems.
Q4) Core Technologies of Java EE?
Answer:
Around 30 Java APIs included as Java EE core technologies, with that
number to approach 50 with the eventual release of Java EE 8. These
Java EE core technologies fall into the below-listed file categories:
HTTP client technologies: For HTTP-based clients, Web Socket
programming is included for Java EE, the JSF and Servlet APIs, an
API for JSON processing and the JSP Standard Tag Library
(JSTL).
Resources and database access technologies: For external and
back-end systems interactions, Java EE includes JavaMail, a Java
Message Service (JMS)API, a standard connector architecture and
a Java Transaction API (JTA) for enforcing two-phase commits.
REST and web service technologies: To help with the
development and deployment of REST-, SOAP-, XML- and JSON-
based web services, the Java APIs for RESTful Web Services
(JAX-RS) and XML-based web services (JAX-WS) are included,
along with APIs for XML messaging and XML Registries (JAXR).
Java EE security and container management: implementation of
security and management of Java EE containers, Java
Authorization Contract are accessible for developers and the Java
Authentication Service Provider Interface for Containers.
Q5) List the components of Java EE applications?
Answer:
Client-tier components: Executes on the client machine.
Web tier components: Resides and executes on the Java EE
server.
Business tier components: Runs on the Java EE server.
Enterprise information system software (EIS software): Runs
on the EIS server.
Q6) What are the Java EE client types?
Answer:
Applets
Application clients
Java Web Start enabled clients, by Java Web Start technology.
Wireless clients, based on the Mobile Information Device Profile
(MIDP) technology.
Q7) Strategies do you consider to import and export XML content?
Answer:
As per the schema JAXB is used to serialize and deserialize objects into
XML. In absence of schema two situations arise
Considering XML content: SAX is used to recommend serial
access for the whole document, or accessed randomly using DOM.
If simply parts of XML content is considered then XPath can be
used or StAX in case operations must be executed instantaneously
following every needed part is established in the document.
Q8) Illustrate the use of Stateless Session Bean, State full Session
Bean, and Singleton Session Bean?
Answer:
Stateless Session Beans: They are used when there is no need to
conserve the state of objects between business transactions. All
transaction holds its own instances and instances of components can be
retrieved from pools of objects. It is not compulsory for large cases, quite
a few operations are performed inside a transaction for maintaining
database consistency.
State full Session Beans: These are used when there is the need to
conserve the state of objects between business transactions. Every
instance of the component has its own objects. These objects are
customized by diverse transactions and they are leftover after reaching a
predefined time of inactivity. They allow to cache the data intensively,
such as long record sets for pagination and referring the data, in order to
reduce the volume of IO operations with the database.
A singleton session bean: Exists for the lifecycle of the application and
Instantiated once per application. This kind of component can be used,
for example, to initialize the application at its start-up and share a specific
object across the application.
Q10) What is the Spring Framework and discuss its benefits?
Answer:
To reduce the overall complexity of an enterprise application, the open
source Spring Framework is used. This is the most popular Java EE
Interview Questions asked in an interview. The major benefits of any
spring Framework include
The middle tier objects can be managed more efficiently.
The properties can be initialized quickly.
Injection dependencies make application testing much easier
phenomena.
The containers are lightweight and components are defined clearly.