1LearnJava/J2EEcoreconceptsanddesign/codingissuesWithJava/J2EEJobInterviewCompanionByK.ArulkumaranTechnicalReviewersCraigMaloneLaraD’AlbreoStuartWatsonAcknowledgementsA.SivayiniR.KumaraswamipillaiCoverDesignK.ArulkumaranA.Sivayini2Java/J2EEJobInterviewCompanionCopyRight2005K.ArulkumaranTheauthorhasmadeeveryeffortinthepreparationofthisbooktoensuretheaccuracyoftheinformation.However,informationinthisbookissoldwithoutwarrantyeitherexpressorimplied.Theauthorwillnotbeheldliableforanydamagescausedorallegedtobecausedeitherdirectlyorindirectlybythisbook.3OutlineSECTIONDESCRIPTIONWhatthisbookwilldoforyou?MotivationforthisbookKeyAreasindexSECTION1Interviewquestionsandanswerson:JavaLanguageFundamentalsSwingAppletPerformanceandmemoryLeaks.PersonalSECTION2Interviewquestionsandanswerson:EnterpriseJavaJ2EEServletJSPJDBCJNDIRMIEJBJMSXMLSQL,DatabasetuningandO/RmappingRUP&UMLStrutsWebandApplicationservers.Bestpracticesandperformanceconsiderations.Testinganddeployment.PersonalSECTION3Puttingitalltogethersection.Howwouldyougoabout…?1.HowwouldyougoaboutdocumentingyourJava/J2EEapplication?2.HowwouldyougoaboutdesigningaJava/J2EEapplication?3.Howwouldyougoaboutidentifyingperformanceproblemsand/ormemoryleaksinyourJavaapplication?4.HowwouldyougoaboutminimisingmemoryleaksinyourJava/J2EEapplication?5.HowwouldyougoaboutimprovingperformanceofyourJava/J2EEapplication?6.Howwouldyougoaboutidentifyinganypotentialthread-safetyissuesinyourJava/J2EEapplication?7.HowwouldyougoaboutidentifyinganypotentialtransactionalissuesinyourJava/J2EEapplication?8.HowwouldyougoaboutapplyingtheObjectOriented(OO)designconceptsinyourJava/J2EE4application?9.HowwouldyougoaboutapplyingtheUMLdiagramsinyourJava/J2EEproject?10.Howwouldyougoaboutdescribingthesoftwaredevelopmentprocessesyouarefamiliarwith?11.HowwouldyougoaboutapplyingthedesignpatternsinyourJava/J2EEapplication?12.HowwouldyougoaboutdeterminingtheenterprisesecurityrequirementsforyourJava/J2EEapplication?13.HowwouldyougoaboutdescribingtheopensourceprojectslikeJUnit(unittesting),Ant(buildtool),CVS(versioncontrolsystem)andlog4J(loggingtool)whichareintegralpartofmostJava/J2EEprojects?14.HowwouldyougoaboutdescribingWebservices?SECTION4EmergingTechnologies/FrameworksTestDrivenDevelopment(TDD).AspectOrientedProgramming(AOP).InversionofControl(IOC)(AlsoknownasDependencyInjection).Annotationsorattributesbasedprogramming(xdocletetc).Springframework.Hibernateframework.EJB3.0.JavaServerFaces(JSF)framework.SECTION5Sampleinterviewquestions…JavaWebComponentsEnterpriseDesignGeneralGLOSSARYOFTERMSRESOURCESINDEX5TableofcontentsOutline_________________________________________________________________________________________3Tableofcontents________________________________________________________________________________5Whatthisbookwilldoforyou?____________________________________________________________________7Motivationforthisbook__________________________________________________________________________8KeyAreasIndex________________________________________________________________________________10Java–Interviewquestions&answers_____________________________________________________________11Java–LanguageFundamentals____________________________________________________________________________12Java–Swing____________________________________________________________________________________________44Java–Applet____________________________________________________________________________________________48Java–PerformanceandMemoryleaks______________________________________________________________________50Java–Personal__________________________________________________________________________________________53Java–KeyPoints________________________________________________________________________________________56EnterpriseJava–Interviewquestions&answers____________________________________________________59Enterprise-J2EE________________________________________________________________________________________60Enterprise-Servlet_______________________________________________________________________________________69Enterprise-JSP_________________________________________________________________________________________77Enterprise-JDBC________________________________________________________________________________________83Enterprise–JNDI&LDAP_________________________________________________________________________________87Enterprise-RMI_________________________________________________________________________________________90Enterprise–EJB2.x______________________________________________________________________________________94Enterprise-JMS________________________________________________________________________________________110Enterprise-XML________________________________________________________________________________________114Enterprise–SQL,TuningandO/Rmapping_________________________________________________________________119Enterprise-RUP&UML_____________________________________________________