<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-6109527685507475247</atom:id><lastBuildDate>Mon, 28 Nov 2011 01:22:52 +0000</lastBuildDate><category>Web Editor</category><category>InstallUtil.exe</category><category>VS 2005</category><category>WYSIWYG</category><category>Service Invisible</category><category>FileDownloading</category><category>DropdownList</category><category>Hibernate</category><category>SQL Server 2005</category><category>Remote Debugging</category><category>OpenSaveDialogbox</category><category>Java</category><category>IIS</category><category>JDBC</category><category>ASP.NET</category><category>C#</category><category>Image Resize</category><category>html-editor</category><category>Thumbnail Generator</category><category>ORM</category><category>NHibernate</category><category>Tooltip</category><category>.net</category><category>Window Services</category><category>JavaScript</category><category>Image Upload</category><category>Validator Controls</category><title>Be Architect (www.hyperlinksolutions.net)</title><description>.NET, C#, ASP.NET, NHibernate, SQLServer</description><link>http://barchitect.blogspot.com/</link><managingEditor>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</managingEditor><generator>Blogger</generator><openSearch:totalResults>28</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/BeArchitect" /><feedburner:info uri="bearchitect" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>BeArchitect</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-1133427923616266634</guid><pubDate>Mon, 29 Aug 2011 06:28:00 +0000</pubDate><atom:updated>2011-08-28T23:28:36.985-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">InstallUtil.exe</category><category domain="http://www.blogger.com/atom/ns#">Service Invisible</category><category domain="http://www.blogger.com/atom/ns#">Window Services</category><title>Windows Service InstallUtil - Service not showing up in services list</title><description>&lt;span class="Apple-style-span" style="color: #333333; font-family: Georgia, serif; font-size: 13px; line-height: 20px;"&gt;Another simple issue that took me a while to figure out what's happening. Well, have built many windows services and used both manual and install packages to deploy them. Recently, was using InstallUtil and the service didn't show up in the services list. The reason - I already had services window open. Closed it and reinstalled using installutil - there you go, it shows up. :P&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Georgia, serif; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="line-height: 20px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6109527685507475247-1133427923616266634?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/X1t-2nUQQ8g" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/X1t-2nUQQ8g/windows-service-installutil-service-not.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><thr:total>0</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2011/08/windows-service-installutil-service-not.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-4577338469202736265</guid><pubDate>Fri, 16 Jul 2010 07:33:00 +0000</pubDate><atom:updated>2010-07-16T00:33:14.362-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">html-editor</category><category domain="http://www.blogger.com/atom/ns#">Web Editor</category><category domain="http://www.blogger.com/atom/ns#">WYSIWYG</category><title>WYSIWYG Opensource HTML Editors</title><description>Hope you all like this :)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: normal; line-height: 23px;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;h2 style="border-bottom-color: rgb(235, 235, 235); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: inherit; font-size: 2.8em; font-style: inherit; font-weight: normal; font: normal normal normal 2em/normal Arial, Georgia, 'Times New Roman', Times, serif; letter-spacing: -2.2px; margin-bottom: 0px; margin-left: 5px; margin-right: 15px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 5px; padding-right: 15px; padding-top: 10px; vertical-align: baseline;"&gt;&lt;a href="http://www.findbestopensource.com/product/ckeditor" style="border-bottom-style: none; border-bottom-width: 1px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; color: #444444; font-family: inherit; font-size: 28px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;CKEditor&lt;/a&gt;&lt;/h2&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CKEditor is a text editor to be used inside web pages. It's a WYSIWYG editor, which means that the text being edited on it looks as similar as possible to the results users have when publishing it. It brings to the web common editing features found on desktop editing applications like Microsoft Word and OpenOffice. It's an editor to be used inside web pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: normal; line-height: 23px;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;h2 style="border-bottom-color: rgb(235, 235, 235); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: inherit; font-size: 2.8em; font-style: inherit; font-weight: normal; font: normal normal normal 2em/normal Arial, Georgia, 'Times New Roman', Times, serif; letter-spacing: -2.2px; margin-bottom: 0px; margin-left: 5px; margin-right: 15px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 5px; padding-right: 15px; padding-top: 10px; vertical-align: baseline;"&gt;&lt;a href="http://www.findbestopensource.com/product/wymeditor" style="border-bottom-style: none; border-bottom-width: 1px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; color: #444444; font-family: inherit; font-size: 28px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Wymeditor&lt;/a&gt;&lt;/h2&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 23px;"&gt;WYMeditor is a web-based WYSIWYM (What You See Is What You Mean) XHTML editor (not WYSIWYG). WYMeditor has been created to generate perfectly structured XHTML strict code, to conform to the W3C XHTML specifications and to facilitate further processing by modern applications.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 23px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 23px;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style="border-bottom-color: rgb(235, 235, 235); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: inherit; font-size: 2.8em; font-style: inherit; font-weight: normal; font: normal normal normal 2em/normal Arial, Georgia, 'Times New Roman', Times, serif; letter-spacing: -2.2px; margin-bottom: 0px; margin-left: 5px; margin-right: 15px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 5px; padding-right: 15px; padding-top: 10px; vertical-align: baseline;"&gt;&lt;a href="http://www.findbestopensource.com/product/tinymce" style="border-bottom-style: none; border-bottom-width: 1px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; color: #444444; font-family: inherit; font-size: 28px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;TinyMCE&lt;/a&gt;&lt;/h2&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 15px;"&gt;TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances. TinyMCE is very easy to integrate.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 15px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 15px;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px;"&gt;&lt;h2 style="border-bottom-color: rgb(235, 235, 235); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: inherit; font-size: 2.8em; font-style: inherit; font-weight: normal; font: normal normal normal 2em/normal Arial, Georgia, 'Times New Roman', Times, serif; letter-spacing: -2.2px; margin-bottom: 0px; margin-left: 5px; margin-right: 15px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 5px; padding-right: 15px; padding-top: 10px; vertical-align: baseline;"&gt;&lt;a href="http://www.findbestopensource.com/product/niceedit" style="border-bottom-style: none; border-bottom-width: 1px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; color: #444444; font-family: inherit; font-size: 28px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;NiceEdit&lt;/a&gt;&lt;/h2&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 15px;"&gt;NicEdit is a Lightweight, Cross Platform, Inline Content Editor to allow easy editing of web site content on the fly in the browser. NicEdit Javascript integrates into any site in seconds to make any element/div editable or convert standard textareas to rich text editing.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 15px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 15px;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px;"&gt;&lt;h2 style="border-bottom-color: rgb(235, 235, 235); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: inherit; font-size: 2.8em; font-style: inherit; font-weight: normal; font: normal normal normal 2em/normal Arial, Georgia, 'Times New Roman', Times, serif; letter-spacing: -2.2px; margin-bottom: 0px; margin-left: 5px; margin-right: 15px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 5px; padding-right: 15px; padding-top: 10px; vertical-align: baseline;"&gt;&lt;a href="http://www.findbestopensource.com/product/xinha" style="border-bottom-style: none; border-bottom-width: 1px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; color: #444444; font-family: inherit; font-size: 28px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Xinha&lt;/a&gt;&lt;/h2&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: 15px;"&gt;Xinha (pronounced like Xena, the Warrior Princess) is a powerful WYSIWYG HTML editor component that works in all current browsers. Its configurabilty and extensibility make it easy to build just the right editor for multiple purposes, from a restricted mini-editor for one database field to a full-fledged website editor. Its makes it an ideal candidate for integration into any kind of project.&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6109527685507475247-4577338469202736265?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/cYZaW0pVWkY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/cYZaW0pVWkY/wysiwyg-opensource-html-editors.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><thr:total>0</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2010/07/wysiwyg-opensource-html-editors.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-3412500178269278263</guid><pubDate>Mon, 03 May 2010 10:38:00 +0000</pubDate><atom:updated>2010-05-03T22:14:25.183-07:00</atom:updated><title>Microsoft Visual Studio 2010 Highlights</title><description>&lt;strong&gt;Here is a list of links that can help to about Visual Studio 2010 features.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb385832%28VS.100%29.aspx" target="_blank" __vstttracked="1"&gt;What's New&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.microsoft.com/feeds/msdn/en-us/teamsystem/MSFTVSblogs.opml" target="_blank" __vstttracked="1"&gt;Visual Studio Product Group Blogs&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/jeffbe/archive/2010/01/18/rangers-ship-vs2010-readiness-materials.aspx" target="_blank" __vstttracked="1"&gt;Visual Studio ALM Rangers 2010 readiness materials&lt;/a&gt;&lt;br /&gt;&lt;a href="http://channel9.msdn.com/shows/10-4/" target="_blank" __vstttracked="1"&gt;10-4 video shows&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/bharry/archive/2009/10/21/upgrading-from-tfs-2005-2008-to-tfs-2010.aspx" target="_blank" __vstttracked="1"&gt;Upgrading from TFS 2005/2008 to TFS 2010&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/bharry/archive/2009/04/08/team-system-2010-overview.aspx" target="_blank" __vstttracked="1"&gt;Team System 2010 Overview&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/bharry/archive/2009/04/19/team-foundation-server-2010-key-concepts.aspx" target="_blank"&gt;Team Foundation Server 2010 Key Concepts&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/bharry/archive/2009/05/19/tfs-2010-project-management.aspx" target="_blank" __vstttracked="1"&gt;TFS 2010 Project Management&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/bharry/archive/2009/05/18/tfs-2010-work-item-tracking.aspx" target="_blank" __vstttracked="1"&gt;TFS 2010 Work Item Tracking&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/ms_joc/archive/2009/05/27/dev10-beta1-free-at-last.aspx" target="_blank" __vstttracked="1"&gt;Debugging and Profiling features in Visual Studio 2010&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/profiler/archive/2009/06/10/write-faster-code-with-vs-2010-profiler.aspx" target="_blank" __vstttracked="1"&gt;Write Faster Code with VS 2010 Profiler&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/dalaqab/archive/2009/12/28/multi-tier-performance-analysis.aspx" target="_blank" __vstttracked="1"&gt;Multi-Tier Performance Analysis&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/hshafi/archive/2009/05/18/visual-studio-2010-beta-1-parallel-performance-tools.aspx" target="_blank" __vstttracked="1"&gt;Visual Studio 2010 Beta 1: Parallel Performance Tools Overview&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/bharry/archive/2005/11/13/492258.aspx" target="_blank" __vstttracked="1"&gt;A Branching and Merging Primer&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/bharry/archive/2008/01/16/new-features-to-understand-branching-merging.aspx" target="_blank" __vstttracked="1"&gt;New features to understand branching/merging&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/jasonz/archive/2010/02/02/favorite-vs2010-features-dependency-graphs-and-dgml.aspx" target="_blank" __vstttracked="1"&gt;Favorite VS2010 Features: Dependency Graphs and DGML&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Web and Load Tests&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/edglas/archive/2009/05/18/dev10-beta-1-available.aspx" target="_blank" __vstttracked="1"&gt;Web and Load Test features in Visual Studio 2010&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/edglas/archive/2009/10/20/introducing-the-microsoft-visual-studio-load-test-virtual-user-pack-2010.aspx" target="_blank" __vstttracked="1"&gt;Introducing the Microsoft Visual Studio Load Test Virtual User Pack 2010&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/edglas/archive/2009/10/19/using-the-virtual-user-activity-chart-to-understand-the-vs-load-engine.aspx" target="_blank" __vstttracked="1"&gt;Using The Virtual User Activity Chart to Understand the VS Load Engine&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/slumley/archive/2009/06/09/vsts-2010-feature-load-test-virtual-user-activity-visualization.aspx" target="_blank" __vstttracked="1"&gt;VSTS 2010 Feature: Load test virtual user activity visualization&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Lab Management&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/lab_management/archive/2010/02/08/what-is-new-for-visual-studio-lab-management-2010-rc.aspx" target="_blank" __vstttracked="1"&gt;What is new for Visual Studio Lab Management 2010 RC&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/lab_management/archive/2009/11/18/Getting-started-with-Lab-Management-_2800_Part-1_2900_.aspx" target="_blank" __vstttracked="1"&gt;Getting started with Lab Management (Part 1)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/lab_management/archive/2009/11/18/getting-started-with-lab-management-part-2.aspx" target="_blank" __vstttracked="1"&gt;Getting started with Lab Management (Part 2)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/lab_management/archive/2009/11/20/getting-started-with-lab-management-part-3.aspx" target="_blank" __vstttracked="1"&gt;Getting started with Lab Management (Part 3)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/lab_management/archive/2009/11/23/getting-started-with-lab-management-part-4.aspx" target="_blank" __vstttracked="1"&gt;Getting started with Lab Management (Part 4)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/lab_management/archive/2009/10/19/enable-lab-management-features-for-existing-team-projects-in-beta2.aspx" target="_blank" __vstttracked="1"&gt;Enable Lab Management features for existing Team Projects in Beta2&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/sravanthir/archive/2010/01/11/customization-of-build-deploy-and-test-workflow-of-lab-management-2010.aspx" target="_blank" __vstttracked="1"&gt;Customization of End to End (E2E) Workflow of Visual Studio Lab Management 2010 Beta2&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Test Professional&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/amit_chatterjee/archive/2009/10/23/what-s-new-in-test-and-lab-management-in-vs-2010-beta-2.aspx" target="_blank" __vstttracked="1"&gt;What’s new in Test and Lab Management in VS 2010 Beta 2&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/vstsqualitytools/archive/2010/02/05/what-s-new-for-testing-tools-in-the-rc.aspx" target="_blank" __vstttracked="1"&gt;What’s New for Testing Tools in the RC?&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/edglas/archive/2009/05/19/elevating-the-role-of-the-tester-with-visual-studio-2010.aspx" target="_blank" __vstttracked="1"&gt;Elevating the Role of the Tester with Visual Studio 2010&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/anutthara/archive/2010/02/09/resources-for-visual-studio-2010-test-tools.aspx" target="_blank"&gt;Resources for Visual Studio 2010 Test Tools&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/anutthara/archive/2009/12/21/vs2010-demos-for-testing-tools-mtlm-cuit-and-related-features.aspx" target="_blank"&gt;VS2010 demos for testing tools – MTLM, CUIT and related features&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/amit_chatterjee/archive/2009/02/17/test-planning-using-camano.aspx" target="_blank" __vstttracked="1"&gt;Test planning using Camano&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/amit_chatterjee/archive/2009/03/28/remote-execution-and-data-collection.aspx" target="_blank" __vstttracked="1"&gt;Remote Execution and Data Collection&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/amit_chatterjee/archive/2009/04/11/diagnostic-data-adapters-changing-how-developers-and-testers-work-together-part-1-of-2-the-test-impact-collector.aspx" target="_blank" __vstttracked="1"&gt;Diagnostic Data Adapters: Changing how Developers and Testers work together (Part 1 of 2 - The Test Impact Collector)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/amit_chatterjee/archive/2009/04/21/diagnostic-data-adapters-changing-how-developers-and-testers-work-together-part-2-of-2-the-diagnostic-trace-collector.aspx" target="_blank" __vstttracked="1"&gt;Diagnostic Data Adapters: Changing how Developers and Testers work together (Part 2 of 2 - The Diagnostic Trace Collector)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/amit_chatterjee/archive/2009/02/28/the-microsoft-test-runner-innovation-for-the-manual-tester.aspx" target="_blank" __vstttracked="1"&gt;The Microsoft Test Runner – innovation for the Generalist Tester&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/vstsqualitytools/archive/2010/01/07/platform-support-for-coded-ui-test-and-fast-forward-feature-of-test-runner.aspx" target="_blank" __vstttracked="1"&gt;Platform Support for Coded UI Test (and Fast Forward feature of Test Runner)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/amit_chatterjee/archive/2009/03/14/coded-ui-test.aspx" target="_blank" __vstttracked="1"&gt;Coded UI Test&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/densto/archive/2009/06/29/test-impact-walk-through.aspx" target="_blank" __vstttracked="1"&gt;Test Impact Walk-through&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;TFS API&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/taylaf/archive/2010/02/23/introducing-the-tfsconnection-tfsconfigurationserver-and-tfsteamprojectcollection-classes.aspx" target="_blank"&gt;Introducing the TfsConnection, TfsConfigurationServer and TfsTeamProjectCollection Classes&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Labels:&lt;/strong&gt; &lt;a href="http://www.kulov.net/blogs/martin/labels/Visual%20Studio%202010.html" rel="tag"&gt;Visual Studio 2010&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6109527685507475247-3412500178269278263?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/lPeo2CeP8Ow" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/lPeo2CeP8Ow/microsoft-visual-studio-2010-highlights.html</link><author>noreply@blogger.com (Muhammad Imran Khawar)</author><thr:total>0</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2010/05/microsoft-visual-studio-2010-highlights.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-4396592648592653503</guid><pubDate>Mon, 02 Nov 2009 20:44:00 +0000</pubDate><atom:updated>2009-11-02T12:55:07.314-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Image Resize</category><category domain="http://www.blogger.com/atom/ns#">Thumbnail Generator</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><category domain="http://www.blogger.com/atom/ns#">Image Upload</category><title>Uploading, Determining Size, Width and Height and Resizing Image Files with ASP.NET</title><description>Almost every web site/portal has image upload facility on its forms i.e either its a social networking site or buy/sell site. Also their is one common need of image resize which play a vital role in look n feel of your displayed items, because e.g if a product site has 10 items on a single page but image size of each items is defferent then that look very bad and unprofessional. So i started to find so existing code/library and come across below given wonderful article by Faisal Khan.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Title: &lt;a href="http://www.stardeveloper.com/articles/display.html?article=2003040501&amp;page=1"&gt;Uploading, Determining Size, Width and Height and Resizing Image Files with ASP.NET&lt;/a&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6109527685507475247-4396592648592653503?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/BTA_jS_2HHc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/BTA_jS_2HHc/uploading-determining-size-width-and.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><thr:total>0</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2009/11/uploading-determining-size-width-and.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-2907969239014008345</guid><pubDate>Sat, 03 Oct 2009 19:49:00 +0000</pubDate><atom:updated>2009-10-03T12:50:11.630-07:00</atom:updated><title>Win Xp: Set Permissions On Files Or Folders</title><description>Set permissions on files or folders (Windows XP, Windows 2000)&lt;br /&gt;&lt;br /&gt;To set permissions on individual files and on folders, you must use NTFS file system.&lt;br /&gt;NTFS file system provides features such as: Encrypt files, Compress a file or folder, Disk quotas and Set permissions on files or folders.&lt;br /&gt;To convert a drive (for example drive C) to NTFS go to command prompt and type&gt;&gt; convert C: /fs:ntfs &lt;br /&gt;Note that you cannot simply convert it back to FAT or FAT32.&lt;br /&gt;OK, enough &lt;br /&gt;1-By default, Windows does not display Security tab in files or folders Properties. To enable this feature go to Folder Options and clear “Use Simple File Sharing” check box in view tab.&lt;br /&gt;2- Right click on your file or folder and click Properties, click Security tab and set permissions. For additional permissions or inheritance information click on Advanced.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6109527685507475247-2907969239014008345?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/Lwujksw-oZI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/Lwujksw-oZI/win-xp-set-permissions-on-files-or.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><thr:total>0</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2009/10/win-xp-set-permissions-on-files-or.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-5279903786098546360</guid><pubDate>Wed, 23 Sep 2009 17:06:00 +0000</pubDate><atom:updated>2009-09-23T10:08:47.275-07:00</atom:updated><title>Show files and folder not working on Win XP</title><description>This Method is working perfectily &lt;br /&gt;&lt;br /&gt;Go to the following registry key: &lt;br /&gt;HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Adva­nced\Folder\Hidden\SHOWALL &lt;br /&gt;&lt;br /&gt;DELETE the value CheckedValue in the right window. (Its type should be REG_SZ and data should be 2.) &lt;br /&gt;&lt;br /&gt;Now create a new DWORD value called CheckedValue (same as above, except that the type is REG_DWORD). Modify the value data to 1 (0x00000001). &lt;br /&gt;&lt;br /&gt;This should let you change the "Hidden Files and Folders" option.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6109527685507475247-5279903786098546360?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/KguU034Cac8" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/KguU034Cac8/show-files-and-folder-not-working-on.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><thr:total>0</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2009/09/show-files-and-folder-not-working-on.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-409157846807930702</guid><pubDate>Mon, 27 Jul 2009 12:08:00 +0000</pubDate><atom:updated>2009-07-27T05:14:26.162-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">NHibernate</category><category domain="http://www.blogger.com/atom/ns#">Hibernate</category><title>hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect)</title><description>&lt;em&gt;This exception comes when ever any of your objects property have some invalid value i.e value that is not according to provided mapping of that object&lt;/em&gt;. e.g while handling optimistic concurrency if you didnt add Unsaved-value="-1" in your versin property i.e&lt;br /&gt;&lt;br /&gt;&lt;version name="Version" column="Version" type="Int64" unsaved-value="-1" /&gt;&lt;br /&gt;&lt;br /&gt;then it leads to  &lt;strong&gt;hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect)&lt;/strong&gt; &lt;br /&gt;because the requirment of version field is "-1" when in default state.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6109527685507475247-409157846807930702?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/DrpBcXuFHHI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/DrpBcXuFHHI/hibernatestaleobjectstateexception-row.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><thr:total>0</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2009/07/hibernatestaleobjectstateexception-row.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-6402137958949055596</guid><pubDate>Mon, 27 Jul 2009 11:53:00 +0000</pubDate><atom:updated>2009-07-27T05:08:08.083-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">NHibernate</category><category domain="http://www.blogger.com/atom/ns#">Hibernate</category><title>NHibernate: SqlDateTime overflow Issue on object Update</title><description>Yesterday i come across NHibernate SqlDateTime overflow exception when ever i update my object. During debug i all datetime fields have there default values/entered values but when i Flush my session it throws this noughty exception :)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="font-size:85%;"&gt;Data.SqlTypes.SqlTypeException with the message "SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.".&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;after alot of findings finally i found the reason behind this. Actually  I didn't map that column as a &lt;strong&gt;Nullable&lt;datetime&gt;&lt;/strong&gt; OR &lt;strong&gt;DateTime?&lt;/strong&gt;  but just as DateTime.  and when ever NHibernate read the row from DB its default value is null which NHibernate remembers. When the Object is rehydrated by NHibernate the Date is set to the value DateTime.MinValue. When the Session is synchronized with the db, NHibernate assumes that something has changed, because the currentState and the previousState are different and tries to update the row. Wich in turn fails, because DateTime.MinValue won't fit into a SqlServer datetime column.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;The solution:&lt;/strong&gt;&lt;br /&gt;Make your datetime nullable either by putting &lt;strong&gt;?&lt;/strong&gt; at end of Datetime like &lt;strong&gt;DateTime?&lt;/strong&gt; or &lt;strong&gt;Nullable&amp;lt;datetime&amp;gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;e.g &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;[Property(Name = "CreatedDate", Column = "CreatedDate", NotNull = false)]//NotNull=false means null is allowed.&lt;br /&gt;private DateTime? _createdDate = DateTime.Now;&lt;br /&gt;&lt;br /&gt;I prefer using DateTime?  rather then Nullable&lt;datetime&gt; because that leades to change the date type where ever used.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6109527685507475247-6402137958949055596?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/p9g9vk77D34" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/p9g9vk77D34/nhibernate-sqldatetime-overflow-issue.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><thr:total>0</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2009/07/nhibernate-sqldatetime-overflow-issue.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-1548454451258818171</guid><pubDate>Thu, 25 Jun 2009 07:17:00 +0000</pubDate><atom:updated>2009-06-25T00:25:52.732-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">VS 2005</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><category domain="http://www.blogger.com/atom/ns#">Remote Debugging</category><category domain="http://www.blogger.com/atom/ns#">C#</category><title>Remote Debugging with ASP.NET</title><description>As my office application (Asp.net based) is getting bigger day by day and took time when we run application in debug mode, so i decided to move my development web server to a central machine and use the REMOTE DEBUGGING feature of VS 2005.&lt;br /&gt;&lt;br /&gt;here is wonderful article by Microsoft support team.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://support.microsoft.com/kb/910448"&gt;http://support.microsoft.com/kb/910448&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;and another from MSDN&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/233w9kd4.aspx"&gt;http://msdn.microsoft.com/en-us/library/233w9kd4.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;will update and share my experience as i complete with the setup :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6109527685507475247-1548454451258818171?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/XUSMOcX6t1I" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/XUSMOcX6t1I/remote-debugging-with-aspnet.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><thr:total>0</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2009/06/remote-debugging-with-aspnet.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-223728004760066016</guid><pubDate>Tue, 21 Apr 2009 17:52:00 +0000</pubDate><atom:updated>2009-05-11T07:02:35.146-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">.net</category><category domain="http://www.blogger.com/atom/ns#">FileDownloading</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><category domain="http://www.blogger.com/atom/ns#">OpenSaveDialogbox</category><category domain="http://www.blogger.com/atom/ns#">C#</category><title>File Downloading in ASP.NET</title><description>&lt;br /&gt;Few days back i come accross a problem of file downloading in asp.net. In my situation i have to download any type of file which is uploaded in my application.so when i upload file i save its path and content type in database.&lt;br /&gt;&lt;br /&gt;Now when you download a file you need to change header information of page and here is the solution that works for me.&lt;br /&gt;&lt;br /&gt;&lt;pre class="javascript" name="code"&gt;&lt;br /&gt;System.IO.FileInfo file = new System.IO.FileInfo(strURL);&lt;br /&gt;Response.Clear();&lt;br /&gt;Response.AppendHeader("Content-Disposition", "attachment; filename=" + file.Name);&lt;br /&gt;Response.AppendHeader("Content-Length", file.Length.ToString());&lt;br /&gt;Response.ContentType = args[2]; //content type from database&lt;br /&gt;Response.WriteFile(strURL);&lt;br /&gt;Response.Flush();&lt;br /&gt;Response.End();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;By default the download dialog box will give Open,Save,Cancel buttons but if you want to disable Open/Save then add this line in your Html &gt; Head section&lt;br /&gt;&lt;br /&gt;&lt;pre class="html" name="code"&gt;&lt;br /&gt;&amp;lt;meta name="DownloadOptions" content="noopennosave" /&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6109527685507475247-223728004760066016?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/-jj6MF0r5vA" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/-jj6MF0r5vA/file-downloading-in-aspnet.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><thr:total>0</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2009/04/file-downloading-in-aspnet.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-3941251482363952838</guid><pubDate>Sat, 07 Feb 2009 13:49:00 +0000</pubDate><atom:updated>2009-05-12T05:05:56.096-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Java</category><category domain="http://www.blogger.com/atom/ns#">.net</category><category domain="http://www.blogger.com/atom/ns#">NHibernate</category><category domain="http://www.blogger.com/atom/ns#">JDBC</category><category domain="http://www.blogger.com/atom/ns#">Hibernate</category><category domain="http://www.blogger.com/atom/ns#">ORM</category><title>Hibernate Interview questions Part 3</title><description>&lt;span class="que"&gt;&lt;span class="queIndex"&gt;31.&lt;/span&gt;What is the advantage of&lt;br /&gt;Hibernate over jdbc? &lt;/span&gt;Hibernate Vs. JDBC :-&lt;br /&gt;&lt;br /&gt;&lt;table class="mytable" style="border: 1px solid rgb(173, 210, 226);" cellpadding="6" cellspacing="0"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;th class="m_tit1" scope="col"&gt;JDBC &lt;/th&gt;&lt;br /&gt;&lt;th class="m_tit1" scope="col"&gt;Hibernate &lt;/th&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td class="tb" width="50%"&gt;With JDBC, &lt;a class="kLink" id="KonaLink0" style="position: static; text-decoration: underline ! important;" href="http://www.developersbook.com/hibernate/interview-questions/hibernate-interview-questions-faqs-3.php#" target="_top"&gt;&lt;span style="font-weight: 400; color: rgb(242, 101, 34) ! important;font-size:13;" &gt;&lt;span class="kLink" style="font-weight: 400; color: rgb(242, 101, 34) ! important;font-size:13;" &gt;developer&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;has to write code to map an object model's data representation to a relational&lt;br /&gt;data model and its corresponding database schema. &lt;/td&gt;&lt;br /&gt;&lt;td class="tb"&gt;Hibernate is flexible and powerful ORM solution to map Java classes&lt;br /&gt;to database tables. Hibernate itself takes care of this mapping using XML files&lt;br /&gt;so developer does not need to write code for this. &lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td class="tb"&gt;With JDBC, the automatic mapping of Java objects with database&lt;br /&gt;tables and vice versa conversion is to be taken care of by the developer&lt;br /&gt;manually with lines of code. &lt;/td&gt;&lt;br /&gt;&lt;td class="tb"&gt;Hibernate provides transparent persistence and developer does not&lt;br /&gt;need to write code explicitly to map database tables tuples to &lt;a class="kLink" id="KonaLink1" style="position: static; text-decoration: underline ! important;" href="http://www.developersbook.com/hibernate/interview-questions/hibernate-interview-questions-faqs-3.php#" target="_top"&gt;&lt;span style="font-weight: 400; color: rgb(242, 101, 34) ! important;font-size:13;" &gt;&lt;span class="kLink" style="font-weight: 400; color: rgb(242, 101, 34) ! important;font-size:13;" &gt;application&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;objects during interaction with RDBMS. &lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td class="tb"&gt;JDBC supports only native Structured Query Language (SQL).&lt;br /&gt;Developer has to find out the efficient way to access database, i.e. to select&lt;br /&gt;effective query from a number of queries to perform same task. &lt;/td&gt;&lt;br /&gt;&lt;td class="tb"&gt;Hibernate provides a powerful query language Hibernate Query&lt;br /&gt;Language (independent from type of database) that is expressed in a familiar SQL&lt;br /&gt;like syntax and includes full support for polymorphic queries. Hibernate also&lt;br /&gt;supports native &lt;a class="kLink" id="KonaLink2" style="position: static; text-decoration: underline ! important;" href="http://www.developersbook.com/hibernate/interview-questions/hibernate-interview-questions-faqs-3.php#" target="_top"&gt;&lt;span style="font-weight: 400; color: rgb(242, 101, 34) ! important;font-size:13;" &gt;&lt;span class="kLink" style="font-weight: 400; color: rgb(242, 101, 34) ! important;font-size:13;" &gt;SQL&lt;br /&gt;&lt;/span&gt;&lt;span class="kLink" style="font-weight: 400; color: rgb(242, 101, 34) ! important;font-size:13;" &gt;statements&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt;It also selects an effective way to perform a database manipulation task for an&lt;br /&gt;application. &lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td class="tb"&gt;Application using JDBC to handle persistent data (database tables)&lt;br /&gt;having database specific code in large amount. The code written to map table&lt;br /&gt;data to application objects and vice versa is actually to map table fields to&lt;br /&gt;object properties. As table changed or database changed then it’s essential to&lt;br /&gt;change object structure as well as to change code written to map&lt;br /&gt;table-to-object/object-to-table. &lt;/td&gt;&lt;br /&gt;&lt;td class="tb"&gt;Hibernate provides this mapping itself. The actual mapping between&lt;br /&gt;tables and application objects is done in XML files. If there is change in&lt;br /&gt;Database or in any table then the only need to change XML file properties.&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td class="tb"&gt;With JDBC, it is developer’s responsibility to handle JDBC result&lt;br /&gt;set and convert it to Java objects through code to use this persistent data in&lt;br /&gt;application. So with JDBC, mapping between Java objects and database tables is&lt;br /&gt;done manually. &lt;/td&gt;&lt;br /&gt;&lt;td class="tb"&gt;Hibernate reduces lines of code by maintaining object-table mapping&lt;br /&gt;itself and returns result to application in form of Java objects. It relieves &lt;a class="kLink" id="KonaLink3" style="position: static; text-decoration: underline ! important;" href="http://www.developersbook.com/hibernate/interview-questions/hibernate-interview-questions-faqs-3.php#" target="_top"&gt;&lt;span style="font-weight: 400; color: rgb(242, 101, 34) ! important;font-size:13;" &gt;&lt;span class="kLink" style="font-weight: 400; color: rgb(242, 101, 34) ! important;font-size:13;" &gt;programmer&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;from manual handling of persistent data, hence reducing the development time and&lt;br /&gt;maintenance cost. &lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td class="tb"&gt;With JDBC, caching is maintained by hand-coding. &lt;/td&gt;&lt;br /&gt;&lt;td class="tb"&gt;Hibernate, with Transparent Persistence, cache is set to&lt;br /&gt;application work space. Relational tuples are moved to this cache as a result of&lt;br /&gt;query. It improves performance if client application reads same data many times&lt;br /&gt;for same write. Automatic Transparent Persistence allows the developer to&lt;br /&gt;concentrate more on business logic rather than this application code. &lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td class="tb"&gt;In JDBC there is no check that always every user has updated data.&lt;br /&gt;This check has to be added by the developer. &lt;/td&gt;&lt;br /&gt;&lt;td class="tb"&gt;Hibernate enables developer to define version type field to&lt;br /&gt;application, due to this defined field Hibernate updates version field of&lt;br /&gt;database table every time relational tuple is updated in form of Java class&lt;br /&gt;object to that table. So if two users retrieve same tuple and then modify it and&lt;br /&gt;one user save this modified tuple to database, version is automatically updated&lt;br /&gt;for this tuple by Hibernate. When other user tries to save updated tuple to&lt;br /&gt;database then it does not allow saving it because this user does not have&lt;br /&gt;updated data. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;32.What are the Collection types in&lt;br /&gt;Hibernate ?&lt;br /&gt;&lt;br /&gt;* Bag&lt;br /&gt;* Set&lt;br /&gt;* List&lt;br /&gt;* Array&lt;br /&gt;*&lt;br /&gt;Map&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;33.What are the ways to express joins in HQL?&lt;br /&gt;&lt;br /&gt;HQL provides&lt;br /&gt;four ways of expressing (inner and outer) joins:-&lt;br /&gt;&lt;br /&gt;* An implicit&lt;br /&gt;association join&lt;br /&gt;* An ordinary join in the FROM clause&lt;br /&gt;* A fetch join in&lt;br /&gt;the FROM clause.&lt;br /&gt;* A theta-style join in the WHERE&lt;br /&gt;clause.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;34.Define cascade and inverse option in one-many&lt;br /&gt;mapping?&lt;br /&gt;&lt;br /&gt;cascade - enable operations to cascade to child&lt;br /&gt;entities.&lt;br /&gt;cascade="allnonesave-updatedeleteall-delete-orphan"&lt;br /&gt;&lt;br /&gt;inverse&lt;br /&gt;- mark this collection as the "inverse" end of a bidirectional&lt;br /&gt;association.&lt;br /&gt;inverse="truefalse"&lt;br /&gt;Essentially "inverse" indicates which&lt;br /&gt;end of a relationship should be ignored, so when persisting a parent who has a&lt;br /&gt;collection of children, should you ask the parent for its list of children, or&lt;br /&gt;ask the children who the parents are?&lt;br /&gt;&lt;br /&gt;35.What is Hibernate&lt;br /&gt;proxy?&lt;br /&gt;&lt;br /&gt;The proxy attribute enables lazy initialization of persistent&lt;br /&gt;instances of the class. Hibernate will initially return CGLIB proxies which&lt;br /&gt;implement the named interface. The actual persistent object will be loaded when&lt;br /&gt;a method of the proxy is invoked.&lt;br /&gt;&lt;br /&gt;36.How can Hibernate be configured to&lt;br /&gt;access an instance variable directly and not through a setter method ?&lt;br /&gt;&lt;br /&gt;By&lt;br /&gt;mapping the property with access="field" in Hibernate metadata. This forces&lt;br /&gt;hibernate to bypass the setter method and access the instance variable directly&lt;br /&gt;while initializing a newly loaded object.&lt;br /&gt;&lt;br /&gt;37.How can a whole class be&lt;br /&gt;mapped as immutable?&lt;br /&gt;&lt;br /&gt;Mark the class as mutable="false" (Default is&lt;br /&gt;true),. This specifies that instances of the class are (not) mutable. Immutable&lt;br /&gt;classes, may not be updated or deleted by the application.&lt;br /&gt;&lt;br /&gt;38.What is the&lt;br /&gt;use of dynamic-insert and dynamic-update attributes in a class&lt;br /&gt;mapping?&lt;br /&gt;&lt;br /&gt;Criteria is a simplified API for retrieving entities by&lt;br /&gt;composing Criterion objects. This is a very convenient approach for&lt;br /&gt;functionality like "search" screens where there is a variable number of&lt;br /&gt;conditions to be placed upon the result set.&lt;br /&gt;&lt;br /&gt;* dynamic-update (defaults&lt;br /&gt;to false): Specifies that UPDATE SQL should be generated at runtime and contain&lt;br /&gt;only those columns whose values have changed&lt;br /&gt;* dynamic-insert (defaults to&lt;br /&gt;false): Specifies that INSERT SQL should be generated at runtime and contain&lt;br /&gt;only the columns whose values are not null.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;39.What do you mean by&lt;br /&gt;fetching strategy ?&lt;br /&gt;&lt;br /&gt;A fetching strategy is the strategy Hibernate will&lt;br /&gt;use for retrieving associated objects if the application needs to navigate the&lt;br /&gt;association. Fetch strategies may be declared in the O/R mapping metadata, or&lt;br /&gt;over-ridden by a particular HQL or Criteria query.&lt;br /&gt;&lt;br /&gt;40.What is automatic&lt;br /&gt;dirty checking?&lt;br /&gt;&lt;br /&gt;Automatic dirty checking is a feature that saves us the&lt;br /&gt;effort of explicitly asking Hibernate to update the database when we modify the&lt;br /&gt;state of an object inside a transaction.&lt;br /&gt;&lt;br /&gt;41.What is transactional&lt;br /&gt;write-behind?&lt;br /&gt;&lt;br /&gt;Hibernate uses a sophisticated algorithm to determine an&lt;br /&gt;efficient ordering that avoids database foreign key constraint violations but is&lt;br /&gt;still sufficiently predictable to the user. This feature is called transactional&lt;br /&gt;write-behind.&lt;br /&gt;People who read this also read:&lt;br /&gt;JSP Interview&lt;br /&gt;Questions&lt;br /&gt;Tibco Questions&lt;br /&gt;webMethods Certification&lt;br /&gt;Hibernate Interview&lt;br /&gt;Questions&lt;br /&gt;XML Questions&lt;br /&gt;&lt;br /&gt;42.What are Callback&lt;br /&gt;interfaces?&lt;br /&gt;&lt;br /&gt;Callback interfaces allow the application to receive a&lt;br /&gt;notification when something interesting happens to an object—for example, when&lt;br /&gt;an object is loaded, saved, or deleted. Hibernate applications don't need to&lt;br /&gt;implement these callbacks, but they're useful for implementing certain kinds of&lt;br /&gt;generic functionality.&lt;br /&gt;&lt;br /&gt;43.What are the types of Hibernate instance states&lt;br /&gt;?&lt;br /&gt;&lt;br /&gt;Three types of instance states:&lt;br /&gt;&lt;br /&gt;* Transient -The instance is not&lt;br /&gt;associated with any persistence context&lt;br /&gt;* Persistent -The instance is&lt;br /&gt;associated with a persistence context&lt;br /&gt;* Detached -The instance was associated&lt;br /&gt;with a persistence context which has been closed – currently not&lt;br /&gt;associated&lt;br /&gt;&lt;br /&gt;&lt;span class="que"&gt;&lt;span class="queIndex"&gt;44.&lt;/span&gt;What are the&lt;br /&gt;differences between EJB 3.0 &amp;amp; Hibernate&lt;/span&gt;&lt;br /&gt;&lt;p class="content" align="justify"&gt;Hibernate Vs EJB 3.0 :-&lt;br /&gt;&lt;br /&gt;&lt;table class="mytable" style="border: 1px solid rgb(173, 210, 226);" cellpadding="6" cellspacing="0"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;th class="m_tit1" scope="col"&gt;Hibernate &lt;/th&gt;&lt;br /&gt;&lt;th class="m_tit1" scope="col"&gt;EJB 3.0 &lt;/th&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td class="tb"&gt;&lt;b&gt;Session&lt;/b&gt;–Cache or collection of loaded objects relating to a&lt;br /&gt;single unit of work &lt;/td&gt;&lt;br /&gt;&lt;td class="tb"&gt;&lt;b&gt;Persistence Context&lt;/b&gt;-Set of entities that can be managed by a&lt;br /&gt;given EntityManager is defined by a persistence unit &lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td class="tb"&gt;&lt;b&gt;XDoclet Annotations&lt;/b&gt; used to support Attribute Oriented&lt;br /&gt;Programming &lt;/td&gt;&lt;br /&gt;&lt;td class="tb"&gt;&lt;b&gt;Java 5.0 Annotations&lt;/b&gt; used to support Attribute Oriented&lt;br /&gt;Programming &lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td class="tb"&gt;&lt;b&gt;Defines HQL&lt;/b&gt; for expressing queries to the database &lt;/td&gt;&lt;br /&gt;&lt;td class="tb"&gt;&lt;b&gt;Defines EJB QL&lt;/b&gt; for expressing queries &lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td class="tb"&gt;&lt;b&gt;Supports Entity Relationships&lt;/b&gt; through mapping files and&lt;br /&gt;annotations in JavaDoc &lt;/td&gt;&lt;br /&gt;&lt;td class="tb"&gt;&lt;b&gt;Support Entity Relationships&lt;/b&gt; through Java 5.0 annotations&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td class="tb"&gt;&lt;b&gt;Provides a Persistence Manager API&lt;/b&gt; exposed via the Session,&lt;br /&gt;Query, Criteria, and Transaction API &lt;/td&gt;&lt;br /&gt;&lt;td class="tb"&gt;&lt;b&gt;Provides and Entity Manager Interface&lt;/b&gt; for managing CRUD&lt;br /&gt;operations for an Entity &lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td class="tb"&gt;&lt;b&gt;Provides callback support&lt;/b&gt; through lifecycle, interceptor,&lt;br /&gt;and validatable interfaces &lt;/td&gt;&lt;br /&gt;&lt;td class="tb"&gt;&lt;b&gt;Provides callback support&lt;/b&gt; through Entity Listener and&lt;br /&gt;Callback methods &lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td class="tb"&gt;&lt;b&gt;Entity Relationships are unidirectional&lt;/b&gt;. Bidirectional&lt;br /&gt;relationships are implemented by two unidirectional relationships &lt;/td&gt;&lt;br /&gt;&lt;td class="tb"&gt;&lt;b&gt;Entity Relationships are bidirectional or unidirectional&lt;/b&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;br /&gt;&lt;span class="que"&gt;&lt;span class="queIndex"&gt;45.&lt;/span&gt;What are the types of inheritance models in&lt;br /&gt;Hibernate?&lt;/span&gt;&lt;br /&gt;&lt;p class="content" align="justify"&gt;There are three types of inheritance models in&lt;br /&gt;Hibernate:&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Table per class hierarchy&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Table per subclass&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Table per concrete class&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/6109527685507475247-3941251482363952838?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/Hsnl--CeYB0" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/Hsnl--CeYB0/hibernate-interview-questions-part-3.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><thr:total>0</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2009/02/hibernate-interview-questions-part-3.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-3773687093109125126</guid><pubDate>Sat, 07 Feb 2009 13:40:00 +0000</pubDate><atom:updated>2009-05-12T05:06:50.720-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Java</category><category domain="http://www.blogger.com/atom/ns#">.net</category><category domain="http://www.blogger.com/atom/ns#">NHibernate</category><category domain="http://www.blogger.com/atom/ns#">JDBC</category><category domain="http://www.blogger.com/atom/ns#">Hibernate</category><category domain="http://www.blogger.com/atom/ns#">ORM</category><title>Hibernate Interview questions Part2</title><description>&lt;style&gt;&lt;br /&gt;v\:*         { behavior: url(#default#VML) }&lt;br /&gt;o\:*         { behavior: url(#default#VML) }&lt;br /&gt;.shape       { behavior: url(#default#VML) }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;span class="queindex"&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;16.&lt;/span&gt;&lt;/span&gt;&lt;span class="que"&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;What’s&lt;br /&gt;the difference between load() and get()? &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="content" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;load() vs. get() :-&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;br /&gt;&lt;table class="MsoNormalTable" style="border: 1pt solid rgb(173, 210, 226);" border="1" cellpadding="0" cellspacing="0"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;td style="border: medium none ; padding: 4.5pt;"&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;b&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;load() &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;br /&gt;&lt;td style="border: medium none ; padding: 4.5pt;"&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;b&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;get() &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td style="border: medium none ; padding: 4.5pt;"&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;Only use the &lt;/span&gt;&lt;br /&gt;&lt;code  style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-size:10;" &gt;load()&lt;/span&gt;&lt;/code&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;&lt;br /&gt;method if you are sure that the object exists. &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;br /&gt;&lt;td style="border: medium none ; padding: 4.5pt;"&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;If you are not sure that&lt;br /&gt;the object exists, then use one of the &lt;/span&gt;&lt;br /&gt;&lt;code  style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-size:10;" &gt;get()&lt;/span&gt;&lt;/code&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt; methods. &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td style="border: medium none ; padding: 4.5pt;"&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;code  style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-size:10;" &gt;load()&lt;/span&gt;&lt;/code&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;&lt;br /&gt;method will throw an exception if the unique id is not found in the&lt;br /&gt;database. &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;br /&gt;&lt;td style="border: medium none ; padding: 4.5pt;"&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;code  style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-size:10;" &gt;get()&lt;/span&gt;&lt;/code&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;&lt;br /&gt;method will return null if the unique id is not found in the database.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td style="border: medium none ; padding: 4.5pt;"&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;code  style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-size:10;" &gt;load()&lt;/span&gt;&lt;/code&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;&lt;br /&gt;just returns a proxy by default and database won’t be hit until the proxy&lt;br /&gt;is first invoked. &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;br /&gt;&lt;td style="border: medium none ; padding: 4.5pt;"&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;code  style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-size:10;" &gt;get()&lt;/span&gt;&lt;/code&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;&lt;br /&gt;will hit the database immediately. &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="queindex"&gt;17.&lt;/span&gt;&lt;span class="que"&gt;What is the difference&lt;br /&gt;between and merge and update ?&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="content" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;Use &lt;/span&gt;&lt;code  style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-size:10;" &gt;update()&lt;/span&gt;&lt;/code&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt; if you are sure that the session does not contain an already&lt;br /&gt;persistent instance with the same identifier, and &lt;/span&gt;&lt;br /&gt;&lt;code  style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-size:10;" &gt;merge()&lt;/span&gt;&lt;/code&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;&lt;br /&gt;if you want to merge your modifications at any time without consideration of the&lt;br /&gt;state of the session.&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;19.Define cascade and inverse&lt;br /&gt;option in one-many mapping?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;cascade - enable operations to cascade to child entities.&lt;br /&gt;&lt;br /&gt;cascade="allnonesave-updatedeleteall-delete-orphan"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;inverse - mark this collection as the "inverse" end of a bidirectional&lt;br /&gt;association.&lt;br /&gt;&lt;br /&gt;inverse="truefalse"&lt;br /&gt;&lt;br /&gt;Essentially "inverse" indicates which end of a relationship should be ignored,&lt;br /&gt;so when persisting a parent who has a collection of children, should you ask the&lt;br /&gt;parent for its list of children, or ask the children who the parents are?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;20.What does it mean to be inverse?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;It informs hibernate to ignore that end of the relationship. If the one–to–many&lt;br /&gt;was marked as inverse, hibernate would create a child–&amp;gt;parent relationship (child.getParent).&lt;br /&gt;If the one–to–many was marked as non–inverse then a child–&amp;gt;parent relationship&lt;br /&gt;would be created.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="queindex"&gt;23.&lt;/span&gt;&lt;span class="que"&gt;Explain Criteria API&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="content" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;Criteria is a simplified API for retrieving entities by&lt;br /&gt;composing Criterion objects. This is a very convenient approach for&lt;br /&gt;functionality like "search" screens where there is a variable number of&lt;br /&gt;conditions to be placed upon the result set.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Example&lt;/b&gt; :&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre  style="margin: 0in 0in 0pt;font-size:10pt;"&gt;&lt;span style="color: rgb(128, 0, 64);"&gt;List &lt;/span&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;employees = &lt;/span&gt;&lt;span style="color: rgb(128, 0, 64);"&gt;session&lt;/span&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;.createCriteria(Employee.class)&lt;br /&gt;&lt;br /&gt;          .add(Restrictions.like(&lt;/span&gt;&lt;span style="color:blue;"&gt;"name"&lt;/span&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;, &lt;/span&gt;&lt;span style="color:blue;"&gt;"a%"&lt;/span&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;) )&lt;br /&gt;&lt;br /&gt;          .add(Restrictions.like(&lt;/span&gt;&lt;span style="color:blue;"&gt;"address"&lt;/span&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 160);"&gt;"Boston"&lt;/span&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;))&lt;br /&gt;&lt;br /&gt;   .addOrder(Order.asc(&lt;/span&gt;&lt;span style="color:blue;"&gt;"name"&lt;/span&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;) )&lt;br /&gt;&lt;br /&gt;   .list();&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="queindex"&gt;24.&lt;/span&gt;&lt;span class="que"&gt;Define HibernateTemplate?&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="content" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;code  style="font-family:Courier New;"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-size:10;" &gt;&lt;br /&gt;org.springframework.orm.hibernate.HibernateTemplate&lt;/span&gt;&lt;/code&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;&lt;br /&gt;is a helper class which provides different methods for querying/retrieving data&lt;br /&gt;from the database. It also converts checked HibernateExceptions into unchecked&lt;br /&gt;DataAccessExceptions.&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="queindex"&gt;25.&lt;/span&gt;&lt;span class="que"&gt;What are the benefits does&lt;br /&gt;HibernateTemplate provide?&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="content" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;The benefits of HibernateTemplate are : &lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;ul style="margin-bottom: 0in;" type="disc"&gt;&lt;br /&gt;&lt;li class="MsoNormal" style="text-align: center; color: rgb(51, 51, 51);"&gt;&lt;br /&gt;&lt;code  style="font-family:Courier New;"&gt;&lt;span style="font-size:10;"&gt;&lt;br /&gt;HibernateTemplate&lt;/span&gt;&lt;/code&gt;&lt;span style="font-family:Verdana;"&gt;, a Spring&lt;br /&gt;Template class simplifies interactions with Hibernate Session. &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class="MsoNormal" style="text-align: center; color: rgb(51, 51, 51);"&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;"&gt;Common functions are simplified to single&lt;br /&gt;method calls. &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class="MsoNormal" style="text-align: center; color: rgb(51, 51, 51);"&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;"&gt;Sessions are automatically closed. &lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class="MsoNormal" style="text-align: center; color: rgb(51, 51, 51);"&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;"&gt;Exceptions are automatically caught and&lt;br /&gt;converted to runtime exceptions.&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;26.How do you switch between&lt;br /&gt;relational databases without code changes?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Using Hibernate SQL Dialects , we can switch databases. Hibernate will generate&lt;br /&gt;appropriate hql queries based on the dialect defined.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;27.If you want to see the Hibernate generated SQL statements on console, what&lt;br /&gt;should we do?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In Hibernate configuration file set as follows:&lt;br /&gt;&lt;br /&gt;&lt;property name="show_sql"&gt;true&lt;br /&gt;&lt;br /&gt;&lt;/property&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;28.What are derived properties?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The properties that are not mapped to a column, but calculated at runtime by&lt;br /&gt;evaluation of an expression are called derived properties. The expression can be&lt;br /&gt;defined using the formula attribute of the element.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="queindex"&gt;29.&lt;/span&gt;&lt;span class="que"&gt;What is component mapping in&lt;br /&gt;Hibernate?&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;ul style="margin-bottom: 0in;" type="disc"&gt;&lt;br /&gt;&lt;li class="MsoNormal" style="text-align: center; color: rgb(51, 51, 51);"&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;"&gt;A component is an object saved as a value,&lt;br /&gt;not as a reference &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class="MsoNormal" style="text-align: center; color: rgb(51, 51, 51);"&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;"&gt;A component can be saved directly without&lt;br /&gt;needing to declare interfaces or identifier properties &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class="MsoNormal" style="text-align: center; color: rgb(51, 51, 51);"&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;"&gt;Required to define an empty constructor&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class="MsoNormal" style="text-align: center; color: rgb(51, 51, 51);"&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;"&gt;Shared references not supported &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p class="content" style="text-align: center;" align="center"&gt;&lt;b&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;Example&lt;/span&gt;&lt;/b&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;:&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;&lt;v:shapetype id="_x0000_t75" stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" coordsize="21600,21600" spt="75" preferrelative="t"&gt;&lt;br /&gt;&lt;v:stroke joinstyle="miter"&gt;&lt;/v:stroke&gt;&lt;br /&gt;&lt;v:formulas&gt;&lt;br /&gt;&lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;&lt;/v:f&gt;&lt;br /&gt;&lt;v:f eqn="sum @0 1 0"&gt;&lt;/v:f&gt;&lt;br /&gt;&lt;v:f eqn="sum 0 0 @1"&gt;&lt;/v:f&gt;&lt;br /&gt;&lt;v:f eqn="prod @2 1 2"&gt;&lt;/v:f&gt;&lt;br /&gt;&lt;v:f eqn="prod @3 21600 pixelWidth"&gt;&lt;/v:f&gt;&lt;br /&gt;&lt;v:f eqn="prod @3 21600 pixelHeight"&gt;&lt;/v:f&gt;&lt;br /&gt;&lt;v:f eqn="sum @0 0 1"&gt;&lt;/v:f&gt;&lt;br /&gt;&lt;v:f eqn="prod @6 1 2"&gt;&lt;/v:f&gt;&lt;br /&gt;&lt;v:f eqn="prod @7 21600 pixelWidth"&gt;&lt;/v:f&gt;&lt;br /&gt;&lt;v:f eqn="sum @8 21600 0"&gt;&lt;/v:f&gt;&lt;br /&gt;&lt;v:f eqn="prod @7 21600 pixelHeight"&gt;&lt;/v:f&gt;&lt;br /&gt;&lt;v:f eqn="sum @10 21600 0"&gt;&lt;/v:f&gt;&lt;br /&gt;&lt;/v:formulas&gt;&lt;br /&gt;&lt;v:path gradientshapeok="t" extrusionok="f" connecttype="rect"&gt;&lt;/v:path&gt;&lt;br /&gt;&lt;o:lock aspectratio="t" ext="edit"&gt;&lt;/o:lock&gt;&lt;br /&gt;&lt;/v:shapetype&gt;&lt;v:shape id="_x0000_s1025" style="width: 481.5pt; height: 311.25pt;" alt="Component Mapping" type="#_x0000_t75"&gt;&lt;br /&gt;&lt;v:imagedata src="new_page_1_files/image001.png" href="http://www.developersbook.com/hibernate/images/component-mapping.png"&gt;&lt;/v:imagedata&gt;&lt;br /&gt;&lt;/v:shape&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="queindex"&gt;30.&lt;/span&gt;&lt;span class="que"&gt;What is the difference&lt;br /&gt;between sorted and ordered collection in hibernate?&lt;/span&gt; &lt;b&gt;sorted collection&lt;br /&gt;vs. order collection&lt;/b&gt; :-&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;br /&gt;&lt;table class="MsoNormalTable" style="border: 1pt solid rgb(173, 210, 226);" border="1" cellpadding="0" cellspacing="0"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;td style="border: medium none ; padding: 4.5pt;"&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;b&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;sorted collection &lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;br /&gt;&lt;td style="border: medium none ; padding: 4.5pt;"&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;b&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;order collection &lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td style="border: medium none ; padding: 4.5pt; width: 50%;" width="50%"&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;A sorted collection is&lt;br /&gt;sorting a collection by utilizing the sorting features provided by the&lt;br /&gt;Java collections framework. The sorting occurs in the memory of JVM which&lt;br /&gt;running Hibernate, after the data being read from database using java&lt;br /&gt;comparator. &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;br /&gt;&lt;td style="border: medium none ; padding: 4.5pt;"&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;Order collection is&lt;br /&gt;sorting a collection by specifying the order-by clause for sorting this&lt;br /&gt;collection when retrieval. &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td style="border: medium none ; padding: 4.5pt;"&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;If your collection is not&lt;br /&gt;large, it will be more efficient way to sort it. &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;br /&gt;&lt;td style="border: medium none ; padding: 4.5pt;"&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Verdana;" &gt;If your collection is very&lt;br /&gt;large, it will be more efficient way to sort it . &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6109527685507475247-3773687093109125126?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/IPcRLXZvWkk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/IPcRLXZvWkk/hibernate-interview-questions-part2.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><thr:total>0</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2009/02/hibernate-interview-questions-part2.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-5134468745891142617</guid><pubDate>Sat, 07 Feb 2009 13:37:00 +0000</pubDate><atom:updated>2009-05-12T05:07:05.441-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Java</category><category domain="http://www.blogger.com/atom/ns#">.net</category><category domain="http://www.blogger.com/atom/ns#">NHibernate</category><category domain="http://www.blogger.com/atom/ns#">JDBC</category><category domain="http://www.blogger.com/atom/ns#">Hibernate</category><category domain="http://www.blogger.com/atom/ns#">ORM</category><title>Hibernate Interview questions Part 1</title><description>1.What is ORM ?&lt;br /&gt;&lt;br /&gt;ORM stands for object/relational mapping. ORM is the automated persistence of objects in a Java application to the tables in a relational database.&lt;br /&gt;&lt;br /&gt;2.What does ORM consists of ?&lt;br /&gt;&lt;br /&gt;An ORM solution consists of the followig four pieces:&lt;br /&gt;&lt;br /&gt;* API for performing basic CRUD operations&lt;br /&gt;* API to express ries refering to classes&lt;br /&gt;* Facilities to specify metadata&lt;br /&gt;* Optimization facilities : dirty checking,lazy associations fetching&lt;br /&gt;&lt;br /&gt;3.What are the ORM levels ?&lt;br /&gt;&lt;br /&gt;The ORM levels are:&lt;br /&gt;&lt;br /&gt;* Pure relational (stored procedure.)&lt;br /&gt;* Light objects mapping (JDBC)&lt;br /&gt;* Medium object mapping&lt;br /&gt;* Full object Mapping (composition,inheritance, polymorphism, persistence by reachability)&lt;br /&gt;&lt;br /&gt;4.What is Hibernate?&lt;br /&gt;&lt;br /&gt;Hibernate is a pure Java object-relational mapping (ORM) and persistence framework that allows you to map plain old Java objects to relational database tables using (XML) configuration files.Its purpose is to relieve the developer from a significant amount of relational data persistence-related programming tasks.&lt;br /&gt;&lt;br /&gt;5.Why do you need ORM tools like hibernate?&lt;br /&gt;&lt;br /&gt;The main advantage of ORM like hibernate is that it shields developers from messy SQL. Apart from this, ORM provides following benefits:&lt;br /&gt;&lt;br /&gt;* Improved productivity&lt;br /&gt;o High-level object-oriented API&lt;br /&gt;o Less Java code to write&lt;br /&gt;o No SQL to write&lt;br /&gt;* Improved performance&lt;br /&gt;o Sophisticated caching&lt;br /&gt;o Lazy loading&lt;br /&gt;o Eager loading&lt;br /&gt;* Improved maintainability&lt;br /&gt;o A lot less code to write&lt;br /&gt;* Improved portability&lt;br /&gt;o ORM framework generates database-specific SQL for you&lt;br /&gt;&lt;br /&gt;6.What Does Hibernate Simplify?&lt;br /&gt;&lt;br /&gt;Hibernate simplifies:&lt;br /&gt;&lt;br /&gt;* Saving and retrieving your domain objects&lt;br /&gt;* Making database column and table name changes&lt;br /&gt;* Centralizing pre save and post retrieve logic&lt;br /&gt;* Complex joins for retrieving related items&lt;br /&gt;* Schema creation from object model&lt;br /&gt;7.What is the need for Hibernate xml mapping file?&lt;br /&gt;Hibernate mapping file tells Hibernate which tables and columns to use to load and store objects. Typical mapping file look as follows:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8.What are the most common methods of Hibernate configuration?&lt;br /&gt;The most common methods of Hibernate configuration are:&lt;br /&gt;&lt;br /&gt;Programmatic configuration&lt;br /&gt;XML configuration (hibernate.cfg.xml)&lt;br /&gt;&lt;br /&gt;9.What are the important tags of hibernate.cfg.xml?&lt;br /&gt;An Action Class is an adapter between the contents of an incoming HTTP rest and the corresponding business logic that should be executed to process this rest.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10.What are the Core interfaces are of Hibernate framework?&lt;br /&gt;&lt;br /&gt;The five core interfaces are used in just about every Hibernate application. Using these interfaces, you can store and retrieve persistent objects and control transactions.&lt;br /&gt;&lt;br /&gt;* Session interface&lt;br /&gt;* SessionFactory interface&lt;br /&gt;* Configuration interface&lt;br /&gt;* Transaction interface&lt;br /&gt;* Query and Criteria interfaces&lt;br /&gt;11.What role does the Session interface play in Hibernate?&lt;br /&gt;&lt;br /&gt;The Session interface is the primary interface used by Hibernate applications. It is a single-threaded, short-lived object representing a conversation between the application and the persistent store. It allows you to create query objects to retrieve persistent objects.&lt;br /&gt;&lt;br /&gt;Session session = sessionFactory.openSession();&lt;br /&gt;&lt;br /&gt;Session interface role:&lt;br /&gt;&lt;br /&gt;* Wraps a JDBC connection&lt;br /&gt;* Factory for Transaction&lt;br /&gt;* Holds a mandatory (first-level) cache of persistent objects, used when navigating the object graph or looking up objects by identifier&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;12.What role does the SessionFactory interface play in Hibernate?&lt;br /&gt;&lt;br /&gt;The application obtains Session instances from a SessionFactory. There is typically a single SessionFactory for the whole application—created during application initialization. The SessionFactory caches generate SQL statements and other mapping metadata that Hibernate uses at runtime. It also holds cached data that has been read in one unit of work and may be reused in a future unit of work&lt;br /&gt;&lt;br /&gt;SessionFactory sessionFactory = configuration.buildSessionFactory();&lt;br /&gt;&lt;br /&gt;13.What is the general flow of Hibernate communication with RDBMS?&lt;br /&gt;&lt;br /&gt;The general flow of Hibernate communication with RDBMS is :&lt;br /&gt;&lt;br /&gt;* Load the Hibernate configuration file and create configuration object. It will automatically load all hbm mapping files&lt;br /&gt;* Create session factory from configuration object&lt;br /&gt;* Get one session from this session factory&lt;br /&gt;* Create HQL Query&lt;br /&gt;* Execute query to get list containing Java objects&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;14.What is Hibernate Query Language (HQL)?&lt;br /&gt;&lt;br /&gt;Hibernate offers a query language that embodies a very powerful and flexible mechanism to query, store, update, and retrieve objects from a database. This language, the Hibernate query Language (HQL), is an object-oriented extension to SQL.&lt;br /&gt;&lt;br /&gt;15.How do you map Java Objects with Database tables?&lt;br /&gt;&lt;br /&gt;* First we need to write Java domain objects (beans with setter and getter). The variables should be same as database columns.&lt;br /&gt;* Write hbm.xml, where we map java class to table and database columns to Java class variables.&lt;br /&gt;&lt;br /&gt;Example :&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;name="userName" not-null="true" type="java.lang.String"/&gt;&lt;br /&gt;name="userPassword" not-null="true" type="java.lang.String"/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6109527685507475247-5134468745891142617?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/QFasFLIJ1LM" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/QFasFLIJ1LM/hibernate-interview-questions-part-1.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><thr:total>0</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2009/02/hibernate-interview-questions-part-1.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-920680157622006217</guid><pubDate>Wed, 21 Jan 2009 14:32:00 +0000</pubDate><atom:updated>2009-05-12T05:07:47.072-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">.net</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><category domain="http://www.blogger.com/atom/ns#">NHibernate</category><category domain="http://www.blogger.com/atom/ns#">Hibernate</category><category domain="http://www.blogger.com/atom/ns#">ORM</category><title>NHibernate: Unexpected row count: 0; expected: 1</title><description>here are some of my experiences when "Unexpected row count: 0; expected: 1" comes and also how can we solve them.&lt;br /&gt;&lt;br /&gt;1. If primarykey generator has some issue e.g you in class its identity and in db its not an identity column. For those columns where your db column is not identity and its part of a requirment then "hilo" works :) for details on generator &lt;a href="http://barchitect.blogspot.com/2008/07/nhibernate-generator-and-primary-key.html"&gt;clickhere&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2. Nhibernate seems to have problems when you create multiple transient entities that reference each other, and then try to save just the root entity. To avoid these problems, call&lt;br /&gt;session.Save() on each transient entity after you create it, before you attach it to others else&lt;br /&gt;use session.Update().&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6109527685507475247-920680157622006217?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/qRFyV-1nb5E" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/qRFyV-1nb5E/nhibernate-unexpected-row-count-0.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><thr:total>0</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2009/01/nhibernate-unexpected-row-count-0.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-8749145396388414303</guid><pubDate>Thu, 01 Jan 2009 18:43:00 +0000</pubDate><atom:updated>2009-05-12T05:09:07.181-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">.net</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><category domain="http://www.blogger.com/atom/ns#">NHibernate</category><category domain="http://www.blogger.com/atom/ns#">Hibernate</category><category domain="http://www.blogger.com/atom/ns#">ORM</category><title>NHibernate - null id in entry (don't flush the Session after an exception occurs)</title><description>I ran into this issue today when trying to persist one of my objects.  The cause of the problem was interesting.  I was trying to save an object when a property/columns in the table had a unique constraint.  As a result, the object that I was trying to persist would not persist simply because the object's property it failed to meet the unique constraint.&lt;br /&gt;&lt;br /&gt;As a result, a call to Save() on the object failed and the ID on the object I was trying to save was not set, but NHibernate still processed the object and associated it with its persistence mechanism leaving it in a "semi-persistent" state with the NHibernate persistence manager (ie: NHibernate now knows about the object you tried to save and it SHOULD have fully evicted the object from its persistence manager because the save failed, but it didn't).&lt;br /&gt;&lt;br /&gt;When an HTTP request finishes on my ASP.NET application, I flush and close all NHibernate session objects at the time the request is done.  And as a result, when the HTTP request finished, NHibernate attempted to flush the jacked up "semi-persistent" object (an object who's ID was null) and ultimately generating the error above.&lt;br /&gt;&lt;br /&gt;So, the solution that I implemented was to wrap the Save() in a try{} catch{} statement, and if the save failed, immediately close and shutdown the session, handle the error/exception.  Then, check if Session.IsOpen when the HTTP request finishes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6109527685507475247-8749145396388414303?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/eMIPGrL3APs" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/eMIPGrL3APs/nhibernate-null-id-in-entry-dont-flush.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><thr:total>0</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2009/01/nhibernate-null-id-in-entry-dont-flush.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-5881240993301673914</guid><pubDate>Mon, 29 Dec 2008 08:57:00 +0000</pubDate><atom:updated>2009-05-12T05:09:31.473-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">.net</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><category domain="http://www.blogger.com/atom/ns#">NHibernate</category><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Hibernate</category><category domain="http://www.blogger.com/atom/ns#">ORM</category><title>How Hibernate / NHibernate Cascade attribute work</title><description>&lt;strong&gt;Concept 1:&lt;/strong&gt; when ever you have a set/bag/collection of child in parent class then its attributes must be inverse = true and cascade = "all-delete-orphan".&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Concept 2:&lt;/strong&gt; In above given senario In child class the reference of ParentID should be NotNull=true and if child creates a manytoone relation with parent then its cascade=none because on child deletion or update parent should not be updated.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Concept 3:&lt;/strong&gt; If parent have no set/bag/collection of child then in child the parent will be NotNull=false means that it can be null. This senario is required if you mark foreignkeys in child table as allow null = true. where as if you mark foreignkeys as Not null in database then its property should be NotNull=true so that child record should not be saved if its parent's foreign key contains null.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Concept 4: &lt;/strong&gt;if your foreignkey column in database allow null and due to any constraint you dont  want to change db columns and you still want that Hibernate/Nhibernate will not save the record if user didnt provide its value then 2 things need to be done.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Validate from frontend that the foreign key value must be given&lt;/li&gt;&lt;li&gt;In your mapping file in child class mark parent field as NotNull=true. This will enforce that value should be given to this column before save/update.&lt;br /&gt;&lt;br /&gt;Please comment if i am wrong&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/6109527685507475247-5881240993301673914?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/-dYdmo6-ZTg" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/-dYdmo6-ZTg/how-hibernate-nhibernate-cascade.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><thr:total>0</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2008/12/how-hibernate-nhibernate-cascade.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-8726398351910198140</guid><pubDate>Mon, 20 Oct 2008 12:09:00 +0000</pubDate><atom:updated>2009-05-12T05:10:11.987-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><category domain="http://www.blogger.com/atom/ns#">Tooltip</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">DropdownList</category><title>ToolTip for DropDownList control in ASP.net</title><description>Adding a dynamic tooltip to the list of dropdownlist items is one of the issues addressed in asp.net. Some time its very important to have a tool tip of a DropDownList specially when the text added in ListItems are longer then the width of DropDownList control.&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt; This solution only works with IE7+, Firefox&lt;br /&gt;&lt;br /&gt;The following example demonstrates you how to show a tooltip when you Mouse Over on a DropdownList / Select box.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="javascript"&gt;&lt;br /&gt;&amp;lt;script language="javascript" type="text/javascript"&amp;gt;&lt;br /&gt;&lt;br /&gt;function showTooltip(obj)&lt;br /&gt;   {&lt;br /&gt;       if(obj.options[obj.selectedIndex].title == "")&lt;br /&gt;       {&lt;br /&gt;           obj.title = obj.options[obj.selectedIndex].text;&lt;br /&gt;           obj.options[obj.selectedIndex].title =  obj.options[obj.selectedIndex].text;&lt;br /&gt;           for(i =0;i&amp;lt;obj.options.length;i++)&lt;br /&gt;           {&lt;br /&gt;               obj.options[i].title = obj.options[i].text;&lt;br /&gt;           }&lt;br /&gt;       }&lt;br /&gt;       else&lt;br /&gt;           obj.title = obj.options[obj.selectedIndex].text;&lt;br /&gt;   }&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In html call the above given function as:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;asp:dropdownlist id="ddlTooltip" onmouseover="showTooltip(this)" width="40px" runat="server"&amp;gt;&amp;lt;/asp:dropdownlist&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6109527685507475247-8726398351910198140?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/3Nl0eckxUas" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/3Nl0eckxUas/tooltip-for-dropdownlist-control-in.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><thr:total>0</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2008/10/tooltip-for-dropdownlist-control-in.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-7669943098440699291</guid><pubDate>Tue, 12 Aug 2008 07:08:00 +0000</pubDate><atom:updated>2009-05-12T05:10:35.259-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">IIS</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><title>Failed to access IIS metabase.</title><description>&lt;div&gt;Some time you may come across the following error&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;" Failed to access IIS Matabase"&lt;/span&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_PQVql4Gpz1g/SKE5n4O2epI/AAAAAAAAAQw/uVpeTum4Pq0/s1600-h/iismatabase.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5233527599253584530" style="margin: 0px 10px 10px 0px; float: left;" alt="" src="http://1.bp.blogspot.com/_PQVql4Gpz1g/SKE5n4O2epI/AAAAAAAAAQw/uVpeTum4Pq0/s320/iismatabase.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;Fix:&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;This problem is because you might install iis or reinstall after installation of Visual Studio or .NET Framework.&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;Simply open command prompt from &gt; ProgramFiles &gt; VS2005 &gt; Tools &gt; CommandPrompt&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;and they&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(51, 51, 51);"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(153, 0, 0);font-size:130%;" &gt;aspnet_regiis - i&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div align="left"&gt;This command reinstall .NET Framework pathch for IIS and reconfigure it.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6109527685507475247-7669943098440699291?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/c6CXSspyhvk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/c6CXSspyhvk/failed-to-access-iis-metabase.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_PQVql4Gpz1g/SKE5n4O2epI/AAAAAAAAAQw/uVpeTum4Pq0/s72-c/iismatabase.JPG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2008/08/failed-to-access-iis-metabase.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-8868608818451587745</guid><pubDate>Sun, 10 Aug 2008 12:08:00 +0000</pubDate><atom:updated>2009-05-12T05:11:19.509-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><category domain="http://www.blogger.com/atom/ns#">.net</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Validator Controls</category><title>How to control ASP.NET Validator Controls Client Side validation from JavaScript</title><description>The only solution is to Enable/Disable the ASP.NET Validator controls on page with JavaScript code to use &lt;strong&gt;ValidatorEnable(val, enable)&lt;/strong&gt; funciton on each page where you need to use both options ( validator control and javascritp).&lt;br /&gt;&lt;br /&gt;A very good example is given on the given link :)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.aspdotnetfaq.com/Faq/How-to-control-ASP-NET-Validator-Controls-Client-Side-validation-from-JavaScript.aspx"&gt;http://www.aspdotnetfaq.com/Faq/How-to-control-ASP-NET-Validator-Controls-Client-Side-validation-from-JavaScript.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6109527685507475247-8868608818451587745?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/2TcILB6v93w" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/2TcILB6v93w/how-to-control-aspnet-validator.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><thr:total>1</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2008/08/how-to-control-aspnet-validator.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-1612641670513043358</guid><pubDate>Thu, 07 Aug 2008 13:44:00 +0000</pubDate><atom:updated>2009-05-12T05:11:46.632-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">IIS</category><category domain="http://www.blogger.com/atom/ns#">.net</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><category domain="http://www.blogger.com/atom/ns#">C#</category><title>Quick things to check when you experience high memory levels in ASP.NET</title><description>Things to check when you you experience high memory levels in ASP.NET&lt;br /&gt;&lt;br /&gt;&lt;a href="http://support.microsoft.com/kb/893660"&gt;http://support.microsoft.com/kb/893660&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6109527685507475247-1612641670513043358?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/O9AwytRJrQo" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/O9AwytRJrQo/quick-things-to-check-when-you.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><thr:total>0</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2008/08/quick-things-to-check-when-you.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-2642547927707689701</guid><pubDate>Thu, 07 Aug 2008 10:00:00 +0000</pubDate><atom:updated>2009-05-12T05:12:12.258-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">IIS</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><title>Difference between aspnet_wp.exe and w3wp.exe</title><description>The way an ASP.NET request is handled by IIS is quite different in IIS 6.0 when compared with 5.0. In 5.0, the ASP.NET worker process is handed off control by the aspnet_isapi extension in IIS. The aspnet_isapi dll runs in the inetinfo.exe process in IIS and functions what is known as the CLR host (a CLR host is the piece of unmanaged code which is responsible for loading the CLR into the memory). So aspnet_isapi “hands over” the processing to the worker process named aspnet_wp.exe, where the request passes through a series of HttpModules and an HttpHandler.&lt;br /&gt;&lt;br /&gt;But in IIS 6.0, there is a driver named http.sys which listens to all the incoming requests (aspnet_isapi.dll is not in the picture at this point). The moment an ASP.NET specific request comes in, this driver starts an IIS 6.0 worker process (which is not related to ASP.NET at all) named w3wp.exe. This process now loads the aspnet_isapi.dll (CLR host) and the request follows through a similar sequence of HttpModules and HttpHandlers.&lt;br /&gt;So the important thing to note here is that w3wp.exe is not an ASP.NET worker process (unlike aspnet_wp.exe) but instead specific to IIS 6.0.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6109527685507475247-2642547927707689701?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/K7cLBHupIXE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/K7cLBHupIXE/difference-between-aspnetwpexe-and.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><thr:total>3</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2008/08/difference-between-aspnetwpexe-and.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-2041835328346043478</guid><pubDate>Tue, 29 Jul 2008 18:35:00 +0000</pubDate><atom:updated>2009-05-12T05:12:34.054-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">.net</category><category domain="http://www.blogger.com/atom/ns#">NHibernate</category><category domain="http://www.blogger.com/atom/ns#">Hibernate</category><category domain="http://www.blogger.com/atom/ns#">ORM</category><title>Understanding NHibernate &lt;generator&gt; element</title><description>Every database supports mechanism to define primary keys and numeric sequence generator. so being and Data Access Layer NHibernate also provide mechanism to handle primary keys and numeric sequence generator.&lt;br /&gt;&lt;br /&gt;Before moving to NHibernate numeric sequence generator element, here is a brief description of Primary key and numeric sequence generator(Identity).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Note:&lt;/span&gt; Query uses TSQL (Microsoft SQL Server)  as its scripting language.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;What is Primary Key&lt;/span&gt;&lt;br /&gt;&lt;span id="intelliTxt" style="margin-top: -15px;" name="intelliTxt"&gt;A primary key is a table column that serves a special purpose. Each database table needs a primary key because it ensures row-level accessibility. If you choose an appropriate primary key, you can specify a primary key value, which lets you query each table row individually and modify each row without altering other rows in the same table. The values that compose a primary key column are unique; no two values are the same. &lt;/span&gt;&lt;span id="intelliTxt" style="margin-top: -15px;" name="intelliTxt"&gt;Each table has one and only one primary key, which can consist of one or many columns.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;What is Identity Column&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span id="intelliTxt" style="margin-top: -15px;" name="intelliTxt"&gt;&lt;/span&gt;&lt;p&gt;"An identity column creates a numeric sequence for you". You can specify a column as an identity in the CREATE TABLE statement:&lt;/p&gt;&lt;pre&gt;CREATE TABLE dbo.Tasks ( TaskId int &lt;span style="color:blue;"&gt;identity(1,1)&lt;/span&gt;, TaskDesc varchar(200) )&lt;/pre&gt;The identity clause specifies that the column TaskId is going to be an identity column. The first record added will automatically be assigned a value of 1 (the &lt;em&gt;seed&lt;/em&gt;) and each subsequent record will be assigned a value 1 higher (the &lt;em&gt;increment&lt;/em&gt;) than the previous inserted row.&lt;br /&gt;&lt;br /&gt;This is how Microsoft SQL Sever provides the mechanism to generate numeric ids in a sequence.&lt;br /&gt;&lt;br /&gt;Now coming towards NHibernate which not only provide configuration mechanism to use existing sqlserver functionality but also provide its own generator mechanism.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Primary Key&lt;/strong&gt;&lt;br /&gt;&lt;div&gt;Mapped classes &lt;em&gt;must&lt;/em&gt; declare the   primary key column of the database table. Most classes will also have a property   holding the unique identifier of an instance. The &amp;lt;id&amp;gt; element defines the mapping from that   property to the primary key column. &lt;/div&gt;&lt;div&gt;  &lt;div&gt;&amp;lt;id&lt;br /&gt;       name="PropertyName"                      (1)&lt;br /&gt;       type="typename"                          (2)&lt;br /&gt;       column="column_name"                     (3)&lt;br /&gt;       unsaved-value="anynonenullid_value"   (4)&lt;br /&gt;       access="fieldpropertynosetterClassName(5)"&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;generator class="generatorClass"/&amp;gt;&lt;br /&gt;&amp;lt;/id&amp;gt;&lt;/div&gt;  &lt;div&gt;    &lt;table tabindex="-1" summary="Callout list" border="1"&gt;      &lt;colgroup&gt;        &lt;col&gt;        &lt;col&gt;      &lt;/colgroup&gt;      &lt;tbody&gt;        &lt;tr&gt;          &lt;td valign="top"&gt;(1)&lt;/td&gt;          &lt;td valign="top"&gt;&lt;div&gt;name (optional): The name of the identifier   property. &lt;/div&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;          &lt;td valign="top"&gt;(2)&lt;/td&gt;          &lt;td valign="top"&gt;&lt;div&gt;type (optional): A name that indicates the   NHibernate type. &lt;/div&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;          &lt;td valign="top"&gt;(3)&lt;/td&gt;          &lt;td valign="top"&gt;&lt;div&gt;column (optional - defaults to the property   name): The name of the primary key column. &lt;/div&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;          &lt;td valign="top"&gt;(4)&lt;/td&gt;          &lt;td valign="top"&gt;&lt;div&gt;unsaved-value (optional - defaults to a   "sensible" value): An identifier property value that indicates that an instance   is newly instantiated (unsaved), distinguishing it from transient instances that   were saved or loaded in a previous session. &lt;/div&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;          &lt;td valign="top"&gt;(5)&lt;/td&gt;          &lt;td valign="top"&gt;&lt;div&gt;access (optional - defaults to property): The strategy NHibernate should use for   accessing the property value. &lt;/div&gt;&lt;/td&gt;        &lt;/tr&gt;      &lt;/tbody&gt;    &lt;/table&gt;  &lt;/div&gt;&lt;/div&gt;&lt;div&gt;If the name attribute is missing, it is   assumed that the class has no identifier property. &lt;/div&gt;&lt;div&gt;The unsaved-value attribute is almost never   needed in NHibernate 1.0. &lt;/div&gt;&lt;div&gt;There is an alternative &amp;lt;composite-id&amp;gt; declaration to allow access to   legacy data with composite keys. We strongly discourage its use for anything   else. &lt;/div&gt;&lt;div&gt;  &lt;div&gt;    &lt;div&gt;      &lt;div&gt;        &lt;h4&gt;&lt;strong&gt;1. generator&lt;/strong&gt;&lt;/h4&gt;      &lt;/div&gt;    &lt;/div&gt;    &lt;div&gt; &lt;/div&gt;  &lt;/div&gt;  &lt;div&gt;The required &amp;lt;generator&amp;gt; child   element names a .NET class used to generate unique identifiers for instances of   the persistent class. If any parameters are required to configure or initialize   the generator instance, they are passed using the &amp;lt;param&amp;gt; element. &lt;/div&gt;  &lt;div&gt;&amp;lt;id name="Id" type="Int64" column="uid" unsaved-value="0"&amp;gt;&lt;br /&gt;       &amp;lt;generator class="NHibernate.Id.TableHiLoGenerator"&amp;gt;&lt;br /&gt;               &amp;lt;param name="table"&amp;gt;uid_table&amp;lt;/param&amp;gt;&lt;br /&gt;               &amp;lt;param name="column"&amp;gt;next_hi_value_column&amp;lt;/param&amp;gt;&lt;br /&gt;       &amp;lt;/generator&amp;gt;&lt;br /&gt;&amp;lt;/id&amp;gt;&lt;/div&gt;  &lt;div&gt;All generators implement the interface NHibernate.Id.IIdentifierGenerator. This is a very   simple interface; some applications may choose to provide their own specialized   implementations. However, NHibernate provides a range of built-in   implementations. There are shortcut names for the built-in generators: &lt;/div&gt;  &lt;div&gt;    &lt;dl&gt;      &lt;dt&gt;increment&lt;/dt&gt;      &lt;dd&gt;        &lt;div&gt;generates identifiers of type Int64, Int16 or Int32 that   are unique only when no other process is inserting data into the same table. &lt;em&gt;Do not use in a cluster.&lt;/em&gt; &lt;/div&gt;      &lt;/dd&gt;      &lt;dt&gt;identity&lt;/dt&gt;      &lt;dd&gt;        &lt;div&gt;supports identity columns in DB2, MySQL, MS SQL Server and Sybase. The   identifier returned by the database is converted to the property type using   Convert.ChangeType. Any integral property type   is thus supported. &lt;/div&gt;      &lt;/dd&gt;      &lt;dt&gt;sequence&lt;/dt&gt;      &lt;dd&gt;        &lt;div&gt;uses a sequence in DB2, PostgreSQL, Oracle or a generator in Firebird. The   identifier returned by the database is converted to the property type using   Convert.ChangeType. Any integral property type   is thus supported. &lt;/div&gt;      &lt;/dd&gt;      &lt;dt&gt;hilo&lt;/dt&gt;      &lt;dd&gt;        &lt;div&gt;uses a hi/lo algorithm to efficiently generate identifiers of type Int16, Int32 or Int64, given a table and column (by default hibernate_unique_key and next_hi respectively) as a source of hi values. The   hi/lo algorithm generates identifiers that are unique only for a particular   database. &lt;em&gt;Do not use this generator with a   user-supplied connection.&lt;/em&gt; &lt;/div&gt;      &lt;/dd&gt;      &lt;dt&gt;seqhilo&lt;/dt&gt;      &lt;dd&gt;        &lt;div&gt;uses a hi/lo algorithm to efficiently generate identifiers of type Int16, Int32 or Int64, given a named database sequence. &lt;/div&gt;      &lt;/dd&gt;      &lt;dt&gt;uuid.hex&lt;/dt&gt;      &lt;dd&gt;        &lt;div&gt;uses System.Guid and its ToString(string format) method to generate identifiers   of type string. The length of the string returned depends on the configured   format. &lt;/div&gt;      &lt;/dd&gt;      &lt;dt&gt;uuid.string&lt;/dt&gt;      &lt;dd&gt;        &lt;div&gt;uses a new System.Guid to create a byte[] that is converted to a string. &lt;/div&gt;      &lt;/dd&gt;      &lt;dt&gt;guid&lt;/dt&gt;      &lt;dd&gt;        &lt;div&gt;uses a new System.Guid as the identifier. &lt;/div&gt;      &lt;/dd&gt;      &lt;dt&gt;guid.comb&lt;/dt&gt;      &lt;dd&gt;        &lt;div&gt;uses the algorithm to generate a new System.Guid described by Jimmy Nilsson in the article   &lt;a href="http://www.informit.com/articles/article.asp?p=25862"&gt;http://www.informit.com/articles/article.asp?p=25862&lt;/a&gt;. &lt;/div&gt;      &lt;/dd&gt;      &lt;dt&gt;native&lt;/dt&gt;      &lt;dd&gt;        &lt;div&gt;picks identity, sequence or hilo   depending upon the capabilities of the underlying database. &lt;/div&gt;      &lt;/dd&gt;      &lt;dt&gt;assigned&lt;/dt&gt;      &lt;dd&gt;        &lt;div&gt;lets the application to assign an identifier to the object before Save() is called. &lt;/div&gt;      &lt;/dd&gt;      &lt;dt&gt;foreign&lt;/dt&gt;      &lt;dd&gt;        &lt;div&gt;uses the identifier of another associated object. Usually used in   conjunction with a &amp;lt;one-to-one&amp;gt; primary   key association. &lt;/div&gt;      &lt;/dd&gt;    &lt;/dl&gt;  &lt;/div&gt;  &lt;div&gt; &lt;/div&gt;&lt;/div&gt;&lt;div&gt;  &lt;div&gt;    &lt;div&gt;      &lt;div&gt;        &lt;h4&gt;&lt;strong&gt;1.1. Hi/Lo   Algorithm&lt;/strong&gt;&lt;/h4&gt;      &lt;/div&gt;    &lt;/div&gt;    &lt;div&gt; &lt;/div&gt;  &lt;/div&gt;  &lt;div&gt;The hilo and seqhilo generators provide two alternate   implementations of the hi/lo algorithm, a favorite approach to identifier   generation. The first implementation requires a "special" database table to hold   the next available "hi" value. The second uses an Oracle-style sequence (where   supported). &lt;/div&gt;  &lt;div&gt;&amp;lt;id name="Id" type="Int64" column="cat_id"&amp;gt;&lt;br /&gt;       &amp;lt;generator class="hilo"&amp;gt;&lt;br /&gt;               &amp;lt;param name="table"&amp;gt;hi_value&amp;lt;/param&amp;gt;&lt;br /&gt;               &amp;lt;param name="column"&amp;gt;next_value&amp;lt;/param&amp;gt;&lt;br /&gt;               &amp;lt;param name="max_lo"&amp;gt;100&amp;lt;/param&amp;gt;&lt;br /&gt;       &amp;lt;/generator&amp;gt;&lt;br /&gt;&amp;lt;/id&amp;gt;&lt;/div&gt;  &lt;div&gt;&amp;lt;id name="Id" type="Int64" column="cat_id"&amp;gt;&lt;br /&gt;       &amp;lt;generator class="seqhilo"&amp;gt;&lt;br /&gt;               &amp;lt;param name="sequence"&amp;gt;hi_value&amp;lt;/param&amp;gt;&lt;br /&gt;               &amp;lt;param name="max_lo"&amp;gt;100&amp;lt;/param&amp;gt;&lt;br /&gt;       &amp;lt;/generator&amp;gt;&lt;br /&gt;&amp;lt;/id&amp;gt;&lt;/div&gt;  &lt;div&gt;Unfortunately, you can't use hilo when   supplying your own IDbConnection to NHibernate.   NHibernate must be able to fetch the "hi" value in a new transaction. &lt;/div&gt;&lt;/div&gt;&lt;div&gt;  &lt;div&gt;    &lt;div&gt;      &lt;div&gt;        &lt;h4&gt;&lt;strong&gt;1.2. UUID Hex   Algorithm&lt;/strong&gt;&lt;/h4&gt;      &lt;/div&gt;    &lt;/div&gt;    &lt;div&gt; &lt;/div&gt;  &lt;/div&gt;  &lt;div&gt;&amp;lt;id name="Id" type="String" column="cat_id"&amp;gt;&lt;br /&gt;       &amp;lt;generator class="uuid.hex"&amp;gt;&lt;br /&gt;           &amp;lt;param name="format"&amp;gt;format_value&amp;lt;/param&amp;gt;&lt;br /&gt;           &amp;lt;param name="seperator"&amp;gt;seperator_value&amp;lt;/param&amp;gt;&lt;br /&gt;       &amp;lt;/generator&amp;gt;&lt;br /&gt;&amp;lt;/id&amp;gt;&lt;/div&gt;  &lt;div&gt;The UUID is generated by calling Guid.NewGuid().ToString(format). The valid values for   format are described in the MSDN documentation.   The default seperator is - and should rarely be modified. The format determines if the configured seperator can replace the default seperator used by   the format. &lt;/div&gt;&lt;/div&gt;&lt;div&gt;  &lt;div&gt;    &lt;div&gt;      &lt;div&gt;        &lt;h4&gt;&lt;strong&gt;1.3. UUID String   Algorithm&lt;/strong&gt;&lt;/h4&gt;      &lt;/div&gt;    &lt;/div&gt;    &lt;div&gt; &lt;/div&gt;  &lt;/div&gt;  &lt;div&gt;The UUID is generated by calling Guid.NewGuid().ToByteArray() and then converting the   byte[] into a char[]. The char[] is   returned as a String consisting of 16   characters. &lt;/div&gt;&lt;/div&gt;&lt;div&gt;  &lt;div&gt;    &lt;div&gt;      &lt;div&gt;        &lt;h4&gt;&lt;strong&gt;1.3. GUID   Algorithms&lt;/strong&gt;&lt;/h4&gt;      &lt;/div&gt;    &lt;/div&gt;    &lt;div&gt; &lt;/div&gt;  &lt;/div&gt;  &lt;div&gt;The guid identifier is generated by calling   Guid.NewGuid(). To address some of the   performance concerns with using Guids as primary keys, foreign keys, and as part   of indexes with MS SQL the guid.comb can be   used. The benefit of using the guid.comb with   other databases that support GUIDs has not been measured. &lt;/div&gt;&lt;/div&gt;&lt;div&gt;  &lt;div&gt;    &lt;div&gt;      &lt;div&gt;        &lt;h4&gt;&lt;strong&gt;1.4. Identity columns   and Sequences&lt;/strong&gt;&lt;/h4&gt;      &lt;/div&gt;    &lt;/div&gt;    &lt;div&gt; &lt;/div&gt;  &lt;/div&gt;  &lt;div&gt;For databases which support identity columns (DB2, MySQL, Sybase, MS SQL),   you may use identity key generation. For   databases that support sequences (DB2, Oracle, PostgreSQL, Interbase, McKoi, SAP   DB) you may use sequence style key generation.   Both these strategies require two SQL queries to insert a new object. &lt;/div&gt;  &lt;div&gt;&amp;lt;id name="Id" type="Int64" column="uid"&amp;gt;&lt;br /&gt;       &amp;lt;generator class="sequence"&amp;gt;&lt;br /&gt;               &amp;lt;param name="sequence"&amp;gt;uid_sequence&amp;lt;/param&amp;gt;&lt;br /&gt;       &amp;lt;/generator&amp;gt;&lt;br /&gt;&amp;lt;/id&amp;gt;&lt;/div&gt;  &lt;div&gt;&amp;lt;id name="Id" type="Int64" column="uid" unsaved-value="0"&amp;gt;&lt;br /&gt;       &amp;lt;generator class="identity"/&amp;gt;&lt;br /&gt;&amp;lt;/id&amp;gt;&lt;/div&gt;  &lt;div&gt;For cross-platform development, the native   strategy will choose from the identity, sequence and hilo   strategies, dependent upon the capabilities of the underlying database. &lt;/div&gt;&lt;/div&gt;&lt;div&gt;  &lt;div&gt;    &lt;div&gt;      &lt;div&gt;        &lt;h4&gt;&lt;strong&gt;1.5. Assigned   Identifiers&lt;/strong&gt;&lt;/h4&gt;      &lt;/div&gt;    &lt;/div&gt;    &lt;div&gt; &lt;/div&gt;  &lt;/div&gt;  &lt;div&gt;If you want the application to assign identifiers (as opposed to having   NHibernate generate them), you may use the assigned generator. This special generator will use   the identifier value already assigned to the object's identifier property. Be   very careful when using this feature to assign keys with business meaning   (almost always a terrible design decision). &lt;/div&gt;  &lt;div&gt;Due to its inherent nature, entities that use this generator cannot be   saved via the ISession's SaveOrUpdate() method. Instead you have to explicitly   specify to NHibernate if the object should be saved or updated by calling either   the Save() or Update() method of the ISession.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6109527685507475247-2041835328346043478?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/o9bnNDLeY8A" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/o9bnNDLeY8A/nhibernate-generator-and-primary-key.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><thr:total>1</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2008/07/nhibernate-generator-and-primary-key.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-1040798702385750026</guid><pubDate>Thu, 17 Jul 2008 11:05:00 +0000</pubDate><atom:updated>2009-05-12T05:13:28.196-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">.net</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><category domain="http://www.blogger.com/atom/ns#">SQL Server 2005</category><title>How to configure SQL Server 2005 to allow remote connections</title><description>When you try to connect to an instance of Microsoft SQL Server 2005 from a remote computer, you may receive an error message. This problem may occur when you use any program to connect to SQL Server. For example, you receive the following error message when you use the SQLCMD utility to connect to SQL Server:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Sqlcmd: Error: Microsoft SQL Native Client: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This problem may occur when SQL Server 2005 is not configured to accept remote connections. By default, SQL Server 2005 Express Edition and SQL Server 2005 Developer Edition do not allow remote connections. To configure SQL Server 2005 to allow remote connections, complete all the following steps:&lt;br /&gt;&lt;br /&gt;• &lt;span style="color: rgb(102, 51, 255);"&gt;Enable remote connections on the instance of SQL Server that you want to connect to from a remote computer.&lt;/span&gt;&lt;br /&gt;• &lt;span style="color: rgb(102, 51, 255);"&gt;Turn on the SQL Server Browser service.&lt;/span&gt;&lt;br /&gt;• &lt;span style="color: rgb(51, 102, 255);"&gt;Configure the firewall to allow network traffic that is related to SQL Server and to the SQL Server Browser service.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Follow the following link for more detail by microsoft support&lt;br /&gt;&lt;br /&gt;&lt;a href="http://support.microsoft.com/kb/914277"&gt;http://support.microsoft.com/kb/914277&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Some time same error occur because of your configuration in web.config.&lt;br /&gt;&lt;br /&gt;if your error is some thing like&lt;br /&gt;&lt;br /&gt;"&lt;span style="color: rgb(204, 0, 0);"&gt;An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connection. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)&lt;/span&gt;"&lt;br /&gt;&lt;br /&gt;Cause: ASP.Net 2.0 Providers are trying to pull from the server's (nonexistent) Providers database.&lt;br /&gt;By default the machine.config file is trying to pull the Provider information from a SQLExpress database using an invalid connection string named "LocalSQLServer". Many web servers will not have SQLExpress enabled, and will not have this value set to a valid SQL Server database that is of use to you. In a shared hosting environment, this is especially true, as it would be expected that you would want your Provider information stored in your database and not some single database shared by the other users of that web server.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;Fix:&lt;br /&gt;&lt;/span&gt;Since you probably cannot access the machine.config file, you need to override the Provider settings in your web.config file, and set the connection string name to your connection string name. The following code comes from the machine.config file and has been modified to first remove each provider before adding the provider.&lt;br /&gt;&lt;br /&gt;Add the following code to your web.config file just under the "&lt;system.web&gt;" tag.&lt;br /&gt;Make sure to replace the 3 occurrences of connectionStringName="LocalSQLServer" with your connection string name.&lt;br /&gt;&lt;br /&gt;This goes in the system.web section of web.config.&lt;br /&gt;&lt;membership&gt;&lt;br /&gt;    &lt;providers&gt;&lt;br /&gt;       &lt;remove name="AspNetSqlMembershipProvider"&gt;&lt;br /&gt;       &lt;add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider,            System.Web, Version=2.0.0.0, Culture=neutral,                                            PublicKeyToken=b03f5f7f11d50a3a" connectionstringname="LocalSQLServer" enablepasswordretrieval="false" enablepasswordreset="true" requiresquestionandanswer="true" applicationname="/" requiresuniqueemail="false" passwordformat="Hashed" maxinvalidpasswordattempts="5" minrequiredpasswordlength="7" minrequirednonalphanumericcharacters="1" passwordattemptwindow="10" passwordstrengthregularexpression=""&gt;&lt;br /&gt;     &lt;/add&gt;&lt;br /&gt; &lt;/remove&gt;&lt;br /&gt; &lt;profile&gt;&lt;br /&gt;     &lt;providers&gt;&lt;br /&gt;        &lt;remove name="AspNetSqlProfileProvider"&gt;&lt;br /&gt;        &lt;add name="AspNetSqlProfileProvider" connectionstringname="LocalSQLServer" applicationname="/" type="System.Web.Profile.SqlProfileProvider,              System.Web, Version=2.0.0.0, Culture=neutral,                                 PublicKeyToken=b03f5f7f11d50a3a"&gt;&lt;br /&gt;      &lt;/add&gt; &lt;br /&gt; &lt;/remove&gt;&lt;br /&gt; &lt;rolemanager&gt;&lt;br /&gt;      &lt;providers&gt;&lt;br /&gt;        &lt;remove name="AspNetSqlRoleProvider"&gt;&lt;br /&gt;        &lt;add name="AspNetSqlRoleProvider" connectionstringname="LocalSQLServer" applicationname="/" type="System.Web.Security.SqlRoleProvider,              System.Web, Version=2.0.0.0, Culture=neutral,                                             PublicKeyToken=b03f5f7f11d50a3a"&gt;&lt;br /&gt;      &lt;/add&gt;&lt;br /&gt; &lt;/remove&gt;&lt;br /&gt;&lt;br /&gt;Your database must be configured for the ASP.Net 2.0 Providers. This article assumes that you have already configured your database to use ASP.Net 2.0 Providers. If you haven't, there is an article at &lt;a href="http://www.aquesthosting.com/HowTo/Sql2005/Providers.aspx"&gt;http://www.aquesthosting.com/HowTo/Sql2005/Providers.aspx&lt;/a&gt;.&lt;/providers&gt;&lt;/rolemanager&gt;&lt;/providers&gt;&lt;/profile&gt;&lt;/providers&gt;&lt;/membership&gt;&lt;/system.web&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6109527685507475247-1040798702385750026?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/dNZderO15YM" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/dNZderO15YM/how-to-configure-sql-server-2005-to.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><thr:total>0</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2008/07/how-to-configure-sql-server-2005-to.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-5633654573493507474</guid><pubDate>Fri, 11 Jul 2008 14:41:00 +0000</pubDate><atom:updated>2009-05-12T05:13:51.710-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">.net</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><category domain="http://www.blogger.com/atom/ns#">NHibernate</category><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Hibernate</category><category domain="http://www.blogger.com/atom/ns#">ORM</category><title>NHibernate Presentations</title><description>Here are some of very importatn/impressive NHibernate presentation for biggners and advance level NHibernate developers.&lt;br /&gt;&lt;br /&gt;To start working with NHibernate you have to &lt;a href="http://www.hibernate.org/hib_docs/nhibernate/1.2/reference/en/pdf/nhibernate_reference.pdf"&gt;download&lt;/a&gt; its &lt;a href="http://www.hibernate.org/hib_docs/nhibernate/1.2/reference/en/pdf/nhibernate_reference.pdf"&gt;reference documentation &lt;/a&gt;first.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ayende.com/103/section.aspx/redirect/13"&gt;&lt;span style="text-decoration: none; color: rgb(255, 102, 0);font-size:85%;" &gt;The Basics for NHibernate&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(255, 102, 0);font-size:85%;" &gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://ayende.com/103/section.aspx/redirect/14"&gt;&lt;span style="text-decoration: none; color: rgb(255, 102, 0);font-size:85%;" &gt;Quering with NHibernate&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(255, 102, 0);font-size:85%;" &gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://ayende.com/103/section.aspx/redirect/15"&gt;&lt;span style="text-decoration: none; color: rgb(255, 102, 0);font-size:85%;" &gt;Associating with NHibernate&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(255, 102, 0);font-size:85%;" &gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://ayende.com/103/section.aspx/redirect/16"&gt;&lt;span style="text-decoration: none; color: rgb(255, 102, 0);font-size:85%;" &gt;NHibernate Advance Topics&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(255, 102, 0);font-size:85%;" &gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://ayende.com/103/section.aspx/redirect/17"&gt;&lt;span style="text-decoration: none; color: rgb(255, 102, 0);font-size:85%;" &gt;NHibernate Performance&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(255, 102, 0);font-size:85%;" &gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://ayende.com/103/section.aspx/redirect/12"&gt;&lt;span style="text-decoration: none; color: rgb(255, 102, 0);font-size:85%;" &gt;Object Relational Mapping - NHibernate &amp;amp; Active Record&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(255, 102, 0);font-size:85%;" &gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://ayende.com/103/section.aspx/redirect/18"&gt;&lt;span style="text-decoration: none; color: rgb(255, 102, 0);font-size:85%;" &gt;NHibernate Exercises (for 1.0.2)&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(255, 102, 0);font-size:85%;" &gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://ayende.com/103/section.aspx/redirect/19"&gt;&lt;span style="text-decoration: none; color: rgb(255, 102, 0);font-size:85%;" &gt;Using Castle Active Record&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;All the above given topics are open for your valuable comments :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6109527685507475247-5633654573493507474?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/jjet0Z67ClM" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/jjet0Z67ClM/nhibernate-presentations.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><thr:total>0</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2008/07/nhibernate-presentations.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6109527685507475247.post-8252136122143267689</guid><pubDate>Thu, 10 Jul 2008 15:24:00 +0000</pubDate><atom:updated>2009-05-12T05:14:19.078-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">.net</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><category domain="http://www.blogger.com/atom/ns#">NHibernate</category><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">SQL Server 2005</category><category domain="http://www.blogger.com/atom/ns#">Hibernate</category><category domain="http://www.blogger.com/atom/ns#">ORM</category><title>Generic List for NHibernate</title><description>A Generic method that takes GenericList as an argument and fill it with the data of type you pass as &lt;t&gt;. Converts a non-typed collection into a strongly typed collection. This will fail if&lt;br /&gt;the non-typed collection contains anything that cannot be casted to type of T.&lt;br /&gt;&lt;br /&gt;The sample method uses CSLA framework with Database layer as NHibernate.&lt;br /&gt;You can get CSLA from &lt;a href="http://www.lhotka.net/"&gt;http://www.lhotka.net/&lt;/a&gt; where as its NHibernate addon is available at &lt;a href="http://www.codeplex.com/"&gt;http://www.codeplex.com/&lt;/a&gt; under CSLA Contributions.&lt;br /&gt;&lt;br /&gt;Here's the code you are looking for&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public static void FillList&lt;t&gt;(out List&lt;t&gt; list)&lt;br /&gt;{&lt;br /&gt;  list = null;&lt;br /&gt;  // Get an NHibernate session factory where DatabaseKey = connectionstring&lt;br /&gt;  ISessionFactory sessionFactory = Csla.NHibernate.Cfg.GetSessionFactory(DatabaseKey);&lt;br /&gt;&lt;br /&gt;  // Open an NHibernate session from the factory&lt;br /&gt;  using (ISession session = sessionFactory.OpenSession())&lt;br /&gt;  {&lt;br /&gt;      // Begin a transaction on the session&lt;br /&gt;      using (ITransaction transaction = session.BeginTransaction())&lt;br /&gt;      {&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;&lt;span style="color: rgb(153, 51, 0);"&gt;           &lt;br /&gt;  System.Collections.IList listOfObjects = session.CreateCriteria(typeof(T)).List();&lt;br /&gt;  T[] temp = new T[listOfObjects.Count];&lt;br /&gt;  listOfObjects.CopyTo(temp, 0);&lt;br /&gt;  list = new List&lt;t&gt;(temp);&lt;br /&gt;&lt;/t&gt;&lt;/span&gt;        }&lt;br /&gt;       catch (HibernateException)&lt;br /&gt;        {&lt;br /&gt;             if (null != transaction)&lt;br /&gt;             {&lt;br /&gt;                 transaction.Rollback();&lt;br /&gt;             }&lt;br /&gt;        }&lt;br /&gt;     }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/t&gt;&lt;/t&gt;&lt;/pre&gt;&lt;/t&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6109527685507475247-8252136122143267689?l=barchitect.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/BeArchitect/~4/j0e5FC7Tfhg" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/BeArchitect/~3/j0e5FC7Tfhg/generic-list-for-nhibernate.html</link><author>noreply@blogger.com (Zafar Ullah  - zafarjcp@gmail.com)</author><thr:total>0</thr:total><feedburner:origLink>http://barchitect.blogspot.com/2008/07/generic-list-for-nhibernate.html</feedburner:origLink></item></channel></rss>

