<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>Java Interview Questions</title>
	<atom:link href="http://www.bestjavainterviewquestions.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bestjavainterviewquestions.com</link>
	<description>Java Interview Questions &#124; Core Java Interview Questions &#124; Advanced Java Interview Questions &#124; EJB Interview Questions &#124; J2EE Interview Questions &#124; Hibernate Interview Questions</description>
	<pubDate>Tue, 07 Apr 2009 16:53:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>J2EE Interview Questions</title>
		<link>http://www.bestjavainterviewquestions.com/j2ee-interview-questions-3/</link>
		<comments>http://www.bestjavainterviewquestions.com/j2ee-interview-questions-3/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 16:53:16 +0000</pubDate>
		<dc:creator>Ramakrishna</dc:creator>
		
		<category><![CDATA[J2EE Interview Question]]></category>

		<guid isPermaLink="false">http://www.bestjavainterviewquestions.com/?p=593</guid>
		<description><![CDATA[Q)  What is J2EE
Rep) Java 2 Platform, Enterprise Edition.
Q)   What is J2EE application
Rep) Any deployable unit of J2EE functionality. This can be
a single J2EE module or a group of modules packaged
into an EAR file along with a J2EE application
deployment descriptor. J2EE applications are typically
engineered to be distributed across multiple computing
tiers.
Q)  What is J2EE component
Rep) A [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Q)  What is J2EE</p>
<p>Rep) </strong>Java 2 Platform, Enterprise Edition.</p>
<p><strong>Q)   What is J2EE application</p>
<p>Rep) </strong>Any deployable unit of J2EE functionality. This can be<br />
a single J2EE module or a group of modules packaged<br />
into an EAR file along with a J2EE application<br />
deployment descriptor. J2EE applications are typically<br />
engineered to be distributed across multiple computing<br />
tiers.</p>
<p><strong>Q)  What is J2EE component</p>
<p>Rep) </strong>A self-contained functional software unit supported by<br />
a container and configurable at deployment time. The<br />
J2EE specification defines the following J2EE<br />
components: Application clients and applets are<br />
components that run on the client. Java servlet and<br />
JavaServer Pages (JSP) technology components are Web<br />
components that run on the server. Enterprise<br />
JavaBeans (EJB) components (enterprise beans) are<br />
business components that run on the server. J2EE<br />
components are written in the Java programming<br />
language and are compiled in the same way as any<br />
program in the language. The difference between J2EE<br />
components and &#8220;standard&#8221; Java classes is that J2EE<br />
components are assembled into a J2EE application,<br />
verified to be well formed and in compliance with the<br />
J2EE specification, and deployed to production, where<br />
they are run and managed by the J2EE server or client<br />
container.</p>
<p><strong>Q)  What is J2EE module</p>
<p>Rep) </strong>A software unit that consists of one or more J2EE<br />
components of the same container type and one<br />
deployment descriptor of that type. There are four<br />
types of modules: EJB, Web, application client, and<br />
resource adapter. Modules can be deployed as<br />
stand-alone units or can be assembled into a J2EE<br />
application.</p>
<p><strong>Q)  What is J2EE product</p>
<p>Rep) </strong>An implementation that conforms to the J2EE platform<br />
specification.</p>
<p><strong>Q)   What is J2EE product provider</p>
<p>Rep) </strong>A vendor that supplies a J2EE product.</p>
<p><strong>Q)  What is J2EE server</p>
<p>Rep)</strong> The runtime portion of a J2EE product. A J2EE server<br />
provides EJB or Web containers or both.</p>
<p><strong>Q)   What is J2ME</p>
<p>Rep) </strong>Abbreviate of Java 2 Platform, Micro Edition.<br />
<strong><br />
Q)  What is J2SE</p>
<p>Rep) </strong>Abbreviate of Java 2 Platform, Standard Edition.</p>
<p><strong>Q)  What is JAR</p>
<p>Rep) </strong>Java archive. A platform-independent file format that<br />
permits many files to be aggregated into one file.</p>
<p><strong>Q)   What is Java 2 Platform, Enterprise Edition(J2EE)</p>
<p>Rep) </strong>An environment for developing and deploying enterprise<br />
applications. The J2EE platform consists of a set of<br />
services, application programming interfaces (APIs),<br />
and protocols that provide the functionality for<br />
developing multitiered, Web-based applications.<br />
<strong><br />
Q)  What is Java 2 Platform, Micro Edition (J2ME)</p>
<p>Rep) </strong>A highly optimized Java runtime environment targeting<br />
a wide range of consumer products, including pagers,<br />
cellular phones, screen phones, digital set-top boxes,<br />
and car navigation systems.</p>
<p><strong>Q)  What is Java 2 Platform, Standard Edition (J2SE)</p>
<p>Rep) </strong>The core Java technology platform.</p>
<p><strong>Q)  What is Java API for XML Processing (JAXP)</p>
<p>Rep) </strong>An API for processing XML documents. JAXP leverages<br />
the parser standards SAX and DOM so that you can<br />
choose to parse your data as a stream of events or to<br />
build a tree-structured representation of it. JAXP<br />
supports the XSLT standard, giving you control over<br />
the presentation of the data and enabling you to<br />
convert the data to other XML documents or to other<br />
formats, such as HTML. JAXP provides namespace<br />
support, allowing you to work with schema that might<br />
otherwise have naming conflicts.</p>
<p><strong>Q)  What is Java API for XML Registries (JAXR)</p>
<p>Rep)</strong> An API for accessing various kinds of XML registries.</p>
<p><strong>Q)  What is Java API for XML-based RPC (JAX-RPC)</p>
<p>Rep)</strong> An API for building Web services and clients that use<br />
remote procedure calls and XML</p>
<p><strong>Q)   What is Java IDL</p>
<p>Rep) </strong>A technology that provides CORBA interoperability and<br />
connectivity capabilities for the J2EE platform. These<br />
capabilities enable J2EE applications to invoke<br />
operations on remote network services using the Object<br />
Management Group IDL and IIOP.</p>
<p><strong>Q)  What is Java Message Service (JMS)</p>
<p>Rep)</strong> An API for invoking operations on enterprise messaging<br />
systems.</p>
<p><strong>Q)  What is Java Naming and Directory Interface (JNDI)</p>
<p>Rep) </strong>An API that provides naming and directory<br />
functionality.</p>
<p><strong>Q)   What is Java Secure Socket Extension (JSSE)</p>
<p>Rep) </strong>A set of packages that enable secure Internet<br />
communications.</p>
<p><strong>Q)   What is Java Transaction API (JTA)</p>
<p>Rep)</strong> An API that allows applications and J2EE servers to<br />
access transactions.</p>
<p><strong>Q)  What is Java Transaction Service (JTS)</p>
<p>Rep)</strong> Specifies the implementation of a transaction manager<br />
that supports JTA and implements the Java mapping of<br />
the Object Management Group Object Transaction Service<br />
1.1 specification at the level below the API.</p>
<p><strong>Q)  What is JavaBeans component</p>
<p>Rep) </strong>A Java class that can be manipulated by tools and<br />
composed into applications. A JavaBeans component must<br />
adhere to certain property and event interface<br />
conventions.<br />
<strong><br />
Q)  What is JavaMail</p>
<p>Rep) </strong>An API for sending and receiving email.</p>
<p><strong>Q)   What is JavaServer Faces Technology </strong></p>
<p><strong>Rep) </strong>A framework for building server-side user interfaces<br />
for Web applications written in the Java programming<br />
language.</p>
<p><strong>Q)  What is JavaServer Faces conversion model</p>
<p>Rep)</strong> A mechanism for converting between string-based markup<br />
generated by JavaServer Faces UI components and<br />
server-side Java objects.</p>
<p><strong>Q)  What is JavaServer Faces event and listener model</strong></p>
<p><strong>Rep) </strong>A mechanism for determining how events emitted by<br />
JavaServer Faces UI components are handled. This model<br />
is based on the JavaBeans component event and listener<br />
model.</p>
<p><strong>Q)  What is JavaServer Faces _expression language</p>
<p>Rep) </strong>A simple _expression language used by a JavaServer<br />
Faces UI component tag attributes to bind the<br />
associated component to a bean property or to bind the<br />
associated component&#8217;s value to a method or an<br />
external data source, such as a bean property. Unlike<br />
JSP EL expressions, JavaServer Faces EL expressions<br />
are evaluated by the JavaServer Faces implementation<br />
rather than by the Web container.</p>
<p><strong>Q)  What is JavaServer Faces navigation model</p>
<p>Rep)</strong> A mechanism for defining the sequence in which pages<br />
in a JavaServer Faces application are displayed.</p>
<p><strong>Q)  What is JavaServer Faces UI component</p>
<p>Rep)</strong> A user interface control that outputs data to a client<br />
or allows a user to input data to a JavaServer Faces<br />
application.</p>
<p><strong>Q)  What is JavaServer Faces UI component class</p>
<p>Rep) </strong>A JavaServer Faces class that defines the behavior and<br />
properties of a JavaServer Faces UI component.</p>
<p><strong>Q)  What is JavaServer Faces validation model</p>
<p>Rep) </strong>A mechanism for validating the data a user inputs to a<br />
JavaServer Faces UI component.</p>
<p><strong>Q)  What is JavaServer Pages (JSP)</p>
<p>Rep)</strong> An extensible Web technology that uses static data,<br />
JSP elements, and server-side Java objects to generate<br />
dynamic content for a client. Typically the static<br />
data is HTML or XML elements, and in many cases the<br />
client is a Web browser.</p>
<p><strong>Q)  What is JavaServer Pages Standard Tag Library(JSTL)</p>
<p>Rep) </strong>A tag library that encapsulates core functionality<br />
common to many JSP applications. JSTL has support for<br />
common, structural tasks such as iteration and<br />
conditionals, tags for manipulating XML documents,<br />
internationalization and locale-specific formatting<br />
tags, SQL tags, and functions.<br />
<strong><br />
Q)  What is JAXR client</p>
<p>Rep)</strong> A client program that uses the JAXR API to access a<br />
business registry via a JAXR provider.<br />
<h3>Random Posts</h3>
<ul class="related_post">
<li><a href="http://www.bestjavainterviewquestions.com/define-ejb-frame-work/" title="Define EJB frame work">Define EJB frame work (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/java-rmi-interview-questions/" title="Java RMI Interview questions">Java RMI Interview questions (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/how-to-get-a-leap-year/" title="How to get a Leap Year">How to get a Leap Year (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/advantage-of-cookies-over-url/" title="Advantage of Cookies over URL">Advantage of Cookies over URL (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/define-servletinputstream/" title="Define ServletInputStream">Define ServletInputStream (0)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bestjavainterviewquestions.com/j2ee-interview-questions-3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>OVERVIEW OF SERVLETS</title>
		<link>http://www.bestjavainterviewquestions.com/overview-of-servlets/</link>
		<comments>http://www.bestjavainterviewquestions.com/overview-of-servlets/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 16:23:43 +0000</pubDate>
		<dc:creator>Ramakrishna</dc:creator>
		
		<category><![CDATA[Servlet Interview Questions]]></category>

		<category><![CDATA[servlets overview]]></category>

		<guid isPermaLink="false">http://www.bestjavainterviewquestions.com/?p=590</guid>
		<description><![CDATA[OVERVIEW OF SERVLETS
Servlets provide a Java based solution used to address the problems currently associated with doing server side programming including inextensible scripting solution, platform specific API’s, and incomplete interfaces.
Servlets are objects that confirm to a specific interface that can be plugged into a Java based server. Servlets are to the server side what applets [...]]]></description>
			<content:encoded><![CDATA[<p><strong>OVERVIEW OF SERVLETS</strong></p>
<p>Servlets provide a Java based solution used to address the problems currently associated with doing server side programming including inextensible scripting solution, platform specific API’s, and incomplete interfaces.</p>
<p>Servlets are objects that confirm to a specific interface that can be plugged into a Java based server. Servlets are to the server side what applets are to the client side object byte code that can be dynamically loaded off the net.<br />
They differ from applets. In that they are face less objects (with out graphics or GUI component).They serve as platform independent, dynamically loadable, pluggable  helper byte code objects on the server side that can be used to dynamically extend server side functionality.</p>
<p>For example, an HTTP servlet can be used to generate dynamic HTML content. When you use servlets to do dynamic content you get the following advantages:</p>
<p>They are faster and cleaner than CGI scripts<br />
They use a  standard API (the servlet API)<br />
They provide all the advantages of Java(run on variety of    servers with out needing to be rewritten)</p>
<p><strong>The Attractiveness of Servlets</strong></p>
<p>There are many features of servlets that make them easy and attractive to use. These include:<br />
Easily configured using the GUI based admin Tool.<br />
Can be loaded and invoked from a local disc or remotely across the network.<br />
Can be linked together, or chained so that on a servlet can call another servlet, or several servlets in sequence.<br />
Can be called dynamically from within HTML pages, using server side include tags.<br />
Are secure- even when downloading across the net work, the servlet security model and servlet sandbox protect your system from unfriendly behavior.</p>
<p><strong>The Advantages of the servlet API</strong></p>
<p>One of the great advantages of the servlet API is protocol independence. It assumes nothing about:<br />
The protocol being used to transmit on the net<br />
How it is loaded<br />
The server environment it will be running in tjese qualities are important, because it allows the servlet API to be embedded in many different kindsof servers.<br />
There are other advantages to the servlet API  as well.<br />
These include:<br />
It’s extensible-you can inherit all your functionality from the classes made available to you;<br />
It’s simple, small, and easy to use.</p>
<p><strong>JAVA SERVLET FEATURES:</strong></p>
<p>The JavaServer provides several important servlet features.<br />
These includes:<br />
Loading and Invoking Servlets</p>
<p>Servlets can be loaded both locally and remotely.</p>
<p>Filters and Servlet Chaining</p>
<p>The JavaServer uses mime types to call servlets sequentially.<br />
<em><br />
Server-Side Includes</em></p>
<p>Server can be invoked from dynamic HTML docements using    server-side include tags.</p>
<p><strong>Replacing CGI Scripts</strong></p>
<p>Servlets are an effective substitute for CGI scripts, and provide a faster and cleaner way to genarate dynamic documents.</p>
<p><strong>INTERNAL SERVLETS:</strong></p>
<p>The Java TM Web Server TM servlet architecture is very flexible and the server takes advantage of thie by dividing  its work among several internal servlets. These are:</p>
<p><strong> File Servlet:</strong></p>
<p>The File Servlet provides the standard document serving capabilities of Java Web Server. This servlet includes a caching mechanism to speed up response times for frequently accessed files.</p>
<p><strong> Invoker Servlet:</strong></p>
<p>The purpose of this servlet is to invoke other servlets which are explicitly requested by name, that is</p>
<p><em>http://&lt;server-host-name&gt;/servlets/servlet name.</em></p>
<p><strong> Server Side Include Servlet:</strong></p>
<p>Servlets can be embedded within html documents using the servlet tag. When the server detects the servlet, and sends output of the servlet to the client at the point where the servlet tag was embedded.</p>
<p><strong> Admin Servlet:</strong></p>
<p>The Admin servlet facilitates administration of the Java web server through a GUI front end Administration Tool.</p>
<p><strong> CGI Servlet:</strong></p>
<p>This servlet acts as a gateway for CGI 1.1 interface. This servlet allows any program that utilizes the CGI 1.1     standard to under operate Java Web Server.</p>
<p><strong> Image Map Servlet:</strong></p>
<p>This servlet implements server-side image maps utilizing an extension of standard NCSA map files.<br />
<h3>Random Posts</h3>
<ul class="related_post">
<li><a href="http://www.bestjavainterviewquestions.com/jdbc-interview-questions-2/" title="Jdbc Interview Questions">Jdbc Interview Questions (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/difference-between-print-and-println-methods-in-java/" title="Difference between Print() and Println() Methods in Java">Difference between Print() and Println() Methods in Java (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/some-important-methos-in-applets/" title="Some important methos in Applets">Some important methos in Applets (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/define-hashset-class/" title="Define HashSet Class">Define HashSet Class (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/java-package/" title="Java Package">Java Package (0)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bestjavainterviewquestions.com/overview-of-servlets/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Exception Handling and their uses</title>
		<link>http://www.bestjavainterviewquestions.com/exception-handling-and-their-uses/</link>
		<comments>http://www.bestjavainterviewquestions.com/exception-handling-and-their-uses/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 16:31:51 +0000</pubDate>
		<dc:creator>Ramakrishna</dc:creator>
		
		<category><![CDATA[Java Interview Questions]]></category>

		<category><![CDATA[exception handling]]></category>

		<guid isPermaLink="false">http://www.bestjavainterviewquestions.com/?p=587</guid>
		<description><![CDATA[Q)  What is the difference between ‘throw’ and ‘throws’ ?And it’s application?

Rep)  Exceptions that are thrown by java runtime systems can be handled by Try and catch blocks. With throw exception we can handle the exceptions thrown by the program itself. If a method is capable of causing an exception that it does not
handle, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Q)  What is the difference between ‘throw’ and ‘throws’ ?And it’s application?<br />
</strong></p>
<p><strong>Rep) </strong> Exceptions that are thrown by java runtime systems can be handled by Try and catch blocks. With throw exception we can handle the exceptions thrown by the program itself. If a method is capable of causing an exception that it does not<br />
handle, it must specify this behavior so the callers of the method can guard<br />
against that exception.</p>
<p><strong>Q)   What is the difference between ‘Exception’ and ‘error’ in java?</strong></p>
<p><strong>Rep) </strong> Exception and Error are the subclasses of the Throwable class. Exception class is used for exceptional conditions that user program should catch. With exception class we can subclass to create our own custom exception.<br />
Error defines exceptions that are not excepted to be caught by you program. Example is Stack Overflow.</p>
<p><strong>Q)  What is ‘Resource leak’?<br />
</strong></p>
<p><strong>Rep) </strong> Freeing up other resources that might have been allocated at the beginning of a method.</p>
<p><strong>Q)  What is the ‘finally’ block?</strong></p>
<p><strong>Rep) </strong> Finally block will execute whether or not an exception is thrown. If an exception is thrown, the finally block will execute even if no catch statement match the exception. Any time a method is about to return to the caller from inside try/catch block, via an uncaught exception or an explicit return statement, the finally clause is also execute.</p>
<p><strong>Q)  Can we have catch block with out try block? If so when?<br />
</strong></p>
<p><strong>Rep) </strong> No. Try/Catch or Try/finally form a unit.</p>
<p><strong>Q)  What will happen to the Exception object after exception handling?<br />
</strong></p>
<p><strong>Rep) </strong> It will go for Garbage Collector. And frees the memory.</p>
<p><strong>Q)  How many Exceptions we can define in ‘throws’ clause?<br />
</strong></p>
<p><strong>Rep) </strong> We can define multiple exceptions in throws clause.<br />
Signature is.. : type method-name (parameter-list) throws exception-list</p>
<p><strong>Q)  The finally block is executed when an exception is thrown, even if no catch matches it.<br />
True/False<br />
</strong></p>
<p><strong>Rep) </strong> True</p>
<p><strong>Q)   The subclass exception should precede the base class exception when used within the catch clause.<br />
True/False<br />
</strong></p>
<p><strong>Rep) </strong>True</p>
<p><strong>Q)   Exceptions can be caught or rethrown to a calling method.<br />
True/False</strong></p>
<p><strong>Rep) </strong>True</p>
<p><strong>Q)  The statements following the throw keyword in a program are not executed.<br />
True/False</strong></p>
<p><strong>Rep) </strong> True</p>
<p><strong>Q)  The toString ( ) method in the user-defined exception class is overridden.<br />
True/False</strong></p>
<p><strong>Rep) </strong>True<br />
<h3>Random Posts</h3>
<ul class="related_post">
<li><a href="http://www.bestjavainterviewquestions.com/define-jsp-include-and-jsp-forward/" title="Define Jsp-include and Jsp-forward">Define Jsp-include and Jsp-forward (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/difference-between-sessionsave-sessionsaveorupdate-and-sessionpersist/" title="Difference between session.save() , session.saveOrUpdate() and session.persist()">Difference between session.save() , session.saveOrUpdate() and session.persist() (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/write-a-short-notes-on-vectors/" title="Write a Short notes on Vectors">Write a Short notes on Vectors (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/jsp-interview-questions-2/" title="JSP Interview Questions">JSP Interview Questions (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/thread-example-for-runnable-interface/" title="Thread example for Runnable Interface">Thread example for Runnable Interface (0)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bestjavainterviewquestions.com/exception-handling-and-their-uses/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to get a Leap Year</title>
		<link>http://www.bestjavainterviewquestions.com/how-to-get-a-leap-year/</link>
		<comments>http://www.bestjavainterviewquestions.com/how-to-get-a-leap-year/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 14:31:38 +0000</pubDate>
		<dc:creator>Ramakrishna</dc:creator>
		
		<category><![CDATA[Java Interview Questions]]></category>

		<category><![CDATA[java leapyear code]]></category>

		<guid isPermaLink="false">http://www.bestjavainterviewquestions.com/?p=544</guid>
		<description><![CDATA[import java.util.Calendar.*;
import java.lang.*;  //its&#8217; a default package which will import
class LeapYear {
public static void main(String args[])throws Exception {
Calendar cal=Calendar.getInstance();
int year=cal.get(Calendar.YEAR);
if(year % 4 == 0 &#38;&#38; (year % 100 != 0 &#124;&#124; year % 400 == 0))
{   System.out.println(&#8221;Leap Year&#8221;);          }else  {
System.out.println(&#8221;Not a Leap Year);      }
}
}  // The Meaning of above is every 4 year&#8217;s the LeapYear [...]]]></description>
			<content:encoded><![CDATA[<p>import java.util.Calendar.*;</p>
<p>import java.lang.*;  //its&#8217; a default package which will import</p>
<p>class <strong>LeapYear </strong>{</p>
<p>public static void main(String args[])throws Exception {</p>
<p>Calendar cal=Calendar.getInstance();</p>
<p>int year=cal.get(Calendar.YEAR);</p>
<p>if(year % 4 == 0 &amp;&amp; (year % 100 != 0 || year % 400 == 0))</p>
<p>{   System.out.println(&#8221;Leap Year&#8221;);          }else  {</p>
<p>System.out.println(&#8221;Not a Leap Year);      }</p>
<p>}</p>
<p>}  // The Meaning of above is every 4 year&#8217;s the LeapYear comes and when The Centuries comes into pictures it will divided by the 400 so that the remainder should be zera is the Leap year<br />
<h3>Random Posts</h3>
<ul class="related_post">
<li><a href="http://www.bestjavainterviewquestions.com/arraylist-class/" title="ArrayList Class">ArrayList Class (1)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/define-array-in-java/" title="Define Array in Java">Define Array in Java (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/when-the-port-number-is-changed/" title="When the port number is changed">When the port number is changed (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/springs-interview-questions-3/" title="Springs Interview Questions">Springs Interview Questions (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/java-rmi-interview-questions/" title="Java RMI Interview questions">Java RMI Interview questions (0)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bestjavainterviewquestions.com/how-to-get-a-leap-year/feed/</wfw:commentRss>
		</item>
		<item>
		<title>EJB Interview questions</title>
		<link>http://www.bestjavainterviewquestions.com/ejb-interview-questions-2/</link>
		<comments>http://www.bestjavainterviewquestions.com/ejb-interview-questions-2/#comments</comments>
		<pubDate>Sat, 04 Apr 2009 19:27:24 +0000</pubDate>
		<dc:creator>Ramakrishna</dc:creator>
		
		<category><![CDATA[Ejb Interview Questions]]></category>

		<category><![CDATA[ejb technical interview questions]]></category>

		<guid isPermaLink="false">http://www.bestjavainterviewquestions.com/?p=582</guid>
		<description><![CDATA[Q) What is EJB
Rep) Enterprise JavaBeans.
Q) What is EJB container
Rep) A container that implements the EJB component contract
of the J2EE architecture. This contract specifies a
runtime environment for enterprise beans that includes
security, concurrency, life-cycle management,
transactions, deployment, naming, and other services.
An EJB container is provided by an EJB or J2EE server.
Q) What is EJB container provider
Rep) A [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Q) What is EJB</p>
<p>Rep) </strong>Enterprise JavaBeans.</p>
<p><strong>Q) What is EJB container</p>
<p>Rep) </strong>A container that implements the EJB component contract<br />
of the J2EE architecture. This contract specifies a<br />
runtime environment for enterprise beans that includes<br />
security, concurrency, life-cycle management,<br />
transactions, deployment, naming, and other services.<br />
An EJB container is provided by an EJB or J2EE server.</p>
<p><strong>Q) What is EJB container provider</p>
<p>Rep) </strong>A vendor that supplies an EJB container.</p>
<p><strong>Q) What is EJB context</p>
<p>Rep) </strong>A vendor that supplies an EJB container. An object<br />
that allows an enterprise bean to invoke services<br />
provided by the container and to obtain the<br />
information about the caller of a client-invoked<br />
method.<br />
<strong><br />
Q) What is EJB home object</p>
<p>Rep)</strong> An object that provides the life-cycle operations<br />
(create, remove, find) for an enterprise bean. The<br />
class for the EJB home object is generated by the<br />
container&#8217;s deployment tools. The EJB home object<br />
implements the enterprise bean&#8217;s home interface. The<br />
client references an EJB home object to perform<br />
life-cycle operations on an EJB object. The client<br />
uses JNDI to locate an EJB home object</p>
<p><strong>Q) What is EJB JAR file</p>
<p>Rep) </strong>A JAR archive that contains an EJB module.</p>
<p><strong>Q) What is EJB module</p>
<p>Rep) </strong>A deployable unit that consists of one or more<br />
enterprise beans and an EJB deployment descriptor.</p>
<p><strong>Q) What is EJB object</p>
<p>Rep) </strong>An object whose class implements the enterprise bean&#8217;s<br />
remote interface. A client never references an<br />
enterprise bean instance directly; a client always<br />
references an EJB object. The class of an EJB object<br />
is generated by a container&#8217;s deployment tools.</p>
<p><strong>Q) What is EJB server</p>
<p>Rep) </strong>Software that provides services to an EJB container.<br />
For example, an EJB container typically relies on a<br />
transaction manager that is part of the EJB server to<br />
perform the two-phase commit across all the<br />
participating resource managers. The J2EE architecture<br />
assumes that an EJB container is hosted by an EJB<br />
server from the same vendor, so it does not specify<br />
the contract between these two entities. An EJB server<br />
can host one or more EJB containers.</p>
<p><strong>Q) What is EJB server provider</p>
<p>Rep) </strong>A vendor that supplies an EJB server.</p>
<p><strong>Q) What is element</p>
<p>Rep) </strong>A unit of XML data, delimited by tags. An XML element<br />
can enclose other elements.</p>
<p><strong>Q) What is empty tag</p>
<p>Rep)</strong> A tag that does not enclose any content<br />
<strong><br />
Q) What is enterprise bean</p>
<p>Rep)</strong> A J2EE component that implements a business task or<br />
business entity and is hosted by an EJB container;<br />
either an entity bean, a session bean, or a<br />
message-driven bean.</p>
<p><strong>Q) What is enterprise bean provider</p>
<p>Rep) </strong>An application developer who produces enterprise bean<br />
classes, remote and home interfaces, and deployment<br />
descriptor files, and packages them in an EJB JAR<br />
file.</p>
<p><strong>Q) What is enterprise information system</p>
<p>Rep) </strong>The applications that constitute an enterprise&#8217;s<br />
existing system for handling companywide information.<br />
These applications provide an information<br />
infrastructure for an enterprise. An enterprise<br />
information system offers a well-defined set of<br />
services to its clients. These services are exposed to<br />
clients as local or remote interfaces or both.<br />
Examples of enterprise information systems include<br />
enterprise resource planning systems, mainframe<br />
transaction processing systems, and legacy database<br />
systems.</p>
<p><strong>Q) What is enterprise information system resource</p>
<p>Rep)</strong> An entity that provides enterprise information<br />
system-specific functionality to its clients. Examples<br />
are a record or set of records in a database system, a<br />
business object in an enterprise resource planning<br />
system, and a transaction program in a transaction<br />
processing system.<br />
<strong><br />
Q) What is Enterprise JavaBeans (EJB)</p>
<p>Rep) </strong>A component architecture for the development and<br />
deployment of object-oriented, distributed,<br />
enterprise-level applications. Applications written<br />
using the Enterprise JavaBeans architecture are<br />
scalable, transactional, and secure.</p>
<p><strong>Q) What is Enterprise JavaBeans Query Language (EJB QL)</p>
<p>Rep) </strong>Defines the queries for the finder and select methods<br />
of an entity bean having container-managed<br />
persistence. A subset of SQL92, EJB QL has extensions<br />
that allow navigation over the relationships defined<br />
in an entity bean&#8217;s abstract schema.</p>
<p><strong>Q) What is an entity</p>
<p>Rep) </strong>A distinct, individual item that can be included in an<br />
XML document by referencing it. Such an entity<br />
reference can name an entity as small as a character<br />
(for example, &lt;, which references the less-than symbol<br />
or left angle bracket, &lt;). An entity reference can<br />
also reference an entire document, an external entity,<br />
or a collection of DTD definitions.</p>
<p><strong>Q) What is entity bean</p>
<p>Rep)</strong> An enterprise bean that represents persistent data<br />
maintained in a database. An entity bean can manage<br />
its own persistence or can delegate this function to<br />
its container. An entity bean is identified by a<br />
primary key. If the container in which an entity bean<br />
is hosted crashes, the entity bean, its primary key,<br />
and any remote references survive the crash.</p>
<p><strong>Q) What is entity reference</p>
<p>Rep) </strong>A reference to an entity that is substituted for the<br />
reference when the XML document is parsed. It can<br />
reference a predefined entity such as &lt; or reference<br />
one that is defined in the DTD. In the XML data, the<br />
reference could be to an entity that is defined in the<br />
local subset of the DTD or to an external XML file (an<br />
external entity). The DTD can also carve out a segment<br />
of DTD specifications and give it a name so that it<br />
can be reused (included) at multiple points in the DTD<br />
by defining a parameter entity.<br />
<strong><br />
Q) What is error</p>
<p>Rep) </strong>A SAX parsing error is generally a validation error;<br />
in other words, it occurs when an XML document is not<br />
valid, although it can also occur if the declaration<br />
specifies an XML version that the parser cannot<br />
handle. See also fatal error, warning.</p>
<p><strong>Q) What is Extensible Markup Language</p>
<p>Rep)</strong> XML.<br />
<strong><br />
Q) What is external entity</p>
<p>Rep) </strong>An entity that exists as an external XML file, which<br />
is included in the XML document using an entity<br />
reference.</p>
<p><strong>Q) What is external subset</p>
<p>Rep) </strong>That part of a DTD that is defined by references to<br />
external DTD files.</p>
<p><strong>Q) What is fatal error</p>
<p>Rep) </strong>A fatal error occurs in the SAX parser when a document<br />
is not well formed or otherwise cannot be processed.<br />
See also error, warning.</p>
<p><strong>Q) What is filter</p>
<p>Rep)</strong> An object that can transform the header or content (or<br />
both) of a request or response. Filters differ from<br />
Web components in that they usually do not themselves<br />
create responses but rather modify or adapt the<br />
requests for a resource, and modify or adapt responses<br />
from a resource. A filter should not have any<br />
dependencies on a Web resource for which it is acting<br />
as a filter so that it can be composable with more<br />
than one type of Web resource.</p>
<p><strong>Q) What is filter chain</p>
<p>Rep) </strong>A concatenation of XSLT transformations in which the<br />
output of one transformation becomes the input of the<br />
next.</p>
<p><strong>Q) What is finder method</p>
<p>Rep) </strong>A method defined in the home interface and invoked by<br />
a client to locate an entity bean.<br />
<strong><br />
Q) What is form-based authentication</p>
<p>Rep) </strong>An authentication mechanism in which a Web container<br />
provides an application-specific form for logging in.<br />
This form of authentication uses Base64 encoding and<br />
can expose user names and passwords unless all<br />
connections are over SSL.<br />
<strong><br />
Q) What is general entity</p>
<p>Rep) </strong>An entity that is referenced as part of an XML<br />
document&#8217;s content, as distinct from a parameter<br />
entity, which is referenced in the DTD. A general<br />
entity can be a parsed entity or an unparsed entity.</p>
<p><strong>Q) What is group</p>
<p>Rep) </strong>An authenticated set of users classified by common<br />
traits such as job title or customer profile. Groups<br />
are also associated with a set of roles, and every<br />
user that is a member of a group inherits all the<br />
roles assigned to that group.</p>
<p><strong>Q) What is handle</p>
<p>Rep) </strong>An object that identifies an enterprise bean. A client<br />
can serialize the handle and then later deserialize it<br />
to obtain a reference to the enterprise bean.<br />
<strong><br />
Q) What is home handle</p>
<p>Rep) </strong>An object that can be used to obtain a reference to<br />
the home interface. A home handle can be serialized<br />
and written to stable storage and deserialized to<br />
obtain the reference.</p>
<p><strong>Q) What is home interface</p>
<p>Rep) </strong>One of two interfaces for an enterprise bean. The home<br />
interface defines zero or more methods for managing an<br />
enterprise bean. The home interface of a session bean<br />
defines create and remove methods, whereas the home<br />
interface of an entity bean defines create, finder,<br />
and remove methods.<br />
<h3>Random Posts</h3>
<ul class="related_post">
<li><a href="http://www.bestjavainterviewquestions.com/mapping-files-in-hibernate/" title="Mapping Files in Hibernate">Mapping Files in Hibernate (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/servlet-session-examples/" title="Servlets Session Examples">Servlets Session Examples (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/sockets-programming-in-java-for-clientserver/" title="Sockets programming in Java for Client/Server">Sockets programming in Java for Client/Server (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/java-lang-package-interview-questions/" title="Java lang package interview questions">Java lang package interview questions (2)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/uploading-file-name-of-image-to-database/" title="Uploading file name or image to DataBase">Uploading file name or image to DataBase (0)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bestjavainterviewquestions.com/ejb-interview-questions-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Define Jar,War,Ear file</title>
		<link>http://www.bestjavainterviewquestions.com/define-jarwarear-file/</link>
		<comments>http://www.bestjavainterviewquestions.com/define-jarwarear-file/#comments</comments>
		<pubDate>Sat, 04 Apr 2009 19:04:02 +0000</pubDate>
		<dc:creator>Ramakrishna</dc:creator>
		
		<category><![CDATA[Define creating and extracting of jar]]></category>

		<category><![CDATA[ear]]></category>

		<category><![CDATA[jar]]></category>

		<category><![CDATA[war]]></category>

		<guid isPermaLink="false">http://www.bestjavainterviewquestions.com/?p=578</guid>
		<description><![CDATA[Q) What is EAR file
Rep) Enterprise Archive file. A JAR archive that contains a
J2EE application.
Q) What is JAR file
Rep) Java Archive file it contains a J2EE application.
You can create a JAR file using the command
jar cf XYZ.jar *.class *.gif
if will compress all the .class files and the related gif files to the one file called [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Q) What is EAR file</strong></p>
<p><strong>Rep) </strong>Enterprise Archive file. A JAR archive that contains a<br />
J2EE application.</p>
<p><strong>Q) What is JAR file</strong></p>
<p><strong>Rep)</strong> Java Archive file it contains a J2EE application.</p>
<p>You can create a JAR file using the command</p>
<p><em>jar cf XYZ.jar *.class *.gif</em></p>
<p>if will compress all the .class files and the related gif files to the one file called jar</p>
<p>You can extract the JAR file using the command</p>
<p><em>jar xf XYZ.jar</em></p>
<p>Updating the existing JAR file</p>
<p><em>jar -uf XYZ.jar file1.class</em></p>
<p><strong>Q) What is WAR file</strong></p>
<p><strong>Rep)</strong> Enterprise Archive file. A JAR archive that contains a<br />
J2EE application.</p>
<p>You can create a <strong>WAR </strong>file using the command</p>
<p><em>jar -cfv XYZ.war</em></p>
<p>You can extract a <strong>WAR </strong>file using the command</p>
<p><em>jar -xfv XYZ.war</em><br />
<h3>Related Post</h3>
<ul class="related_post">
<li><a href="http://www.bestjavainterviewquestions.com/define-earjar-and-war/" title="Define Ear,jar and war">Define Ear,jar and war (0)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bestjavainterviewquestions.com/define-jarwarear-file/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Java Interview Questions</title>
		<link>http://www.bestjavainterviewquestions.com/java-interview-questions/</link>
		<comments>http://www.bestjavainterviewquestions.com/java-interview-questions/#comments</comments>
		<pubDate>Sat, 04 Apr 2009 18:48:52 +0000</pubDate>
		<dc:creator>Ramakrishna</dc:creator>
		
		<category><![CDATA[J2EE Interview Question]]></category>

		<category><![CDATA[j2ee]]></category>

		<guid isPermaLink="false">http://www.bestjavainterviewquestions.com/?p=574</guid>
		<description><![CDATA[Q) What is CTS
Rep) Compatibility test suite. A suite of compatibility
tests for verifying that a J2EE product complies with
the J2EE platform specification.
Q) What is data
Rep) The contents of an element in an XML stream, generally
used when the element does not contain any
subelements. When it does, the term content is
generally used. When the only text in [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Q) What is CTS</p>
<p>Rep) </strong>Compatibility test suite. A suite of compatibility<br />
tests for verifying that a J2EE product complies with<br />
the J2EE platform specification.</p>
<p><strong>Q) What is data</p>
<p>Rep) </strong>The contents of an element in an XML stream, generally<br />
used when the element does not contain any<br />
subelements. When it does, the term content is<br />
generally used. When the only text in an XML structure<br />
is contained in simple elements and when elements that<br />
have subelements have little or no data mixed in, then<br />
that structure is often thought of as XML data, as<br />
opposed to an XML document.</p>
<p><strong>Q) What is DDP</p>
<p>Rep) </strong>Document-driven programming. The use of XML to define<br />
applications.</p>
<p><strong>Q) What is declaration</p>
<p>Rep) </strong>The very first thing in an XML document, which<br />
declares it as XML. The minimal declaration is . The<br />
declaration is part of the document prolog.</p>
<p><strong>Q) What is declarative security</p>
<p>Rep)</strong> Mechanisms used in an application that are expressed<br />
in a declarative syntax in a deployment descriptor.</p>
<p><strong>Q) What is delegation</p>
<p>Rep) </strong>An act whereby one principal authorizes another<br />
principal to use its identity or privileges with some<br />
restrictions.</p>
<p><strong>Q) What is deployer</p>
<p>Rep) </strong>A person who installs J2EE modules and applications<br />
into an operational environment.<br />
<strong><br />
Q) What is deployment</p>
<p>Rep) </strong>The process whereby software is installed into an<br />
operational environment.</p>
<p><strong>Q) What is deployment descriptor</p>
<p>Rep) </strong>An XML file provided with each module and J2EE<br />
application that describes how they should be<br />
deployed. The deployment descriptor directs a<br />
deployment tool to deploy a module or application with<br />
specific container options and describes specific<br />
configuration requirements that a deployer must<br />
resolve.</p>
<p><strong>Q) What is destination</p>
<p>Rep) </strong>A JMS administered object that encapsulates the<br />
identity of a JMS queue or topic. See point-to-point<br />
messaging system, publish/subscribe messaging system.<br />
68. What is digest authentication</p>
<p>An authentication mechanism in which a Web application<br />
authenticates itself to a Web server by sending the<br />
server a message digest along with its HTTP request<br />
message. The digest is computed by employing a one-way<br />
hash algorithm to a concatenation of the HTTP request<br />
message and the client&#8217;s password. The digest is<br />
typically much smaller than the HTTP request and<br />
doesn&#8217;t contain the password.</p>
<p><strong>Q) What is distributed application</p>
<p>Rep) </strong>An application made up of distinct components running<br />
in separate runtime environments, usually on different<br />
platforms connected via a network. Typical distributed<br />
applications are two-tier (client-server), three-tier<br />
(client-middleware-server), and multitier<br />
(client-multiple middleware-multiple servers).<br />
<strong><br />
Q) What is document</p>
<p>Rep) </strong>In general, an XML structure in which one or more<br />
elements contains text intermixed with subelements.</p>
<p><strong>Q) What is Document Object Model</p>
<p>Rep) </strong>An API for accessing and manipulating XML documents as<br />
tree structures. DOM provides platform-neutral,<br />
language-neutral interfaces that enables programs and<br />
scripts to dynamically access and modify content and<br />
structure in XML documents.<br />
<strong><br />
Q) What is document root</p>
<p>Rep) </strong>The top-level directory of a WAR. The document root is<br />
where JSP pages, client-side classes and archives, and<br />
static Web resources are stored.</p>
<p><strong>Q) What is DTD</p>
<p>Rep)</strong> Document type definition. An optional part of the XML<br />
document prolog, as specified by the XML standard. The<br />
DTD specifies constraints on the valid tags and tag<br />
sequences that can be in the document. The DTD has a<br />
number of shortcomings, however, and this has led to<br />
various schema proposals. For example, the DTD entry<br />
says that the XML element called username contains<br />
parsed character data-that is, text alone, with no<br />
other structural elements under it. The DTD includes<br />
both the local subset, defined in the current file,<br />
and the external subset, which consists of the<br />
definitions contained in external DTD files that are<br />
referenced in the local subset using a parameter<br />
entity.<br />
<strong><br />
Q) What is durable subscription</p>
<p>Rep)</strong> In a JMS publish/subscribe messaging system, a<br />
subscription that continues to exist whether or not<br />
there is a current active subscriber object. If there<br />
is no active subscriber, the JMS provider retains the<br />
subscription&#8217;s messages until they are received by the<br />
subscription or until they expire.</p>
<p><strong>Q) What is ebXML</p>
<p>Rep)</strong> Electronic Business XML. A group of specifications<br />
designed to enable enterprises to conduct business<br />
through the exchange of XML-based messages. It is<br />
sponsored by OASIS and the United Nations Centre for<br />
the Facilitation of Procedures and Practices in<br />
Administration, Commerce and Transport (U.N./CEFACT).<br />
<h3>Random Posts</h3>
<ul class="related_post">
<li><a href="http://www.bestjavainterviewquestions.com/can-we-call-destroy-method-on-servlets-from-service-method/" title="Can we call destroy() method on servlets from service method">Can we call destroy() method on servlets from service method (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/define-session-hijacking-3/" title="Define Session Hijacking">Define Session Hijacking (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/how-the-web-container-creates-a-servlet-object/" title="How the Web Container creates a servlet object">How the Web Container creates a servlet object (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/what-are-command-line-arguments-in-java/" title="What are Command Line Arguments in Java">What are Command Line Arguments in Java (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/difference-between-getcurrentsession-and-opensession/" title="Difference between getCurrentSession() and openSession()">Difference between getCurrentSession() and openSession() (0)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bestjavainterviewquestions.com/java-interview-questions/feed/</wfw:commentRss>
		</item>
		<item>
		<title>J2EE Interview Questions</title>
		<link>http://www.bestjavainterviewquestions.com/j2ee-interview-questions-2/</link>
		<comments>http://www.bestjavainterviewquestions.com/j2ee-interview-questions-2/#comments</comments>
		<pubDate>Sat, 04 Apr 2009 18:35:09 +0000</pubDate>
		<dc:creator>Ramakrishna</dc:creator>
		
		<category><![CDATA[J2EE Interview Question]]></category>

		<category><![CDATA[j2ee questions]]></category>

		<guid isPermaLink="false">http://www.bestjavainterviewquestions.com/?p=571</guid>
		<description><![CDATA[Q) What is authentication ?
Rep) The process that verifies the identity of a user,
device, or other entity in a computer system, usually
as a prerequisite to allowing access to resources in a
system. The Java servlet specification requires three
types of authentication-basic, form-based, and
mutual-and supports digest authentication.
Q) What is authorization?
Rep) The process by which access to a method [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Q) What is authentication ?</strong></p>
<p><strong>Rep)</strong> The process that verifies the identity of a user,<br />
device, or other entity in a computer system, usually<br />
as a prerequisite to allowing access to resources in a<br />
system. The Java servlet specification requires three<br />
types of authentication-basic, form-based, and<br />
mutual-and supports digest authentication.</p>
<p><strong>Q) What is authorization?</strong></p>
<p><strong>Rep) </strong>The process by which access to a method or resource is<br />
determined. Authorization depends on the determination<br />
of whether the principal associated with a request<br />
through authentication is in a given security role. A<br />
security role is a logical grouping of users defined<br />
by the person who assembles the application. A<br />
deployer maps security roles to security identities.<br />
Security identities may be principals or groups in the<br />
operational environment.</p>
<p><strong>Q) What is authorization constraint</strong></p>
<p><strong>Rep)</strong> An authorization rule that determines who is permitted<br />
to access a Web resource collection.</p>
<p><strong>Q) What is B2B</strong></p>
<p><strong>Rep) </strong>B2B stands for Business-to-business.</p>
<p><strong>Q) What is backing bean</strong></p>
<p><strong>Rep) </strong>A JavaBeans component that corresponds to a JSP page<br />
that includes JavaServer Faces components. The backing<br />
bean defines properties for the components on the page<br />
and methods that perform processing for the component.<br />
This processing includes event handling, validation,<br />
and processing associated with navigation.</p>
<p><strong>Q) What is basic authentication</strong></p>
<p><strong>Rep) </strong>An authentication mechanism in which a Web server<br />
authenticates an entity via a user name and password<br />
obtained using the Web application&#8217;s built-in<br />
authentication mechanism.</p>
<p><strong>Q) What is business logic</strong></p>
<p><strong>Rep) </strong>The code that implements the functionality of an<br />
application. In the Enterprise JavaBeans architecture,<br />
this logic is implemented by the methods of an<br />
enterprise bean.</p>
<p><strong>Q) What is business method</strong></p>
<p><strong>Rep) </strong>A method of an enterprise bean that implements the<br />
business logic or rules of an application.</p>
<p><strong>Q) What is callback methods</strong></p>
<p><strong>Rep) </strong>Component methods called by the container to notify<br />
the component of important events in its life cycle.</p>
<p><strong>Q) What is caller</strong></p>
<p><strong>Rep) </strong>Same as caller principal.</p>
<p><strong>Q) What is caller principal</strong></p>
<p><strong>Rep) </strong>The principal that identifies the invoker of the<br />
enterprise bean method.</p>
<p><strong>Q) What is cascade delete</strong></p>
<p><strong>Rep) </strong> A deletion that triggers another deletion. A cascade<br />
delete can be specified for an entity bean that has<br />
container-managed persistence.</p>
<p><strong>Q) What is CDATA</strong></p>
<p><strong>Rep) </strong>A predefined XML tag for character data that means<br />
&#8220;don&#8217;t interpret these characters,&#8221; as opposed to<br />
parsed character data (PCDATA), in which the normal<br />
rules of XML syntax apply. CDATA sections are<br />
typically used to show examples of XML syntax.</p>
<p><strong>Q) What is certificate authority</strong></p>
<p><strong>Rep) </strong>A trusted organization that issues public key<br />
certificates and provides identification to the<br />
bearer.</p>
<p><strong>Q) What is client-certificate authentication</strong></p>
<p><strong>Rep) </strong>An authentication mechanism that uses HTTP over SSL,<br />
in which the server and, optionally, the client<br />
authenticate each other with a public key certificate<br />
that conforms to a standard that is defined by X.509<br />
Public Key Infrastructure.</p>
<p><strong>Q) What is comment</strong></p>
<p><strong>Rep) </strong>In an XML document, text that is ignored unless the<br />
parser is specifically told to recognize it.</p>
<p><strong>Q) What is commit</strong></p>
<p><strong>Rep)</strong> The point in a transaction when all updates to any<br />
resources involved in the transaction are made<br />
permanent.</p>
<p><strong>Q) What is component contract</strong></p>
<p><strong>Rep) </strong>The contract between a J2EE component and its<br />
container. The contract includes life-cycle management<br />
of the component, a context interface that the<br />
instance uses to obtain various information and<br />
services from its container, and a list of services<br />
that every container must provide for its components.</p>
<p><strong>Q) What is component-managed sign-on</strong></p>
<p><strong>Rep) </strong>A mechanism whereby security information needed for<br />
signing on to a resource is provided by an application<br />
component.</p>
<p><strong>Q) What is connector</strong></p>
<p><strong>Rep) </strong>A standard extension mechanism for containers that<br />
provides connectivity to enterprise information<br />
systems. A connector is specific to an enterprise<br />
information system and consists of a resource adapter<br />
and application development tools for enterprise<br />
information system connectivity. The resource adapter<br />
is plugged in to a container through its support for<br />
system-level contracts defined in the Connector<br />
architecture.</p>
<p><strong>Q) What is Connector architecture</strong></p>
<p><strong>Rep) </strong>An architecture for integration of J2EE products with<br />
enterprise information systems. There are two parts to<br />
this architecture: a resource adapter provided by an<br />
enterprise information system vendor and the J2EE<br />
product that allows this resource adapter to plug in.<br />
This architecture defines a set of contracts that a<br />
resource adapter must support to plug in to a J2EE<br />
product-for example, transactions, security, and<br />
resource management.</p>
<p><strong>Q) What is context attribute</strong></p>
<p><strong>Rep) </strong>An object bound into the context associated with a<br />
servlet.</p>
<p><strong>Q) What is context root</strong></p>
<p><strong>Rep) </strong>A name that gets mapped to the document root of a Web<br />
application.</p>
<p><strong>Q) What is conversational state ?</strong></p>
<p><strong>Rep) </strong>The field values of a session bean plus the transitive<br />
closure of the objects reachable from the bean&#8217;s<br />
fields. The transitive closure of a bean is defined in<br />
terms of the serialization protocol for the Java<br />
programming language, that is, the fields that would<br />
be stored by serializing the bean instance.</p>
<p><strong>Q) What is CORBA</strong></p>
<p><strong>Rep) </strong>Common Object Request Broker Architecture. A<br />
language-independent distributed object model<br />
specified by the OMG.</p>
<p><strong>Q) What is create method</strong></p>
<p><strong>Rep) </strong>A method defined in the home interface and invoked by<br />
a client to create an enterprise bean.</p>
<p><strong>Q) What is credentials</strong></p>
<p><strong>Rep) </strong>The information describing the security attributes of<br />
a principal.</p>
<p><strong>Q) What is CSS</strong></p>
<p><strong>Rep) </strong>Cascading style sheet. A stylesheet used with HTML and<br />
XML documents to add a style to all elements marked<br />
with a particular tag, for the direction of browsers<br />
or other presentation mechanisms.<br />
<h3>Random Posts</h3>
<ul class="related_post">
<li><a href="http://www.bestjavainterviewquestions.com/when-the-port-number-is-changed/" title="When the port number is changed">When the port number is changed (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/difference-between-a-break-statement-and-a-continue-statement/" title="Difference between a break statement and a continue statement">Difference between a break statement and a continue statement (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/difference-between-errortag-and-message-tag/" title="Difference between errortag and message tag">Difference between errortag and message tag (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/overview-of-servlets/" title="OVERVIEW OF SERVLETS">OVERVIEW OF SERVLETS (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/define-transaction-isolation-in-ejb/" title="Define Transaction Isolation in EJB">Define Transaction Isolation in EJB (0)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bestjavainterviewquestions.com/j2ee-interview-questions-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>J2EE Interview Questions</title>
		<link>http://www.bestjavainterviewquestions.com/j2ee-interview-questions/</link>
		<comments>http://www.bestjavainterviewquestions.com/j2ee-interview-questions/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 11:05:07 +0000</pubDate>
		<dc:creator>Ramakrishna</dc:creator>
		
		<category><![CDATA[J2EE Interview Question]]></category>

		<category><![CDATA[j2ee interivew questionhs]]></category>

		<guid isPermaLink="false">http://www.bestjavainterviewquestions.com/?p=567</guid>
		<description><![CDATA[Q) What is J2EE?
Rep) 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.
Q) What is the J2EE module?
Rep) A J2EE module consists of one or more J2EE components for the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Q) What is J2EE?</strong></p>
<p><strong>Rep)</strong> 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.</p>
<p><strong>Q) What is the J2EE module?</strong></p>
<p><strong>Rep)</strong> A J2EE module consists of one or more J2EE components for the same container type and one component deployment descriptor of that type.</p>
<p><strong>Q) What are the components of J2EE application?</strong></p>
<p><strong>Rep)</strong> 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. The J2EE specification defines the following J2EE components: Application clients and applets are client components. Java Servlet and JavaServer PagesTM (JSPTM) technology components are web components. Enterprise JavaBeansTM (EJBTM) components (enterprise beans) are business components. Resource adapter components provided by EIS and tool vendors.</p>
<p><strong>Q)What are the four types of J2EE modules?</strong></p>
<p><strong>Rep) </strong><br />
1. Application client module<br />
2. Web module<br />
3. Enterprise JavaBeans module<br />
4. Resource adapter module</p>
<p><strong>Q) What does application client module contain?</strong></p>
<p><strong>Rep)</strong> The application client module contains:</p>
<p>&#8211;class files,<br />
&#8211;an application client deployment descriptoor. Application client modules are packaged as JAR files with a .jar extension.</p>
<p><strong>Q) What is &#8220;application assembler&#8221; ?</strong></p>
<p><strong>Rep)</strong> A person who combines J2EE components and modules into deployable application units.</p>
<p><strong>Q) What is &#8220;application client&#8221; ?</strong></p>
<p><strong>Rep)</strong> A first-tier J2EE client component that executes in its own Java virtual machine. Application clients have access to some J2EE platform APIs.</p>
<p><strong>Q) What is &#8220;application client container&#8221; ?</strong></p>
<p><strong>Rep)</strong> A container that supports application client components.</p>
<p><strong>Q) What is &#8220;application client module&#8221; ?</strong></p>
<p><strong>Rep)</strong> A software unit that consists of one or more classes and an application client deployment descriptor.</p>
<p><strong>Q) What is &#8220;application component provider&#8221; ?</strong></p>
<p><strong>Rep)</strong> A vendor that provides the Java classes that implement components&#8217; methods, JSP page definitions, and any required deployment descriptors.</p>
<p><strong>Q) What is &#8220;application configuration resource file&#8221; ?</strong></p>
<p><strong>Rep)</strong>An XML file used to configure resources for a JavaServer Faces application, to define navigationrules for the application, and to register converters,validators, listeners, renderers, and components with the application.</p>
<p><strong>Q) What is &#8220;archiving&#8221;</strong></p>
<p><strong>Rep) </strong>The process of saving the state of an object and<br />
restoring it.</p>
<p><strong>Q) What is &#8220;asant&#8221; ?</strong></p>
<p><strong>ReP) </strong>A Java-based build tool that can be extended using Java classes. The configuration files are XML-based,calling out a target tree where various tasks get executed.</p>
<p><strong>Q) What is &#8220;attribute&#8221; What is &#8220;asant&#8221; ?</strong></p>
<p><strong>Rep)</strong> A qualifier on an XML tag that provides additional information. with the application.</p>
<p><strong>Q) What is &#8220;archiving&#8221; ?</strong></p>
<p><strong>Rep)</strong>The process of saving the state of an object and<br />
restoring it.</p>
<p><strong>Q) What is &#8220;asant&#8221;</strong></p>
<p><strong>Rep)</strong> A Java-based build tool that can be extended using Java classes. The configuration files are XML-based,calling out a target tree where various tasks get executed.<br />
<strong><br />
Q) What is &#8220;attribute&#8221;What is &#8220;asant&#8221; ?</strong></p>
<p><strong>Rep) </strong>A qualifier on an XML tag that provides additional information.<br />
<h3>Random Posts</h3>
<ul class="related_post">
<li><a href="http://www.bestjavainterviewquestions.com/different-types-of-session-tracking/" title="Different types of Session Tracking">Different types of Session Tracking (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/java-thread-interview-questions/" title="Java Thread Interview Questions">Java Thread Interview Questions (1)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/define-stored-procedures/" title="Define Stored Procedures">Define Stored Procedures (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/example-programs-of-lifecycle-of-servlets/" title="Example programs of lifecycle of servlets">Example programs of lifecycle of servlets (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/explain-session-tracking-using-servlet/" title="Explain Session tracking using Servlet">Explain Session tracking using Servlet (0)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bestjavainterviewquestions.com/j2ee-interview-questions/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Creating a Stateful session Bean</title>
		<link>http://www.bestjavainterviewquestions.com/creating-a-stateful-session-bean/</link>
		<comments>http://www.bestjavainterviewquestions.com/creating-a-stateful-session-bean/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 15:00:30 +0000</pubDate>
		<dc:creator>Ramakrishna</dc:creator>
		
		<category><![CDATA[Example of stateful session bean]]></category>

		<category><![CDATA[statefulsessionbean]]></category>

		<guid isPermaLink="false">http://www.bestjavainterviewquestions.com/?p=564</guid>
		<description><![CDATA[To send two values to a stateful session bean and getting their sum and difference.
The program makes two conversations(calls) with the session bean. In one call it gets the sum and in the second call it gets the difference. Between the calls state is to be maintained.
1 Step) Remote interface :

import javax.ejb.*;
import java.rmi.*;
//No change from [...]]]></description>
			<content:encoded><![CDATA[<p>To send two values to a stateful session bean and getting their sum and difference.</p>
<p>The program makes two conversations(calls) with the session bean. In one call it gets the sum and in the second call it gets the difference. Between the calls state is to be maintained.</p>
<p><em><strong>1 Step) Remote interface :</strong><br />
</em></p>
<p><em>import javax.ejb.*;<br />
import java.rmi.*;</p>
<p>//No change from Stateless</p>
<p>public interface Calc extends EJBObject<br />
{<br />
public int add(int a,int b) throws RemoteException;<br />
public int sub(int a, int b) throws RemoteException;<br />
}</p>
<p><strong>2 Step: Home interface;</strong></p>
<p>import javax.ejb.*;<br />
import javax.rmi.*;</p>
<p>public interface CalcHome extends EJBHome<br />
{<br />
public Calc create() throws CreateException, RemoteException;</p>
<p>//Observe the change in the implementation of business methods<br />
}</p>
<p><strong>3 Step: Bean class file;</strong></p>
<p>import javax.ejb.*;<br />
import javax.rmi.*;</p>
<p>public class CalcBean implements SessionBean<br />
{</p>
<p>//change here, creating some instance variables to be used in between method calls<br />
SessionContext ctx;<br />
int a,b;</p>
<p>public int add(int a ,int b)<br />
{</p>
<p>//initialize local ot instance variables</p>
<p>this.a=a;<br />
this.b=b;</p>
<p>return a+b;<br />
}</p>
<p>//for subtraction, instance variables assigned in the previous call are used<br />
public int sub()<br />
{<br />
return a-b;<br />
}</p>
<p>//override all the 4 SessionBean methods</p>
<p>public void ejbCreate(){  }<br />
public void ejbActivate(){  }<br />
public void ejbPassivate(){  }<br />
public void setSessionContext(SessionContext ctx)<br />
{<br />
this.ctx = ctx;<br />
}<br />
}</p>
<p><strong>4 Step: Write XML files needed to create a manifest file</strong></p>
<p>The template of XML files with default setting are available in :<br />
C:\ weblogic\examples\ejb\basic\statefulsession\build\meta-Inf<br />
Copy the Meta-Inf directory to your working directory. That is this Meta-Inf directory becomes subdirectory to your working directory.</p>
<p><strong>1. ejb-jar.xml:</strong></p>
<p>//on this name bean will be deployed<br />
&lt;ejb-name&gt; Calculation &lt;/ejb-name&gt;</p>
<p>//write your home interface name<br />
&lt;home&gt; CalcHome &lt;/home&gt;</p>
<p>//write your remote interface name<br />
&lt;remote&gt; Calc &lt;/remote&gt;</p>
<p>//write your bean class name<br />
//earlier it is Stateless<br />
&lt;session -type&gt; Stateful &lt;/session-type&gt;</p>
<p>comedown and write again<br />
&lt;ejb-name&gt; Calculation &lt;/ejb-name&gt;</p>
<p><strong>2. weblogic-ejb-jar.xml :</strong></p>
<p>&lt;ejb-name&gt; Calculation &lt;/ejb-name&gt;<br />
comedown and write again</p>
<p>//this is reference name to be mentioned in client<br />
//program and with this reference name bean and client will communicate.</p>
<p>&lt;jndi-name&gt; XXX &lt;/jndi-name&gt;</p>
<p><strong>5  Step : Write JAR file :</strong></p>
<p>jar cvf CalcJar.jar *.class META-INF\.xml<br />
<strong><br />
6  Step: Compile JAR file and obtain compiled JAR file :</strong></p>
<p>ejbc CalcJar.jar CalcJar1.jar</p>
<p><strong>7  Step: Copy the compiled JAR file to myserver directory:</strong></em></p>
<p><em>copy CalcJar1.jar c:\weblogic \myserver</p>
<p><strong>8  Step: Deploy the bean: (run from start menu)</strong></p>
<p>start a weblogic 5.1.0 a Utilities a Edit Server Properties<br />
Use Search menu option to locate Weblogic EJB Demo Properties</p>
<p><strong>Write the following statement :</strong></p>
<p>c:\weblogic \myserver \CalcJar1.jar \<br />
<strong><br />
9  Step Run weblogic server (run from start menu )</strong></p>
<p>start weblogic 5.1.0 a weblogic Server</p>
<p>Observer the server displays: 1 deployed. 0 failed to deploy</p>
<p>What we have done so far is, we have created the bean and deployed in weblogic server. Now<br />
we can call and use it.</p>
<p><strong>10 Step: to write the client program, compile and run it to call the bean:</strong></p>
<p>//Observe the change in the implementation of business methods</p>
<p>import javax.ejb.*;<br />
import javax.rmi.*;<br />
import javax.naming.*;<br />
import java.util.*;<br />
class CalcClient<br />
{<br />
public static void main(String args[] ) throws Exception<br />
{<br />
Properties p=new Properties();<br />
p.put(Context.INITIAL_CONTEXT_FACTORY, &#8221; weblogic.jndi.T#InitialContextFactory&#8221;);<br />
p.put(Context.PROVIDER_RUL, &#8220;t3://local:7001&#8243;);<br />
//InitialContext() method throws javax.naming.NamingException<br />
Context ctx = new InitialContext(p);<br />
CalcHome chome = (calcHome) ctx.lookup(&#8221;SNRao&#8221;);<br />
//create() method throws RemoteException and javax.ejb.CreateException<br />
Calc rref = chome.create();</p>
<p>//observe change here<br />
int sum = rref.add(20,5);<br />
int diff = rref.sub();</p>
<p>System.out.println(&#8221;sum :&#8221;+sum);<br />
System.out.println(&#8221;Diff : &#8220;+diff);<br />
}<br />
}</em><br />
<h3>Random Posts</h3>
<ul class="related_post">
<li><a href="http://www.bestjavainterviewquestions.com/write-a-short-notes-on-tomcat/" title="Write a short notes on TOMCAT">Write a short notes on TOMCAT (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/life-cycle-of-applet/" title="Life cycle of Applet">Life cycle of Applet (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/write-a-short-notes-on-vectors/" title="Write a Short notes on Vectors">Write a Short notes on Vectors (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/define-local-interfaces/" title="Define Local Interfaces">Define Local Interfaces (0)</a></li>
<li><a href="http://www.bestjavainterviewquestions.com/jsp-interview-questions/" title="JSP Interview Questions">JSP Interview Questions (0)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bestjavainterviewquestions.com/creating-a-stateful-session-bean/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
