Anda di halaman 1dari 5

1. What J2EE?

 J2EE is a standard for building enterprise applications. It includes technologies for implementing business logic, database access,
 message exchange, transaction management, web requests processing and many other features.
 The main approach of J2EE is separating presentation level from business logic (lightweight client applications) and business logic
from data storage ( application level of n-tier architecture).J2EE is an environment for developing and deploying 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 applet container?


 IManages the execution of applets.Consists of a Web browser and Java Plugin running on the client together.

3. What is Enterprise Java Beans (EJB) container?


 It manages the execution of enterprise beans for J2EE application. Enterprise beans and their container run on the J2EE server.

4. What is life cycle (J2EE component)?


 The framework events of a J2EE component's existence. Each type of component has defining events that mark its transition into
states in which it has varying availability for use. For example, servlet is created and has its init method called by its container
before invocation of its service method by clients or other servlets that require its functionality. The init and destroy methods in
this example are callback methods.
Similar considerations apply to the life cycle of all J2EE component types :
 Enterprise beans Web components (servlets or JSP pages) Applets and Application clients

Are JavaBeans components?


 No. Java Beans components are not considered J2EE component by the J2EE specification.
 They are written to manage the data flow between an application client or applet and components running on the J2EE server or between server co
methods for accessing the data in the instance variables.Java Beans components used in this way ]
 are typically simple in design and implementation, but should conform to the naming and design conventions outlined in
 the Java Beans component architecture.

6. What is Java Beans component?


 A java class can be maintained by tools and composed into applications.
 A Java Beans component must adhere to certain property and event interface conventions.

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

8. What is web component?


A component that provides services in response to requests; either a servlet or a JSP page
9. What is J2EE module?
A software unit that consists of one or more J2EE components of the same container type and one deployment descriptor of that type. There
 EJB
 Web
 Application client and
 Resource adapter
Modules can be deployed as standalone units or can be assembled into a J2EE application.
10. What is J2EE product?
An implementation that conforms to the J2EE platform specification.
11. What is J2EE application?
Any deployable unit of J2EE functionality.
This can be a single J2EE module or a group of modules packaged into an Ear file along with a J2EE application deployment descriptor.
J2EE applications are typically engineered to be distributed across multiple computing tiers.
12. What is web component?
A component that provides services in response to requests; either a servlet or a JSP page.
13. What is application client module?
A software unit that consists of one or more classes and an application client deployment descriptor.
13. What is application client module?
A software unit that consists of one or more classes and an application client deployment descriptor.
16. What is the abbreviation for SAX?
Abbreviation of Simple API for XML.

17. What is message?


 In the Java Message Service, an asynchronous request, report, or event that is created, sent and consumed by
 an enterprise application and not by a human.It contains vital information needed to coordinate enterprise applications,
 in the form of precisely formatted data that describes specific business actions.

18. What is web service?


 An application that exists in a distributed environment, such as the Internet.
 A web service accepts a request, performs its function based on the request, and returns a response.
 The request and the response can be part of the same operation, or they can occur separately, in which case the consumer does not
 need to wait for a response. Both the request and the response usually take the form of XML, a portable data interchange format,
 and are delivered over a wire protocol, such as HTTP.

19. What is backing bean?


 A Java Beans component that corresponds to a JSP page that includes Java Server 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.

20. What is Web module?


A deployable unit that consists of one or more Web components, other resources and a Web application deployment descriptor contained
format.
21. What are the types of J2EE modules?
 Application client module
 Web module
 Enterprise JavaBeans module
 Resource adapter module

22. What is Java Secure Socket Extension (JSSE)?


A set of packages that enables secure Internet communications.
23. What is URI?
 Uniform resource identifier. A globally unique identifier for an abstract or physical resource. A URL is a kind of URI that specifies
 s the retrieval protocol (http or https for Web applications) and physical location of a resource (host name and host relative path).
 A URN is another type of URI.
24. What is Servlet?
A java program that extends the functionality of a Web server, generating dynamic content and interacting with Web applications
using a request response paradigm.
25. What does web module contains?
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.

26. What is Java Transaction Services (JTS)?


Specifies the implementation of a transaction manager that supports JTA and implements the Java mapping of the Object Management
Group Object Transaction Service 1.1 specification at the level below the API.
27. What is URN?
 Uniform resource name.
 A unique identifier that identifies an entity but doesn't tell where it is located.
 A system can use a URN to lookup an entity locally before trying to find it on the Web. It also allows the web location to change,
 while still allowing the entity to be found.

What is WAR file?


Web application archive file A JAR that contains a web module

How do we package J2EE component?

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 or be made up of two or more J2EE applications, depending on design requirements.
A J2EE application and each of its module has its own deployment descriptor.
A deployment is an XML document with an .xml extension that describes a component's deployment settings.

Q1). Name the major components for J2EE apps briefly?

The major components of any J2EE web-enabled app include – client-tier components, business tier components, web tier
components, and EIS (Enterprise Information System) components etc.

 Client-tier components are made to run on client machine.


 Web tier components are made to run on J2EE server.
 Business tier components are made to run on J2EE server, and
 EIS components run over the EIS server.

Q2). Name the different types of J2EE client?


The different J2EE clients are Applets, application clients, wireless clients and Java Web start clients.
Q3). Define the struts in the J2EE framework?
Structs are based on MVC (Model-View-Controller) architecture used to design applications for large enterprises. It can be
described in detail as follows –
 Model – The internal state of a system is defined by Model. It may be either single or a cluster of Java Beans based on
app architecture.
 View – The view of any enterprise app is usually designed by JSP technology.
 Controller – It is used to process the client request and respond accordingly based on the request. Basically, it is used
to manage the actions of users.
Q4). How to design interactive UI for J2EE apps?
To design interactive User Interface in J2EE, you must opt for JSF (Java Server Faces). The framework has a wider set of reusable
UI components that is based on MVC architecture and design concepts. Further, the automated data that is created at server
side and displayed ay client side is also managed by the JSF.
Q5). Define Hashtable and how it works in J2EE?
Hashtable is taken as a cluster of synchronized objects where Null values are allowed but not the duplicated values. It works
very much similar to the HashMap.

Q6). Define Hibernate and HQL?


Hibernate is an open-source query and object-relational mapping service. Here, you can write HQL (Hibernate Query Language)
scripts instead of using SQL that saves a lot of time and efforts. Hibernate is closely related to composition, polymorphism,
inheritance, and collections. With the help of this framework, you can process queries beautifully by using simple Java objects.
Q7). Explain the limitation of Hibernate, if any?
 The execution of queries is slower.
 There is only HQL support for composite keys.
 There are no shared references to the value type.
Q8). Explain the major benefits of Hibernate?
 Hibernate is independent of database and vendor so it is termed as the portable framework.
 Domain objects can be mapped to relational databases.
 JPA support for standard ORM.
 The database connectivity is better in Hibernate when compared to JDBC.
Q9). Define the web components and how are they helpful?
Java Servlets or Java Server Pages are the web components that dynamically receive requests from users and respond
accordingly. JSP pages are further executed in the form of servlets to generate more static content for the web pages.
Q10). Define ORM and how it works in J2EE?
ORM is abbreviated as Object-relational mapping in J2EE. The objects are mapped to tables in the relational databases by
transforming data from one form to another.
J2EE Interview Questions & Answers For Experienced
Q11). How will you define save () or update () methods in Hibernate?

Save () Update ()

It is used to save or store an object in the


It is used to update the existing objects once the
database. It creates a new entry every time you
record is found with the help of identifier.
create a fresh object.

Q12). How will you differentiate the get () and Load () methods?

Load () Get ()

If an object is not found in Cache or database, then


If an object is not found either in Cache or
Get () method returns a null value, not the
database, Load () method will throw an exception.
exception.

Q13). List the advantages of ORM (object-relational mapping)?


 Productivity – The automatic code is generated that minimizes the overall data access time based on the data model
defined.
 Performance – The complete data access needs of an application are managed by the automated code generated by
the ORM. Because there is no need for any extra code so overall data access process is made faster and optimized.
 Vendor independent – The code generated is independent of the vendor that increased the overall portability of an
application.
 Maintainability – The code is well tested generated by the ORM and only a developer can understand the code
perfectly.
Q14). Describe the web container in J2EE?
There is an interface in between component and the low-level platform with defined functionality that is generally designed to
support the component and termed as the container in J2EE.
Q15). Define the concept of connection pooling?
Connection Pooling is a simple concept that is popular to reuse the existing connections. In other words, if object connections
are already well defined and connected then they can be reused whenever there is a requirement instead of generating the
new one.
Q16). What is Spring Framework and discuss its benefits?
To reduce the overall complexity of an enterprise application, the open source Spring Framework is used. The major benefits of
any spring Framework include –
 The middle tier objects can be managed more efficiently.
 The properties can be initialized quickly.
 The testability of application is made easier with injection dependencies.
 The containers are lightweight and components are defined clearly.
 The Spring services are managed or configured in runtime environment instead of focusing on its architectural layer.
Q17). What are the different type of collections in Hibernate?
A collection is defined as one-to-many references. The most popular collections in Hibernate include – Array, List, Set, Map, or
Bag types.
Q18). What is a thin client?
A program that doesn’t have any complex operations like connection, business rules or database queries is termed as the thin
client.
Q19). Define the servlet?
Servlet is a server-side component that offers full functionalities to create a server-side program. The different servlets are
available with a specific design for a variety of protocols. Most popular type of protocol for the servlet is HTTP.
Q20). Name the different phases of servlet lifecycle?
Class Loading Phase, Instantiation Phase, Initialize Phase, Removal Phase, and the Request Handling Phase.

Anda mungkin juga menyukai