<?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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Java Interview Questions &#187; What is Thread Safe Servlet</title>
	<atom:link href="http://www.bestjavainterviewquestions.com/category/java-interview-questions/what-is-thread-safe-servlet/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>
	<lastBuildDate>Fri, 03 Feb 2012 10:23:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>What is Thread Safe Servlet</title>
		<link>http://www.bestjavainterviewquestions.com/479/</link>
		<comments>http://www.bestjavainterviewquestions.com/479/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 16:11:23 +0000</pubDate>
		<dc:creator>Ramakrishna</dc:creator>
				<category><![CDATA[What is Thread Safe Servlet]]></category>
		<category><![CDATA[thread-safe servlet]]></category>

		<guid isPermaLink="false">http://www.bestjavainterviewquestions.com/?p=479</guid>
		<description><![CDATA[&#8211;&#62; A thread-safe servlet is one that works correctly when more than one thread is running at  the same time. &#8211;&#62; To synchronize access to a method or a block of code, you can use the synchronized  keyword. Then, only one thread at a time can access the code in the block or the method. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>&#8211;&gt; </strong> A <em>thread-safe servlet</em> is one that works correctly when more than one thread is running at  the same time.</p>
<p><strong>&#8211;&gt; </strong>To <em>synchronize</em> access to a method or a block of code, you can use the synchronized  keyword. Then, only one thread at a time can access the code in the block or the method.</p>
<p><strong>&#8211;&gt; </strong> To prevent multiple threads from accessing the code in a servlet, you can implement the  <em>SingleThreadModel interface</em>. This is a tagging interface that prevents two threads from  accessing the servlet’s service method at the same time.</p>
<h2  class="related_post_title">Random Posts</h2><ul class="related_post"><li>September 30, 2008 -- <a href="http://www.bestjavainterviewquestions.com/define-precompile-of-jsp-page/" title="Define Precompile of Jsp page">Define Precompile of Jsp page</a> (0)</li><li>July 1, 2008 -- <a href="http://www.bestjavainterviewquestions.com/java-thread-interview-questions/" title="Java Thread Interview Questions">Java Thread Interview Questions</a> (1)</li><li>September 22, 2008 -- <a href="http://www.bestjavainterviewquestions.com/what-is-default-package-in-java/" title="What is Default Package in Java">What is Default Package in Java</a> (0)</li><li>July 15, 2008 -- <a href="http://www.bestjavainterviewquestions.com/springs-interview-questions-3/" title="Springs Interview Questions">Springs Interview Questions</a> (1)</li><li>September 17, 2008 -- <a href="http://www.bestjavainterviewquestions.com/mapping-files-in-hibernate/" title="Mapping Files in Hibernate">Mapping Files in Hibernate</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.bestjavainterviewquestions.com/479/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

