<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6848574956779103996</id><updated>2011-10-06T12:14:03.512-07:00</updated><title type='text'>JAVA AND J2EE  FAQ's</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://javaandj2eefaqs.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6848574956779103996/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://javaandj2eefaqs.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Bunny</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6848574956779103996.post-8778247432948532224</id><published>2008-11-13T11:23:00.000-08:00</published><updated>2008-11-13T11:35:28.394-08:00</updated><title type='text'>JSF Interview Questions</title><content type='html'>&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5Csun-it%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:"Trebuchet MS"; 	panose-1:2 11 6 3 2 2 2 2 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:647 0 0 0 159 0;} @font-face 	{font-family:"Palatino Linotype"; 	panose-1:2 4 5 2 5 5 5 3 3 4; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-536870009 1073741843 0 0 415 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman"; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-language:AR-SA;} h3 	{mso-margin-top-alt:auto; 	margin-right:0in; 	mso-margin-bottom-alt:auto; 	margin-left:0in; 	mso-pagination:widow-orphan; 	mso-outline-level:3; 	font-size:13.5pt; 	font-family:"Times New Roman";} a:link, span.MsoHyperlink 	{color:blue; 	text-decoration:underline; 	text-underline:single;} a:visited, span.MsoHyperlinkFollowed 	{color:purple; 	text-decoration:underline; 	text-underline:single;} p.que, li.que, div.que 	{mso-style-name:que; 	margin-top:3.0pt; 	margin-right:0in; 	margin-bottom:3.0pt; 	margin-left:0in; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Trebuchet MS"; 	mso-fareast-font-family:"Times New Roman"; 	mso-bidi-font-family:"Times New Roman"; 	color:#0863A5; 	font-weight:bold;} span.content1 	{mso-style-name:content1; 	mso-ansi-font-size:10.0pt; 	mso-bidi-font-size:10.0pt; 	font-family:"Trebuchet MS"; 	mso-ascii-font-family:"Trebuchet MS"; 	mso-hansi-font-family:"Trebuchet MS"; 	color:#414141;} p.content, li.content, div.content 	{mso-style-name:content; 	margin-top:3.0pt; 	margin-right:0in; 	margin-bottom:3.0pt; 	margin-left:0in; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Trebuchet MS"; 	mso-fareast-font-family:"Times New Roman"; 	mso-bidi-font-family:"Times New Roman"; 	color:#414141;} span.queindex1 	{mso-style-name:queindex1; 	mso-ansi-font-size:10.0pt; 	mso-bidi-font-size:10.0pt; 	color:#414141;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;}  /* List Definitions */  @list l0 	{mso-list-id:183637632; 	mso-list-template-ids:-1523148026;} @list l0:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} @list l1 	{mso-list-id:1765101899; 	mso-list-template-ids:-722723010;} @list l1:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} ol 	{margin-bottom:0in;} ul 	{margin-bottom:0in;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;    &lt;p class="que"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;What is JSF (or JavaServer Faces)?&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(51, 51, 255); font-weight: bold;" class="content1"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;A server side user interface component framework for Java™ technology-based web applications.JavaServer Faces (JSF) is an industry standard and a framework for building component-based user interfaces for web applications. &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(51, 51, 255); font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-weight: bold;" class="content1"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;JSF contains an API for representing UI components and managing their state; handling events, server-side validation, and data conversion; defining page navigation; supporting internationalization and accessibility; and providing extensibility for all these features.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="que"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;What are the advantages of JSF? &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="color: rgb(51, 51, 255);" class="content"&gt;&lt;span style="color: rgb(51, 51, 255);" class="content1"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;The major benefits of JavaServer Faces technology are: &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.25in; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;JavaServer Faces architecture makes it easy for the developers to use. In JavaServer Faces technology, user interfaces can be created easily with its built-in UI component library, which handles most of the complexities of user interface management.&lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.25in; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Offers a clean separation between behavior and presentation. &lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.25in; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Provides a rich architecture for managing component state, processing component data, validating user input, and handling events. &lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.25in; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Robust event handling mechanism. &lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.25in; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Events easily tied to server-side code. &lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.25in; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Render kit support for different clients &lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.25in; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Component-level control over statefulness &lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.25in; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Highly 'pluggable' - components, view handler, etc &lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.25in; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;JSF also supports internationalization and accessibility &lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.25in;"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(51, 51, 255);"&gt;Offers multiple, standardized vendor implementations &lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="que"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;What are differences between struts and JSF?&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="color: rgb(51, 51, 255);" class="content"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;In a nutshell, Faces has the following advantages over Struts:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="content" style="margin-left: 0.5in; text-indent: -0.25in; color: rgb(51, 51, 255);"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Eliminated the need for a Form Bean&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="content" style="margin-left: 0.5in; text-indent: -0.25in; color: rgb(51, 51, 255);"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Eliminated the need for a DTO Class&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="content" style="margin-left: 0.5in; text-indent: -0.25in; color: rgb(51, 51, 255);"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Allows the use of the same POJO on all Tiers because of the Backing Bean&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="content" style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Because Struts is a web application framework, it has a more sophisticated controller architecture than does JavaServer Faces technology. It is more sophisticated partly because the application developer can access the controller by creating an Action object that can integrate with the controller, whereas JavaServer Faces technology does not allow access to the controller. In addition, the Struts controller can do things like access control on each Action based on user roles. This functionality is not provided by JavaServer Faces technology.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="que"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;What are the available implementations of JavaServer Faces?&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="color: rgb(51, 51, 255);" class="content"&gt;&lt;span style="color: rgb(51, 51, 255);" class="queindex1"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;The main implementations of JavaServer Faces are: &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style="color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Reference      Implementation (&lt;b&gt;RI&lt;/b&gt;) by Sun Microsystems. &lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Apache &lt;b&gt;MyFaces      &lt;/b&gt;is an open source JavaServer Faces (JSF) implementation or run-time. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="color: rgb(65, 65, 65);"&gt;&lt;b style="color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;ADF Faces&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; is Oracle’s implementation for      the JSF standard. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p class="que"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;What typical JSF application consists of?&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="color: rgb(51, 51, 255);" class="content"&gt;&lt;span class="queindex1"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;A typical JSF application consists of the following parts: &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;JavaBeans components for managing application state and behavior. &lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Event-driven development (via listeners as in traditional GUI development). &lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(51, 51, 255);"&gt;Pages that represent MVC-style views; pages reference view roots via the JSF component tree. &lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="color: rgb(255, 102, 102);" class="que"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;What Is a JavaServer Faces Application?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="color: rgb(51, 51, 255);" class="content"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;JavaServer Faces applications are just like any other Java web application. They run in a servlet container, and they typically contain the following: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;JavaBeans components containing application-specific functionality and data. &lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Event listeners. &lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Pages, such as JSP pages. &lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(51, 51, 255);"&gt;Server-side helper classes, such as database access beans. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;b style="color: rgb(255, 102, 102);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;b style="color: rgb(255, 102, 102);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;In addition to these items, a JavaServer Faces application also has:&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;A custom tag library for rendering UI components on a page. &lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;A custom tag library for representing event handlers, validators, and other actions. &lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;UI components represented as stateful objects on the server. &lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Backing beans, which define properties and functions for UI components. &lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; color: rgb(51, 51, 255);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Validators, converters, event listeners, and event handlers. &lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in;"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(65, 65, 65);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;An application configuration resource file for configuring application resources.&lt;/span&gt; &lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="que"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;What is Backing Bean?&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="color: rgb(51, 51, 255);" class="content"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Backing beans are JavaBeans components associated with UI components used in a page. Backing-bean management separates the definition of UI component objects from objects that perform application-specific processing and hold data.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="content"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;The backing bean defines properties and handling-logics associated with the UI components used on the page. Each backing-bean property is bound to either a component instance or its value. A backing bean also defines a set of methods that perform functions for the component, such as validating the component's data, handling events that the component fires and performing processing associated with navigation when the component activates. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="que"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;What are the differences between a Backing Bean and Managed Bean?&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="color: rgb(51, 51, 255);" class="content"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Backing Beans are merely a convention, a subtype of JSF Managed Beans which have a very particular purpose. There is nothing special in a Backing Bean that makes it different from any other managed bean apart from its usage.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="content"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;What makes a Backing Bean is the relationship it has with a JSF page; it acts as a place to put component references and Event code.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="que"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;What is view object? &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="content"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;A view object is a model object used specifically in the presentation tier. It contains the data that must display in the view layer and the logic to validate user input, handle events, and interact with the business-logic tier. The backing bean is the view object in a JSF-based application. Backing bean and view object are interchangeable terms.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="que"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;What do you mean by Bean Scope?&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="content"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Bean Scope typically holds beans and other objects that need to be available in the different components of a web application.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="que"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;What are the different kinds of Bean Scopes in JSF?&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 3pt 0in;"&gt;&lt;span style="color: rgb(51, 51, 255);" class="content1"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;JSF supports three Bean Scopes. &lt;i&gt;viz.,&lt;/i&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style="color: rgb(65, 65, 65); margin-top: 3pt; margin-bottom: 3pt;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;Request Scope:&lt;/span&gt; &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;The request scope is short-lived. It starts when an      HTTP request is submitted and ends when the response is sent back to the      client.&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="color: rgb(65, 65, 65); margin-top: 3pt; margin-bottom: 3pt;"&gt;&lt;b style="color: rgb(255, 102, 102);"&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Session Scope:&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;The session scope persists from the time that a      session is established until session termination. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(65, 65, 65);"&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;Application Scope:&lt;/span&gt; &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(51, 51, 255);"&gt;The application      scope persists for the entire duration of the web application. This scope      is shared among all the requests and sessions.&lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6848574956779103996-8778247432948532224?l=javaandj2eefaqs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaandj2eefaqs.blogspot.com/feeds/8778247432948532224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6848574956779103996&amp;postID=8778247432948532224' title='43 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6848574956779103996/posts/default/8778247432948532224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6848574956779103996/posts/default/8778247432948532224'/><link rel='alternate' type='text/html' href='http://javaandj2eefaqs.blogspot.com/2008/11/jsf-interview-questions.html' title='JSF Interview Questions'/><author><name>Bunny</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>43</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6848574956779103996.post-4004597471556421347</id><published>2008-11-13T11:17:00.001-08:00</published><updated>2008-11-13T11:23:44.789-08:00</updated><title type='text'>RMI Interview Questions</title><content type='html'>&lt;span style="color: rgb(255, 0, 0);"&gt;Explain RMI Architecture?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;RMI uses a layered architecture, each of the layers could be enhanced or replaced without affecting the rest of the system. The details of layers can be summarized as follows:&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Application Layer:&lt;/span&gt; The client and server program&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Stub &amp;amp; Skeleton Layer:&lt;/span&gt; Intercepts method calls made by the client/redirects these calls to a remote RMI service.&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Remote Reference Layer:&lt;/span&gt; Understands how to interpret and manage references made from clients to the remote service objects.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;What is the difference between RMI &amp;amp; Corba ?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The most significant difference between RMI and CORBA is that CORBA was made specifically for interoperability across programming languages. That is CORBA fosters the notion that programs can be built to interact in multiple languages. The server could be written in C++, the business logic in Python, and the front-end written in COBOL in theory. RMI, on the other hand is a total java solution, the interfaces, the implementations and the clients--all are written in Java.&lt;br /&gt;RMI allows dynamic loading of classes at runtime. In a multi-language CORBA environment, dynamic class loading is not possible. The important advantage to dynamic class loading is that it allows arguments to be passed in remote invocations that are subtypes of the declared types. In CORBA, all types have to be known in advance. RMI (as well as RMI/IIOP) provides support for polymorphic parameter passing, whereas strict CORBA does not. CORBA does have support for multiple languages which is good for someapplications, but RMI has the advantage of being dynamic, which is good for other applications.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;What are the services in RMI ? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;An RMI "service" could well be any Java method that can be invoked remotely. The other service is the JRMP RMI naming service which is a lookup service.&lt;br /&gt;Does RMI-IIOP support code downloading for Java objects sent by value across an IIOP connection in the same way as RMI does across a JRMP connection?&lt;br /&gt;Yes. The JDK 1.2 support the dynamic class loading.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;How many types of protocol implementations does RMI have? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;RMI has at least three protocol implementations: Java Remote Method Protocol(JRMP), Internet Inter ORB Protocol(IIOP), and Jini Extensible Remote Invocation(JERI). These are alternatives, not part of the same thing, All three are indeed layer 6 protocols for those who are still speaking OSI reference model.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Does RMI-IIOP support dynamic downloading of classes? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;No, RMI-IIOP doesn't support dynamic downloading of the classes as it is done with CORBA in DII (Dynamic Interface Invocation).Actually RMI-IIOP combines the usability of Java Remote Method Invocation (RMI) with the interoperability of the Internet Inter-ORB Protocol (IIOP).So in order to attain this interoperability between RMI and CORBA,some of the features that are supported by RMI but not CORBA and vice versa are eliminated from the RMI-IIOP specification.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Does RMI-IIOP support code downloading for Java objects sent by value across an IIOP connection in the same way as RMI does across a JRMP connection? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Yes. The JDK 1.2 support the dynamic class loading.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Can RMI and Corba based applications interact ? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Yes they can. RMI is available with IIOP as the transport protocol instead of JRMP&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6848574956779103996-4004597471556421347?l=javaandj2eefaqs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaandj2eefaqs.blogspot.com/feeds/4004597471556421347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6848574956779103996&amp;postID=4004597471556421347' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6848574956779103996/posts/default/4004597471556421347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6848574956779103996/posts/default/4004597471556421347'/><link rel='alternate' type='text/html' href='http://javaandj2eefaqs.blogspot.com/2008/11/rmi-interview-questions.html' title='RMI Interview Questions'/><author><name>Bunny</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6848574956779103996.post-8891706637925660988</id><published>2008-11-13T11:07:00.000-08:00</published><updated>2008-11-13T11:17:44.316-08:00</updated><title type='text'>Design Patterns Interview Questions</title><content type='html'>&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5Csun-it%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:"Palatino Linotype"; 	panose-1:2 4 5 2 5 5 5 3 3 4; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-536870009 1073741843 0 0 415 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman"; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-language:AR-SA;} h3 	{mso-margin-top-alt:auto; 	margin-right:0in; 	mso-margin-bottom-alt:auto; 	margin-left:0in; 	mso-pagination:widow-orphan; 	mso-outline-level:3; 	font-size:13.5pt; 	font-family:"Times New Roman"; 	font-weight:bold;} a:link, span.MsoHyperlink 	{color:blue; 	text-decoration:underline; 	text-underline:single;} a:visited, span.MsoHyperlinkFollowed 	{color:purple; 	text-decoration:underline; 	text-underline:single;} p 	{mso-margin-top-alt:auto; 	margin-right:0in; 	mso-margin-bottom-alt:auto; 	margin-left:0in; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman"; 	mso-bidi-font-family:"Times New Roman";} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;}  /* List Definitions */  @list l0 	{mso-list-id:1352534471; 	mso-list-template-ids:1813684374;} @list l0:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} ol 	{margin-bottom:0in;} ul 	{margin-bottom:0in;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;h3&gt;&lt;b style="color: rgb(255, 0, 0);"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;What is a software design pattern?&lt;/span&gt;&lt;/b&gt;&lt;span style=";font-family:&amp;quot;;" &gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;    &lt;p style="color: rgb(51, 102, 255);" class="MsoNormal"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;A design pattern is a &lt;strong&gt;&lt;span style=";font-family:&amp;quot;;" &gt;solution&lt;/span&gt;&lt;/strong&gt; to a general software &lt;strong&gt;&lt;span style=";font-family:&amp;quot;;" &gt;problem&lt;/span&gt;&lt;/strong&gt; within a particular &lt;strong&gt;&lt;span style=";font-family:&amp;quot;;" &gt;context&lt;/span&gt;&lt;/strong&gt;. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="color: rgb(51, 102, 255);" class="MsoNormal"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Context: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; color: rgb(51, 102, 255);"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;A recurring set of situations where the pattern applies. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="color: rgb(51, 102, 255);" class="MsoNormal"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Problem:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; color: rgb(51, 102, 255);"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;A System of forces (goals and constraints) that occur repeatedly in this context. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="color: rgb(51, 102, 255);" class="MsoNormal"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Solution:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;&lt;span style="color: rgb(51, 102, 255);"&gt;A description of communicating objects and classes (collaboration) that can be applied to resolve those forces&lt;/span&gt;. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;b style="color: rgb(255, 0, 0);"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Why is the study of patterns important?&lt;/span&gt;&lt;/b&gt;&lt;span style=";font-family:&amp;quot;;" &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;&lt;span style="color: rgb(51, 102, 255);"&gt;As initial software designs are implemented and deployed, programmers often discover improvements which make the designs more adaptable to change. Design patterns capture solutions that have evolved over time as developers strive for greater flexibility in their software, and they document the solutions in a way which facilitates their reuse in other, possibly unrelated systems. Design patterns allow us to reuse the knowledge of experienced software designers.&lt;/span&gt;&lt;br /&gt;&lt;!--[if !supportLineBreakNewLine]--&gt;&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b style="color: rgb(255, 0, 0);"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;3)How do I document a design pattern?&lt;/span&gt;&lt;/b&gt;&lt;span style=";font-family:&amp;quot;;" &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="color: rgb(51, 102, 255);" class="MsoNormal"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;A pattern description must address the following major points: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="color: rgb(51, 102, 255);" class="MsoNormal"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Pattern Name and Classification &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;&lt;span style="color: rgb(51, 102, 255);"&gt;A short, meaningful name for the pattern, usually only one or two words. Names provide a vocabulary for patterns, and they have implied semantics – choose names carefully. Following the GoF book, we can also group patterns into higher level classifications such as creational, structural, and behavioral patterns. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style="color: rgb(255, 0, 0);"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Problem: &lt;/span&gt;&lt;/b&gt;&lt;span style=";font-family:&amp;quot;;" &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;&lt;span style="color: rgb(51, 102, 255);"&gt;A general description of the problem context and the goals and constraints that occur repeatedly in that context. A concrete motivational scenario can be used to help describe the problem. The problem description should provide guidance to assist others in recognizing situations where the pattern can be applied.&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style="color: rgb(255, 0, 0);"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Solution:&lt;/span&gt;&lt;/b&gt;&lt;span style=";font-family:&amp;quot;;" &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;&lt;span style="color: rgb(51, 102, 255);"&gt;The classes and/or objects that participate in the design pattern, their structure (e.g., in terms of a UML class diagram), their responsibilities, and their collaborations. The solution provides an abstract description that can be applied in many different situations. Sample Code in an object-oriented language can be used to illustrate a concrete realization of the pattern. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style="color: rgb(255, 0, 0);"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Consequences:&lt;/span&gt;&lt;/b&gt;&lt;span style=";font-family:&amp;quot;;" &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;&lt;span style="color: rgb(51, 102, 255);"&gt;A discussion of the results and tradeoffs of applying the pattern. Variations and language-dependent alternatives should also be addressed. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="color: rgb(255, 0, 0);" class="MsoNormal"&gt;&lt;b&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Known Uses:&lt;/span&gt;&lt;/b&gt;&lt;span style=";font-family:&amp;quot;;" &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; color: rgb(51, 102, 255);"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Examples of the pattern in real systems. Look for applications of the pattern in language libraries and frameworks, published system descriptions, text books, etc. Not every good solution represents a pattern. A general rule of thumb is that a candidate pattern (also called a “proto-pattern”) should be discovered in a minimum of three existing systems before it can rightfully be called a pattern. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;&lt;span style="color: rgb(51, 102, 255);"&gt;The following quote by Robert Martin highlights the importance of providing pattern descriptions: “The revolutionary concept of the GoF book is not the fact that there are patterns; it is the way in which those patterns are documented. ... Prior to the GoF book, the only good way to learn patterns was to discover them in design documentation, or (more probably) code.”&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b style="color: rgb(255, 0, 0);"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;4)Where can I learn more about design patterns?&lt;/span&gt;&lt;/b&gt;&lt;span style=";font-family:&amp;quot;;" &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;&lt;span style="color: rgb(51, 102, 255);"&gt;The best place to start is the seminal work by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides (collectively known as the “Gang of Four” or simply “GoF”) entitled&lt;/span&gt;&lt;br /&gt;&lt;strong style="color: rgb(255, 0, 0);"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Warning:&lt;/span&gt;&lt;/strong&gt; &lt;span style="color: rgb(51, 102, 255);"&gt;This book is not light reading. From the Preface: “Don't worry if you don't understand this book completely on the first reading. We didn't understand it all on the first writing.”&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;It is, however, a book which wears well over time, and it is definitely worth the effort required to work through it.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b style="color: rgb(255, 0, 0);"&gt;What is an example of a design pattern?&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="color: rgb(51, 102, 255);" class="MsoNormal"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Following the lead of the “Gang of Four” (GoF), design pattern descriptions usually contain multiple sections including &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in; color: rgb(51, 102, 255);" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Intent &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Motivation &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Applicability &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Structure &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Participants &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Collaborations &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Consequences &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Implementation &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Sample Code &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Known Uses &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Related Patterns &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;&lt;span style="color: rgb(51, 102, 255);"&gt;A complete discussion of even a small pattern is beyond the scope of a simple FAQ entry, but it is possible to get the idea by examining an abbreviated discussion of one of the simplest and most easily understood patterns. Consider the Singleton pattern, whose intent reads as follows:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style="color: rgb(255, 0, 0);"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;Intent:&lt;/span&gt;&lt;/b&gt;&lt;span style=";font-family:&amp;quot;;" &gt; &lt;span style="color: rgb(51, 102, 255);"&gt;Ensure that a class has one instance, and provide a global point of access to it. &lt;/span&gt;&lt;o:p style="color: rgb(51, 102, 255);"&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:&amp;quot;;" &gt;&lt;span style="color: rgb(51, 102, 255);"&gt;Almost every programmer has encountered this problem and formulated an approach for solving it in a general way – some solutions are better than others. The solution offered by the GoF would look something like the following when coded in java.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6848574956779103996-8891706637925660988?l=javaandj2eefaqs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaandj2eefaqs.blogspot.com/feeds/8891706637925660988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6848574956779103996&amp;postID=8891706637925660988' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6848574956779103996/posts/default/8891706637925660988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6848574956779103996/posts/default/8891706637925660988'/><link rel='alternate' type='text/html' href='http://javaandj2eefaqs.blogspot.com/2008/11/design-patterns-interview-questions.html' title='Design Patterns Interview Questions'/><author><name>Bunny</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6848574956779103996.post-6220155724927699267</id><published>2008-11-03T14:24:00.000-08:00</published><updated>2008-11-03T14:28:11.529-08:00</updated><title type='text'>JMS Interview Questions</title><content type='html'>JMS Interview Questions&lt;br /&gt;&lt;br /&gt;What is JMS?&lt;br /&gt;&lt;br /&gt;Java Message Service is the new standard for inter client communication. It allows J2EE application components to create, send, receive, and read messages. It enables distributed communication that is loosely coupled, reliable, and asynchronous.&lt;br /&gt;&lt;br /&gt;What type messaging is provided by JMS ?&lt;br /&gt;&lt;br /&gt;Both synchronous and asynchronous&lt;br /&gt;&lt;br /&gt;How may messaging models do JMS provide for and what are they?&lt;br /&gt;&lt;br /&gt;JMS provides for two messaging models, publish-and-subscribe and point-to-point queuing&lt;br /&gt;&lt;br /&gt;What are the types of messaging?&lt;br /&gt;&lt;br /&gt;There are two kinds of Messaging. Synchronous messaging involves a client that waits for the server to respond to a message.&lt;br /&gt;Asynchronous messaging involves a client that does not wait for a message from the server. An event is used to trigger a message from a&lt;br /&gt;server.&lt;br /&gt;&lt;br /&gt;What is publish/subscribe messaging?&lt;br /&gt;&lt;br /&gt;With publish/subscribe message passing the sending application/client establishes a named topic in the JMS broker/server and publishes&lt;br /&gt;messages to this queue. The receiving clients register (specifically, subscribe) via the broker to messages by topic; every subscriber to a&lt;br /&gt;topic receives each message published to that topic. There is a one-to-many relationship between the publishing client and the subscribing&lt;br /&gt;clients.&lt;br /&gt;&lt;br /&gt;Why doesn’t the JMS API provide end-to-end synchronous message delivery and notification of delivery?&lt;br /&gt;&lt;br /&gt;Some messaging System provide synchronous delivery to destinations as a mechanism for implementing reliable applications. Some systems&lt;br /&gt;provide clients with various forms of delivery notification so that the clients can detect dropped or ignored messages. This is not the model&lt;br /&gt;defined by the JMS API. JMS API messaging provides guaranteed delivery via the once-and-only-once delivery semantics of PERSISTENT&lt;br /&gt;messages. In addition, message consumers can insure reliable processing of messages by using either CLIENT_ACKNOWLEDGE mode or&lt;br /&gt;transacted sessions. This achieves reliable delivery with minimum synchronization and is the enterprise messaging model most vendors and DEVELOPERS prefer. The JMS API does not define a schema of systems messages (such as delivery notifications). If an application requires&lt;br /&gt;acknowledgment of message receipt, it can define an application-level acknowledgment message.&lt;br /&gt;What are the core JMS-related objects required for each JMS-enabled application?&lt;br /&gt;Each JMS-enabled client must establish the following:&lt;br /&gt;o A connection object provided by the JMS server (the message broker)&lt;br /&gt;o Within a connection, one or more sessions, which provide a context for message sending and receiving&lt;br /&gt;o Within a session, either a queue or topic object representing the destination (the message staging area) within the message broker&lt;br /&gt;o Within a session, the appropriate sender or publisher or receiver or subscriber object (depending on whether the client is a message producer or consumer and uses a point-to-point or publish/subscribe strategy, respectively). Within a session, a message object (to send or to receive)&lt;br /&gt;&lt;br /&gt;What is the Role of the JMS Provider?&lt;br /&gt;&lt;br /&gt;The JMS provider handles SECURITY of the messages, data conversion and the client triggering. The JMS provider specifies the level of&lt;br /&gt;encryption and the security level of the message, the best data type for the non-JMS client.&lt;br /&gt;How does a typical client perform the communication? -&lt;br /&gt;1. Use JNDI to locate administrative objects.&lt;br /&gt;2. Locate a single ConnectionFactory object.&lt;br /&gt;3. Locate one or more Destination objects.&lt;br /&gt;4. Use the ConnectionFactory to create a JMS Connection.&lt;br /&gt;5. Use the Connection to create one or more Session(s).&lt;br /&gt;6. Use a Session and the Destinations to create the MessageProducers and MessageConsumers needed.&lt;br /&gt;7. Perform your communication.&lt;br /&gt;&lt;br /&gt;Give an example of using the point-to-point model.&lt;br /&gt;The point-to-point model is used when the information is specific to a single client. For example, a client can send a message for a print&lt;br /&gt;out, and the server can send information back to this client after completion of the print job&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Does Tomcat support JMS (java Messaging Service)?&lt;br /&gt;&lt;br /&gt;Tomcat is just a servlet container, not an EJB container nor an applicationserver, so it does not contains any JMS basic support.&lt;br /&gt;However, there's nothing stopping you from using another JMS provider&lt;br /&gt;&lt;br /&gt;Is it possible to send email messages using JMS?&lt;br /&gt;&lt;br /&gt;JMS has no inherent support for email operations.&lt;br /&gt;&lt;br /&gt;How do I communicate between two clients that are on different machines on a network using JMS? I want to use a standalone application for communicating between the machine and I want to pass the message using JMS.&lt;br /&gt;You can make two JMS client applications, say AppA and AppB. Make AppA listen to topic ‘forA’. Make AppB listen to topic ‘forB’.&lt;br /&gt;If AppA sends a message to topic ‘forB’, AppB will receive it. If AppB sends a message to topic ‘forA’, AppA will receive it.&lt;br /&gt;For sample code etc, try downloading SonicMQ (as a JMS server) and go through the samples.&lt;br /&gt;Is there any relationship between javax.jms.Message and javax.mail.Message?&lt;br /&gt;There is no direct relationship between javax.mail.Message and javax.jms.Message. If your requirement is to map (correlate) them, here is what you can do:&lt;br /&gt;1. From JMS domain to JavaMail domain (a javax.jms.Message is received):&lt;br /&gt;1. A JMS topic/queue can be associated with one or many e-mail id(s).&lt;br /&gt;2. The JMS Message Header can be mapped to ‘custom’ JavaMail Message Header.&lt;br /&gt;3. The JMS Message Body can be associated with the JavaMail Message body.&lt;br /&gt;4. A JavaMail client application should be able to process these ‘custom’ headers and the content of the message body.&lt;br /&gt;2. From JavaMail domain to JMS domain (a javax.mail.Message is received):&lt;br /&gt;1. An e-mail id can be associated with one or more JMS topics/queues.&lt;br /&gt;2. The JavaMail Message Header can be mapped to ‘custom’ JMS Message Header.&lt;br /&gt;3. The JavaMail Message Body can be associated with the JMS Message body.&lt;br /&gt;4. The JMS client application should be able to process these ‘custom’ headers and the content of the message body.&lt;br /&gt;In a simple application that I tried, I removed the ‘custom’ header scenario and just forwarded the contents of the message (text message), which worked without any problems.Try using SonicMQ bridges, which already has something like that.&lt;br /&gt;&lt;br /&gt;Is it possible to acknowledge individual messages on a queue without affecting previously received, but as yet unacknowledged, messages?&lt;br /&gt;&lt;br /&gt;If you acknowledge a message, all previously received messages will also be acknowledged. From the javax.jms.Message Javadoc, the acknowledge method will "Acknowledge this and all previous messages received."&lt;br /&gt;So the answer to your question is no, if what you meant by "affecting" is not-yet acknowledged.&lt;br /&gt;I suggest an alternative. You should look at javax.jms.QueueBrowser to review queued messages. QueueBrowser has getEnumeration, which "Gets an enumeration for browsing the current queue messages in the order they would be received".&lt;br /&gt;&lt;br /&gt;What encryption options are there for sending messages through JMS?&lt;br /&gt;&lt;br /&gt;Encryption is not handled by the JMS specification. It is left to the JMS provider to implement and provide encryption and decryption of messages. These days, Progress Software’s SonicMQ is a leading JMS provider and they have a robust encryption mechanism called Quality of Protection. They also provide an SSL-related feature, which also has build in encryption.&lt;br /&gt;&lt;br /&gt;How does the Application server handle the JMS Connection?&lt;br /&gt;&lt;br /&gt;Application server creates the server session and stores them in a pool.&lt;br /&gt;Connection consumer uses the server session to put messages in the session of the JMS.&lt;br /&gt;Server session is the one that spawns the JMS session.&lt;br /&gt;Applications written by Application programmers creates the message listener.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6848574956779103996-6220155724927699267?l=javaandj2eefaqs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaandj2eefaqs.blogspot.com/feeds/6220155724927699267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6848574956779103996&amp;postID=6220155724927699267' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6848574956779103996/posts/default/6220155724927699267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6848574956779103996/posts/default/6220155724927699267'/><link rel='alternate' type='text/html' href='http://javaandj2eefaqs.blogspot.com/2008/11/jms-interview-questions.html' title='JMS Interview Questions'/><author><name>Bunny</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6848574956779103996.post-2452727332412581405</id><published>2008-11-03T14:15:00.000-08:00</published><updated>2008-11-03T14:23:59.122-08:00</updated><title type='text'>J2EE Interview Questions</title><content type='html'>J2EE Interview Questions &lt;br /&gt;&lt;br /&gt;What is J2EE? &lt;br /&gt;&lt;br /&gt;J2EE is an environment for developing and deploying enterprise applications. The J2EE platform consists of a set of services, application programming interfaces (APIs), and protocols that provide the functionality for developing multitiered, web-based applications.&lt;br /&gt;&lt;br /&gt;What are the components of J2EE application?&lt;br /&gt;&lt;br /&gt;A J2EE component is a self-contained functional software unit that is assembled into a J2EE application with its related classes and files and communicates with other components. &lt;br /&gt;The J2EE specification defines the following J2EE components:&lt;br /&gt;Application clients and applets are client components.&lt;br /&gt;Java Servlet and JavaServer Pages technology components are web components.&lt;br /&gt;Enterprise JavaBeans components (enterprise beans) are business components.&lt;br /&gt;Resource adapter components provided by EIS and tool vendors. &lt;br /&gt;&lt;br /&gt;What makes J2EE suitable for distributed multitiered Applications?&lt;br /&gt;&lt;br /&gt;The J2EE platform uses a multitiered distributed application model. Application logic is divided into components according to function, and the various 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. &lt;br /&gt;&lt;br /&gt;The J2EE application parts are:&lt;br /&gt;&lt;br /&gt;Client-tier components run on the client machine.&lt;br /&gt;Web-tier components run on the J2EE server.&lt;br /&gt;Business-tier components run on the J2EE server.&lt;br /&gt;&lt;br /&gt;What do Enterprise JavaBeans components contain?&lt;br /&gt;&lt;br /&gt;Enterprise JavaBeans components contains Business code, which is logicthat solves or meets the needs of a particular business domain 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 receives data from client programs, processes it (if necessary), and sends it to the enterprise information system tier for storage. An enterprise bean also retrieves data from storage, processes it (if necessary), and sends it back to the client program.&lt;br /&gt;&lt;br /&gt;Is J2EE application only a web-based?&lt;br /&gt;&lt;br /&gt;No, It depends on type of application that client wants. A J2EE application can be web-based or non-web-based. if an application client executes on the client machine, it is a non-web-based J2EE application. &lt;br /&gt;The J2EE application can provide a way for users to handle tasks such as J2EE system or application administration. It typically has a graphical user interface created from Swing or AWT APIs, or a command-line interface. When user request, it can open an HTTP connection to establish communication with a servlet running in the web tier.&lt;br /&gt;&lt;br /&gt;Are JavaBeans J2EE components?&lt;br /&gt;&lt;br /&gt;No. JavaBeans components are not considered J2EE components by the J2EE specification. They are written to manage the data flow between an application client or applet and components running on the J2EE server or between server components and a database. JavaBeans components written for the J2EE platform have instance variables and get and set methods for accessing the data in the instance variables. &lt;br /&gt;JavaBeans components used in this way are typically simple in design and implementation, but should conform to the naming and design conventions outlined in the JavaBeans component architecture.&lt;br /&gt;&lt;br /&gt;Is HTML page a web component?&lt;br /&gt;&lt;br /&gt;No. Static HTML pages and applets are bundled with web components during application assembly, but are not considered web components by the J2EE specification. Even the server-side utility classes are not considered web components, either.&lt;br /&gt;&lt;br /&gt;What can be considered as a web component?&lt;br /&gt;&lt;br /&gt;J2EE Web components can be either servlets or JSP pages. Servlets are Java programming language classes that dynamically process requests and construct responses. JSP pages are text-based documents that execute as servlets but allow a more natural approach to creating static content.&lt;br /&gt;&lt;br /&gt;What is the container?&lt;br /&gt;&lt;br /&gt;Containers are the interface between a component and the low-level platform specific functionality that supports the component. Before a Web, enterprise bean, or application client component can be executed, it must be assembled into a J2EE application and deployed into its container.&lt;br /&gt;&lt;br /&gt;What are container services?&lt;br /&gt;&lt;br /&gt;A container is a runtime support of a system-level entity. Containers provide components with services such as lifecycle management, security, deployment, and threading.&lt;br /&gt;&lt;br /&gt;What is the web container?&lt;br /&gt;&lt;br /&gt;Servlet and JSP containers are collectively referred to as Web containers. It manages the execution of JSP page and servlet components for J2EE applications. Web components and their container run on the J2EE server.&lt;br /&gt;What is Enterprise JavaBeans (EJB) container?&lt;br /&gt;&lt;br /&gt;It manages the execution of enterprise beans for J2EE applications.Enterprise beans and their container run on the J2EE server.&lt;br /&gt;What is Applet container?&lt;br /&gt;&lt;br /&gt;IManages the execution of applets. Consists of a Web browser and Java Plugin running on the client together.&lt;br /&gt;&lt;br /&gt;How do we package J2EE components?&lt;br /&gt;&lt;br /&gt;J2EE components are packaged separately and bundled into a J2EE application for deployment. Each component, its related files such as GIF and HTML files or server-side utility classes, and a deployment descriptor are assembled into a module and added to the J2EE application. &lt;br /&gt;A J2EE application is composed of one or more enterprise bean,Web, or application client component modules. The final enterprise solution can use one J2EE application or be made up of two or more J2EE applications, depending on design requirements. A J2EE application and each of its modules has its own deployment descriptor. A deployment descriptor is an XML document with an .xml extension that describes a component’s deployment settings.&lt;br /&gt;&lt;br /&gt;What is a thin client?&lt;br /&gt;&lt;br /&gt;A thin client is a lightweight interface to the application that does not have such operations like query databases, execute complex business rules, or connect to legacy applications.&lt;br /&gt;&lt;br /&gt;What is deployment descriptor?&lt;br /&gt;&lt;br /&gt;A deployment descriptor is an Extensible Markup Language (XML) text-based file with an .xml extension that describes a component’s deployment settings. A J2EE application and each of its modules has its own deployment descriptor. &lt;br /&gt;For example, an enterprise bean module deployment descriptor declares transaction attributes and security authorizationsfor an enterprise bean. Because deployment descriptor information is declarative, it can be changed without modifying the bean source code. At run time, the J2EE server reads the deployment descriptor and acts upon the component accordingly.&lt;br /&gt;&lt;br /&gt;What is the EAR file?&lt;br /&gt;&lt;br /&gt;An EAR file is a standard JAR file with an .ear extension, named from Enterprise ARchive file. A J2EE application with all of its modules is delivered in EAR file.&lt;br /&gt;&lt;br /&gt;What is JTA and JTS?&lt;br /&gt;&lt;br /&gt;JTA is the abbreviation for the Java Transaction API. JTS is the abbreviation for the Jave Transaction Service. JTA provides a standard interface and allows you to demarcate transactions in a manner that is independent of the transaction manager implementation. &lt;br /&gt;The J2EE SDK implements the transaction 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 transaction interface and ejb uses behind the scenes (client code doesn’t directly interact with JTS. It is based on object transaction service(OTS) which is part of CORBA.&lt;br /&gt;&lt;br /&gt;What is JAXP?&lt;br /&gt;&lt;br /&gt;JAXP stands for Java 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 provides standard services to determine the type of an arbitrary piece of data, encapsulate access to it, discover the operations available on it, and create the appropriate JavaBeans component to perform those operations.&lt;br /&gt;&lt;br /&gt;What is J2EE Connector?&lt;br /&gt;&lt;br /&gt;The J2EE Connector API is used by J2EE tools vendors and system integrators to create resource adapters that support access to enterprise information systems that can be plugged into any J2EE product. Each type of database or EIS has a different resource adapter. &lt;br /&gt;Note: A resource adapter is a software component that allows J2EE application components to access and interact with the underlying resource manager. Because a resource adapter is specific to its resource manager, there is typically a different resource adapter for each type of database or enterprise information system.&lt;br /&gt;&lt;br /&gt;What is JAAP?&lt;br /&gt;&lt;br /&gt;The Java Authentication and Authorization Service (JAAS) provides a way for a J2EE application to authenticate and authorize a specific user or group of users to run it. It is a standard Pluggable Authentication Module (PAM) framework that extends the Java 2 platform security architecture to support user-based authorization.&lt;br /&gt;&lt;br /&gt;What is Java Naming and Directory Service?&lt;br /&gt;&lt;br /&gt;The JNDI provides naming and directory functionality. It provides applications with methods for performing standard directory operations, such as associating attributes with objects and searching for objects using their attributes. Using JNDI, a J2EE application can store and retrieve any type of named Java object. &lt;br /&gt;Because JNDI is independent of any specific implementations, applications can use JNDI to access multiple naming and directory services, including existing naming anddirectory services such as LDAP, NDS, DNS, and NIS.&lt;br /&gt;&lt;br /&gt;What is Struts?&lt;br /&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;How is the MVC design pattern used in Struts framework? &lt;br /&gt;&lt;br /&gt;In the MVC design pattern, application flow is mediated 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 application’s business logic or state. Control is usually then forwarded back through the Controller to the appropriate View. &lt;br /&gt;The forwarding can be determined by consulting a set of mappings, usually loaded from a database or configuration file. This provides a loose coupling between the View and Model, which can make an application significantly easier to create and maintain. &lt;br /&gt;Controller: Servlet controller which supplied by Struts itself; &lt;br /&gt;View: what you can see on the screen, a JSP page and presentation components; &lt;br /&gt;Model: System state and a business logic JavaBeans.&lt;br /&gt;&lt;br /&gt;What is the purpose of JNDI?&lt;br /&gt;&lt;br /&gt;JNDI provides a platform-independent Java interface tonaming and directory services, such as LDAP, NDS, and ActiveDirectory.&lt;br /&gt;What’s the difference between JNDI lookup(), list(), listBindings(), and search()?&lt;br /&gt;lookup() attempts to find the specified object in the given context. I.e., it looks for a single, specific object and either finds it in the current context or it fails. list() attempts to return an enumeration of all of the NameClassPair’s of all of the objects in the current context. &lt;br /&gt;I.e., it’s a listing of all of the objects in the current context but only returns the object’s name and the name of the class to which the object belongs. listBindings() attempts to return an enumeration of the Binding’s of all of the objects in the current context. I.e., it’s a listing of all of the objects in the current context with the object’s name, its class name, and a reference to the object itself. search() attempts to return an enumeration of all of the objects matching a given set of search criteria. It can search across multiple contexts (or not). &lt;br /&gt;It can return whatever attributes of the objects that you desire. It’s by far the most complex and powerful of these options but is also the most expensive.&lt;br /&gt;&lt;br /&gt;Components of JNDI?&lt;br /&gt;&lt;br /&gt;Naming Interface- The naming interface organizes information hierarchically and maps human-friendly names to addresses or objects that are machine-friendly. It allows access to named objects through multiple namespaces. &lt;br /&gt;Directory Interface - JNDI includes a directory service interface that provides access to directory objects, which can contain attributes, thereby providing attribute-based searching and schema support. &lt;br /&gt;Service Provider Interface - JNDI comes with the SPI, which supports the protocols provided by third parties.&lt;br /&gt;&lt;br /&gt;What is the Max amount of information that can be saved in a Session Object? &lt;br /&gt;&lt;br /&gt;As such there is no limit on the amount of information that can be saved in a Session Object. Only the RAM available on the server machine is the limitation. The only limit is the Session ID length(Identifier), which should not exceed more than 4K. If the data to be store is very huge, then it’s preferred to save it to a temporary file onto hard disk, rather than saving it in session. Internally if the amount of data being saved in Session exceeds the predefined limit, most of the servers write it to a temporary cache on Hard disk.&lt;br /&gt;&lt;br /&gt;Must my bean-managed persistence mechanism use the WebLogic JTS driver?&lt;br /&gt;&lt;br /&gt;BEA recommend that you use the TxDataSource for bean-managed persistence.&lt;br /&gt;Do EJBs have to be homogeneously deployed across a cluster? Why? &lt;br /&gt;Yes. Beginning with WebLogic Server version 6.0, EJBs must be homogeneously deployed across a cluster for the following reasons:&lt;br /&gt;To keep clustering EJBs simple&lt;br /&gt;To avoid cross server calls which results in more efficiency. If EJBs are not deployed on all servers, cross server calls are much more likely.&lt;br /&gt;To ensure that every EJB is available locally&lt;br /&gt;To ensure that all classes are loaded in an undeployable way&lt;br /&gt;Every server must have access to each EJB’s classes so that it can be bound into the local JNDI tree. &lt;br /&gt;If only a subset of the servers deploys the bean, the other servers will have to load the bean’s classes in their respective system classpaths which makes it impossible to undeploy the beans.&lt;br /&gt;&lt;br /&gt;Is an XSLT processor bundled in WebLogic Server?&lt;br /&gt;&lt;br /&gt;Yes, an XSLT processor, based on Apache’s Xalan 2.0.1 processor, in WebLogic Server 6.1.&lt;br /&gt;I plugged in a version of Apache Xalan that I downloaded from the Apache Web site, and now I get errors when I try to transform documents. What is the problem?&lt;br /&gt;You must ensure that the version of Apache Xalan you download from the Apache Web site is compatible with Apache Xerces version 1.3.1. Because you cannot plug in a different version of Apache Xerces , the only version of Apache Xerces that is compatible with WebLogic Server 6.1 is 1.3.1. The built-in parser (based on version 1.3.1 of Apache Xerces) and transformer (based on version 2.0.1 of Apache Xalan) have been modified by BEA to be compatible with each other.&lt;br /&gt;&lt;br /&gt;How do I increase WebLogic Server memory?&lt;br /&gt;&lt;br /&gt;Increase the allocation of Java heap memory for WebLogic Server. (Set the minimum and the maximum to the same size.) Start WebLogic Server with the -ms32m option to increase the allocation, as in this example: $ java ... -ms32m -mx32m ...&lt;br /&gt;This allocates 32 megabytes of Java heap memory to WebLogic Server, which improves performance and allows WebLogic Server to handle more simultaneous connections. You can increase this value if necessary.&lt;br /&gt;&lt;br /&gt;What causes Java.io exceptions in the log file of WebLogic Server? &lt;br /&gt;&lt;br /&gt;You may see messages like these in the log file: (Windows NT) java.io.IOException Connection Reset by Peer java.io.EOFException Connection Reset by Peer(Solaris) java.io.Exception: Broken pipe&lt;br /&gt;These messages occur when you are using servlets. A client initiates an HTTP request, and then performs a series of actions on the browser:&lt;br /&gt;Click Stop or enter equivalent command or keystrokes&lt;br /&gt;Click Refresh or enter equivalent command or keystrokes&lt;br /&gt;Send a new HTTP request.&lt;br /&gt;The messages indicate that WebLogic Server has detected and recovered from an interrupted HTTP request.&lt;br /&gt;&lt;br /&gt;What is the function of T3 in WebLogic Server?&lt;br /&gt;&lt;br /&gt;T3 provides a framework for WebLogic Server messages that support for enhancements. These enhancements include abbreviations and features, such as object replacement, that work in the context of WebLogic Server clusters and HTTP and other product tunneling. &lt;br /&gt;T3 predates Java Object Serialization and RMI, while closely tracking and leveraging these specifications. T3 is a superset of Java Object. Serialization or RMI; anything you can do in Java Object Serialization and RMI can be done over T3. T3 is mandated between WebLogic Servers and between programmatic clients and a WebLogic Server cluster. &lt;br /&gt;HTTP and IIOP are optional protocols that can be used to communicate between other processes and WebLogic Server. It depends on what you want to do. For example, when you want to communicate between a browser and WebLogic Server-use HTTP, or an ORB and WebLogic Server-IIOP.&lt;br /&gt;&lt;br /&gt;What are the enhancements in EJB 2.0 specification with respect to Asynchronous communication?&lt;br /&gt;&lt;br /&gt;EJB 2.0 mandates integration between JMS and EJB. We have specified the integration of Enterprise JavaBeans with the Java Message Service, and have introduced message-driven beans. A message-driven bean is a stateless component that is invoked by the container as a result of the arrival of a JMS message. The goal of the message-driven bean model is to make developing an enterprise bean that is asynchronously invoked to handle the processing of incoming JMS messages as simple as developing the same functionality in any other JMS MessageListener. &lt;br /&gt;What are the enhancements in EJB 2.0 with respect to CMP?&lt;br /&gt;EJB 2.0 extends CMP to include far more robust modeling capability, with support for declarative management of relationships between entity EJBs. Developers no longer need to re-establish relationships between the various beans that make up their application — the container will restore the connections automatically as beans are loaded, allowing bean developers to navigate between beans much as they would between any standard Java objects.&lt;br /&gt;EJB 2.0 also introduces for the first time a portable query language, based on the abstract schema, not on the more complex database schema. This provides a database and vendor-independent way to find entity beans at run time, based on a wide variety of search criteria.&lt;br /&gt;&lt;br /&gt;Can you briefly describe local interfaces?&lt;br /&gt;&lt;br /&gt;EJB was originally designed around remote invocation using the Java Remote Method Invocation (RMI) mechanism, and later extended to support to standard CORBA transport for these calls using RMI/IIOP. This design allowed for maximum flexibility in developing applications without consideration for the deployment scenario, and was a strong feature in support of a goal of component reuse in J2EE. &lt;br /&gt;Many developers are using EJBs locally - that is, some or all of their EJB calls are between beans in a single container. With this feedback in mind, the EJB 2.0 expert group has created a local interface mechanism. The local interface may be defined for a bean during development, to allow streamlined calls to the bean if a caller is in the same container. &lt;br /&gt;&lt;br /&gt;This does not involve the overhead involved with RMI like marshalling etc. This facility will thus improve the performance of applications in which co-location is planned. Local interfaces also provide the foundation for container-managed relationships among entity beans with container-managed persistence.&lt;br /&gt;&lt;br /&gt;What are the special design care that must be taken when you work with local interfaces?&lt;br /&gt;&lt;br /&gt;It is important to understand that the calling semantics of local interfaces are different from those of remote interfaces. For example, remote interfaces pass parameters using call-by-value semantics, while local interfaces use call-by-reference. &lt;br /&gt;&lt;br /&gt;This means that in order to use local interfaces safely, application developers need to carefully consider potential deployment scenarios up front, then decide which interfaces can be local and which remote, and finally, develop the application code with these choices in mind. While EJB 2.0 local interfaces are extremely useful in some situations, the long-term costs of these choices, especially when changing requirements and component reuse are taken into account, need to be factored into the design decision.&lt;br /&gt;What happens if remove( ) is never invoked on a session bean?&lt;br /&gt;In case of a stateless session bean it may not matter if we call or not as in both cases nothing is done. The number of beans in cache is managed by the container. In case of stateful session bean, the bean may be kept in cache till either the session times out, in which case the bean is removed or when there is a requirement for memory in which case the data is cached and the bean is sent to free pool. &lt;br /&gt;What is the difference between creating a distributed application using RMI and using a EJB architecture?&lt;br /&gt;It is possible to create the same application using RMI and EJB. But in case of EJB the container provides the requisite services to the component if we use the proper syntax. It thus helps in easier development and lesser error and use of proven code and methodology. But the investment on application server is mandatory in that case. &lt;br /&gt;But this investment is warranted because it results in less complex and maintainable code to the client, which is what the end client wants. Almost all the leading application servers provide load balancing and performance tuning techniques. In case of RMI we have to code the services and include in the program the way to invoke these services.&lt;br /&gt;Why would a client application use JTA transactions? &lt;br /&gt;One possible example would be a scenario in which a client needs to employ two (or more) session beans, where each session bean is deployed on a different EJB server and each bean performs operations against external resources (for example, a database) and/or is managing one or more entity beans. In this scenario, the client’s logic could required an all-or-nothing guarantee for the operations performed by the session beans; &lt;br /&gt;hence, the session bean usage could be bundled together with a JTA UserTransaction object. In the previous scenario, however, the client application developer should address the question of whether or not it would be better to encapsulate these operations in yet another session bean, and allow the session bean to handle the transactions via the EJB container. In general, lightweight clients are easier to maintain than heavyweight clients. &lt;br /&gt;Also, EJB environments are ideally suited for transaction management. &lt;br /&gt;Context c = new InitialContext(); &lt;br /&gt;UserTransaction ut = (UserTransaction)c.lookup("java:comp/UserTransaction");ut.begin(); // perform multiple operations...ut.commit() ...&lt;br /&gt;Can the bean class implement the EJBObject class directly? If not why?&lt;br /&gt;It is better not to do it will make the Bean class a remote object and its methods can be accessed without the containers? security, and transaction implementations if our code by mistake passed it in one of its parameters. Its just a good design practice.&lt;br /&gt;&lt;br /&gt;What does isIdentical() method return in case of different type of beans?&lt;br /&gt;&lt;br /&gt;Stateless - true always. Stateful - depends whether the references point to the same session object. Entity - Depends whether the primary key is the same and the home is same. &lt;br /&gt;&lt;br /&gt;How should you type cast a remote object? Why?&lt;br /&gt;&lt;br /&gt;A client program that is intended to be interoperable with all compliant EJB Container implementations must use the javax.rmi.PortableRemoteObject.narrow(…) method to perform type-narrowing of the client-side representations of the remote home and remote interfaces. Programs using the cast operator for narrowing the remote and remote home interfaces are likely to fail if the Container implementation uses RMI-IIOP as the underlying communication transport.&lt;br /&gt;What should you do in a passive method?&lt;br /&gt;you try to make all nontransient variables, which are not one of the following to null. For the given list the container takes care of serializing and restoring the object when activated. Serializable objects, null, UserTransaction, SessionContext, JNDI contexts in the beans context, reference to other beans, references to connection pools.Things that must be handled explicitly are like a open database connection etc. These must be closed and set to null and retrieved back in the activate method.&lt;br /&gt;&lt;br /&gt;What is EJB architecture(components) ?&lt;br /&gt;&lt;br /&gt;EJB Architecture consists of : &lt;br /&gt;a) EJB Server&lt;br /&gt;b) EJB containers that run on these servers,&lt;br /&gt;c) Home Objects, Remote EJB Objects and Enterprise Beans that run within these containor&lt;br /&gt;d) EJB Clients and&lt;br /&gt;e) Auxillary System Like JNDI (Java Naming and DirectoryInterface), JTS(Java Transaction Service) and security services. &lt;br /&gt;&lt;br /&gt;What is the lifecycle of Entity Bean?&lt;br /&gt;&lt;br /&gt;The following steps describe the life cycle of an entity bean instance An entity bean instances life starts when the container creates the instance using newInstance and then initialises it using setEntityContext. The instance enters the pool of available instances. Each entity bean has its own pool. While the instance is in the available pool, the instance is not associated with any particular entity object identity. &lt;br /&gt;&lt;br /&gt;Any of these pooled instances may be used to execute finder (ejbFind) or home (ejbHome) methods. An instance transitions from the pooled state to the ready state when the container selects that instance to service a client call to an entity object. There are two possible transitions from the pooled to the ready state: through the creation of an entity (ejbCreate and ejbPostCreate) or through the activation of an entity (ejbActivate). When an entity bean instance is in the ready state, the instance is associated with a specific entity object identity. While the instance is in the ready state, the container can synchronize the instance with its representation in the underlying data source whenever it determines the need to using ejbLoad and ejbStore methods. &lt;br /&gt;&lt;br /&gt;Business methods can also be invoked zero or more times on an instance. An ejbSelect method can be called by a business method, ejbLoad or ejbStore method. The container can choose to passivate an entity bean instance within a transaction. &lt;br /&gt;To passivate an instance, the container first invokes the ejbStore method to allow the instance to prepare itself for the synchronization of the database state with the instance?s state, and then the container invokes the ejbPassivate method to return the instance to the pooled state. &lt;br /&gt;&lt;br /&gt;There are three possible transitions from the ready to the pooled state: through the ejbPassivate method, through the ejbRemove method (when the entity is removed), and because of a transaction rollback for ejbCreate, ejbPostCreate,or ejbRemove. The container can remove an instance in the pool by calling the unsetEntityContext() method on the instance.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6848574956779103996-2452727332412581405?l=javaandj2eefaqs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaandj2eefaqs.blogspot.com/feeds/2452727332412581405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6848574956779103996&amp;postID=2452727332412581405' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6848574956779103996/posts/default/2452727332412581405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6848574956779103996/posts/default/2452727332412581405'/><link rel='alternate' type='text/html' href='http://javaandj2eefaqs.blogspot.com/2008/11/j2ee-interview-questions.html' title='J2EE Interview Questions'/><author><name>Bunny</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6848574956779103996.post-6492565033269914533</id><published>2008-11-03T14:02:00.000-08:00</published><updated>2008-11-03T14:15:20.055-08:00</updated><title type='text'></title><content type='html'>J2ME Interview Questions &lt;br /&gt;What is J2ME?&lt;br /&gt;Java 2, Micro Edition is a group of specifications and technologies that pertain to Java on small devices. The J2ME moniker covers a wide range of devices, from pagers and mobile telephones through set-top boxes and car navigation systems. The J2ME world is divided into configurations and profiles, specifications that describe a Java environment for a specific class of device.&lt;br /&gt;&lt;br /&gt;What is J2ME WTK?&lt;br /&gt;The J2ME Wireless Toolkit is a set of tools that provides developers with an emulation environment, documentation and examples for developing Java applications for small devices. The J2ME WTK is based on the Connected Limited Device Configuration (CLDC) and Mobile Information Device Profile (MIDP) reference implementations, and can be tightly integrated with Forte for Java.&lt;br /&gt;&lt;br /&gt;What is 802.11?&lt;br /&gt;802.11 is a group of specifications for wireless networks developed by the Institute of Electrical and Electronics Engineers (IEEE). 802.11 uses the Ethernet protocol and CSMA/CA (carrier sense multiple access with collision avoidance) for path sharing.&lt;br /&gt;&lt;br /&gt;What is API?&lt;br /&gt;An Application Programming Interface (API) is a set of classes that you can use in your own application. Sometimes called libraries or modules, APIs enable you to write an application without reinventing common pieces of code.&lt;br /&gt;For example, a networking API is something your application can use to make network connections, without your ever having to understand the underlying code.&lt;br /&gt;&lt;br /&gt;What is AMPS?&lt;br /&gt;Advanced Mobile Phone Service (AMPS) is a first-generation analog, circuit-switched cellular phone network. Originally operating in the 800 MHz band, service was later expanded to include transmissions in the 1900 MHz band, the VHF range in which most wireless carriers operate. Because AMPS uses analog signals, it cannot transmit digital signals and cannot transport data packets without assistance from newer technologies such as TDMA and CDMA.&lt;br /&gt;&lt;br /&gt;What is CDC? &lt;br /&gt;The Connected Device Configuration (CDC) is a specification for a J2ME configuration. Conceptually, CDC deals with devices with more memory and processing power than CLDC;&lt;br /&gt;it is for devices with an always-on network connection and a minimum of 2 MB of memory available for the Java system.&lt;br /&gt;&lt;br /&gt;What is CDMA?&lt;br /&gt;Code-Division Multiple Access (CDMA) is a cellular technology widely used in North America. There are currently three CDMA standards: CDMA One, CDMA2000 and W-CDMA. CDMA technology uses UHF 800Mhz-1.9Ghz frequencies and bandwidth ranges from 115Kbs to 2Mbps.&lt;br /&gt;&lt;br /&gt;What is CDMA?&lt;br /&gt;Also know as IS-95, CDMAOne is a 2nd generation wireless technology. Supports speeds from 14.4Kbps to 115K bps.&lt;br /&gt;&lt;br /&gt;What is CDMA2000?&lt;br /&gt;Also known as IS-136, CDMA2000 is a 3rd generation wireless technology. Supports speeds ranging from 144Kbps to 2Mbps.&lt;br /&gt;&lt;br /&gt;What is CDPD?&lt;br /&gt;Developed by Nortel Networks, Cellular Digital Packet Data (CDPD) is an open standard for supporting wireless Internet access from cellular devices. CDPD also supports Multicast, which allows content providers to efficiently broadcast information to many devices at the same time.&lt;br /&gt;&lt;br /&gt;What is cHTML?&lt;br /&gt;Compact HTML (cHTML) is a subset of HTML which is designed for small devices. The major features of HTML that are excluded from cHTML are: JPEG image, Table, Image map, Multiple character fonts and styles, Background color and image, Frame and Style sheet.&lt;br /&gt;&lt;br /&gt;What is CLDC?&lt;br /&gt;The Connected, Limited Device Configuration (CLDC) is a specification for a J2ME configuration. The CLDC is for devices with less than 512 KB or RAM available for the Java system and an intermittent (limited) network connection.&lt;br /&gt;It specifies a stripped-down Java virtual machine1 called the KVM as well as several APIs for fundamental application services. Three packages are minimalist versions of the J2SE java.lang, java.io, and java.util packages. A fourth package, javax.microedition.io, implements the Generic Connection Framework, a generalized API for making network connections.&lt;br /&gt;&lt;br /&gt;What is configuration?&lt;br /&gt;In J2ME, a configuration defines the minimum Java runtime environment for a family of devices: the combination of a Java virtual machine (either the standard J2SE virtual machine or a much more limited version called the CLDC VM) and a core set of APIs. CDC and CLDC are configurations. See also profile, optional package.&lt;br /&gt;&lt;br /&gt;What is CVM?&lt;br /&gt;The Compact Virtual Machine (CVM) is an optimized Java virtual machine1 (JVM) that is used by the CDC.&lt;br /&gt;&lt;br /&gt;What is Deck?&lt;br /&gt;A deck is a collection of one or more WML cards that can be downloaded, to a mobile phone, as a single entity.&lt;br /&gt;&lt;br /&gt;What is EDGE?&lt;br /&gt;Enhanced Data GSM Environment (EDGE) is a new, faster version of GSM. EDGE is designed to support transfer rates up to 384Kbps and enable the delivery of video and other high-bandwidth applications. EDGE is the result of a joint effort between TDMA operators, vendors and carriers and the GSM Alliance.&lt;br /&gt;&lt;br /&gt;What is ETSI?&lt;br /&gt;The European Telecommunications Standards Institute (ETSI) is a non-profit organization that establishes telecommunications standards for Europe.&lt;br /&gt;&lt;br /&gt;What is FDMA?&lt;br /&gt;Frequency-division multiple-access (FDMA) is a mechanism for sharing a radio frequency band among multiple users by dividing it into a number of smaller bands.&lt;br /&gt;&lt;br /&gt;What is Foundation Profile ?&lt;br /&gt;The Foundation Profile is a J2ME profile specification that builds on CDC. It adds additional classes and interfaces to the CDC APIs but does not go so far as to specify user interface APIs, persistent storage, or application life cycle.&lt;br /&gt;Other J2ME profiles build on the CDC/Foundation combination: for example, the Personal Profile and the RMI Profile both build on the Foundation Profile.&lt;br /&gt;&lt;br /&gt;What is Generic Connection Framework ?&lt;br /&gt;The Generic Connection Framework (GCF) makes it easy for wireless devices to make network connections. It is part of CLDC and CDC and resides in the javax.microedition.io package.&lt;br /&gt;&lt;br /&gt;What is GPRS ?&lt;br /&gt;The General Packet Radio System (GPRS) is the next generation of GSM. It will be the basis of 3G networks in Europe and elsewhere.&lt;br /&gt;&lt;br /&gt;What is GSM ?&lt;br /&gt;The Global System for Mobile Communications (GSM) is a wireless network system that is widely used in Europe, Asia, and Australia. GSM is used at three different frequencies: GSM900 and GSM1800 are used in Europe, Asia, and Australia, while GSM1900 is deployed in North America and other parts of the world.&lt;br /&gt;&lt;br /&gt;What is HLR ?&lt;br /&gt;The Home Location Register (HLR) is a database for permanent storage of subscriber data and service profiles.&lt;br /&gt;&lt;br /&gt;What is HTTPS ?&lt;br /&gt;Hyper Text Transfer Protocol Secure sockets (HTTPS) is a protocol for transmission of encrypted hypertext over Secure Sockets Layer.&lt;br /&gt;&lt;br /&gt;What is i-appli ?&lt;br /&gt;Sometimes called "Java for i-mode", i-appli is a Java environment based on CLDC. It is used on handsets in NTT DoCoMo's i-mode service. While i-appli is similar to MIDP, it was developed before the MIDP specification was finished and the two APIs are incompatible.&lt;br /&gt;&lt;br /&gt;What is IDE ?&lt;br /&gt;An Integrated Development Environment (IDE) provides a programming environment as a single application. IDEs typically bundle a compiler, debugger, and GUI builder tog ether. Forte for Java is Sun's Java IDE.&lt;br /&gt;&lt;br /&gt;What is iDEN ?&lt;br /&gt;The Integrated Dispatch Enhanced Network (iDEN) is a wireless network system developed by Motorola. Various carriers support iDEN networks around the world: Nextel is one of the largest carriers, with networks covering North and South America.&lt;br /&gt;&lt;br /&gt;What is i-mode ?&lt;br /&gt;A standard used by Japanese wireless devices to access cHTML (compact HTML) Web sites and display animated GIFs and other multimedia content.&lt;br /&gt;&lt;br /&gt;What is 3G ?&lt;br /&gt;Third generation (3G) wireless networks will offer faster data transfer rates than current networks. The first generation of wireless (1G) was analog cellular.&lt;br /&gt;The second generation (2G) is digital cellular, featuring integrated voice and data communications. So-called 2.5G networks offer incremental speed increases. 3G networks will offer dramatically improved data transfer rates, enabling new wireless applications such as streaming media.&lt;br /&gt;&lt;br /&gt;What is 3GPP ?&lt;br /&gt;The 3rd Generation Partnership Project (3GPP) is a global collaboration between 6 partners: ARIB, CWTS, ETSI, T1, TTA, and TTC. The group aims to develop a globally accepted 3rd-generation mobile system based on GSM.&lt;br /&gt;window.google_render_ad();&lt;br /&gt;geovisit();&lt;br /&gt;&lt;br /&gt;What is Java Card ?&lt;br /&gt;The Java Card specification allows Java technology to run on smart cards and other small devices. The Java Card API is compatible with formal international standards, such as, ISO7816, and industry-specific standards, such as, Europay/Master Card/Visa (EMV).&lt;br /&gt;&lt;br /&gt;What is JavaHQ ?&lt;br /&gt;JavaHQ is the Java platform control center on your Palm OS device.&lt;br /&gt;&lt;br /&gt;What is JCP ?&lt;br /&gt;The Java Community Process (JCP) an open organization of international Java developers and licensees who develop and revise Java technology specifications, reference implementations, and technology compatibility kits through a formal process.&lt;br /&gt;&lt;br /&gt;What is JDBC for CDC/FP ?&lt;br /&gt;The JDBC Optional Package for CDC/Foundation Profile (JDBCOP for CDC/FP) is an API that enables mobile Java applications to communicate with relational database servers using a subset of J2SE's Java Database Connectivity.&lt;br /&gt;This optional package is a strict subset of JDBC 3.0 that excludes some of JDBC's advanced and server-oriented features, such as pooled connections and array types. It's meant for use with the Foundation Profile or its supersets.&lt;br /&gt;&lt;br /&gt;What is JSR ?&lt;br /&gt;Java Specification Request (JSR) is the actual description of proposed and final specifications for the Java platform. JSRs are reviewed by the JCP and the public before a final release of a specification is made.&lt;br /&gt;&lt;br /&gt;What is KittyHawk ?&lt;br /&gt;KittyHawk is a set of APIs used by LG Telecom on its IBook and p520 devices. KittyHawk is based on CLDC. It is conceptually similar to MIDP but the two APIs are incompatible.&lt;br /&gt;&lt;br /&gt;What is KJava ?&lt;br /&gt;KJava is an outdated term for J2ME. It comes from an early package of Java software for PalmOS, released at the 2000 JavaOne show. The classes for that release were packaged in the com.sun.kjava package.&lt;br /&gt;&lt;br /&gt;What is kSOAP ?&lt;br /&gt;kSOAP is a SOAP API suitable for the J2ME, based on kXML.&lt;br /&gt;&lt;br /&gt;What is kXML ?&lt;br /&gt;The kXML project provides a small footprint XML parser that can be used with J2ME.&lt;br /&gt;&lt;br /&gt;What is KVM ?&lt;br /&gt;The KVM is a compact Java virtual machine (JVM) that is designed for small devices. It supports a subset of the features of the JVM. For example, the KVM does not support floating-point operations and object finalization. The CLDC specifies use of the KVM. According to folklore, the 'K' in KVM stands for kilobyte, signifying that the KVM runs in kilobytes of memory as opposed to megabytes.&lt;br /&gt;&lt;br /&gt;What is LAN ?&lt;br /&gt;A Local Area Network (LAN) is a group of devices connected with various communications technologies in a small geographic area. Ethernet is the most widely-used LAN technology. Communication on a LAN can either be with Peer-to-Peer devices or Client-Server devices.&lt;br /&gt;&lt;br /&gt;What is LCDUI ?&lt;br /&gt;LCDUI is a shorthand way of referring to the MIDP user interface APIs, contained in the javax.microedition.lcdui package. Strictly speaking, LCDUI stands for Liquid Crystal Display User Interface. It's a user interface toolkit for small device screens which are commonly LCD screens.&lt;br /&gt;&lt;br /&gt;What is MExE ?&lt;br /&gt;The Mobile Execution Environment (MExE) is a specification created by the 3GPP which details an applicatio n environment for next generation mobile devices. MExE consists of a variety of technologies including WAP, J2ME, CLDC and MIDP.&lt;br /&gt;&lt;br /&gt;What is MIDlet ?&lt;br /&gt;A MIDlet is an application written for MIDP. MIDlet applications are subclasses of the javax.microedition.midlet.MIDlet class that is defined by MIDP.&lt;br /&gt;&lt;br /&gt;What is MIDlet suite ?&lt;br /&gt;MIDlets are packaged and distributed as MIDlet suites. A MIDlet suite can contain one or more MIDlets. The MIDlet suite consists of two files, an application descriptor file with a .jad extension and an archive file with a .jar file. The descriptor lists the archive file name, the names and class names for each MIDlet in the suite, and other information. The archive file contains the MIDlet classes and resource files.&lt;br /&gt;&lt;br /&gt;What is MIDP ?&lt;br /&gt;The Mobile Information Device Profile (MIDP) is a specification for a J2ME profile. It is layered on top of CLDC and adds APIs for application life cycle, user interface, networking, and persistent storage.&lt;br /&gt;&lt;br /&gt;What is MIDP-NG ?&lt;br /&gt;The Next Generation MIDP specification is currently under development by the Java Community Process. Planned improvements include XML parsing and cryptographic support.&lt;br /&gt;&lt;br /&gt;What is Mobitex ?&lt;br /&gt;Mobitex is a packet-switched, narrowband PCS network, designed for wide-area wireless data communications. It was developed in 1984 by Eritel, an Ericsson subsidiary, a nd there are now over 30 Mobitex networks in operation worldwide.&lt;br /&gt;&lt;br /&gt;What is Modulation ?&lt;br /&gt;Modulation is the method by which a high-frequency digital signal is grafted onto a lower-frequency analog wave, so that digital packets are able to ride piggyback on the analog airwave.&lt;br /&gt;&lt;br /&gt;What is MSC ?&lt;br /&gt;A Mobile Switching Center (MSC) is a unit within a cellular phone network that automatically coordinates and switches calls in a given cell. It monitors each caller's signal strength, and when a signal begins to fade, it hands off the call to another MSC that's better positioned to manage the call.&lt;br /&gt;&lt;br /&gt;What is Obfuscation ?&lt;br /&gt;Obfuscation is a technique used to complicate code. Obfuscation makes code harder to understand when it is de-compiled, but it typically has no affect on the functionality of the code. Obfuscation programs can be used to protect Java programs by making them harder to reverse-engineer.&lt;br /&gt;&lt;br /&gt;What is optional package ?&lt;br /&gt;An optional package is a set of J2ME APIs providing services in a specific area, such as database access or multimedia. Unlike a profile, it does not define a complete application environment, but rather is used in conjunction with a configuration or a profile.&lt;br /&gt;It extends the runtime environment to support device capabilities that are not universal enough to be defined as part of a profile or that need to be shared by different profiles. J2ME RMI and the Mobile Media RMI are examples of optional packages.&lt;br /&gt;&lt;br /&gt;What is OTA ?&lt;br /&gt;Over The Air (OTA) refers to any wireless networking technology.&lt;br /&gt;&lt;br /&gt;What is PCS ?&lt;br /&gt;Personal Communications Service (PCS) is a suite of second-generation, digitally modulated mobile-communications interfaces that includes TDMA, CDMA, and GSM. PCS serves as an umbrella term for second-generation wireless technologies operating in the 1900MHz range.&lt;br /&gt;&lt;br /&gt;What is PDAP ?&lt;br /&gt;The Personal Digital Assistant Profile (PDAP) is a J2ME profile specification designed for small platforms such as PalmOS devices. You can think of PDAs as being larger than mobile phones but smaller than set-top boxes.&lt;br /&gt;PDAP is built on top of CLDC and will specify user interface and persistent storage APIs. PDAP is currently being developed using the Java Community Process (JCP).&lt;br /&gt;&lt;br /&gt;What is PDC ?&lt;br /&gt;Personal Digital Cellular (PDC) is a Japanese standard for wireless communications.&lt;br /&gt;&lt;br /&gt;What is PDCP ?&lt;br /&gt;Parallel and Distributed Computing Practices (PDCP) are often used to describe computer systems that are spread over many devices on a network (wired or wireless) where many nodes process data simultaneously.&lt;br /&gt;&lt;br /&gt;What is Personal Profile ?&lt;br /&gt;The Personal Profile is a J2ME profile specification. Layered on the Foundation Profile and CDC, the Personal Profile will be the next generation of PersonalJava technology. The specification is currently in development under the Java Community Process (JCP).&lt;br /&gt;&lt;br /&gt;What is PersonalJava ?&lt;br /&gt;PersonalJava is a Java environment based on the Java virtual machine1 (JVM) and a set of APIs similar to a JDK 1.1 environment. It includes the Touchable Look and Feel (also called Truffle), a graphic toolkit that is optimized for consumer devices with a touch sensitive screen. PersonalJava will be included in J2ME in the upcoming Personal Profile, which is built on CDC.&lt;br /&gt;&lt;br /&gt;What is PNG ?&lt;br /&gt;Portable Network Graphics (PNG) is an image format offering lossless compression and storage flexibility. The MIDP specification requires implementations to recognize certain types of PNG images.&lt;br /&gt;&lt;br /&gt;What is POSE?&lt;br /&gt;Palm OS Emulator (POSE).&lt;br /&gt;&lt;br /&gt;What is PRC ?&lt;br /&gt;Palm Resource Code (PRC) is the file format for Palm OS applications.&lt;br /&gt;&lt;br /&gt;What is preverification ?&lt;br /&gt;Due to memory and processing power available on a device, the verification process of classes are split into two processes. The first process is the preverification which is off-device and done using the preverify tool. The second process is verification which is done on-device.&lt;br /&gt;&lt;br /&gt;What is profile ?&lt;br /&gt;A profile is a set of APIs added to a configuration to support specific uses of a mobile device. Along with its underlying configuration, a profile defines a complete, and usually self-contained, general-purpose application environment.&lt;br /&gt;Profiles often, but not always, define APIs for user interface and persistence; the MIDP profile, based on the CLDC configuration, fits this pattern. Profiles may be supersets or subsets of other profiles; the Personal Basis Profile is a subset of the Personal Profile and a superset of the Foundation Profile. See also configuration, optional package.&lt;br /&gt;&lt;br /&gt;What is Provisioning ?&lt;br /&gt;In telecommunications terms, provisioning means to provide telecommunications services to a user. This includes providing all necessary hardware, software, and wiring or transmission devices.&lt;br /&gt;&lt;br /&gt;What is PSTN ?&lt;br /&gt;The public service telephone network (PSTN) is the traditional, land-line based system for exchanging phone calls.&lt;br /&gt;&lt;br /&gt;What is RMI ?&lt;br /&gt;Remote method invocation (RMI) is a feature of J2SE that enables Java objects running in one virtual machine to invoke methods of Java objects running in another virtual machine, seamlessly.&lt;br /&gt;&lt;br /&gt;What is RMI OP ?&lt;br /&gt;The RMI Optional Package (RMI OP) is a subset of J2SE 1.3's RMI functionality used in CDC-based profiles that incorporate the Foundation Profile, such as the Personal Basis Profile and the Personal Profile.&lt;br /&gt;The RMIOP cannot be used with CLDC-based profiles because they lack object serialization and other important features found only in CDC-based profiles. RMIOP supports most of the J2SE RMI functionality, including the Java Remote Method Protocol, marshalled objects, distributed garbage collection, registry-based object lookup, and network class loading, but not HTTP tunneling or the Java 1.1 stub protocol.&lt;br /&gt;&lt;br /&gt;What is RMI Profile?&lt;br /&gt;The RMI Profile is a J2ME profile specification designed to support Java's Remote Method Invocation (RMI) distributed object system. Devices implementing the RMI Profile will be able to interoperate via RMI with other Java devices, including Java 2, Standard Edition. The RMI Profile is based on the Foundation Profile, which in turn is based on CDC.&lt;br /&gt;&lt;br /&gt;What is RMS ?&lt;br /&gt;The Record Management System (RMS) is a simple record-oriented database that allows a MIDlet to persistently store information and retrieve it later. Different MIDlets can also use the RMS to share data.&lt;br /&gt;&lt;br /&gt;What is SDK ?&lt;br /&gt;A Software Development Kit (SDK) is a set of tools used to develop applications for a particular platform. An SDK typically contains a compiler, linker, and debugger. It may also contain libraries and documentation for APIs.&lt;br /&gt;&lt;br /&gt;What is SIM ?&lt;br /&gt;A Subscriber Identity Module (SIM) is a stripped-down smart card containing information about the identity of a cell-phone subscriber, and subscriber authentication and service information. Because the SIM uniquely identifies the subscriber and is portable among handsets, the user can move it from one kind of phone to another, facilitating international roaming.&lt;br /&gt;&lt;br /&gt;What is SMS?&lt;br /&gt;Short Message Service (SMS) is a point-to-point service similar to paging for sending text messages of up to 160 characters to mobile phones.&lt;br /&gt;&lt;br /&gt;What is SOAP ?&lt;br /&gt;The Simple Object Access Protocol (SOAP) is an XML- based protocol that allows objects of any type to communicated in a distributed environment. SOAP is used in developing Web Services.&lt;br /&gt;&lt;br /&gt;What is SSL?&lt;br /&gt;Secure Sockets Layer (SSL) is a socket protocol that encrypts data sent over the network and provides authentication for the socket endpoints.&lt;br /&gt;&lt;br /&gt;What is T9?&lt;br /&gt;T9 is a text input method for mobile phones and other small devices. It replaces the "multi-tap" input method by guessing the word that you are trying to enter. T9 may be embedded in a device by the manufacturer. Note that even if the device supports T9, the Java implementation may or may not use it. Check your documentation for details.&lt;br /&gt;&lt;br /&gt;What is TDMA ?&lt;br /&gt;Time Division Multiple Access (TDMA) is a second-generation modulation standard using bandwidth allocated in the 800 MHz, 900 MHz, and 1900MHz ranges.&lt;br /&gt;&lt;br /&gt;What is WAP?&lt;br /&gt;Wireless Application Protocol (WAP) is a protocol for transmitting data between servers and clients (usually small wireless devices like mobile phones). WAP is analogous to HTTP in the World Wide Web. Many mobile phones include WAP browser software to allow users access to Internet WAP sites.&lt;br /&gt;&lt;br /&gt;What is WAP Gateway?&lt;br /&gt;A WAP Gateway acts as a bridge allowing WAP devices to communicate with other networks (namely the Internet).&lt;br /&gt;&lt;br /&gt;What is W-CDMA?&lt;br /&gt;Wideband Code-Division Multiple Access (W-CDMA), also known as IMT-2000, is a 3rd generation wireless technology. Supports speeds up to 384Kbps on a wide-area network, or 2Mbps locally.&lt;br /&gt;&lt;br /&gt;What is WDP?&lt;br /&gt;Wireless Datagram Protocol (WDP) works as the transport layer of WAP. WDP processes datagrams from upper layers to formats required by different physical datapaths, bearers, that may be for example GSM SMS or CDMA Packet Data. WDP is adapted to the bearers available in the device so upper layers don't need to care about the physical level.&lt;br /&gt;&lt;br /&gt;What is WMA?&lt;br /&gt;The Wireless Messaging API (WMA) is a set of classes for sending and receiving Short Message Service messages. See also SMS.&lt;br /&gt;&lt;br /&gt;What is WML?&lt;br /&gt;The Wireless Markup Language (WML) is a simple language used to create applications for small wireless devices like mobile phones. WML is analogous to HTML in the World Wide Web.&lt;br /&gt;&lt;br /&gt;What is WMLScript?&lt;br /&gt;WMLScript is a subset of the JavaScript scripting language designed as part of the WAP standard to provide a convenient mechanism to access mobile phone's peripheral functions.&lt;br /&gt;&lt;br /&gt;What is WSP?&lt;br /&gt;Wireless Session Protocol (WSP) implements session services of WAP. Sessions can be connection-oriented and connectionless and they may be suspended and resumed at will.&lt;br /&gt;&lt;br /&gt;What is WTLS?&lt;br /&gt;Wireless Transport Layer Security protocal (WTLS) does all cryptography oriented features of WAP. WTLS handles encryption/decryption, user authentication and data integrity. WTLS is based on the fixed network Transport Layer Security protocal (TLS), formerly known as Secure Sockets Layer (SSL).&lt;br /&gt;&lt;br /&gt;What is WTP?&lt;br /&gt;Wireless Transaction Protocol (WTP) is WAP's transaction protocol that works between the session protocol WSP and security protocol WTLS. WTP chops data packets into lower level datagrams and concatenates received datagrams into useful data. WTP also keeps track of received and sent packets and does re-transmissions and acknowledgment sending when needed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6848574956779103996-6492565033269914533?l=javaandj2eefaqs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaandj2eefaqs.blogspot.com/feeds/6492565033269914533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6848574956779103996&amp;postID=6492565033269914533' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6848574956779103996/posts/default/6492565033269914533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6848574956779103996/posts/default/6492565033269914533'/><link rel='alternate' type='text/html' href='http://javaandj2eefaqs.blogspot.com/2008/11/j2me-interview-questions-what-is-j2me.html' title=''/><author><name>Bunny</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6848574956779103996.post-3698478679392233153</id><published>2008-11-03T13:41:00.000-08:00</published><updated>2008-11-03T14:01:06.516-08:00</updated><title type='text'>Tibco Interview Questions</title><content type='html'>&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5Csun-it%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City" downloadurl="http://www.5iamas-microsoft-com:office:smarttags"&gt;&lt;/o:smarttagtype&gt;&lt;o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place" downloadurl="http://www.5iantlavalamp.com/"&gt;&lt;/o:smarttagtype&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if !mso]&gt;&lt;object classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id="ieooui"&gt;&lt;/object&gt; &lt;style&gt; st1\:*{behavior:url(#ieooui) } &lt;/style&gt; &lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Wingdings; 	panose-1:5 0 0 0 0 0 0 0 0 0; 	mso-font-charset:2; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:0 268435456 0 0 -2147483648 0;} @font-face 	{font-family:"Palatino Linotype"; 	panose-1:2 4 5 2 5 5 5 3 3 4; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-536870009 1073741843 0 0 415 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman"; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-language:AR-SA;} h3 	{mso-margin-top-alt:auto; 	margin-right:0in; 	mso-margin-bottom-alt:auto; 	margin-left:0in; 	mso-pagination:widow-orphan; 	mso-outline-level:3; 	font-size:13.5pt; 	font-family:"Times New Roman"; 	font-weight:bold;} a:link, span.MsoHyperlink 	{color:blue; 	text-decoration:underline; 	text-underline:single;} a:visited, span.MsoHyperlinkFollowed 	{color:purple; 	text-decoration:underline; 	text-underline:single;} p 	{mso-margin-top-alt:auto; 	margin-right:0in; 	mso-margin-bottom-alt:auto; 	margin-left:0in; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman"; 	mso-bidi-font-family:"Times New Roman";} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;}  /* List Definitions */  @list l0 	{mso-list-id:88015262; 	mso-list-template-ids:1890385030;} @list l0:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} @list l1 	{mso-list-id:142820849; 	mso-list-template-ids:-986529238;} @list l1:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} @list l2 	{mso-list-id:317270238; 	mso-list-template-ids:25216306;} @list l2:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} @list l3 	{mso-list-id:379669228; 	mso-list-template-ids:-72189492;} @list l3:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} @list l4 	{mso-list-id:388958756; 	mso-list-template-ids:-1788957736;} @list l4:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} @list l5 	{mso-list-id:434442675; 	mso-list-template-ids:1342743100;} @list l5:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} @list l6 	{mso-list-id:626618230; 	mso-list-template-ids:-1822646914;} @list l6:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} @list l7 	{mso-list-id:974335872; 	mso-list-template-ids:180110556;} @list l7:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} @list l8 	{mso-list-id:1042557364; 	mso-list-template-ids:326268146;} @list l8:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} @list l9 	{mso-list-id:1092628901; 	mso-list-template-ids:-1786237756;} @list l9:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} @list l10 	{mso-list-id:1690448789; 	mso-list-template-ids:323009226;} @list l10:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} @list l11 	{mso-list-id:1784030828; 	mso-list-template-ids:1317307370;} @list l11:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} @list l12 	{mso-list-id:1800301898; 	mso-list-template-ids:-383862420;} @list l12:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} @list l13 	{mso-list-id:1819570538; 	mso-list-template-ids:1591506642;} @list l13:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} @list l14 	{mso-list-id:1837762992; 	mso-list-template-ids:-886154560;} @list l14:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} @list l15 	{mso-list-id:1917547189; 	mso-list-template-ids:-1748333134;} @list l15:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} @list l16 	{mso-list-id:2085371462; 	mso-list-template-ids:1834407108;} @list l16:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} ol 	{margin-bottom:0in;} ul 	{margin-bottom:0in;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;h3&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;a href="http://nagfaqs.blogspot.com/2008/10/tibco-interview-questions.html"&gt;Tibco Interview Questions&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;What is Tibco ?&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Tibco makes integration server software for enterprises. An integration server allows a company to mix packaged applications, custom software, and legacy software for use across internal and external networks. Tibco's patented approach is called Information Bus (TIB)and Tibco says that it has been used in financial services, telecommunications, electronic commerce, transportation, manufacturing, and energy.&lt;br /&gt;Active &lt;st1:city st="on"&gt;&lt;st1:place st="on"&gt;Enterprise&lt;/st1:place&gt;&lt;/st1:city&gt; is Tibco's integration server package that supports both message-bus and hub-and-spoke integration server models. The message-bus model connects the different applications to a common backbone using application adapters. The hub-and-spoke model connects all applications to a central server. Tibco's latest addition to Active Enterprise is Business Works, which uses Web Services technology. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;What is the role of TRA?&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;TRA stands for TIBCO Runtime Agent. The TRA has two main functions: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Supplies an agent that is running in the background      on each machine. The agent is responsible for starting and stopping      processes that run on a machine according to the deployment information.      The agent monitors the machine. That information is then visible via TIBCO      Administrator. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Supplies the run-time environment, that is, all      shared libraries including third-party libraries. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;What are the revision control system options available in TIBCO designer?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;File sharing&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;VSS &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Perforce &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;XML Canon &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;ClearCase &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;iPlanet &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;PVCS &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;What are the different modes of service invocation?&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Services can be invoked in several ways. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;A one-way operation is executed once and does not      wait for a response. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;A request-response operation is executed once and      waits for one response. In a request-response service, communication flows      in both directions. The complete interaction consists of two      point-to-point messages—a request and a response. The interaction is only      considered complete after the response has arrived. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Publication (notification) means an operation sends      information on an as-needed basis, potentially multiple times. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Subscription means incoming information is processed      on an as-needed basis, potentially multiple times. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;What is vcrepo.dat?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;br /&gt;TIBCO Designer creates a file named vcrepo.dat in the project root directory when you first save the project. This file is used to store properties such as display name, TIBCO Rendezvous encoding, and description. This file can be used for identification in place of the project root directory and can be used as the repository locator string (repoUrl).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;What are the TIBCO BW activities that can participate in transactions?&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Not all TIBCO BusinessWorks activities can participate in a transaction. Only the following types of activities have transactional capabilities: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;JDBC activities&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;JMS activities &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;ActiveEnterprise Adapter activities that use JMS      transports &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;EJB activities &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;TIBCO iProcess BusinessWorks Connector activities &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;What are the different types of Transactions TIBCO provides?&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;TIBCO BusinessWorks offers a variety of types of transactions that can be used in different situations. You can use the type of transaction that suits the needs of your integration project. When you create a transaction group, you must specify the type of transaction. TIBCO BusinessWorks supports the following types of transactions: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;JDBC&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Java Transaction API (JTA) UserTransaction&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;XA Transaction &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;What activities are supported in JTA Transaction? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;The Java Transaction API (JTA) UserTransaction type allows&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;JDBC&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;JMS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;ActiveEnterprise Adapter (using JMS transports) &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;EJB activities &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;What is the purpose of the inspector activity ?&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;The Inspector activity is used to write the output of any or all activities and process variables to a file and/or stdout. This is particularly useful when debugging process definitions and you wish to see the entire schema instead of mapping specific elements to the Write File activity. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;What are the maximum/minimum of threads available for incoming HTTP ?&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;The maximum/minimum of threads available for incoming HTTP : 75/10 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;How can unauthorized users be prevented from triggering a process ?&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Unauthorized users be prevented from triggering a process by giving 'write' access for the process engine to only selected users. Only users with 'write' access can do activities like deploying application, starting/stopping process engines etc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;What are the possible Error output's of Read File activity?&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Integration can be at different application layers: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 102, 204);"&gt;FileNotFoundException&lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt; :Thrown when yhe file does not      exist.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 102, 204);"&gt;UnsupportedEncodingException:&lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Thrown when the text file’s      encoding is not valid and the content of the file is read into process      data. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 102, 204);"&gt;FileIOException &lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;:Thrown when an I/O exception      occurred when trying to read the file. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;What are the mandatory configuration parameters for FTP Connection &amp;amp; FTP with firewall ?&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;The mandatory configuration parameters for FTP Connection &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;FTP host&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Port&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Username &amp;amp; Password&lt;br /&gt;     If Firewall is enabled in addition the proxy host and port are required.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;How to design a process such that depending on number of records updated in a database,3 different sub-processes may be called ?&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Define 3 transitions from JDBC update with condition on the no of updates and call appropriate child processes. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;How to use legacy .dat file format with latest designer ?&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Convert .dat file to multi file project using Administration tab while starting up Designer(Other one being Project tab) and then open the multifile project in the normal way.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;What are the encodings supported by designer ?&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Encodings supported by designer are &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;ISO8859-1(Latin-1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;UTF-8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;How do you determine if there are broken references in the project?&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Project -&gt; Validate for deployment&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;Where are the Designer preferences stored ?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;br /&gt;Designer preferences stored are stores in a file called 'Designer .prefs' in the user home directory.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;What are the 4 main panels of the Designer window ? &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;br /&gt;The 4 main panels of the Designer window are &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Project panel&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Palette panel&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Design panel&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Configuration panel&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;Explain the process configuration parameters - Max Jobs, Flow Limit &amp;amp; Activation Limit ?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Max Jobs :&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Max Jobs specifies the number of      process instances that are kept in memmory. Once this limit is reached      newly created process instances (subject to flow limit) are paged out to      disk.0 specifies no limit and is the default.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Flow Limit :&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Flow Limit specifies the maximum      number of running process instances that are spawned before the process      starter is suspended ie it enters a FLOW_CONTROLLED state and does not      accept new events. This can be used to control the number of process      instances running simultaneously and when the protocol generating the event      can store the event till it is received, like email servers, JMS, RV etc.      0 specifies no limit and is the default.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Activation Limit :&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Activation limit flag specifies      that once a process instance is loaded it must be placed in memory till it      completes execution. By default it is enabled.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;What are the options for configuring storage for process engine's checkpoint repository ?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;br /&gt;The options for configuring storage for process engine's checkpoint repository are: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Local File &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Database. Fault tolerant engines can recover from a      checkpoint only when database is used.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;What is the purpose of a Lock shared configuration resource?&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;A Lock is specified for a 'Critical Section' group when the scope is 'Multiple'. It can be used to ensure synchronization across process instances belonging to multiple processs definitions or for process instances across engines(Check multi engine flag for lock in this case and the BW engine needs to be configured with database persistence while deployment). If synchronization is for process instances belonging to the same processs definition inside one engine, just specify the scope as 'Single'.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;How to control the sequence of execution of process instances created by a process starter ?&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Use the sequencing key field in the Misc tab of any process starter. Process instances with the same value for this field are executed in the sequence in which they are started.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;Can there be two error transitions out of an activity ?&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;No. There can be only one Error and one Success if no matching condition transition out of each activity.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;When is a 'No Action' group used ?&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;'No Action' group used to have a set of activities having a common error transition&lt;br /&gt;What activity can be used to set the value of a 'User defined process variable' ?&lt;br /&gt;The 'Assign' activity can be used to set the value of a 'User defined process variable'. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;Process engines in a fault tolerant group can be configured as peers or master secondary.How do these differ ?&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;The options for configuring storage for process engine's checkpoint repository are: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Peer means all of them have the same weight. In this      case when one engine fails another one takes over and continues processing      till it fails. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;In master secondary configuration weights are      unequal, the secondary starts processing when master fails. But when      master recovers, secondary stops and master continues processing. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;What are the uses of grouping activities ?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;br /&gt;Uses of grouping activities are:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Create a set of activities having a common error      transition.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Repeat group of activities based on a condition.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Group activities into a transaction.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;To create a critical section area that synchronizes      process instances.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;A 'Pick First Group' allows you to wait for the      occurence of multiple events and proceed along a path following the first      event to occur. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;Which are the two process variables available to all activities with inputs ? &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;$_globalVariables &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;$_processContext&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;What are the types of adapter services ?&lt;br /&gt;Types of adapter services are : &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Subscriber Service&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Publisher Service&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Request-Response Service&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Request-Response Invocation Service&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;If the business process needs to invoke another web service which resource do you use ?&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;SOAP request reply activity. If the business process needs to be exposed as SOAP service use SOAP Event Source in conjunction with SOAP Send Reply or SOAP Send Fault.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;What is the functionality of the Retrieve Resources resource?&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;It can be used to serve the wsdl file of a SOAP Event Source to a (http) client.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Construct a process like: HTTP Receiver -&gt; Retrieve Resources -&gt; Send HTTP ResponseNow the WSDL file for a SOAP service can be retreived using the http requesthttp://://?wsdlwhere 'path' is the folder path to the SOAP Event Source process and 'resourceName' is the name of the process&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;How do wait-notify resources work ?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;br /&gt;Basically wait and notify should share a common notification configuration which is just a schema definition for data that will be passed from notifier to waiter. Specific instances of waiter &amp;amp; notifier are corrrelated via a key.&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;For example:&lt;/span&gt;&lt;/strong&gt; when one process is in wait state for key 'Order-1', it waits till another process issues a notification with the same key value. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;What is the default Axis in XPath ?&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Child axis&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;- What this means is that when you select "BOOK" from the current context, it selects a child node with that name, not a sibling with that name. Other axes are parent , self , sibling etc. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;What are the output formats for XSLT? &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;XML&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;HTML&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Text&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;What does ' Success if no matching condition' transition mean ?&lt;/span&gt;&lt;/strong&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;; color: rgb(204, 51, 204);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Lets say between two nodes N1 and N2, there are 3 success transitions with condition and there is no success transition without condition. If none of the conditions match then a 'Success if no matching condition' transition can be used. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: &amp;quot;Palatino Linotype&amp;quot;;"&gt;Also if there is a success transition and also success transitions with condition and if the condition matches then both the success transition (no condition) as well as the transition(s) with matching conditions are followed. So you can use 'Success if no matching condition' to prevent duplicate paths of execution. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6848574956779103996-3698478679392233153?l=javaandj2eefaqs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaandj2eefaqs.blogspot.com/feeds/3698478679392233153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6848574956779103996&amp;postID=3698478679392233153' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6848574956779103996/posts/default/3698478679392233153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6848574956779103996/posts/default/3698478679392233153'/><link rel='alternate' type='text/html' href='http://javaandj2eefaqs.blogspot.com/2008/11/tibco-interview-questions.html' title='Tibco Interview Questions'/><author><name>Bunny</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6848574956779103996.post-7004484239179951116</id><published>2008-10-13T15:14:00.000-07:00</published><updated>2008-10-13T15:16:27.630-07:00</updated><title type='text'>30 Core Java FAQs </title><content type='html'>&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5Csun-it%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;link rel="Edit-Time-Data" href="file:///C:%5CDOCUME%7E1%5Csun-it%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_editdata.mso"&gt;&lt;!--[if !mso]&gt; &lt;style&gt; v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} &lt;/style&gt; &lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman"; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-language:AR-SA;} p 	{mso-margin-top-alt:auto; 	margin-right:0in; 	mso-margin-bottom-alt:auto; 	margin-left:0in; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman"; 	mso-bidi-font-family:"Times New Roman";} span.code 	{mso-style-name:code;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:shapedefaults ext="edit" spidmax="1027"&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:shapelayout ext="edit"&gt;   &lt;o:idmap ext="edit" data="1"&gt;  &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;* Q1. How could Java classes direct program messages to the system console, but error messages, say to a file?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shapetype id="_x0000_t75" coordsize="21600,21600" spt="75" preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;  &lt;v:stroke joinstyle="miter"&gt;  &lt;v:formulas&gt;   &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;   &lt;v:f eqn="sum @0 1 0"&gt;   &lt;v:f eqn="sum 0 0 @1"&gt;   &lt;v:f eqn="prod @2 1 2"&gt;   &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;   &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @0 0 1"&gt;   &lt;v:f eqn="prod @6 1 2"&gt;   &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;   &lt;v:f eqn="sum @8 21600 0"&gt;   &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @10 21600 0"&gt;  &lt;/v:formulas&gt;  &lt;v:path extrusionok="f" gradientshapeok="t" connecttype="rect"&gt;  &lt;o:lock ext="edit" aspectratio="t"&gt; &lt;/v:shapetype&gt;&lt;v:shape id="_x0000_s1026" type="#_x0000_t75" alt="" style="'position:absolute;" allowoverlap="f"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\sun-it\LOCALS~1\Temp\msohtml1\01\clip_image001.jpg" title="REAL_WORLD_JAVA"&gt;  &lt;w:wrap type="square"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span style="font-family: Arial; color: blue;"&gt;A. The class System has a variable &lt;i&gt;out&lt;/i&gt; that represents the standard output, and the variable &lt;i&gt;err&lt;/i&gt; that represents the standard error device. By default, they both point at the system console. This how the standard output could be re-directed:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span class="code"&gt;&lt;span style="font-family: Arial; color: blue;"&gt;Stream st = new Stream(new FileOutputStream("output.txt")); System.setErr(st); System.setOut(st);&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial; color: blue;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;* Q2. What's the difference between an interface and an abstract class?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. An abstract class may contain code in method bodies, which is not allowed in an interface. With abstract classes, you have to inherit your class from it and Java does not allow multiple inheritance. On the other hand, you can implement multiple interfaces in your class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;* Q3. Why would you use a synchronized block vs. synchronized method?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. Synchronized blocks place locks for shorter periods than synchronized methods.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family: Arial;"&gt;* Q4. Explain the usage of the keyword transient?&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. This keyword indicates that the value of this member variable does not have to be serialized with the object. When the class will be de-serialized, this variable will be initialized with a default value of its data type (i.e. zero for integers).&lt;/span&gt;&lt;b&gt;&lt;br /&gt;&lt;br /&gt;* Q5. How can you force garbage collection?&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. You can't force GC, but could request it by calling System.gc(). JVM does not guarantee that GC will be started immediately.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;* Q6. How do you know if an explicit object casting is needed?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. If you assign a superclass object to a variable of a subclass's data type, you need to do explicit casting. For example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial; color: blue;"&gt;Object a; Customer b; b = (Customer) a;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial; color: blue;"&gt;&lt;br /&gt;When you assign a subclass to a variable having a supeclass type, the casting is performed automatically. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;* Q7. What's the difference between the methods sleep() and wait()&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. The code &lt;span class="code"&gt;sleep(1000); &lt;/span&gt;puts thread aside for exactly one second. The code &lt;span class="code"&gt;wait(1000), &lt;/span&gt;causes a wait of up to one second. A thread could stop waiting earlier if it receives the notify() or notifyAll() call. The method wait() is defined in the class Object and the method sleep() is defined in the class Thread.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;* Q8. Can you write a Java class that could be used both as an applet as well as an application?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. Yes. Add a main() method to the applet.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;* Q9. What's the difference between constructors and other methods?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. Constructors must have the same name as the class and can not return a value. They are only called once while regular methods could be called many times.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;* Q10. Can you call one constructor from another if a class has multiple constructors&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. Yes. Use this() syntax.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;* Q11. Explain the usage of Java packages.&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. This is a way to organize files when a project consists of multiple modules. It also helps resolve naming conflicts when different packages have classes with the same names. Packages access level also allows you to protect data from being used by the non-authorized classes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;* Q12. If a class is located in a package, what do you need to change in the OS environment to be able to use it?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. You need to add a directory or a jar file that contains the package directories to the CLASSPATH environment variable. Let's say a class Employee belongs to a package com.xyz.hr; and is located in the file c:\dev\com\xyz\hr\Employee.java. In this case, you'd need to add c:\dev to the variable CLASSPATH. If this class contains the method main(), you could test it from a command prompt window as follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span class="code"&gt;&lt;span style="font-family: Arial; color: blue;"&gt;c:\&gt;java com.xyz.hr.Employee&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial; color: blue;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt; &lt;b&gt;&lt;br /&gt;* Q13. What's the difference between J2SDK 1.5 and J2SDK 5.0?&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A.There's no difference, Sun Microsystems just re-branded this version.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family: Arial;"&gt;* Q14. What would you use to compare two String variables - the operator == or the method equals()?&lt;/span&gt;&lt;/strong&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. I'd use the method equals() to compare the values of the Strings and the == to check if two variables point at the same instance of a String object.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family: Arial;"&gt;* Q15. Does it matter in what order catch statements for FileNotFoundException and IOExceptipon are written?&lt;/span&gt;&lt;/strong&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. Yes, it does. The FileNoFoundException is inherited from the IOException. Exception's subclasses have to be caught first.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;* Q16. Can an inner class declared inside of a method access local variables of this method?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. It's possible if these variables are final.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;* Q17. What can go wrong if you replace &amp;amp;&amp;amp; with &amp;amp; in the following code:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;span class="code"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;String a=null; if (a!=null &amp;amp;&amp;amp; a.length()&gt;10) {...}&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial; color: blue;"&gt;A. A single ampersand here would lead to a NullPointerException.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family: Arial;"&gt;* Q18. What's the main difference between a Vector and an ArrayList&lt;/span&gt;&lt;/strong&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. Java Vector class is internally synchronized and ArrayList is not.&lt;/span&gt;&lt;b&gt;&lt;br /&gt;&lt;br /&gt;* Q19. When should the method invokeLater()be used?&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt;"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. This method is used to ensure that Swing components are updated through the event-dispatching thread.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;* Q20. How can a subclass call a method or a constructor defined in a superclass?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. Use the following syntax: super.myMethod(); To call a constructor of the superclass, just write super(); in the first line of the subclass's constructor.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;For senior-level developers:&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;** Q21. What's the difference between a queue and a stack?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. Stacks works by last-in-first-out rule (LIFO), while queues use the FIFO rule&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-family: Arial;"&gt;** Q22. You can create an abstract class that contains only abstract methods. On the other hand, you can create an interface that declares the same methods. So can you use abstract classes instead of interfaces?&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: Arial;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. Sometimes. But your class may be a descendent of another class and in this case the interface is your only option.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;** Q23. What comes to mind when you hear about a young generation in Java?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. Garbage collection.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;** Q24. What comes to mind when someone mentions a shallow copy in Java?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. Object cloning.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;** Q25. If you're overriding the method equals() of an object, which other method you might also consider?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. hashCode()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;** Q26. You are planning to do an indexed search in a list of objects. Which of the two Java collections should you use:&lt;br /&gt;ArrayList or LinkedList?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. ArrayList&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;** Q27. How would you make a copy of an entire Java object with its state?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. Have this class implement Cloneable interface and call its method clone().&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;** Q28. How can you minimize the need of garbage collection and make the memory use more effective?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. Use object pooling and weak object references.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt; &lt;b&gt;** Q29. There are two classes: A and B. The class B need to inform a class A when some important event has happened. What Java technique would you use to implement it?&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. If these classes are threads I'd consider notify() or notifyAll(). For regular classes you can use the Observer interface.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;** Q30. What access level do you need to specify in the class declaration to ensure that only classes from the same directory can access it?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;A. You do not need to specify any access level, and Java will use a default package access level.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6848574956779103996-7004484239179951116?l=javaandj2eefaqs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaandj2eefaqs.blogspot.com/feeds/7004484239179951116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6848574956779103996&amp;postID=7004484239179951116' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6848574956779103996/posts/default/7004484239179951116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6848574956779103996/posts/default/7004484239179951116'/><link rel='alternate' type='text/html' href='http://javaandj2eefaqs.blogspot.com/2008/10/30-core-java-faqs.html' title='30 Core Java FAQs '/><author><name>Bunny</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6848574956779103996.post-4019564519395105880</id><published>2008-04-04T04:59:00.000-07:00</published><updated>2008-04-04T05:01:42.958-07:00</updated><title type='text'>OOP Concepts</title><content type='html'>What is Java?&lt;br /&gt;Java is a language developed by Sun Microsystems which allows World Wide Web pages to contain code that is executed on the browser. Because Java is based on a single "virtual machine" that all implementations of java emulate, it is possible for Java programs to run on any system which has a version of Java. It is also possible for the "virtual machine" emulator to make sure that Java programs downloaded through the web do not attempt to do unauthorized things.&lt;br /&gt;&lt;br /&gt;What is an Object Oriented language? &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A computer language can be aid to be Object Oriented if it provides support for the following:&lt;br /&gt;Class: &lt;br /&gt;           A class is a blueprint, or prototype, that defines the variables and the methods common to all objects of a certain kind.&lt;br /&gt;Object:&lt;br /&gt;                An instance of a class. A class must be instantiated into an object before it can be used in the software. More than one instance of the same class can be in existence at any one time.&lt;br /&gt;Encapsulation:&lt;br /&gt;                        The act of placing data and the operations that perform on that data in the same class. The class then becomes the 'capsule' or container for the data and operations.&lt;br /&gt;Inheritence:&lt;br /&gt;                    The reuse of base classes (superclasses) to form derived classes (subclasses). Methods and properties defined in the superclass are automatically shared by any subclass.&lt;br /&gt;Polymorphism:&lt;br /&gt;                        Same interface, different implementation. The ability to substitute one class for another. This means that different classes may contain the same method names, but the result which is returned by each method will be different as the code behind each method (the implementation) is different in each class.&lt;br /&gt;What Is a Class?&lt;br /&gt;In the real world, you'll often find many individual objects all of the same kind. There may be thousands of other bicycles in existence, all of the same make and model. &lt;br /&gt;Each bicycle was built from the same set of blueprints and therefore contains the same components. In object-oriented terms, we say that your bicycle is an instance of the class of objects known as bicycles. A class is the blueprint from which individual objects are created. &lt;br /&gt;The following Bicycle class is one possible implementation of a bicycle: &lt;br /&gt;Class Bicycle {&lt;br /&gt;          int cadence = 0;&lt;br /&gt;       int speed = 0;&lt;br /&gt;       int gear = 1;&lt;br /&gt;       &lt;br /&gt;       void changeCadence(int newValue) {&lt;br /&gt;            cadence = newValue;&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       void changeGear(int newValue) {&lt;br /&gt;            gear = newValue;&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       void speedUp(int increment) {&lt;br /&gt;            speed = speed + increment;   &lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       void applyBrakes(int decrement) {&lt;br /&gt;            speed = speed - decrement;&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       void printStates() {&lt;br /&gt;            System.out.println("cadence:"+cadence+" speed:"+speed+" gear:"+gear);&lt;br /&gt;       }&lt;br /&gt;}&lt;br /&gt;The syntax of the Java programming language will look new to you, but the design of this class is based on the previous discussion of bicycle objects. The fields cadence, speed, and gear represent the object's state, and the methods (changeCadence, changeGear, speedUp etc.) define its interaction with the outside world. &lt;br /&gt;You may have noticed that the Bicycle class does not contain a main method. That's because it's not a complete application; it's just the blueprint for bicycles that might be used in an application. The responsibility of creating and using new Bicycle objects belongs to some other class in your application. &lt;br /&gt;Here's a BicycleDemo class that creates two separate Bicycle objects and invokes their methods: &lt;br /&gt;class BicycleDemo {&lt;br /&gt;     public static void main(String[] args) {&lt;br /&gt;&lt;br /&gt;          // Create two different Bicycle objects&lt;br /&gt;          Bicycle bike1 = new Bicycle();&lt;br /&gt;          Bicycle bike2 = new Bicycle();&lt;br /&gt;&lt;br /&gt;          // Invoke methods on those objects&lt;br /&gt;          bike1.changeCadence(50);&lt;br /&gt;          bike1.speedUp(10);&lt;br /&gt;          bike1.changeGear(2);&lt;br /&gt;          bike1.printStates();&lt;br /&gt;&lt;br /&gt;          bike2.changeCadence(50);&lt;br /&gt;          bike2.speedUp(10);&lt;br /&gt;          bike2.changeGear(2);&lt;br /&gt;          bike2.changeCadence(40);&lt;br /&gt;          bike2.speedUp(10);&lt;br /&gt;          bike2.changeGear(3);&lt;br /&gt;          bike2.printStates();&lt;br /&gt;     }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;The output of this test prints the ending pedal cadence, speed, and gear for the two bicycles: &lt;br /&gt;cadence:50 speed:10 gear:2&lt;br /&gt;cadence:40 speed:20 gear:3 &lt;br /&gt;What Is an Object?&lt;br /&gt;Objects are key to understanding object-oriented technology. Look around right now and you'll find many examples of real-world objects: your dog, your desk, your television set, your bicycle. &lt;br /&gt;Real-world objects share two characteristics: They all have state and behavior. Dogs have state (name, color, breed, hungry) and behavior (barking, fetching, wagging tail). Bicycles also have state (current gear, current pedal cadence, current speed) and behavior (changing gear, changing pedal cadence, applying brakes). Identifying the state and behavior for real-world objects is a great way to begin thinking in terms of object-oriented programming.&lt;br /&gt;Take a minute right now to observe the real-world objects that are in your immediate area. For each object that you see, ask yourself two questions: "What possible states can this object be in?" and "What possible behavior can this object perform?". Make sure to write down your observations. As you do, you'll notice that real-world objects vary in complexity; your desktop lamp may have only two possible states (on and off) and two possible behaviors (turn on, turn off), but your desktop radio might have additional states (on, off, current volume, current station) and behavior (turn on, turn off, increase volume, decrease volume, seek, scan, and tune). You may also notice that some objects, in turn, will also contain other objects. These real-world observations all translate into the world of object-oriented programming. &lt;br /&gt; &lt;br /&gt;A software object.&lt;br /&gt;Software objects are conceptually similar to real-world objects: they too consist of state and related behavior. An object stores its state in fields (variables in some programming languages) and exposes its behavior through methods (functions in some programming languages). Methods operate on an object's internal state and serve as the primary mechanism for object-to-object communication. Hiding internal state and requiring all interaction to be performed through an object's methods is known as data encapsulation — a fundamental principle of object-oriented programming. &lt;br /&gt;Consider a bicycle, for example: &lt;br /&gt; &lt;br /&gt;A bicycle modeled as a software object.&lt;br /&gt;By attributing state (current speed, current pedal cadence, and current gear) and providing methods for changing that state, the object remains in control of how the outside world is allowed to use it. For example, if the bicycle only has 6 gears, a method to change gears could reject any value that is less than 1 or greater than 6. &lt;br /&gt;Bundling code into individual software objects provides a number of benefits, including: &lt;br /&gt;1. Modularity: The source code for an object can be written and maintained independently of the source code for other objects. Once created, an object can be easily passed around inside the system. &lt;br /&gt;2. Information-hiding: By interacting only with an object's methods, the details of its internal implementation remain hidden from the outside world. &lt;br /&gt;3. Code re-use: If an object already exists (perhaps written by another software developer), you can use that object in your program. This allows specialists to implement/test/debug complex, task-specific objects, which you can then trust to run in your own code. &lt;br /&gt;4. Pluggability and debugging ease: If a particular object turns out to be problematic, you can simply remove it from your application and plug in a different object as its replacement. This is analogous to fixing mechanical problems in the real world. If a bolt breaks, you replace it, not the entire machine.&lt;br /&gt;What is Encapsulation? &lt;br /&gt;Encapsulation provides the basis for again modularity- by hiding information from unwanted outside access and attaching that information to only methods that need access to it. This binds data and operations tightly together and separates them from external access that may corrupt them intentionally or unintentionally.&lt;br /&gt;&lt;br /&gt;Encapsulation is achieved by declaring variables as Private in a class- this gives access to data to only member functions of the class. A next level of accessibility is provided by the Protected keyword which gives the derived classes the access to the member variables of the base class- a variable declared as Protected can at most be accessed by the derived classes of the class.&lt;br /&gt;What is Inheritance?                                      &lt;br /&gt;Different kinds of objects often have a certain amount in common with each other. Mountain bikes, road bikes, and tandem bikes, for example, all share the characteristics of bicycles (current speed, current pedal cadence, current gear). Yet each also defines additional features that make them different: tandem bicycles have two seats and two sets of handlebars; road bikes have drop handlebars; some mountain bikes have an additional chain ring, giving them a lower gear ratio. &lt;br /&gt;Object-oriented programming allows classes to inherit commonly used state and behavior from other classes. In this example, Bicycle now becomes the superclass of MountainBike, RoadBike, and TandemBike. In the Java programming language, each class is allowed to have one direct superclass, and each superclass has the potential for an unlimited number of subclasses: fig. A hierarchy of Bicycle classes&lt;br /&gt;The syntax for creating a subclass is simple. At the beginning of your class declaration, use the extends keyword, followed by the name of the class to inherit from: &lt;br /&gt;class MountainBike extends Bicycle {&lt;br /&gt;&lt;br /&gt;     // new fields and methods defining a mountain bike would go here&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;A hierarchy of bicycle classes.&lt;br /&gt;This gives MountainBike all the same fields and methods as Bicycle, yet allows its code to focus exclusively on the features that make it unique. This makes code for your subclasses easy to read. However, you must take care to properly document the state and behavior that each superclass defines, since that code will not appear in the source file of each subclass. &lt;br /&gt;What is Polymorphism? &lt;br /&gt;Polymorphism gives us the ultimate flexibility in extensibility.                                                                        Polymorphism is a term that describes a situation where one name may refer to different methods. In java there are two type of polymorphism: overloading type and overriding type.&lt;br /&gt;When you override methods, java determines the proper methods to call at the program’s run time, not at the compile time. Overriding occurs when a class method has the same name and signature as a method in parent class. Overloading occurs when several methods have same names with different method signature. Overloading is determined at the compile time.&lt;br /&gt;&lt;br /&gt;Example: Overloading&lt;br /&gt;Class Book{&lt;br /&gt; String title;&lt;br /&gt; String publisher;&lt;br /&gt; float price;&lt;br /&gt;          setBook(String title){}&lt;br /&gt;          setBook(String title, String publisher){}&lt;br /&gt;          setBook(String title, String publisher,float price){}&lt;br /&gt;}&lt;br /&gt;Example: Overriding&lt;br /&gt;Class Tool{&lt;br /&gt;void operate_it(){&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;Class ScrewDriver extends Tool{&lt;br /&gt; void operate_it(){&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;What is an Interface? &lt;br /&gt;A Tool class and its class hierarchy defines what a Tool can and cannot do in terms of its characteristics. However a Tool can have a different relationship with other parts of the world. For example, a Tool in a store could be managed by an inventory program. An inventory program doesn't care what class of items it manages as long as each item provides certain information, such as price and tracking number.&lt;br /&gt;&lt;br /&gt;Instead of forcing class relationships on otherwise unrelated items, the inventory program sets up a protocol of communication. This protocol comes in the form of a set of constant and method definitions contained within an interface. The inventory interface would define, but not implement, methods that set and get the retail price, assign a tracking number, and so on. &lt;br /&gt;&lt;br /&gt;To work in the inventory program, the Tool class must agree to this protocol by implementing the interface. When a class implements an interface, the class agrees to implement all the methods defined in the interface. Thus, the Tool class would provide the implementations for the methods that set and get retail price, assign a tracking number, and so on. &lt;br /&gt;&lt;br /&gt;You use an interface to define a protocol of behavior that can be implemented by any class anywhere in the class hierarchy. Interfaces are useful for the following: &lt;br /&gt;• Capturing similarities among unrelated classes without artificially forcing a class relationship. &lt;br /&gt;• Declaring methods that one or more classes are expected to implement. &lt;br /&gt;• Revealing an object's programming interface without revealing its class. &lt;br /&gt;An interface is a contract in the form of a collection of method and constant declarations. When a class implements an interface, it promises to implement all of the methods declared in that interface. Interfaces are useful for capturing similarities among unrelated classes without artificially forcing a class relationship, declaring methods that one or more classes are expected to implement and revealing an object's programming interface without revealing its class. Java uses ‘interface’ and ‘abstract Class’ to define interfaces.&lt;br /&gt;What is Abstract classes &amp; methods?&lt;br /&gt;&lt;br /&gt;Abstract class is a class that has no direct instances, but whose descendants may have direct instances. There are case i which it is useful to define classes for which the programmer never intends to instantiate any objects; because such classes normally are used as bae-classes in inheritance hierarchies, we call such classes abstract classes These classes cannot be used to instantiate objects; because abstract classes are incomplete. Derived classes called concrete classesmust define the missing pieces. &lt;br /&gt;&lt;br /&gt;Abstract classes normally contain one or more abstract methods or abstract properties, such methods or properties do not provide implementations, but our derived classes must override inherited abstract methods or properties to enable obejcts ot those derived classes to be instantiated, not to override those methods or properties in derived classes is syntax error, unless the derived class also is an abstract class. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In some cases, abstract classes constitute the top few levels of the hierarchy, for Example abstract class Shape with abstract method Draw() has tow derived abstract classe Shape2D &amp; Shape3D inherites the method Draw() &amp; also do not provide any implementation for it. Now we have normal classes Rectangle, Square &amp; Circle inherites from Shape2D, and another group of classes Sphere, Cylinder &amp; Cube inherites from Shape3D. All classes at the bottom of the hierarchy must override the abstract method Draw(). &lt;br /&gt;&lt;br /&gt;A class is made abstract by declaring it with Keyword abstract. &lt;br /&gt;&lt;br /&gt;Example: &lt;br /&gt;public abstract class Shape&lt;br /&gt;{&lt;br /&gt;    //...Class implementation&lt;br /&gt;&lt;br /&gt;    public abstract void Draw(int x, int y)&lt;br /&gt;    {&lt;br /&gt;        //this method mustn't be implemented here.&lt;br /&gt;        //If we do implement it, the result is a Syntax Error.&lt;br /&gt;    } &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public abstract class Shape2D : Shape&lt;br /&gt;{&lt;br /&gt;    //...Class implementation&lt;br /&gt;    //...you do not have to implement the the method Draw(int x, int y)&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class Cricle : Shape2D&lt;br /&gt;{&lt;br /&gt;    //here we should provide an implemetation for Draw(int x, int y)&lt;br /&gt;    public override void Draw(int x, int y)&lt;br /&gt;    {&lt;br /&gt;        //must do some work here&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Difference between an abstract method &amp; virtual method: &lt;br /&gt;&lt;br /&gt;Virtual method has an implementation &amp; provide the derived class with the option of overriding it. Abstract method does not provide an implementation &amp; forces the derived class to override the method. &lt;br /&gt;&lt;br /&gt;important Notes: &lt;br /&gt;&lt;br /&gt;(a)Any Class with abstract method or property in it must be declared abstract &lt;br /&gt;&lt;br /&gt;(b)Attempting to instantiate an object of an abstract class retults in a compilation error &lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;Shape m_MyShape = new Shape(); //it is Wrong to that.&lt;br /&gt;&lt;br /&gt;But we can do that. &lt;br /&gt;Shape m_MyShape = new Circle(); // True&lt;br /&gt;&lt;br /&gt;Or &lt;br /&gt;Shape m_MyShape; &lt;br /&gt;/*&lt;br /&gt;&lt;br /&gt;declare refrences only, and the refrences can refer to intances of&lt;br /&gt;any concrete classes derived from abstract class&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;Circle m_MyCircle = new Circle();&lt;br /&gt;m_MyShape  = m_MyCircle; // Also True&lt;br /&gt;&lt;br /&gt;Interface Vs Abstract Class?&lt;br /&gt;There are three differences between an interface and an abstract class: &lt;br /&gt;• you can implement multiple interfaces at the same time, but only extend one class, &lt;br /&gt;• an abstract class is allowed to contain implementation (non-abstract methods, constructors, instance initializers and instance variables) and non-public members, and &lt;br /&gt;• abstract classes may be a tiny bit faster (or they may not.) &lt;br /&gt; Abstract class can contain abstract methods, abstract property as well as other members (just like normal class).&lt;br /&gt;Interface can only contain abstract methods, properties but we don’t need to put abstract and public keyword. All the methods and properties defined in Interface are by default public and abstract.&lt;br /&gt;Actually the first point is the reason for the existence of interfaces in Java: to provide a form of multiple inheritance. In languages with multiple implementation inheritance, an interface would be equivalent to a fully abstract class (a class with only public abstract members). &lt;br /&gt;The above differentiation suggests when to use an abstract class and when to use an interface: &lt;br /&gt;• use an abstract class, if you want to provide common implementation to subclasses, &lt;br /&gt;• use an abstract class, if you want to declare non-public members, &lt;br /&gt;• use an abstract class, if you want to be free to add new public methods in the future, &lt;br /&gt;• use an interface if you're sure the API is stable for the long run &lt;br /&gt;• use an interface if you want to provide the implementing classes the opportunity to inherit from other sources at the same time. &lt;br /&gt;In general, prefer interfaces if you don't need to use an abstract class, because they provide more design flexibility. &lt;br /&gt;            //Abstarct Class&lt;br /&gt;public abstract class Vehicles &lt;br /&gt;      {&lt;br /&gt;        private int noOfWheel;&lt;br /&gt;        private string color;&lt;br /&gt;        public abstract string Engine&lt;br /&gt;        {   &lt;br /&gt;            get;&lt;br /&gt;            set;&lt;br /&gt;        }&lt;br /&gt;        public abstract void Accelerator();&lt;br /&gt;      }&lt;br /&gt;      //Interface &lt;br /&gt;public interface Vehicles &lt;br /&gt;      {&lt;br /&gt;        string Engine&lt;br /&gt;        {   &lt;br /&gt;            get;&lt;br /&gt;            set;&lt;br /&gt;        }&lt;br /&gt;        void Accelerator();&lt;br /&gt;      }&lt;br /&gt;  &lt;br /&gt;We can see abstract class contains private members also we can put some methods with implementation also. But in case of interface only methods and properties allowed.&lt;br /&gt;We use abstract class and Interface for the base class in our application.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6848574956779103996-4019564519395105880?l=javaandj2eefaqs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaandj2eefaqs.blogspot.com/feeds/4019564519395105880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6848574956779103996&amp;postID=4019564519395105880' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6848574956779103996/posts/default/4019564519395105880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6848574956779103996/posts/default/4019564519395105880'/><link rel='alternate' type='text/html' href='http://javaandj2eefaqs.blogspot.com/2008/04/oop-concepts.html' title='OOP Concepts'/><author><name>Bunny</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6848574956779103996.post-4707783671638551398</id><published>2008-04-02T23:11:00.000-07:00</published><updated>2008-04-02T23:32:55.632-07:00</updated><title type='text'>JSP Implicit Objects</title><content type='html'>JSP implicit objects&lt;br /&gt;(a) request, (b) response, (c) out, (d) session, &lt;br /&gt;(e) config, (f) application, (g) page, ( h)pageContext, &lt;br /&gt;and (i) exception.&lt;br /&gt;What are Implicit Objects?&lt;br /&gt;When writing Servlets the available objects are fairly obvious as they are the parameters to methods, thus if you are overriding the doPost method you will have a signature of &lt;br /&gt;public void doPost(HttpServletRequest request,&lt;br /&gt;              HttpServletResponse response)&lt;br /&gt;When writing JSP pages the implicit objects are created automatically for you within the service method . You just have to know what the implicit objects are, but as most of them match closely to those available in Servlet methods they are not too difficult to memorise. You will have come across one of the implicit objects already with the out object which allows you to send information to the output stream.&lt;br /&gt;Note that the implicit variables are only available within the jspService method and thus are not available within any declarations. Thus for example the following code will cause a compile time error.&lt;br /&gt;&lt;%!&lt;br /&gt;   public void amethod(){&lt;br /&gt;        out.print("Hello");&lt;br /&gt;   }   &lt;br /&gt;%&gt;&lt;br /&gt;1) The request and response implicit objects &lt;br /&gt;The request implicit object is an instance of HttpServletRequest, and response is an instance of HttpServletResponse objects. They are available in a similar way to the request and response object passed to the doGet and doPost methods in servlets. &lt;br /&gt;A typical use for the request is to get the details of HTTP query string such as query names and parameters. &lt;br /&gt;&lt;%= request.getQueryString() %&gt;&lt;br /&gt;Will display the query string after the name of the jsp file itself. Thus if this code is within a file called hello.jsp and is called with the url as follows&lt;br /&gt;http://localhost:8080/chap03/hello.jsp?thisisthequerystring&lt;br /&gt;The output will include thisisthequerystring as part of the page. &lt;br /&gt;The response can be used for the same purposes as the HttpServletResponse in a servlet, such as adding cookies or headers. &lt;br /&gt;The request and response objects are the same as the parameters to doPost and represent instances of HttpServletRequest and HttpServletResponse respectively. &lt;br /&gt;3) The out implicit object &lt;br /&gt;The out implicit object has a type of jsp.JspWriter. The out object can be used in a similar way to System.out is used in plain ordinary Java programs, i.e. &lt;br /&gt;&lt;% &lt;br /&gt;out.print("Hello World");&lt;br /&gt;%&gt;&lt;br /&gt;The parameters of out are sent to the output stream, which generally means they end up visible in the browser requesting the JSP page.&lt;br /&gt;4)session&lt;br /&gt;The session implicit object is an instance of &lt;br /&gt;javax.servlet.http.HttpSession &lt;br /&gt;The session concept is a way of allowing multiple requests from the same client to be group together as part of a single “conversation”. This is a way of getting around the basic architectural limitation within HTTP in that it was designed as a stateless protocol, i.e. web servers “forget” about each client as soon as a request has finished execution. The default way of logically linking multiple requests from the same client is by generating a cookie that stores a value unique to the client. After the first request establishes a session, each subsequent request reads that cookie and can thus identify the unique client. &lt;br /&gt;With the session object you do not need the type of code required in a Servlet whereby you have to call the getSession method to access an existing session or start a new one. Typical uses of the session object are for getting and setting attributes. Thus you can add a new attribute to the session with code like the following.&lt;br /&gt;&lt;% &lt;br /&gt;session.setAttribute("username","marcusgreen");&lt;br /&gt;%&gt;&lt;br /&gt;5)config &lt;br /&gt;The config implicit object is an instance of &lt;br /&gt;javax.servlet.ServletConfig&lt;br /&gt;And represents the parameters set up within the deployment descriptor. To set up the configuration a servlet is configured within web.xml , but instead of creating a &lt;servlet-class&gt; element a &lt;jsp-file&gt; element is created containing the name of the JSP page. Parameters are then created using the &lt;param-name&gt; and &lt;param-value&gt; tags. &lt;br /&gt;The config object can be used to retrieve parameters using its &lt;br /&gt;getInitParameter(String param) &lt;br /&gt;method. &lt;br /&gt;The config object can be used to retrieve the ServletContext object through its getServletContext method. Thus the following code retrieves information about the currently executing server, and in my own setup it generates the output.&lt;br /&gt;Apache Tomcat/5.5.9 &lt;br /&gt;&lt;%&lt;br /&gt;ServletContext ct = config.getServletContext();&lt;br /&gt;out.print(ct.getServerInfo());&lt;br /&gt;%&gt;&lt;br /&gt;6) application &lt;br /&gt;The application implicit object is an instance of javax.servlet.ServletContext. It refers to the overall web application environment that the JSP belongs to. According to the API docs &lt;br /&gt;“Defines a set of methods that a servlet uses to communicate with its servlet container, for example, to get the MIME type of a file, dispatch requests, or write to a log file.”&lt;br /&gt;In Apache Tomcat a web application will be contained in an individual directory under the webapps directory. A typical use of the application object is to get access to the application wide initialisation parameters. Because the application and config objects have similar and slightly confusing uses the following code shows how they can be used along with a deployment descriptor (WEB.XML) that sets up the appropriate initialisation parameters for them.&lt;br /&gt;The file index.jsp&lt;br /&gt;&lt;%&lt;br /&gt;/*for parameters declared at the application level .&lt;br /&gt; *i.e. under the WEB-APP tag of the deployment descriptor&lt;br /&gt;*/&lt;br /&gt;out.print(application.getInitParameter("myparam"));&lt;br /&gt;/*for a specific resource within an application&lt;br /&gt; *identified as a servlet in the deployment descriptor&lt;br /&gt; */&lt;br /&gt;out.print(config.getInitParameter("myparam2"));&lt;br /&gt;%&gt;&lt;br /&gt;7) The page implicit object &lt;br /&gt;The page implicit object is of type Object and it is assigned a reference to the servlet that executing the _jspService() method. Thus in the Servlet generated by tomcat the page object is created as &lt;br /&gt;Object page = this;&lt;br /&gt;Because page is of type Object it is of less direct use than simply accessing the implicit this object. To access any of the methods of the servlet through page it must be first cast to type Servlet. Thus the two following lines of code are equivalent.&lt;br /&gt;&lt;% this.log("log message"); %&gt;&lt;br /&gt;&lt;% ((HttpServlet)page).log("anothermessage"); %&gt;&lt;br /&gt;As you probably will not be using the page object in your own code the main thing to remember for the exam is that it is not the same as the pageContext object and that it is of type Object.&lt;br /&gt;8) The pageContext implicit object &lt;br /&gt;The pageContext object has a type of javax.servlet.jsp.PageContext and according to the API documents &lt;br /&gt;“A PageContext instance provides access to all the namespaces associated with a JSP page, provides access to several page attributes, as well as a layer above the implementation details. Implicit objects are added to the pageContext automatically “http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/jsp/PageContext.html&lt;br /&gt;So it can be seen as a convenience object for tasks such as transferring requests to other web resources. Much of its functionality appears to be for the convenience of generating the servlet from the JSP, thus the following example of a servlet generated from the Tomcat container shows how PageContext is used to populate other implicit objects.&lt;br /&gt;application = pageContext.getServletContext();&lt;br /&gt;config = pageContext.getServletConfig();&lt;br /&gt;session = pageContext.getSession();&lt;br /&gt;out = pageContext.getOut();&lt;br /&gt;A typical use of the pageContext is to to include another resource or forward to another resource. Thus the following would forward from the current page to menu.jsp&lt;br /&gt;&lt;% &lt;br /&gt;pageContext.forward("menu.jsp");&lt;br /&gt;%&gt;&lt;br /&gt;9) The exception implicit object &lt;br /&gt;The exception implicit object is of type&lt;br /&gt;java.lang.Throwable&lt;br /&gt;This object is only available to pages that have isErrorPage set to true with the directive&lt;br /&gt;&lt;%@ page isErrorPage='true' %&gt;&lt;br /&gt;The exception object refers to the exception triggered by the page that uses this page as an exception handler &lt;br /&gt;The following code demonstrates the use of the exception implicit object. The first page uses the errorPage directive to set up the JSP page to use when an error occurs, and the second page called ErrorPage.jsp uses the isErrorPage directive to set itself up to catch the error.&lt;br /&gt;First page &lt;br /&gt;&lt;%@page errorPage="ErrorPage.jsp" %&gt;&lt;br /&gt;&lt;%&lt;br /&gt;  int i=10;&lt;br /&gt;  /*Divide by zero, generates an error */&lt;br /&gt;  out.print(i/0); &lt;br /&gt;%&gt;&lt;br /&gt;ErrorPage.jsp&lt;br /&gt;&lt;%@ page isErrorPage='true' %&gt;&lt;br /&gt;&lt;%&lt;br /&gt;out.print("&lt;h1&gt; Here is the error message &lt;/h1&gt;");  &lt;br /&gt;out.print(exception.getMessage());&lt;br /&gt;%&gt;&lt;br /&gt;Declarative handling of exceptions&lt;br /&gt;It is also possible to map HTTP error codes and or Java exception types to an error page in the deployment descriptor. This is done at the web application level by using the &lt;error-page&gt; tag which is a child of the &lt;web-app&gt; tag. Thus the following tags would re-direct all SQL exception errors to the /errorpage.jsp page.&lt;br /&gt;  &lt;error-page&gt;&lt;br /&gt;     &lt;exception-type&gt;&lt;br /&gt;      java.sql.SQLException &lt;br /&gt;     &lt;/exception-type&gt;&lt;br /&gt;     &lt;location&gt;&lt;br /&gt;      /errorpage.jsp&lt;br /&gt;     &lt;/location&gt;&lt;br /&gt;  &lt;/error-page&gt; &lt;br /&gt;The following tags would re-direct all HTTP 404 errors to the /errorpage.jsp page&lt;br /&gt;&lt;error-page&gt;&lt;br /&gt;    &lt;error-code&gt;404&lt;/error-code&gt;&lt;br /&gt;    &lt;location&gt;/errorPage.jsp&lt;/location&gt;&lt;br /&gt;&lt;/error-page&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6848574956779103996-4707783671638551398?l=javaandj2eefaqs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaandj2eefaqs.blogspot.com/feeds/4707783671638551398/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6848574956779103996&amp;postID=4707783671638551398' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6848574956779103996/posts/default/4707783671638551398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6848574956779103996/posts/default/4707783671638551398'/><link rel='alternate' type='text/html' href='http://javaandj2eefaqs.blogspot.com/2008/04/jsp-implicit-objects_02.html' title='JSP Implicit Objects'/><author><name>Bunny</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
