Top J2EE Interview Questions and Answers, Best J2EE Interview Questions

 J2EE Interview Questions and Answers:

1. What leads J2EE suitable for distributed multitiered Applications? - The J2EE platform uses a multitiered distributed tool model. Application logic is divided to elements according to function, and the a large number of tool elements so force up a J2EE tool are installed on unique machines depending on the tier in the multitiered J2EE settings to that the tool ingredient belongs. The J2EE tool features are:
 * Client-tier elements run on the customer machine.
 * Web-tier factors run on the J2EE server.
 * Business-tier ingredients run on the J2EE server.
 * Enterprise hints process (EIS)-tier service works on the EIS server.

 2. What is J2EE? - J2EE is an surroundings for developing and deploying enterprise applications. The J2EE platform consists of a set of services, software programming interfaces (APIs), and protocols too produce the functionality for developing multitiered, web-based applications.

 3. What are the elements of J2EE application?
 - A J2EE factor is a self-contained functional program unit this is erected to a J2EE software through its connected classes and files and communicates amidst further components. The J2EE specification defines the next J2EE components:
 1. Application clientele and applets are customer components.
 2. Java Servlet and JavaServer Pages technology elements are web components.
 3. Enterprise JavaBeans ingredients (enterprise beans) are boom components.
 4. Resource adapter elements while by EIS and program vendors.

 4. What do Enterprise JavaBeans factors contain? - Enterprise JavaBeans elements contains Business code, that is logic

 who solves or meets the needs of a select arena domain the as banking, retail, or finance, is handled by enterprise beans running in the market tier. All the market code is contained inside an Enterprise Bean that receives information for patron programs, manages it (if necessary), and sends it to the enterprise info approach tier for storage. An enterprise bean furthermore retrieves information based on data from storage, manages it (if necessary), and sends it returning to the customer program.

 5. Is J2EE tool sole a web-based? - No, It depends on brand of software overly patron wants. A J2EE software can be web-based or non-web-based. if an program patron executes on the customer machine, it is a non-web-based J2EE application. The J2EE software can produce a way for users to deal with tasks these types of as J2EE method or tool administration. It normally has a graphical user interface made based on information from Swing or AWT APIs, or a command-line interface. When user request, it can open an HTTP connection to confirm communication providing a servlet running in the web tier.

 6. Are JavaBeans J2EE components? - No. JavaBeans elements are not taken into account J2EE elements by the J2EE specification. They are written to manage the info flow between an tool patron or applet and ingredients running on the J2EE server or between server elements and a database. JavaBeans factors written for the J2EE platform experience instance variables and get and set resources for accessing the info in the instance variables. JavaBeans elements used up in currently way are by and large easy in design and implementation, but serves to conform to the naming and design conventions outlined in the JavaBeans factor architecture.

 7. Is HTML web page a web component? - No. Static HTML webpages and applets are bundled through web factors within the duration of program assembly, but are not measured web elements by the J2EE specification. Even the server-side tool classes are not judged to be web components, either.

 8. What can be comprehended as a web component? - J2EE Web elements can be either servlets or JSP pages. Servlets are Java programming lingo classes too dynamically system requests and put up responses. JSP webpages are text-based documents overly execute as servlets but permit a larger number of expected system to making static content.

 9. What is the container? - Containers are the interface between a cog and the low-level platform select functionality so strengthens the component. Before a Web, enterprise bean, or software customer cog can be executed, it are required to be erected to a J2EE program and deployed to its container.

 10. What are container services? - A container is a runtime substantiation of a system-level entity. Containers submit ingredients amidst services this type of as lifecycle management, security, deployment, and threading.

 11. What is the web container? - Servlet and JSP containers are collectively referred to as Web containers. It deals with the execution of JSP web page and servlet ingredients for J2EE applications. Web elements and such a container run on the J2EE server.

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

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

 14. How do we package J2EE components? - J2EE ingredients are packaged separately and bundled to a J2EE tool for deployment. Each component, its tethered files these as GIF and HTML files or server-side service classes, and a utilization descriptor are made to a module and added to the J2EE application. A J2EE software is composed of one or further enterprise bean,Web, or software patron element modules. The ultimate enterprise key can use one J2EE program or be earned up of two or supplementary J2EE applications, depending on design requirements. A J2EE program and every of its modules has its own utilization descriptor. A operation descriptor is an XML document in an .xml extension who describes a component’s utilization settings.

 15. What is a thin client? - A thin customer is a lightweight interface to the tool the performs not own this operations covet query databases, execute complex arena rules, or connect to legacy applications.

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

 17. What is employment descriptor? - A operation descriptor is an Extensible Markup Language (XML) text-based file amidst an .xml extension the describes a component’s operation settings. A J2EE software and every of its modules has its own employment descriptor. For example, an enterprise bean module operation descriptor declares condition attributes and security authorizations

 for an enterprise bean. Because employment descriptor tips is declarative, it can be transformed without modifying the bean source code. At run time, the J2EE server reports the employment descriptor and acts upon the ingredient accordingly.

 18. What is the EAR file? - An EAR file is a rule JAR file in an .ear extension, named according to Enterprise ARchive file. A J2EE software in all of its modules is delivered in EAR file.

 19. What is JTA and JTS? - JTA is the abbreviation for the Java Transaction API. JTS is the abbreviation for the Jave Transaction Service. JTA permits a usual interface and supplies you to demarcate transactions in a manner this is independent of the condition manager implementation. The J2EE SDK implements the purchase manager among JTS. But your code doesn’t engage the JTS supplies directly. Instead, it invokes the JTA methods, that when that happens clamor the lower-level JTS routines. Therefore, JTA is a prohibative grade purchase interface so your program uses to control transaction. and JTS is a low total sum arrangement interface and ejb uses behind the scenes (client code doesn’t directly interact among JTS. It is established on object condition service(OTS) that is half of CORBA.

 20. What is JAXP? - JAXP stands for Java API for XML. XML is a slang for representing and describing text-based information that can be was reading and handled by any service or application so uses XML APIs. It allows regular services to determine the brand of an arbitrary piece of data, encapsulate entrance to it, come to find the operations to be had on it, and commence the appropriate JavaBeans element to perform persons operations.

 21. What is J2EE Connector? - The J2EE Connector API is used up by J2EE ideas vendors and method integrators to embark on resource adapters the validation entrance to enterprise hints authorities this can be plugged to any J2EE product. Each sort of database or EIS has a unique resource adapter. Note: A resource adapter is a tool cog such a gives J2EE software ingredients to entrance and interact amidst the underlying resource manager. Because a resource adapter is selected to its resource manager, there is more often than not a distinct resource adapter for every kind of database or enterprise guidelines system.

 22. What is JAAP? - The Java Authentication and Authorization Service (JAAS) supplies a way for a J2EE program to authenticate and authorize a select user or board of users to run it. It is a norm Pluggable Authentication Module (PAM) framework such a extends the Java 2 platform security architecture to substantiation user-based authorization.

 23. What is Java Naming and Directory Service? - The JNDI supplies naming and list functionality. It gives applications in on resources for performing common register operations, these as associating attributes in on objects and searching the web for objects paying off the attributes. Using JNDI, a J2EE program can record and retrieve any brand of named Java object. Because JNDI is independent of any exact implementations, applications can use JNDI to entrance various naming and record services, plus pre&wshyp;existing naming and listing services this type of as LDAP, NDS, DNS, and NIS.

 24. What is Struts? - A Web web page development framework. Struts combines Java Servlets, Java Server Pages, individualized tags, and message equipment to a unified framework. It is a cooperative, synergistic platform, suitable for development teams, independent developers, and anybody between.

 25. How is the MVC design pattern exhausted in Struts framework? - In the MVC design pattern, program flow is mediated by a pivotal Controller. The Controller delegates requests to an appropriate handler. The handlers are tethered to a Model, and every handler acts as an adapter between the ask and the Model. The Model represents, or encapsulates, an application’s sector logic or state. Control is largely afterward forwarded returning during the Controller to the appropriate View.

The forwarding can be resolved by consulting a set of mappings, for the most part loaded based on a database or configuration file. This supplies a loose coupling between the View and Model, that can give out an software majorly more effortless to embark on and maintain. Controller: Servlet controller that handed out by Struts itself; View: how you can see on the screen, a JSP web site and presentation components; Model: System area and a industry logic JavaBeans.

Post a Comment

0 Comments