If you're looking for J2EE Interview Questions for Experienced or Freshers, you are in right place. There are a lot of opportunities from many reputed companies in the world. According to research J2EE has a market share of about 7.0%. So, You still have the opportunity to move ahead in your career in J2EE Development. Mindmajix offers Top J2EE Interview Questions 2021 that helps you in cracking your interview & acquire a dream career as a J2EE Developer.
|In This Interview Questions, You Will Learn|
|Enthusiastic about exploring the skill set of J2EE? Then, have a look at the J2EE Training together with additional knowledge.|
The Java 2 Platform Enterprise Edition (J2EE) is a set of coordinated specifications and practices that together enable solutions for developing, deploying, and managing multi-tier server-centric applications. Building on the Java 2 Platform, Standard Edition (J2SE), the J2EE platform adds the capabilities necessary to provide a complete, stable, secure, and fast Java platform to the enterprise level. It provides value by significantly reducing the cost and complexity of developing and deploying multi-tier solutions, resulting in services that can be rapidly deployed and easily enhanced.
The J2EE platform provides the following:
Complete Web services support. The J2EE platform provides a framework for developing and deploying web services on the Java platform. The Java API for XML-based RPC (JAX-RPC) enables Java technology developers to develop SOAP-based interoperable and portable web services. Developers use the standard JAX-RPC programming model to develop SOAP-based web service clients and endpoints. A web service endpoint is described using a Web Services Description Language (WSDL) document. JAX-RPC enables JAX-RPC clients to invoke web services developed across heterogeneous platforms. In a similar manner, JAX-RPC web service endpoints can be invoked by heterogeneous clients.
It provides faster solutions delivery time to market. The J2EE platform uses “containers” to simplify development. J2EE containers provide for the separation of business logic from resource and lifecycle management, which means that developers can focus on writing business logic — their value add — rather than writing enterprise infrastructure. For example, the Enterprise JavaBeans (EJB) container (implemented by J2EE technology vendors) handles distributed communication, threading, scaling, transaction management, etc. Similarly, Java Servlets simplify web development by providing infrastructure for component, communication, and session management in a web container that is integrated with a web server.
It provides freedom of choice. J2EE technology is a set of standards that many vendors can implement. The vendors are free to compete on implementations but not on standards or APIs. Sun supplies a comprehensive J2EE Compatibility Test Suite (CTS) to J2EE licensees. The J2EE CTS helps ensure compatibility among the application vendors which helps ensure portability for the applications and components written for the J2EE platform. The J2EE platform brings Write Once, Run Anywhere (WORA) to the server.
It provides simplified connectivity. J2EE technology makes it easier to connect the applications and systems you already have and bring those capabilities to the web, to cell phones, and to devices. J2EE offers Java Message Service for integrating diverse applications in a loosely coupled, asynchronous way. The J2EE platform also offers CORBA support for tightly linking systems through remote method calls. In addition, the J2EE platform has J2EE Connectors for linking to enterprise information systems such as ERP systems, packaged financial applications, and CRM applications.
By offering one platform with faster solution delivery time to market, freedom of choice, and simplified connectivity, the J2EE platform helps IT by reducing TCO and simultaneously avoiding single-source for their enterprise software needs.
Yes, if the other implementations are WS-I compliant.
The primary technologies in the J2EE platform are Java API for XML-Based RPC (JAX-RPC), JavaServer Pages, Java Servlets, Enterprise Java Beans components, J2EE Connector Architecture, J2EE Management Model, J2EE Deployment API, Java Management Extensions (JMX), J2EE Authorization Contract for Containers, Java API for XML Registries (JAXR), Java Message Service (JMS), Java Naming and Directory Interface (JNDI), Java Transaction API (JTA), CORBA, and JDBC data access API.
|Related Article: J2EE Tutorial|
The Java 2 SDK, Enterprise Edition 1.4 (J2EE 1.4 SDK) is a complete package for developing and deploying J2EE 1.4 applications. The J2EE 1.4 SDK contains the Sun Java System Application Server Platform Edition 8, the J2SE 1.4.2 SDK, J2EE 1.4 platform API documentation, and a slew of samples to help developers learn about the J2EE platform and technologies and prototype J2EE applications. The J2EE 1.4 SDK is for both development and deployment.
The J2EE 1.4 specification is final and you can use the J2EE 1.4 SDK to deploy applications today. However, for improved reliability, scalability, and performance, it is recommended that you deploy your applications on J2EE 1.4 commercial implementations that will be available early in 2004.
If you want to deploy your application before 2004, and reliability, scalability, and performance are critical, you should consider using a high-performance application server that supports J2EE v1.3 such as the Sun Java System Application Server 7. Many application server vendors are expected to release J2EE platform v1.4 versions of their product before the spring.
J2EE applications that are written to the J2EE 1.3 specification will run in a J2EE 1.4 implementation. Backward compatibility is a requirement of the specification.
The J2EE architecture is the foundation of the Sun Java System Application Server, a component of the Sun Java Enterprise System. The Sun Java System Application Server in the current Sun Java Enterprise System is based on the J2EE platform v1.3, with additional support for Web services.
Developers familiar with J2EE technology can easily apply their skills to building applications, including Web services applications, using the Sun Java Enterprise System. For more information, see the Sun Java Enterprise System Web site.
You can get the source for the J2EE 1.4.1 Reference Implementation from the Sun Community Source Licensing site. The J2EE 1.4.1 Reference Implementation is the Sun Java System Application Server Platform Edition 8 minus the following components:
There are numerous choices of tools available for developing Java and J2EE applications. You can download the Open Source NetBeans IDE for free at NetBeans.org. Many of the J2EE compatible vendors offer tools that support any J2EE compatible application server.
ISVs need the J2EE platform because it gives them a blueprint for providing a complete enterprise computing solution on the Java platform. Enterprise developers J2EE Tutorial, because writing distributed business applications are hard, and they need a high-productivity solution that allows them to focus only on writing their business logic and having a full range of enterprise-class services to rely on, like transactional distributed objects, message-oriented middleware, and naming and directory services.
There are resources that are available for free on the Sun Solaris website that may help you resolve your issues without requiring technical support. For example, you can ask questions on the forum, search for known issues on the bug database, review the documentation, or take a look at code samples and applications to help you at no cost.
Production support is also available for a fee through Sun Service. For more information about Developer Technical Service and Sun Service, you can go visit here
Yes. The J2EE Compatibility Test Suite (CTS) is available for the J2EE platform. The J2EE CTS contains over 5,000 tests for J2EE 1.4 and will contain more for later versions. This test suite tests compatibility by performing specific application functions and checking results. For example, to test the JDBC call to insert a row in a database, an EJB component makes a call to insert a row, and then a call is made to check that the row was inserted.
A J2EE licensee has signed a commercial distribution license for J2EE. That means the licensee has the compatibility tests and has made a commitment to compatibility. It does not mean the licensees’ products are necessarily compatible yet. Look for the J2EE brand which signifies that the specific branded product has passed the Compatibility Test Suite (CTS) and is compatible.
Tomcat is based on the original implementation of the JavaServer Pages (JSP) and Java Servlet specifications, which was donated by Sun to the Apache Software Foundation in 1999. Sun continues to participate in the development of Tomcat at Apache, focusing on keeping Tomcat current with new versions of the specifications coming out of the Java Community Source Process.
Sun adapts and integrates the then-current Tomcat source code into new releases of the J2EE SDK. However, since Tomcat evolves rapidly at Apache, there are additional differences between the JSP and Servlet implementations in the J2EE SDK and in Tomcat between J2EE SDK releases. Tomcat source and binary code are governed by the ASF license, which freely allows deployment and redistribution.
The Java EE 5 SDK provides a complete implementation of the Java EE 5 specification along with extra features to help developers learn about what’s new and improved in the specification.
The Java EE 5 SDK includes the Sun Java System Application Server Platform Edition 9, the Java SE platform as its foundation, and various tools to help developers’ prototype Java EE applications and learn about the Java EE platform and technologies.
The Enterprise JavaBeans or EJB platform handles functions such as transaction and state management, multithreading, resource pooling, and simple searches while you concentrate on writing business logic.
The JavaMail API provides a set of abstract classes that model a mail system. The API provides a platform-independent and protocol-independent framework to build Java technology-based email client applications.
The following are the design goals of J2EE architecture:
Service Availability: The application should be available 24 * 7. The business depends on the application without the need for customer service representatives
Data Connectivity: The application should be able to connect to mainframe systems and other legacy systems to ensure business functions as usual
Accessibility: The user should be able to connect the application from anywhere and from any electronic devices
User Interaction: The user should be able to connect to the application from desktop, laptop, PDA, and mobile
Flexibility: The architecture should be created in such a way that the developer just concentrates on the business component model (business logic) and the rest of the services are handled by the server
The following are the roles of J2EE architect:
Architecture defines the structural issues, communication protocols, data access, synchronization, and subsystems’ classification. It also defines the architectural design of the component interfaces. In Design, we define the components to be created for each interface, the inputs, the outputs, algorithms, and data structures. In short, the designers describe each component’s internal details.
The following activities will be performed in Architectural Analysis:
Use case diagram: This is developed to depict the high level system functionality
Class Diagram: This is developed to depict the functionality as classes and methods
Collaboration Diagram: This is developed to depict how each class talk to each other
Sequence Diagram: This is developed to depict the operation sequence
The following activities will be performed in Architectural Design:
The following activities will be performed in object-oriented design:
The following are the components of multi-tier architecture:
Presentation Tier: The front end component is present in this tier which is used to display the presentation
Resource Tier: The back end component is present in this tier which is used to communicate with the database
Business Tier: The component present in this tier is used to provide business logic for the system
The following are the advantages of multi-tier client-server architecture:
The following are the responsibilities of the bean developer:
The following are the responsibilities of the application assembler:
The following are the responsibilities of bean deployer:
The third-party companies that provide the software can play any of the following three roles:
Component Provider: Responsible for developing object modeling, programming, architecture, and business process
Container Provider: Responsible for proving the environment during runtime to the server
EAR represents the Enterprise Archive file. It contains the components of the web, EJB, and client. All the components are packed in a compressed file called the .ear file.
WAR represents Web Archive file. It contains all the components related to the web application. All the components are packed in a compressed file called the .war file.
JAR represents the Java Archive file. It contains all the class files and library files that constitute an API (Application Programming Interface). All the components are packed in a compressed file called .jar file.
JTA represents Java Transaction API. It is used for coordinating and managing transactions across enterprise information system.
JNDI represents Java Naming Directory Interface. It is used for accessing information from directory services.
JMS represents Java Messaging Service. It is used for receiving and sending messages through messaging systems.
EDI represents Electronic Data Interchange. It is used for exchanging data through Value Added Network (VAN) which acts as the transmission medium.
EDI is expensive to install and requires customization by the exchanging clients. EDI also relies on X12 standards to interchange documents.
EAI represents Enterprise Application Integration. This makes one or more applications a single application and requires data to be transmitted to the appropriate system at the right time.
For example, while integrating sales and account systems, it is necessary for sales to send sales order to accounting to generate an invoice. Also, accounting must send an invoice to sales to update data for the sales professionals.
This system handles transaction automatically across application and eliminates human errors.
The intent to support XML is to:
The following protocols are used for communicating between business tier and user interface:
HTTP: It denotes ‘Hyper Text Transfer Protocol’
JMS: It denotes ‘Java Messaging Service’
RMI: It denotes ‘Remote Method Invocation’
CORBA: It denotes ‘Common Object Request Broker Architecture
DCOM: It denotes ‘Distributed Component Object Model’
The following are the advantages of HTTP protocol:
The following are the disadvantages of HTTP protocol
JRMP represents Java Remote Method Protocol. This is used by Remote Method Invocation (RMI) to pass java objects as arguments.
Since Java relies on Object Serialization which marshals objects as a stream, RMI relies on the protocol JRMP to transfer objects from one JVM (Java Virtual Machine) to another.
The following are the advantages of CORBA:
The following are the disadvantages of CORBA:
DCOM represents Distributed Component Object Model. This uses ORPC (Object Remote Procedure Call) protocol to support remote objects.
ORPC is built on top of RPC (Remote Procedure Call) and interacts with runtime services. DCOM supports multiple interfaces and the components can be created in various programming languages. Examples of languages are Java, C, Visual Basic, etc. DCOM is widely used in windows platforms.
The following are the capabilities of J2EE architecture:
Performance: performs functionality in a short time frame
Scalability: Supports even if the load on the server increases
Availability: The system is always accessible across 24 * 7
Flexibility: Change in hardware or architecture does not impact the system
Security: The information cannot be hacked and modified
Reusability: The component created for a system can be reused and save development time
System architecture represents the architecture as a product. This comprises the component functions, interfaces of the proposed system, constraints, and interactions. This is the base for application design implementation. Reference architecture represents architecture as a method or style. For a specific domain, reference architecture refers coherent design principle.
Best Practice can be defined as follows:
J2EE has the following tiers:
Client Tier: It represents the browser from which a request is sent to the server. The interfaces used in this tier are HTML browser, java application, an applet, or a non-java application.
Middle Tier: It comprises a presentation tier, business tier, and integration tier. The user interface is created in the presentation tier using JSP. The business logic is written in the business tier using EJB. The database objects are created in the integration tier.
Backend: This constitutes the Enterprise Information System (EIS) which is used to store data.
The best practices to be followed in the presentation layer are explained below:
MVC represents Model View Controller. The component used in Model, View, and Controller are explained below:
The J2EE system must possess the following to operate globally:
Financial Considerations: The method of payment to buy an item should contain many forms as not all visitors will have a credit card. Also, a government has its own taxes, custom restrictions, and tariffs.
Language Requirements: The application should support multiple languages and it has to be country-specific.
Legal Differences: Customs laws and privacy requirements are different for each country and each government has restrictions on images, ideas, and speeches.
DAO represents Data Access Object. The best practices to be followed in DAO are explained below:
Guideline refers to rule or agreement on operations which are developed by the professionally recognized organization or associations.
It also includes approved formal proprietary standards to be followed during the project activities.
An example of a Guideline is Analysts attempting to maximize data content to reduce network traffic.
VO represents Value objects. The best practices to be followed in Value Objects are explained below:
|Explore J2EE Sample Resumes Download & Edit, Get Noticed by Top Employers!|
The following are the best practices to be followed in session bean façade:
The following are the benefits of MVC:
Technical Content Writer