<?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, 30 Jul 2010 06:00:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.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><a href="http://www.bestjavainterviewquestions.com/what-is-finalizer-methods/" title="What is Finalizer Methods"><img src="Array" alt="What is Finalizer Methods" /></a></li><li><a href="http://www.bestjavainterviewquestions.com/explain-briefly-about-serialization/" title="Explain Briefly about Serialization"><img src="Array" alt="Explain Briefly about Serialization" /></a></li><li><a href="http://www.bestjavainterviewquestions.com/what-is-unicode-system/" title="What is unicode System"><img src="Array" alt="What is unicode System" /></a></li><li><a href="http://www.bestjavainterviewquestions.com/java-rmi-interview-questions/" title="Java RMI Interview questions"><img src="Array" alt="Java RMI Interview questions" /></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"><img src="Array" alt="Difference between a break statement and a continue statement" /></a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.bestjavainterviewquestions.com/479/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
