j2ee interview questions and answers _ techinterviews

5
10/23/13 J2EE interv iew questions and answ ers | TechInterview s w w w. techint erv i ew s.com/ j 2ee- interv i ew-quest i ons-and-answers 1/5 Java  >> J2EE interv iew questions and answers Search Tech Interv iews  Search Tech Interviews  Prepare for job interviews w ith the ques tions and ans we rs as ked b y high-tech e mployers . NET C++ Da t abase Gen er a l Ha r dw a r e Ja v a Net workin g Puz zl es S A P A BAP T est i n g Un ix/Lin u x V B Web dev Wi n dow s J2EE interview questions and answers By admin | September 1, 2004 Than ks to Sachin Rastogi for contributing these. 1.  Wha t ma kes J2EE sui ta ble f or dist ri but ed mu lt it ier ed Applicati ons? - The J2EE platform uses a multitiered dis tribut ed application model. Application logic is divided into components according to function, an d the v arious applic ation components that make up a J2EE application are installed on different machines depending on the tier in the multitiered J2EE environment to which the application component belo ngs. The J2 EE application parts ar e: Client-tier components run on the client machine.  Web-ti er com ponen ts r un on t he J 2EE serv er. Business -tier compo nents ru n on the J2 EE s erv er. Enterprise informat ion system (EIS)- tier sof twar e run s o n th e EI S server . 2.  Wha t is J2EE ? - J2EE is an environment for developing and deploying enterprise applications. The J2 EE platfo rm consists of a set of s erv ices, application program min g interfaces (APIs), and protoco ls that prov ide the functionality fo r dev eloping mu ltitiered, web-based applications. 3 .  Wha t are t he componen ts of J2EE appl icat ion? - A J2EE component is a self- contained funct ional so ftwar e unit that is asse mbled into a J2EE application with its related classes and files and commun icates with other components. The J2 EE spe cification defines the follo wing J2EE components:  A. App lic at ion c lien ts a nd appl ets a re cli ent com ponen ts. B. Jav a Serv let and Jav aServer Pages techno lo gy components are web components . C. Enterprise Jav aBeans co mponents (enterprise beans) are busines s co mponents. D. Re so urce ada pter components pro v ided by EIS and tool vendors. 4.  Wha t do Ent erpr ise Jav aBea ns componen ts cont ai n? - Enterprise JavaBeans components contains Business co de, wh ich is logic that so lv es o r m eets the needs of a part icular business do ma in such a s banking, r etail, or finance, is handled by enterprise beans running in the business tier. All the business code is contained inside an Enterprise Bean which receives data from client programs, proces ses it (if necessary ), an d sends it to the enter prise info rm ation sy stem tier for sto rag e. An enter prise bean also retriev es data from sto rag e, processes it (if necess ary ), and sends it back to the client program. 5. Is J2EE application only a web-based?  - No, It depends o n ty pe of app lication th at client w ants. A J2EE application can be web-based or n on- web-bas ed. if an applicat ion client executes on the client m achin e, it is a non-web- based J2EE applicatio n. The J2EE application can pr ovide a wa y fo r users to handle tasks such as J2EE system or application administration. It ty pically h as a graphical user interface created from Swing or A WT API s, o r a comm and-line interface. When u ser request, it can open an HTTP connection to establish communication with a servlet running in the web tier. 6.  Ar e Jav aBea ns J2EE component s? - No . Jav aBeans components are not conside red J2EE components by the J2EE specification. They are written to manage the data flow  betw een an app lic at ion c lien t or app let an d com ponen ts r un ni ng on t he J 2EE serv er or  betw een serv er com ponen ts a nd a d at aba se. J av aBea ns c ompon ent s wr itt en for t he J2EE platform have instance variables and get and set methods for accessing the data  A ds by Goog le Java Developers 0 -1 Year Jobs fo r Jav a Developers in a Top Online Tra v el Co mpany . Apply Now! Monsterindia.com/JAVA Government Vacancies  App ly for J obs in t he Gov ern m ent Sect or. 1 00 % Free, Register Now! Quikr.com/Government-Jobs Get The Hottest Deals Just visit getithotdeals and find unlimited deals. Subscribe now! getithotdeals.in Job Interview Question Articles C# Interview Questions and Answers QTP I nterv iew Questio ns and An swers C++ Inte rv iew Questio ns and Answers PHP Interv iew Questio ns and An swers XML Interv iew Questions and An swers Jav aScript Interview Questions and A nswers  Asp. Net Inter v iew Quest ions a nd An swer s J2EE Interview Questions and Answers  ABA P Inter v iew Quest ions a nd An swer s Perl Interview Questions and Answers Jav a Interview Questio ns and Answers Resources Technolo gy Questio n an d Answer Website Ho w to dance around th e salary -e xpectation question QuickBooks From Intuit quickbooks.in Must H ave Tool for Business Owners. Access  Anyw here. Try it for F ree! Dr. Batra's Hair Clinic Urgen t Jo bs at Cognizan t Naukri.com - Register Now

Upload: stylishpower-king

Post on 14-Apr-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: J2EE Interview Questions and Answers _ TechInterviews

7/27/2019 J2EE Interview Questions and Answers _ TechInterviews

http://slidepdf.com/reader/full/j2ee-interview-questions-and-answers-techinterviews 1/5

10/23/13 J2EE interview questions and answers | TechInterviews

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

Java >> J2EE interv iew questions and answers

Search Tech Interv iews

  SearchTech Interviews Prepare for job interviews w ith the questions and ans wers asked b y high-tech employers

.NET C++ Da ta base Gen er a l Ha r dw a r e Ja v a Netw or kin g Pu zzles SA P A BA P Testin g Un ix/Lin u x V B Web dev Win dow s

J2EE interview questions and answersBy  admin | September 1 , 2004

Than ks to Sachin Rastogi for contr ibuting these.

1 .  Wha t makes J2EE suita ble f or dist ribut ed mu lt it ier ed Applicati ons?

- The J2EE platform uses a multit iered distribut ed application model. Application logic

is divided into components according to function, an d the v arious application

components that make up a J2EE application are installed on different machines

depending on the tier in the multitiered J2EE environment to which the application

component belongs. The J2 EE application parts ar e:

Client-tier components run on the client machine.

 Web-tier componen ts r un on t he J 2EE serv er.

Business-tier components ru n on the J2 EE serv er.

Enterprise informat ion system (EIS)-tier softwar e run s on th e EIS server .

2.  Wha t is J2EE? - J2EE is an environment for developing and deploying enterprise

applications. The J2 EE platform consists of a set of serv ices, application program min g

interfaces (APIs), and protocols that prov ide the functionality for dev eloping

mu ltitiered, web-based applications.

3 .  Wha t are the componen ts of J2EE applicat ion?- A J2EE component is a self-contained funct ional softwar e unit that is assembled into a

J2EE application with its related classes and files and commun icates with other

components. The J2 EE specification defines the following J2EE components:

 A. Applicat ion c lien ts a nd appl ets a re cli ent com ponen ts.

B. Jav a Serv let and Jav aServer Pages technology components are web components.

C. Enterprise Jav aBeans components (enterprise beans) are business components.

D. Resource ada pter components prov ided by EIS and tool vendors.

4.  Wha t do Ent erprise Jav aBea ns components cont ain? - Enterprise JavaBeans

components contains Business code, wh ich is logic

that solv es or m eets the needs of a part icular business doma in such a s banking, r etail,

or finance, is handled by enterprise beans running in the business tier. All the business

code is contained inside an Enterprise Bean which receives data from client programs,

processes it (if necessary ), an d sends it to the enter prise inform ation sy stem tier for

storag e. An enter prise bean also retriev es data from storag e, processes it (if necessary ),and sends it back to the client program.

5. Is J2EE application only a web-based? - No, It depends on ty pe of application th at

client w ants. A J2EE application can be web-based or n on-web-based. if an applicat ion

client executes on the client m achin e, it is a non-web-based J2EE application. The

J2EE application can pr ovide a wa y for users to handle tasks such as J2EE system or

application administration. It ty pically h as a graphical user interface created from

Swing or A WT APIs, or a comm and-line interface. When u ser request, it can open an

HTTP connection to establish communication with a servlet running in the web tier.

6.  Ar e Jav aBea ns J2EE component s? - No. Jav aBeans components are not considered

J2EE components by the J2EE specification. They are written to manage the data flow 

 betw een an applicat ion c lien t or applet an d com ponen ts r un ning on t he J 2EE serv er or

 betw een serv er componen ts a nd a dat aba se. J av aBea ns c omponent s wr itt en for t he

J2EE platform have instance variables and get and set methods for accessing the data

 A ds by Goog le

Java Developers 0 -1 Year

Jobs for Jav a Developers in a Top Online Tra v el

Company . Apply Now!

Monsterindia.com/JAVA 

Government Vacancies Apply for J obs in t he Gov ern ment Sect or. 1 00 %

Free, Register Now!

Quikr.com/Government-Jobs

Get The Hottest Deals

Just visit getithotdeals and find unlimited deals.

Subscribe now!

getithotdeals.in

Job Interview Question Articles

C# Interview Questions and Answers

QTP Interv iew Questions and An swers

C++ Interv iew Questions and AnswersPHP Interv iew Questions and An swers

XML Interv iew Questions and An swers

Jav aScript Interv iew Questions and A nswers

 Asp. Net Inter v iew Quest ions a nd An swer s

J2EE Interview Questions and Answers

 ABA P Inter v iew Quest ions a nd An swer s

Perl Interview Questions and Answers

Jav a Interview Questions and Answers

Resources

Technology Question an d Answer Website

How to dance around th e salary -expectation

question

QuickBooks From Intuitquickbooks.in

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

Page 2: J2EE Interview Questions and Answers _ TechInterviews

7/27/2019 J2EE Interview Questions and Answers _ TechInterviews

http://slidepdf.com/reader/full/j2ee-interview-questions-and-answers-techinterviews 2/5

10/23/13 J2EE interview questions and answers | TechInterviews

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

in the instance v ariables. Jav aBeans components used in this way are ty pically simple

in design and implementation, but should conform to the naming and design

conventions outlined in the JavaBeans component architecture.

7 . Is HTML page a web component ? - No. Static HTML pages and applets are bu ndled

 wi th web componen ts du ri ng appl ica tion assem bly , bu t a re not considere d web

components by the J2 EE specification. Even t he serv er-side utility classes are not

considered web components, eith er.

8.  Wha t can be considered as a web component ? - J2EE Web components can be

either serv lets or JSP pages. Serv lets are Java program ming language classes that

dy nam ically process requests and constru ct responses. JSP pages are text-based

documents that execute as servlets but allow a more natural approach to creating

static content.

9.  Wha t is t he cont ainer ? - Containers are the interface between a component and the

low-lev el platform specific functionality that supports the component. Before a Web,

enterprise bean, or application client component can be executed, it mu st be assembled

into a J2EE application and deployed into its contain er.

1 0.  Wha t are conta in er ser vi ces? - A contain er is a run tim e support of a system-lev el

entity. Containers provide components with serv ices such as lifecy cle mana gement,

security , deploy ment, an d threading.

1 1 .  Wha t is t he web cont ai ner ? - Servlet and JSP containers are collectively referred to

as Web conta iners. It man ages the execut ion of JSP page and serv let components for

J2EE applications. Web components and their container run on the J2EE server.

1 2.  Wha t is En terprise Jav aBea ns (EJB) cont ainer ? - It m anag es the execution of 

enterprise beans for J2EE applicat ions.

Enterprise beans and their container run on the J2EE server.

1 3.  Wha t is Applet conta iner? - IManages the execution of applets. Consists of a Web

 browser an d Ja v a Pl ug in ru nn ing on th e cl ient t ogeth er.1 4. How do we package J2EE components? - J2EE components are pac kaged separately 

and bun dled into a J2 EE application for deploy ment . Each component, its relat ed files

such a s GIF and HTML files or server -side utility classes, an d a deploym ent descriptor

are a ssembled into a m odule and a dded to the J2 EE application. A J2 EE application is

composed of one or m ore enterprise bean,Web, or application client component

modules. The final enter prise solution can use one J2 EE application or be ma de up of 

two or more J2EE applications, depending on design r equirement s. A J2EE application

and each of its modules has its own deploy ment descriptor. A deploy ment descriptor is

an XML document w ith an . xm l extension tha t describes a component’s deploy ment

settings.

1 5.  Wha t is a t hin cli ent ? - A thin client is a lightweight interface to the application

that does not hav e such operat ions like query databases, execute complex business

rules, or connect to legacy applications.

1 6.  Wha t are types of J2EE client s? - Following a re th e ty pes of J2EE clients:

 Applet s Applicat ion c lien ts

Jav a Web Start-enabled rich clients, powered by Jav a Web Start technology .

 Wir eless cl ients, based on Mobile Inform at ion Dev ice Profile (MIDP) tec hn ology .

1 7 .  Wha t is depl oyment descriptor? - A deploym ent descriptor is an Extensible Marku p

Langua ge (XML) text-based file with an .xm l extension that describes a component’s

deploy ment settings. A J2 EE application and each of its modules has its own

deploy ment descriptor. For example, an enterprise bean module deploy ment descriptor

declares transaction attributes and security authorizations

for an enterprise bean. Because deployment descriptor information is declarative, it

can be chang ed without modifying the bean source code. At r un tim e, the J2EE server

reads the deployment descriptor and acts upon the component accordingly.

1 8.  Wha t is t he EA R fi le? - An EAR file is a standard JA R file with a n .ear extension,

nam ed from Enter prise ARchive file. A J2 EE application with all of its modules is

deliver ed in EAR file.

1 9.  Wha t is JTA and JTS? - JTA is the abbreviation for the Java Transaction API. JTS is

the abbreviation for th e Jav e Transaction Serv ice. JTA provides a standard interface

and allows you to demarcate transactions in a manner that is independent of the

transaction mana ger im plementation. The J2EE SDK implements the tran saction

manager with JTS. But your code doesn’t call the JTS methods directly. Instead, it

invokes the JTA methods, which then call the lower-level JTS routines. Therefore, JTA 

is a high level transaction interface that your application uses to control transaction.

and JTS is a low level tr ansaction int erface and ejb uses behind the scenes (client code

doesn’t directly intera ct wit h JTS. It is based on object transact ion serv ice(OTS) which

is part of CORBA.

20 .  Wha t is JAXP? - JAXP stands for Ja v a A PI for XML. XML is a lang uage for

representing and describing text-based data which can be read and handled by any 

program or tool tha t uses XML APIs. It provides standard serv ices to determin e the ty pe

10 mistakes mana gers make during job interviews

Stupid interview questions

How to Answer These Tricky Interview Questions

Seven tips for w ritin g an online profile for LinkedIn,

My Space or Facebook 

Tutorials

 AJ AX Tu tori al s

Dealing with y our job

Getting a job

Jav aScript tutorials

Job interv iew tips from Yahoo! HotJobs

MySQL tutorials

Retiring from your job

Ruby on Rails tutorials

Salary guide for IT jobs

Self-employment

TechInterv iews guides in PDF

Understanding pointers

XML Tutorials

XUL tutorials

RSS Feeds

 Al l posts

 Al l comm ent s

Page 3: J2EE Interview Questions and Answers _ TechInterviews

7/27/2019 J2EE Interview Questions and Answers _ TechInterviews

http://slidepdf.com/reader/full/j2ee-interview-questions-and-answers-techinterviews 3/5

10/23/13 J2EE interview questions and answers | TechInterviews

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

« Basic VB interv iew questions Wireless engineer interv iew questions »

 A ds by Goo g le

QuickBooks From

Intuit

Intuit QuickBooks is now in

India. A Must Softwa re for

SMEs. Try Free!

quickbooks.in

Naukri.com - Register

Now 

Get Headhunted by Best

Recruiters Top MNCs, Best

Profile, High CTC

Naukri.com

 Walk-Ins Jobs

Search for Wa lk Ins Job

postings - Find y our new job

today. Indeed™

 w w w .i n dee d. co .i n /Wa lk -Ins

of an arbitrary piece of data, encapsulate access to it, discover the operations available

on it, and crea te the appropriate Jav aBeans component t o perform those operat ions.

21 .  Wha t is J2EE Connect or? - The J2EE Connector API is used by J2EE tools v endors

and sy stem integr ators to create resource ada pters that support access to enterprise

informat ion sy stems that can be plugged into any J2EE product. Each ty pe of databa se

or EIS has a different r esource a dapter. Note: A r esource a dapter is a softwa re

component that allows J2EE application components to access and interact with the

underlying resource manager. Because a resource adapter is specific to its resource

ma nag er, there is ty pically a different r esource adapter for each ty pe of database or

enterprise information system.

22 .  Wha t is JAA P? - The Java Authentication and Auth orization Serv ice (JAAS) prov ides

a wa y for a J2 EE application to auth enticat e and aut horize a specific user or group of 

users to run it. It is a standa rd Plugga ble Authent ication Module (PAM) fram ework 

that extends the Java 2 platform security architecture to support user-based

authorization.

23 .  Wha t is Jav a Naming and Di rect ory Serv ice? - The JNDI provides naming and

directory functionality. It provides applications with methods for performing standard

directory operations, such as associatin g att ributes with objects and searchin g for

objects using their attributes. Using JNDI, a J2EE application can store and retrieve

any ty pe of nam ed Jav a object. Because JNDI is independent of any specific

implementations, applications can use JNDI to access multiple naming and directory 

serv ices, including existing naming and

directory serv ices such a s LDAP, NDS, DNS, and NIS.

24 .  Wha t is St ruts? - A Web page development framework. Struts combines Java

Servlets, Java Server Pages, custom tags, and message resources into a unified

framework. It is a cooperative, synergistic platform, suitable for development teams,

independent developers, and everyone between.25 . How is the MVC design patt ern used in St ruts fra mework? - In the MVC design

pattern, application flow is mediated by a central Controller. The Controller delegates

requests to an a ppropriat e handler. Th e handlers ar e tied to a Model, and each h andler

acts as an adapter between t he request and t he Model. The Model represents, or

encapsulates, an application’s business logic or state. Control is usually then forwar ded

 bac k t hr ough th e Cont roll er to th e appropr ia te V iew . T he forw ar din g c an be

determin ed by consulting a set of mappings, usua lly loaded from a database or

configurat ion file. This prov ides a loose coupling between th e View an d Model, which

can m ake an application significantly easier to create and maintain. Controller:

Servlet controller which supplied by Struts itself; View: what you can see on the

screen, a JSP page an d presentation components; Model: Sy stem state an d a business

logic Jav aBeans.

This entry wa s posted in  Java . Bookmark the  pe rma link .  Pos t a co mm en t or leav e a trackback:

Trackback URL.

5 COMMENTS ON J2EE INTERVIEW QUESTIONS AND ANSWER S

 Abhijit ParalikarPosted 4/2/2007 at 11:50 am | Per malink

Hi,

I don’t th ink th e answer t o the question no.

Page 4: J2EE Interview Questions and Answers _ TechInterviews

7/27/2019 J2EE Interview Questions and Answers _ TechInterviews

http://slidepdf.com/reader/full/j2ee-interview-questions-and-answers-techinterviews 4/5

10/23/13 J2EE interview questions and answers | TechInterviews

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

POST A C OMMENT

25 How is the MVC design pattern used in Struts framework?

is up to the ma rk. The Model is not a pa rt of struts fram ework. For th e model

part any thing from EJB, hibernate, JDBC etc can be used which are not a part

of the struts framework.

If this is what y ou mean please state it explicitly in y our answer as this can be

 v ery confu sing to a new bie in par ticu lar.

amhedPosted 8/20/2007 at 9:44 pm | Per malink

Honestly, will the people you are interviewing ever use this Book knowledge

 wh en t hey ar e wor kin g? Su re t hey wou ld if th ey wer e to t eac h J 2 EE. Bu t i f it

 wa s a pr ogram ming posit ion or ar ch ite ct ur al position I doubt th at th ey 

actually hav e any use for such broad and encompassing triv ia FAQs.

Oh by the wa y I think I saw t he answers as the techn ologies are described in

 books. I th ink y our que stions ar e v ery INAPPROPRIATE. Inter v iew s for soft dev 

should not be the same as college test questions. If y ou interv iew this wa y , I

 wou ld n ot be su rprised th at

 y ou’d g et a coupl e of bookish people t ha t do n ot kn ow h ow t o thi nk for

themselves.

Or let m e guess, these are the questions non tech nical people expect techn ical

people to answer. One sugg estion, let the people actually inv olved in the gru nt

 wor k do t he i nt erv iew ing a nd i t w ould proba bly boost mor al e.

cffgfgPosted 8/28/2007 at 1:56 am | Per malink

 Wha t a re th e com ponen ts of J2 EE applic at ion?

- A J2EE component is a self-contained funct ional softwar e unit that is

assembled into a J2EE application with its related classes and files and

commu nicates with other components. The J2 EE specification defines the

following J2EE components:

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

 Wha t a re th e j2 EE com ponen ts?

 A j 2e e com ponen t i s a sel f cont ained fun ct iona l softw ar e u ni t t ha t i s assem bled

into a j2EE application with it s related classes and files with other

components. The j2EE spec defines the follwing components:

enos76Posted 1/28/2009 at 5:33 am | Per malink

I find this FAQ useful for “g etting t he big pictur e” wh ile preparing for the SCJA 

certification - Thanks

Page 5: J2EE Interview Questions and Answers _ TechInterviews

7/27/2019 J2EE Interview Questions and Answers _ TechInterviews

http://slidepdf.com/reader/full/j2ee-interview-questions-and-answers-techinterviews 5/5

10/23/13 J2EE interview questions and answers | TechInterviews

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

Powered by  WordPress . Built on the Thematic Them e Framework .

Name * Email *

Post Comm ent

 Your em ai l is never published nor shared. Required fields are ma rked *

 Websi te

Comment