Vous êtes sur la page 1sur 5

10/23/13

J2EE interview questions and answers | TechInterviews


Search Tech Interv iews

Tech Interviews
Prepare for job interviews with the questions and answers asked by high-tech employers
.NET C++ Da t a ba se Gen er a l Ha r dw a r e Ja v a Net w or k in g Pu zzles SA P A BA P

Search

T est in g

Un ix /Lin u x

VB

W eb dev

W in dow s

Jav a > > J2EE int erview quest ions and answers

J2EE interview questions and answers


By adm in | Sept em ber 1 , 2 0 0 4

QuickBooks From Intuit


quickbooks.in

Thanks to Sachin Rastogi for contributing these. 1 . What makes J2EE suit able for dist ribut ed mult it iered Applicat ions? - The J2 EE platform uses a m ultitiered distributed application m odel. Application logic is div ided into com ponents according to function, and the v arious application com ponents that m ake up a J2 EE application are installed on different m achines depending on the tier in the m ultitiered J2 EE env ironm ent to which the application com ponent belongs. The J2 EE application parts are: Client-tier com ponents run on the client m achine. Web-tier com ponents run on the J2 EE serv er. Business-tier com ponents run on the J2 EE serv er. Enterprise inform ation sy stem (EIS)-tier software runs on the EIS serv er. 2 . What is J2EE? - J2 EE is an env ironm ent for dev eloping and deploy ing enterprise applications. The J2 EE platform consists of a set of serv ices, application program m ing interfaces (APIs), and protocols that prov ide the functionality for dev eloping m ultitiered, web-based applications. 3 . What are t he component s of J2EE applicat ion? - A J2 EE com ponent is a self-contained functional software unit that is assem bled into a J2 EE application with its related classes and files and com m unicates with other com ponents. The J2 EE specification defines the following J2 EE com ponents: A. Application clients and applets are client com ponents. B. Jav a Serv let and Jav aServ er Pages technology com ponents are web com ponents. C. Enterprise Jav aBeans com ponents (enterprise beans) are business com ponents. D. Resource adapter com ponents prov ided by EIS and tool v endors. 4 . What do Ent erprise JavaBeans component s cont ain? - Enterprise Jav aBeans com ponents contains Business code, which is logic that solv es or m eets the needs of a particular business dom ain such as banking, retail, or finance, is handled by enterprise beans running in the business tier. All the business code is contained inside an Enterprise Bean which receiv es data from client program s, processes it (if necessary ), and sends it to the enterprise inform ation sy stem tier for storage. An enterprise bean also retriev es data from storage, processes it (if necessary ), and sends it back to the client program . 5. Is J2EE applicat ion only a web-based? - No, It depends on ty pe of application that client wants. A J2 EE application can be web-based or non-web-based. if an application client executes on the client m achine, it is a non-web-based J2 EE application. The J2 EE application can prov ide a way for users to handle tasks such as J2 EE sy stem or application adm inistration. It ty pically has a graphical user interface created from Swing or AWT APIs, or a com m and-line interface. When user request, it can open an HTTP connection to establish com m unication with a serv let running in the web tier. 6 . Are JavaBeans J2EE component s? - No. Jav aBeans com ponents are not considered J2 EE com ponents by the J2 EE specification. They are written to m anage the data flow between an application client or applet and com ponents running on the J2 EE serv er or between serv er com ponents and a database. Jav aBeans com ponents written for the J2 EE platform hav e instance v ariables and get and set m ethods for accessing the data

Must Have Tool for Business Owners. Access Anywhere. Try it for Free!

Dr. Batra's Hair Clinic Urgent Jobs at Cognizant Naukri.com - Register Now
A ds by Goog le

Java Developers 0 -1 Year


Jobs for Jav a Dev elopers in a Top Online Trav el Com pany . Apply Now!
Mon st er in dia .com /JA V A

Government Vacancies
Apply for Jobs in the Gov ernm ent Sector. 1 00% Free, Register Now!
Qu ik r .com /Gov er n m en t -Jobs

Get T he Hottest Deals


Just v isit getithotdeals and find unlim ited deals. Subscribe now!
g et it h ot dea ls.in

Job Interview Question Articles


C# Interv iew Questions and Answers QTP Interv iew Questions and Answers C+ + Interv iew Questions and Answers PHP Interv iew Questions and Answers XML Interv iew Questions and Answers Jav aScript Interv iew Questions and Answers Asp.Net Interv iew Questions and Answers J2 EE Interv iew Questions and Answers ABAP Interv iew Questions and Answers Perl Interv iew Questions and Answers Jav a Interv iew Questions and Answers

Resources
Technology Question and Answer Website How to dance around the salary -expectation question

www.techinterviews.com/j2ee-interview-questions-and-answers

1/5

10/23/13

J2EE interview questions and answers | TechInterviews


in the instance v ariables. Jav aBeans com ponents used in this way are ty pically sim ple in design and im plem entation, but should conform to the nam ing and design conv entions outlined in the Jav aBeans com ponent architecture. Is HTML page a web component ? - No. Static HTML pages and applets are bundled with web com ponents during application assem bly , but are not considered web com ponents by the J2 EE specification. Ev en the serv er-side utility classes are not considered web com ponents, either. What can be considered as a web component ? - J2 EE Web com ponents can be either serv lets or JSP pages. Serv lets are Jav a program m ing language classes that dy nam ically process requests and construct responses. JSP pages are text-based docum ents that execute as serv lets but allow a m ore natural approach to creating static content. What is t he cont ainer? - Containers are the interface between a com ponent and the low-lev el platform specific functionality that supports the com ponent. Before a Web, enterprise bean, or application client com ponent can be executed, it m ust be assem bled into a J2 EE application and deploy ed into its container. What are cont ainer services? - A container is a runtim e support of a sy stem -lev el entity . Containers prov ide com ponents with serv ices such as lifecy cle m anagem ent, security , deploy m ent, and threading. What is t he web cont ainer? - Serv let and JSP containers are collectiv ely referred to as Web containers. It m anages the execution of JSP page and serv let com ponents for J2 EE applications. Web com ponents and their container run on the J2 EE serv er. What is Ent erprise JavaBeans (EJB) cont ainer? - It m anages the execution of enterprise beans for J2 EE applications. Enterprise beans and their container run on the J2 EE serv er. What is Applet cont ainer? - IManages the execution of applets. Consists of a Web browser and Jav a Plugin running on the client together. How do we package J2EE component s? - J2 EE com ponents are packaged separately and bundled into a J2 EE application for deploy m ent. Each com ponent, its related files such as GIF and HTML files or serv er-side utility classes, and a deploy m ent descriptor are assem bled into a m odule and added to the J2 EE application. A J2 EE application is com posed of one or m ore enterprise bean,Web, or application client com ponent m odules. The final enterprise solution can use one J2 EE application or be m ade up of two or m ore J2 EE applications, depending on design requirem ents. A J2 EE application and each of its m odules has its own deploy m ent descriptor. A deploy m ent descriptor is an XML docum ent with an .xm l extension that describes a com ponents deploy m ent settings. What is a t hin client ? - A thin client is a lightweight interface to the application that does not hav e such operations like query databases, execute com plex business rules, or connect to legacy applications. What are t y pes of J2EE client s? - Following are the ty pes of J2 EE clients: Applets Application clients Jav a Web Start-enabled rich clients, powered by Jav a Web Start technology . Wireless clients, based on Mobile Inform ation Dev ice Profile (MIDP) technology . 1 0 m istakes m anagers m ake during job interv iews Stupid interv iew questions How to Answer These Tricky Interv iew Questions Sev en tips for writing an online profile for LinkedIn, My Space or Facebook

7.

8.

T utorials
AJAX Tutorials Dealing with y our job Getting a job Jav aScript tutorials Job interv iew tips from Yahoo! HotJobs My SQL tutorials Retiring from y our job Ruby on Rails tutorials Salary guide for IT jobs Self-em ploy m ent TechInterv iews guides in PDF Understanding pointers XML Tutorials XUL tutorials

9.

1 0.

11.

1 2.

RSS Feeds
All posts All com m ents

1 3. 1 4.

1 5.

1 6.

1 7 . What is deploy ment descript or? - A deploy m ent descriptor is an Extensible Markup Language (XML) text-based file with an .xm l extension that describes a com ponents deploy m ent settings. A J2 EE application and each of its m odules has its own deploy m ent descriptor. For exam ple, an enterprise bean m odule deploy m ent descriptor declares transaction attributes and security authorizations for an enterprise bean. Because deploy m ent descriptor inform ation is declarativ e, it can be changed without m odify ing the bean source code. At run tim e, the J2 EE serv er reads the deploy m ent descriptor and acts upon the com ponent accordingly . 1 8. What is t he EAR file? - An EAR file is a standard JAR file with an .ear extension, nam ed from Enterprise ARchiv e file. A J2 EE application with all of its m odules is deliv ered in EAR file. 1 9 . What is JTA and JTS? - JTA is the abbrev iation for the Jav a Transaction API. JTS is the abbrev iation for the Jav e Transaction Serv ice. JTA prov ides a standard interface and allows y ou to dem arcate transactions in a m anner that is independent of the transaction m anager im plem entation. The J2 EE SDK im plem ents the transaction m anager with JTS. But y our code doesnt call the JTS m ethods directly . Instead, it inv okes the JTA m ethods, which then call the lower-lev el JTS routines. Therefore, JTA is a high lev el transaction interface that y our application uses to control transaction. and JTS is a low lev el transaction interface and ejb uses behind the scenes (client code doesnt directly interact with JTS. It is based on object transaction serv ice(OTS) which is part of CORBA. 2 0. What is JAXP? - JAXP stands for Jav a API for XML. XML is a language for representing and describing text-based data which can be read and handled by any program or tool that uses XML APIs. It prov ides standard serv ices to determ ine the ty pe

www.techinterviews.com/j2ee-interview-questions-and-answers

2/5

10/23/13

J2EE interview questions and answers | TechInterviews


of an arbitrary piece of data, encapsulate access to it, discov er the operations av ailable on it, and create the appropriate Jav aBeans com ponent to perform those operations. What is J2EE Connect or? - The J2 EE Connector API is used by J2 EE tools v endors and sy stem integrators to create resource adapters that support access to enterprise inform ation sy stem s that can be plugged into any J2 EE product. Each ty pe of database or EIS has a different resource adapter. Note: A resource adapter is a software com ponent that allows J2 EE application com ponents to access and interact with the underly ing resource m anager. Because a resource adapter is specific to its resource m anager, there is ty pically a different resource adapter for each ty pe of database or enterprise inform ation sy stem . What is JAAP? - The Jav a Authentication and Authorization Serv ice (JAAS) prov ides a way for a J2 EE application to authenticate and authorize a specific user or group of users to run it. It is a standard Pluggable Authentication Module (PAM) fram ework that extends the Jav a 2 platform security architecture to support user-based authorization. What is Java Naming and Direct ory Service? - The JNDI prov ides nam ing and directory functionality . It prov ides applications with m ethods for perform ing standard directory operations, such as associating attributes with objects and searching for objects using their attributes. Using JNDI, a J2 EE application can store and retriev e any ty pe of nam ed Jav a object. Because JNDI is independent of any specific im plem entations, applications can use JNDI to access m ultiple nam ing and directory serv ices, including existing nam ing and directory serv ices such as LDAP, NDS, DNS, and NIS. What is St rut s? - A Web page dev elopm ent fram ework. Struts com bines Jav a Serv lets, Jav a Serv er Pages, custom tags, and m essage resources into a unified fram ework. It is a cooperativ e, sy nergistic platform , suitable for dev elopm ent team s, independent dev elopers, and ev ery one between. How is t he MVC design pat t ern used in St rut s framework? - In the MVC design pattern, application flow is m ediated by a central Controller. The Controller delegates requests to an appropriate handler. The handlers are tied to a Model, and each handler acts as an adapter between the request and the Model. The Model represents, or encapsulates, an applications business logic or state. Control is usually then forwarded back through the Controller to the appropriate View. The forwarding can be determ ined by consulting a set of m appings, usually loaded from a database or configuration file. This prov ides a loose coupling between the View and Model, which can m ake an application significantly easier to create and m aintain. Controller: Serv let controller which supplied by Struts itself; View: what y ou can see on the screen, a JSP page and presentation com ponents; Model: Sy stem state and a business logic Jav aBeans.

21 .

22.

23.

24.

2 5.

T h is en t r y w a s post ed in Java . Book m a r k t h e perm alink . Pos t a com m ent or lea v e a t r a ck ba ck : Track back URL.

Basic VB interv iew questions


A ds by Goog le

Wireless engineer interv iew questions

QuickBooks From Intuit


Intuit QuickBooks is now in India. A Must Software for SMEs. Try Free!
qu ick book s.in

Naukri.com - Register Now


Get Headhunted by Best Recruiters Top MNCs, Best Profile, High CTC
Na u k r i.com

Walk-Ins Jobs
Search for Walk Ins Job postings - Find y our new job today . Indeed
w w w .in deed.co.in /W a lk -In s

5 C OMME NT S ON J2 E E INT E R V IE W QUE S T IONS A ND A NS W E R S

Abhijit Paralikar
Posted 4/2/2007 at 11:50 am | Pe rmalink

Hi, I dont think the answer to the question no.

www.techinterviews.com/j2ee-interview-questions-and-answers

3/5

10/23/13

J2EE interview questions and answers | TechInterviews


2 5 How is the MVC design pattern used in Struts fram ework? is up to the m ark. The Model is not a part of struts fram ework. For the m odel part any thing from EJB, hibernate, JDBC etc can be used which are not a part of the struts fram ework. If this is what y ou m ean please state it explicitly in y our answer as this can be v ery confusing to a newbie in particular.

amhed
Posted 8/20/2007 at 9:44 pm | Pe rmalink

Honestly , will the people y ou are interv iewing ev er use this Book knowledge when they are working? Sure they would if they were to teach J2 EE. But if it was a program m ing position or architectural position I doubt that they actually hav e any use for such broad and encom passing triv ia FAQs. Oh by the way I think I saw the answers as the technologies are described in books. I think y our questions are v ery INAPPROPRIATE. Interv iews for soft dev should not be the sam e as college test questions. If y ou interv iew this way , I would not be surprised that y oud get a couple of bookish people that do not know how to think for them selv es. Or let m e guess, these are the questions non technical people expect technical people to answer. One suggestion, let the people actually inv olv ed in the grunt work do the interv iewing and it would probably boost m orale.

cffgfg
Posted 8/28/2007 at 1:56 am | Pe rmalink

What are the com ponents of J2 EE application? - A J2 EE com ponent is a self-contained functional software unit that is assem bled into a J2 EE application with its related classes and files and com m unicates with other com ponents. The J2 EE specification defines the following J2 EE com ponents:

what is a component ?
Posted 3/24/2008 at 5:20 am | Pe rmalink

What are the j2 EE com ponents? A j2 ee com ponent is a self contained functional software unit that is assem bled into a j2 EE application with its related classes and files with other com ponents. The j2 EE spec defines the follwing com ponents:

enos76
Posted 1/28/2009 at 5:33 am | Pe rmalink

I find this FAQ useful for getting the big picture while preparing for the SCJA certification - Thanks

POS T A C OMME NT

www.techinterviews.com/j2ee-interview-questions-and-answers

4/5

10/23/13

J2EE interview questions and answers | TechInterviews


Your em ail is never published nor shared. Required fields are m arked *
N am e * Em ai l *

Websi te

Com m en t

Post Com m ent

Pow er ed by WordPres s . Bu ilt on t h e Them atic Them e Fram ew ork .

www.techinterviews.com/j2ee-interview-questions-and-answers

5/5

Vous aimerez peut-être aussi