J2ee Interview Questions
What is J2EE?
J2EE is an environment for developing and deploying enterprise applications.? J2EE is a Java 2 Enterprise Edition. The J2EE platform is one of the richest platforms for the development and deployment of enterprise applications. J2EE specification is defined by Sun Microsystems Inc. The J2EE platform is a set of services, application programming interfaces (APIs), and protocols, which provides the functionality necessary for developing multi-tiered, web-based applications.
What do you understand by a J2EE module?
A J2EE module is a software building block that consists of one or more than J2EE components of the same container type along with one deployment descriptor of that type. J2EE specification specifies four characters of? modules:
a) Web module
b) EJB module
c) Resource adapter
d) Application client
Modules can also be assembled into J2EE applications.
What is J2EE component?
J2EE component is a collected functional software unit supported by a container and configurable at deployment time. The J2EE specification shows the following J2EE component part:
Application clients and applets that run on the client machine.
Java servlet and Java Server Pages (JSP) technology are Web components that run on the server machine.
Enterprise JavaBeans (EJB) (enterprise beans) are business components that run on the server.
What is bean-managed transaction?
The boundaries which are defined by an enterprise bean is called bean-managed transaction.
What are types of J2EE clients?
a) Java-Web Start
b) Clients Applets
c) Web applications
d) Wireless clients
Why J2EE is suitable for the development of distributed multi-tiered enterprise applications?
J2EE application program allows the developers to design and implement the business logic into components according to business requirement. J2EE architecture allows the development of multi-tired applications and the developed applications can be installed on different machines depending on the tier in the multi-tiered J2EE environment .
The J2EE application parts are:
a) Web-tier components.
b) Client-tier components.
c) Business-tier components.
d) Enterprise information system (EIS)-tier software.
What are the components of web module?
The components of web module are as following:
a) Java classes
b) JSP files
c) Gif and html files and
d) Web component deployment descriptors
What is J2EE Connector architecture?
J2EE Connector Architecture (JCA) is a Java-based technology solution for connecting application servers and enterprise information systems (EIS) as part of enterprise? application integration (EAI) solutions.
What is binding (XML)?
Generating the code needed to process a well-defined portion of XML data.
What is binding (JSF)?
Wiring UI components to back-end data sources such as backing bean? properties.
What is build file?
The XML file that contains one or more asant targets.
What is business logic?
The code that implements the functionality of an application.
What is business method?
A method of an enterprise bean that implements the business logic or rules of an application.
What is callback methods?
Component methods called by the container to notify the component of important events in its life cycle.
What is caller principal?
It is principal that identifies the invoker of the enterprise bean method.
What is caller?
It identifies the invoker of the enterprise bean method. It is same as caller principle.
Differentiate ear, jar and war files?
These files are created for different uses .These files are only zipped file using java jartool. Here is the description of these files:
ear files: The .ear file comprises the EJB modules of the application. .
jar files: are with the .jar extension. The .jar files comprises the libraries, resources and accessories files like property files..
Differentiate between Session Bean and Entity Bean?
Session Bean: Session is one of the EJB and it shows a single client inside theApplication Server. Stateless session bean is easy to develop and it is efficient. As compare to entity beans session beans need few server resources.
Entity Bean: An entity bean represents persistent global data from the database. Entity beans data are stored into database.
What is a container?
Containers are the interface between a component and the low-level platform specific functionality that supports the component.
What services provided by a container?
The services provided by container are as follows:
a) Transaction management for the bean
b) Instance pooling for the bean
d) Remote access
e) Lifecycle management
f) Database-connection pooling
What is Deployment Descriptor?
A deployment descriptor is simply an XML (Extensible Markup Language) file with the extension of .xml. Application servers reads the deployment descriptor to deploy the components contained in the deployment unit. As in: ejb-jar.xml file is used to describe the setting of the EJB.