<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Tsabar Blog</title>
	<atom:link href="http://tsabar.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://tsabar.wordpress.com</link>
	<description>Tsabar Solutions</description>
	<lastBuildDate>Thu, 30 Sep 2010 14:02:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='tsabar.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Tsabar Blog</title>
		<link>http://tsabar.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://tsabar.wordpress.com/osd.xml" title="Tsabar Blog" />
	<atom:link rel='hub' href='http://tsabar.wordpress.com/?pushpress=hub'/>
		<item>
		<title>WCF polling adapter</title>
		<link>http://tsabar.wordpress.com/2010/09/18/wcf-polling-adapter/</link>
		<comments>http://tsabar.wordpress.com/2010/09/18/wcf-polling-adapter/#comments</comments>
		<pubDate>Sat, 18 Sep 2010 13:20:39 +0000</pubDate>
		<dc:creator>Dan Gershony</dc:creator>
				<category><![CDATA[BizTalk]]></category>

		<guid isPermaLink="false">http://tsabar.wordpress.com/?p=12</guid>
		<description><![CDATA[This post shows how to Consume a BizTalk WCF-Custom adapter with sqlbindings to create a polling mechanism from a SQL table. A bit about polling. In general I am a big fan of polling from SQL, compare to having a receive port within a listen shape and a delay, which will cause dehydration. In cases [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tsabar.wordpress.com&amp;blog=15944361&amp;post=12&amp;subd=tsabar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This post shows how to Consume a BizTalk WCF-Custom adapter with  sqlbindings to create a polling mechanism from a SQL table.</p>
<p><strong>A  bit about polling.</strong></p>
<p>In general I am a big fan of polling  from SQL, compare to having a receive port within a listen shape and a  delay, which will cause dehydration. In cases of a short time  correlation when the response is expected in a fairly short time a  listen shape is a good solution especially if we might not be notified  of an exception happening later on or when implementing scatter gather  patterns, but if waiting time can exceed minutes then “waiting in the  DB”, to my opinion, is the correct approach.</p>
<p>I did come upon  solutions with messages that could wait for a correlation response from  an external system using a delay shape for <strong>month</strong>, which resulted  in <strong>thousands</strong> of dehydrated messages, that stuffs up the message  box, it’s hard to keep track of the messages and resolve failure  scenarios, not to mention the overhead on the entire system.</p>
<p>The  <strong>benefit</strong> of waiting in the DB and polling when a state was  reached reduces message box overhead and hands a lot of control over the  message in the sense of knowing what state a process is in, having the  ability to store information from the message in additional columns  (assuming for example the message is serialized to an XML column and key  fields are saved in additional columns) and the obvious ability to  query those fields, being able to initiate polling only when several  conditions are met(for example values or rows form other tables), and  easy to amend rules having the polling logic in a stored procedure.</p>
<p>There are several polling techniques available in the 2009  WCF-custom Adapter with SQL bindings as <strong>Polling</strong>,<strong> TypedPolling</strong>,  <strong>XMLPolling</strong> and <strong>notification</strong> can be found <a href="http://msdn.microsoft.com/en-us/library/dd788532(BTS.10).aspx" target="_blank">here</a>.</p>
<p>In this post I will show polling  using the XMLPolling type.</p>
<p><span style="text-decoration:underline;">A look in to the stored procedure:</span></p>
<pre>      <span style="color:#008040;">--how many messages in each batch</span>
      declare @BatchSize int = 5;
      declare @tblIDs table (BatchID int)
      declare @BatchCount int = 0;

    insert into @tblIDs
     select top(@BatchSize)  BatchID from Batch WITH(NOLOCK) where Operation = @Operation and Processed = 0

      IF (select count(BatchID) from @tblIDs) &gt; 0
      BEGIN
            update Batch set Processed = 1 where BatchID in(select BatchID from @tblIDs)
            set @BatchCount = (select count(BatchID) from @tblIDs)
      END

      declare @xVar XML
      SET @xVar =
      (
            select [xml] from Batch where BatchID in(select BatchID from @tblIDs)
            FOR XML AUTO
      );

      WITH XMLNAMESPACES (<span style="color:#ff0000;">'http://BizTalk/BatchsMessages'</span> as ns1)
       Select @Operation as Operation, @BatchCount as BatchCount ,@xVar as <span style="color:#ff0000;">'ns1:xmlMessage'</span>
      FOR XML RAW(<span style="color:#ff0000;">'ns1:BatchsMessages'</span>)</pre>
<p><!-- .csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></p>
<p><span style="text-decoration:underline;">The schema:</span></p>
<p>Use the <span style="color:#4f4fff;">xmlschema</span> command to generate an  XSD, use this XSD schema in the BizTalk project as the polling schema.</p>
<p>You need to change the import schemaLocation=”sqltypes.xsd” in the  generated XSD to point to a local XSD schema, you can get it <a href="http://go.microsoft.com/fwlink/?LinkId=131087" target="_blank">here</a>.<strong> </strong></p>
<p>Create a schema Envelope point the body XPath to the root element as  shown below:</p>
<p><a href="http://tsabar.files.wordpress.com/2010/09/image1-axd.jpg"><img style="border:0 none;" title="clip_image001" src="http://tsabar.files.wordpress.com/2010/09/image1-axd.jpg?w=649&#038;h=372" border="0" alt="clip_image001" width="649" height="372" /></a></p>
<p>The properties of the schema and the root element should look  something like this.</p>
<p><a href="http://tsabar.files.wordpress.com/2010/09/image2-axd.jpg"><img style="border:0 none;" title="clip_image001[7]" src="http://tsabar.files.wordpress.com/2010/09/image2-axd.jpg?w=357&#038;h=326" border="0" alt="clip_image001[7]" width="357" height="326" /></a> <a href="http://tsabar.files.wordpress.com/2010/09/image3-axd.jpg"><img style="border:0 none;" title="clip_image001[9]" src="http://tsabar.files.wordpress.com/2010/09/image3-axd.jpg?w=352&#038;h=331" border="0" alt="clip_image001[9]" width="352" height="331" /></a></p>
<p><span style="text-decoration:underline;">PipeLine:</span></p>
<p>Create a receive pipeline and add a dissembler component, add the  pooling schema to the Document schemas (collection) and the envelope  schema to the Envelope schema (collection).</p>
<p>This should strap the wrapper element the adapter will add to the  message.</p>
<p><span style="text-decoration:underline;">Orchestration:</span></p>
<p>In the orchestration create an activate receive port specified to  receive a messages of the pooling schema type.</p>
<p><a href="http://tsabar.files.wordpress.com/2010/09/image4-axd.jpg"><img style="border:0 none;" title="clip_image001[12]" src="http://tsabar.files.wordpress.com/2010/09/image4-axd.jpg?w=582&#038;h=118" border="0" alt="clip_image001[12]" width="582" height="118" /></a></p>
<p>The port message type should be set to the polling schema type.</p>
<p><a href="http://tsabar.files.wordpress.com/2010/09/image5-axd.jpg"><img style="border:0 none;" title="clip_image001[14]" src="http://tsabar.files.wordpress.com/2010/09/image5-axd.jpg?w=348&#038;h=169" border="0" alt="clip_image001[14]" width="348" height="169" /></a></p>
<p><span style="text-decoration:underline;">Physical port binding:</span></p>
<p>Create a WCF-Custom receive location with sqlbinding as shown bellow.</p>
<p><a href="http://tsabar.files.wordpress.com/2010/09/image6-axd.jpg"><img style="border:0 none;" title="clip_image001[16]" src="http://tsabar.files.wordpress.com/2010/09/image6-axd.jpg?w=729&#038;h=611" border="0" alt="clip_image001[16]" width="729" height="611" /></a></p>
<p>The root node and namespace must match the ones on the envelope  schema, the pipeline will strip off that root element passing in to the  orchestration the polling schema.</p>
<p>Attach the pipeline to the receive location.</p>
<p><strong>Note</strong> you must have some select statement or a SP call in the  polledDataAvailableStatement property, should be some sort of count, if  the result from that statement is &gt;0 a call is made to the next  statement ”pollingStatement” (tip: you can initiate polling by  specifying “select 1”).</p>
<p>You are good to go .</p>
<p>A walk through how to create XMLPolling WCF custom with SQL binding  can be found <a href="http://msdn.microsoft.com/en-us/library/dd788084(BTS.10).aspx" target="_blank">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tsabar.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tsabar.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tsabar.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tsabar.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tsabar.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tsabar.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tsabar.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tsabar.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tsabar.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tsabar.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tsabar.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tsabar.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tsabar.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tsabar.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tsabar.wordpress.com&amp;blog=15944361&amp;post=12&amp;subd=tsabar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tsabar.wordpress.com/2010/09/18/wcf-polling-adapter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/12663d0176698e2ec0ac4fbf75c2ca82?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">poblico</media:title>
		</media:content>

		<media:content url="http://tsabar.files.wordpress.com/2010/09/image1-axd.jpg" medium="image">
			<media:title type="html">clip_image001</media:title>
		</media:content>

		<media:content url="http://tsabar.files.wordpress.com/2010/09/image2-axd.jpg" medium="image">
			<media:title type="html">clip_image001[7]</media:title>
		</media:content>

		<media:content url="http://tsabar.files.wordpress.com/2010/09/image3-axd.jpg" medium="image">
			<media:title type="html">clip_image001[9]</media:title>
		</media:content>

		<media:content url="http://tsabar.files.wordpress.com/2010/09/image4-axd.jpg" medium="image">
			<media:title type="html">clip_image001[12]</media:title>
		</media:content>

		<media:content url="http://tsabar.files.wordpress.com/2010/09/image5-axd.jpg" medium="image">
			<media:title type="html">clip_image001[14]</media:title>
		</media:content>

		<media:content url="http://tsabar.files.wordpress.com/2010/09/image6-axd.jpg" medium="image">
			<media:title type="html">clip_image001[16]</media:title>
		</media:content>
	</item>
		<item>
		<title>Monitoring BizTalk Performance Counters for throttling</title>
		<link>http://tsabar.wordpress.com/2010/09/18/monitoring-biztalk-performance-counters-for-throttling/</link>
		<comments>http://tsabar.wordpress.com/2010/09/18/monitoring-biztalk-performance-counters-for-throttling/#comments</comments>
		<pubDate>Sat, 18 Sep 2010 13:00:17 +0000</pubDate>
		<dc:creator>Dan Gershony</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://tsabar.wordpress.com/?p=4</guid>
		<description><![CDATA[In occasions when a BizTalk server has a big load to process often we will notice every thing slows down and it seems BizTalk is not processing any more messages. This happens when a throttling state was achieved, and BizTalk will stop processing messages, In my case the Message delivery throttling state had the value [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tsabar.wordpress.com&amp;blog=15944361&amp;post=4&amp;subd=tsabar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In occasions when a BizTalk server has a big load to process often we  will notice every thing slows down and it seems BizTalk is <strong>not</strong> processing any more messages.</p>
<p>This happens when a <strong>throttling</strong> state was achieved, and BizTalk will stop processing messages, In my  case the Message delivery throttling state had the value of 3 meaning “<strong>Throttling  due to high in-process message count</strong>” we had too many messages  going in, allowing the host to use more memory(see below) solved the  problem for the amount of messages that where input to BizTalk.</p>
<p>To  monitor BizTalk throttling states we can use some performance counters,  to add the counters:</p>
<p>go to:  <em>Performance monitor -&gt;  BizTalk:MessageAgent</em></p>
<p><a href="http://tsabar.files.wordpress.com/2010/09/image1-axd.png"><img class="alignnone" title="Perfcount" src="http://tsabar.files.wordpress.com/2010/09/image1-axd.png?w=507&#038;h=480" alt="" width="507" height="480" /></a></p>
<p>The description for  each of the performance counters can be found here <a title="http://msdn.microsoft.com/en-us/library/aa578302%28BTS.20%29.aspx" href="http://msdn.microsoft.com/en-us/library/aa578302%28BTS.20%29.aspx" target="_blank">msdn</a>.</p>
<p>Tip: on 64 bit machines we  can allow the host to use up to 50% of the memory on the server that  will allow BizTalk the ability to have a higher throughput.</p>
<p>On  the host configuration click <em>advanced -&gt; throttling trash hold  -&gt; Process memory usage</em> (<strong>on 64 bit can increase to 50%</strong>)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tsabar.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tsabar.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tsabar.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tsabar.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tsabar.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tsabar.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tsabar.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tsabar.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tsabar.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tsabar.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tsabar.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tsabar.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tsabar.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tsabar.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tsabar.wordpress.com&amp;blog=15944361&amp;post=4&amp;subd=tsabar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tsabar.wordpress.com/2010/09/18/monitoring-biztalk-performance-counters-for-throttling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/12663d0176698e2ec0ac4fbf75c2ca82?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">poblico</media:title>
		</media:content>

		<media:content url="http://tsabar.files.wordpress.com/2010/09/image1-axd.png" medium="image">
			<media:title type="html">Perfcount</media:title>
		</media:content>
	</item>
		<item>
		<title>Using the Tuning Advisor to to improve SQL performance</title>
		<link>http://tsabar.wordpress.com/2010/01/18/using-the-tuning-advisor-to-to-improve-sql-performance/</link>
		<comments>http://tsabar.wordpress.com/2010/01/18/using-the-tuning-advisor-to-to-improve-sql-performance/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 13:35:27 +0000</pubDate>
		<dc:creator>Dan Gershony</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://tsabar.wordpress.com/?p=27</guid>
		<description><![CDATA[This post is about how to use the DataBase Engine Tuning Advisor. Performance is a key issue in solutions and performance has very much to do with calling SQL procedures and avoiding deadlocks so tuning up SP can significantly boost performance. SQL provides the DataBase Engine Tuning Advisor which is a tool to help indexing [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tsabar.wordpress.com&amp;blog=15944361&amp;post=27&amp;subd=tsabar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This post is about how to use the DataBase Engine Tuning Advisor.</p>
<p>Performance is a key issue in solutions and performance has very  much to do with calling SQL procedures and avoiding deadlocks so tuning  up SP can significantly boost performance.</p>
<p>SQL provides the  DataBase Engine Tuning Advisor which is a tool to help indexing SQL  tables.</p>
<p>In order to evaluate the DB performance we need to have a  sample to tune on, this is where the SQL Sever profiler comes in.</p>
<p>How  to create a Trace file:</p>
<blockquote><p>1. On the SQL management  studio go to tools -&gt; SQL Profiler.</p>
<p>2. Start a new trace  make sure you specify a file to save to and use the Tuning template</p>
<p><a href="http://tsabar.files.wordpress.com/2010/01/image1-axd.jpg"><img style="border:0 none;" title="clip_image0018_thumb4[10]" src="http://tsabar.files.wordpress.com/2010/01/image1-axd.jpg?w=659&#038;h=416" border="0" alt="clip_image0018_thumb4[10]" width="659" height="416" /></a></p>
<p>3. Select the Events  Selection tab and click on Column Filters to bring up the Edit Filter  window, now specify the name of the DB to trace</p>
<p><a href="http://tsabar.files.wordpress.com/2010/01/image2-axd.jpg"><img style="border:0 none;" title="clip_image002_thumb6" src="http://tsabar.files.wordpress.com/2010/01/image2-axd.jpg?w=664&#038;h=422" border="0" alt="clip_image002_thumb6" width="664" height="422" /></a></p>
<p>4. Press run to  start tracing, now is the point where you need to start using your  application, in my case pushing messages in to the BizTalk server and  the more the better try to cover as much scenarios as possible  especially scenarios that interact with SQL Server so the trace can have  good statistics.</p>
<p><a href="http://tsabar.files.wordpress.com/2010/01/image3-axd.jpg"><img style="border:0 none;" title="clip_image003_thumb2" src="http://tsabar.files.wordpress.com/2010/01/image3-axd.jpg?w=666&#038;h=484" border="0" alt="clip_image003_thumb2" width="666" height="484" /></a></p>
<p>5. After letting the  systems run for some time (In my case I let the system run for a couple  of minutes)  we can stop the trace and now its time to use the tuning  advisor, From the SQL management studio/or the profiler itself go to  tools -&gt; DataBase Engine Tuning Advisor.</p>
<p>6. Create a new  session specify the trace file created in the Profiler, select the  workload database which is you DB and select the same DB to tune(I  selected all tables) then press the Start Analysis button. should look  like the following</p>
<p><a href="http://tsabar.files.wordpress.com/2010/01/image4-axd.jpg"><img style="border:0 none;" title="clip_image004_thumb6" src="http://tsabar.files.wordpress.com/2010/01/image4-axd.jpg?w=517&#038;h=491" border="0" alt="clip_image004_thumb6" width="517" height="491" /></a></p>
<p>7. When the analysis  is finished we get a recommendation of which tables to index and  actually the script itself, notice the estimated improvement percentage  on the top left and bellow are some other screen shots of the report  that was generated</p>
<p><a href="http://tsabar.files.wordpress.com/2010/01/image5-axd.jpg"><img style="border:0 none;" title="clip_image005_thumb2" src="http://tsabar.files.wordpress.com/2010/01/image5-axd.jpg?w=642&#038;h=209" border="0" alt="clip_image005_thumb2" width="642" height="209" /></a></p>
<p>The reports, other  reports are available in the select report drop down</p>
<p><a href="http://tsabar.files.wordpress.com/2010/01/image6-axd.jpg"><img style="border:0 none;" title="clip_image006_thumb2" src="http://tsabar.files.wordpress.com/2010/01/image6-axd.jpg?w=481&#038;h=527" border="0" alt="clip_image006_thumb2" width="481" height="527" /></a></p></blockquote>
<p>After  creating the indexes and running the tuning advisor again I managed to  get 0% estimated improvement, Note before creating the indexes one of  the SP had occasional Dead Locks, after indexing that never happened  again.</p>
<p>A good reason to use the tuning Advisor is to sort out  Dead Lock errors (in my case I over indexed several columns which can  actually decrease performance).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tsabar.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tsabar.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tsabar.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tsabar.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tsabar.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tsabar.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tsabar.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tsabar.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tsabar.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tsabar.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tsabar.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tsabar.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tsabar.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tsabar.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tsabar.wordpress.com&amp;blog=15944361&amp;post=27&amp;subd=tsabar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tsabar.wordpress.com/2010/01/18/using-the-tuning-advisor-to-to-improve-sql-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/12663d0176698e2ec0ac4fbf75c2ca82?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">poblico</media:title>
		</media:content>

		<media:content url="http://tsabar.files.wordpress.com/2010/01/image1-axd.jpg" medium="image">
			<media:title type="html">clip_image0018_thumb4[10]</media:title>
		</media:content>

		<media:content url="http://tsabar.files.wordpress.com/2010/01/image2-axd.jpg" medium="image">
			<media:title type="html">clip_image002_thumb6</media:title>
		</media:content>

		<media:content url="http://tsabar.files.wordpress.com/2010/01/image3-axd.jpg" medium="image">
			<media:title type="html">clip_image003_thumb2</media:title>
		</media:content>

		<media:content url="http://tsabar.files.wordpress.com/2010/01/image4-axd.jpg" medium="image">
			<media:title type="html">clip_image004_thumb6</media:title>
		</media:content>

		<media:content url="http://tsabar.files.wordpress.com/2010/01/image5-axd.jpg" medium="image">
			<media:title type="html">clip_image005_thumb2</media:title>
		</media:content>

		<media:content url="http://tsabar.files.wordpress.com/2010/01/image6-axd.jpg" medium="image">
			<media:title type="html">clip_image006_thumb2</media:title>
		</media:content>
	</item>
		<item>
		<title>Schema validation component</title>
		<link>http://tsabar.wordpress.com/2009/12/30/schema-validation-component/</link>
		<comments>http://tsabar.wordpress.com/2009/12/30/schema-validation-component/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 10:39:42 +0000</pubDate>
		<dc:creator>Dan Gershony</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://tsabar.wordpress.com/?p=38</guid>
		<description><![CDATA[In my latest project we had a requirement to validate schemas, In several locations within the process flow schemas needed validation. Now I know validation can be performed in an xml pipeline, but then again when looking in to the pipeline code using reflection validation happens using an XmlReader against the XSD schema, there are [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tsabar.wordpress.com&amp;blog=15944361&amp;post=38&amp;subd=tsabar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In my latest project we had a requirement to validate schemas, In  several locations within the process flow schemas needed validation.</p>
<p>Now  I know validation can be performed in an xml pipeline, but then again  when looking in to the pipeline code using reflection validation happens  using an <strong>XmlReader</strong> against the XSD schema, there are several benefits in writing a custom component.</p>
<p>The <strong>XmlReader</strong> takes in its constructor an <strong>XmlReaderSettings</strong> component, the <strong>XmlReaderSettings</strong> exposes an event we can subscribe to which will trigger if the schema  validation fails, This allows to create an ESB fault message(we where  using the ESB Exception management portal) without running within a try  catch block, which is more preferment.</p>
<p>The <strong>XmlReaderSettings</strong> uses the <strong>XmlSchemaSet</strong> object to store the schemas it will validate against which allows the  ability to cache the schemas and thus improve performance. <strong><span style="text-decoration:underline;">Note</span></strong> that <strong>XmlSchemaSet</strong> is guaranteed to be thread safe only when used as a static  field(singleton), all schemas that need validation must be loaded in to  the <strong>XmlSchemaSet</strong> in the static constructor and thus create a caching effect.</p>
<p>The code is available here <a href="http://f65s8a.blu.livefilestore.com/y1pr1iTA7TDNbZXUYPROrULdzuE8NW8dGmt3XT_Lf0Vw_3Gu6YVrE6R0Y7o2BYiTezQmj2ebwV76BuUaCQjowBw6KH21NFpvgEm/2009_12_SchemaValidation.cs?download&amp;psid=1">SchemaValidation.cs</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tsabar.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tsabar.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tsabar.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tsabar.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tsabar.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tsabar.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tsabar.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tsabar.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tsabar.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tsabar.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tsabar.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tsabar.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tsabar.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tsabar.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tsabar.wordpress.com&amp;blog=15944361&amp;post=38&amp;subd=tsabar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tsabar.wordpress.com/2009/12/30/schema-validation-component/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/12663d0176698e2ec0ac4fbf75c2ca82?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">poblico</media:title>
		</media:content>
	</item>
		<item>
		<title>Enumerating context properties</title>
		<link>http://tsabar.wordpress.com/2009/12/02/enumerating-context-properties/</link>
		<comments>http://tsabar.wordpress.com/2009/12/02/enumerating-context-properties/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 10:37:36 +0000</pubDate>
		<dc:creator>Dan Gershony</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://tsabar.wordpress.com/?p=36</guid>
		<description><![CDATA[Enumerating the context properties of a BizTalk message can be useful when trying to solve an error in an orchestration. I wrote the following method to our tracing component that will loop through the context properties of an XLANGMessage. because the context properties are hidden within the XMessage object in the Microsoft.XLANGs.Core name space, I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tsabar.wordpress.com&amp;blog=15944361&amp;post=36&amp;subd=tsabar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Enumerating the context properties of a BizTalk message can be useful when trying to solve an error in an orchestration.</p>
<p>I wrote the following method to our tracing component that will loop through the context properties of an XLANGMessage.</p>
<p>because  the context properties are hidden within the XMessage object in the  Microsoft.XLANGs.Core name space, I had to use reflection to unwrap   XMessage in order to expose the GetContextProperties() method.</p>
<p><strong>Important:</strong></p>
<p>This method uses the internal method &#8220;Unwrap&#8221; in the XMessage object that is <strong>NOT</strong> intended to be used by user code <strong>DO NOT USE</strong> this method in a production environment, I use it only for testing purposes and remove the call to the method when finished.</p>
<pre>public void WriteMessageProperties(XLANGMessage message)
{
    try
    {
        StringBuilder sb = new StringBuilder();
        sb.Append(Environment.NewLine);
        if (message is Microsoft.XLANGs.Core.MessageWrapperForUserCode)
        {
            Microsoft.XLANGs.Core..MessageWrapperForUserCode mwu = (Microsoft.XLANGs.Core..MessageWrapperForUserCode)message;
            Microsoft.XLANGs.Core.XMessage xmessage = (Microsoft.XLANGs.Core.XMessage)mwu.GetType()
            .GetMethod("Unwrap", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic)
            .Invoke(mwu, null);
            if (xmessage != null)
            {
                System.Collections.Hashtable ht = xmessage.GetContextProperties();
                Microsoft.XLANGs.Core.XmlQNameTable tbl = new Microsoft.XLANGs.Core.XmlQNameTable(ht);
                foreach (System.Collections.DictionaryEntry dic in tbl)
                {
                    Microsoft.XLANGs.BaseTypes.XmlQName N = (Microsoft.XLANGs.BaseTypes.XmlQName)dic.Key;
                    sb.Append(N.Name + " : " + dic.Value + Environment.NewLine);
                }
            }
        }
        LogEntry entry = new LogEntry();
        entry.Message = sb.ToString();
        entry.Categories = new string[1] { sourceType };
        entry.Severity = System.Diagnostics.TraceEventType.Verbose;
        Logger.Write(entry);
    }
    catch (Exception ex)
    {
        Debug.WriteLine(ex.ToString(), "Error");
    }
    finally
    {
        // Call Dispose on the XLANGMessage object
        // because the message doesn't belong to the
        // .NET runtime - it belongs to the MessageBox database
        message.Dispose();
    }
}</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tsabar.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tsabar.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tsabar.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tsabar.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tsabar.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tsabar.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tsabar.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tsabar.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tsabar.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tsabar.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tsabar.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tsabar.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tsabar.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tsabar.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tsabar.wordpress.com&amp;blog=15944361&amp;post=36&amp;subd=tsabar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tsabar.wordpress.com/2009/12/02/enumerating-context-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/12663d0176698e2ec0ac4fbf75c2ca82?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">poblico</media:title>
		</media:content>
	</item>
		<item>
		<title>catch the close button event on a windows form</title>
		<link>http://tsabar.wordpress.com/2009/09/18/catch-the-close-button-event-on-a-windows-form/</link>
		<comments>http://tsabar.wordpress.com/2009/09/18/catch-the-close-button-event-on-a-windows-form/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 13:44:55 +0000</pubDate>
		<dc:creator>Dan Gershony</dc:creator>
				<category><![CDATA[Win Forms]]></category>

		<guid isPermaLink="false">http://tsabar.wordpress.com/?p=34</guid>
		<description><![CDATA[In order to catch the close button event of the form we need to override the WndProc method. Code: public partial class MyForm : Form { public MyForm() { InitializeComponent(); } protected override void WndProc(ref Message M) { const int WM_SYSCOMMAND = 0x112; const int SC_CLOSE = 0xf060; if (M.Msg == WM_SYSCOMMAND &#38; M.WParam.ToInt32() == [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tsabar.wordpress.com&amp;blog=15944361&amp;post=34&amp;subd=tsabar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In order to catch the close button event of the form we need to  override the <strong>WndProc</strong> method.</p>
<p>Code:</p>
<pre>public partial class MyForm : Form
{
    public MyForm()
    {
        InitializeComponent();
    }

    protected override void WndProc(ref Message M)
    {
        const int WM_SYSCOMMAND = 0x112;
        const int SC_CLOSE = 0xf060;

        if (M.Msg == WM_SYSCOMMAND &amp; M.WParam.ToInt32() == SC_CLOSE)
        {
            // User clicked the X - close button
            // Any code handling goes here:

            return;
        }

        base.WndProc(ref M);
    }
}</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tsabar.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tsabar.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tsabar.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tsabar.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tsabar.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tsabar.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tsabar.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tsabar.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tsabar.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tsabar.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tsabar.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tsabar.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tsabar.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tsabar.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tsabar.wordpress.com&amp;blog=15944361&amp;post=34&amp;subd=tsabar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tsabar.wordpress.com/2009/09/18/catch-the-close-button-event-on-a-windows-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/12663d0176698e2ec0ac4fbf75c2ca82?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">poblico</media:title>
		</media:content>
	</item>
		<item>
		<title>Balls bouncing and colliding on the screen</title>
		<link>http://tsabar.wordpress.com/2009/09/18/balls-bouncing-and-colliding-on-the-screen/</link>
		<comments>http://tsabar.wordpress.com/2009/09/18/balls-bouncing-and-colliding-on-the-screen/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 13:36:11 +0000</pubDate>
		<dc:creator>Dan Gershony</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Win Forms]]></category>

		<guid isPermaLink="false">http://tsabar.wordpress.com/?p=29</guid>
		<description><![CDATA[Just a small graphical application i made in my free time. The program has a ball form which is called in a loop from the void main method. We catch the paint event which is where the ball is drawn: private void BallForm_Paint(object sender, PaintEventArgs e) { Width = Convert.ToInt32(radios * 2); //24; Height = [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tsabar.wordpress.com&amp;blog=15944361&amp;post=29&amp;subd=tsabar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just a small graphical application i made in my free time.<br />
The  program has a ball form which is called in a loop from the<strong> void main</strong> method.</p>
<p>We catch the paint event which is where the ball is  drawn:</p>
<pre>private void BallForm_Paint(object sender, PaintEventArgs e)
{
    Width = Convert.ToInt32(radios * 2); //24;
    Height = Convert.ToInt32(radios * 2); //24;

    Graphics g = e.Graphics;
    g.Clear(Color.Cyan);
    g.FillPie(new SolidBrush(col), 0, 0, Width - 1, Height - 1, 0, 360);
    g.DrawArc(new Pen(Color.Black,2), 0, 0, Width - 1, Height - 1, 0, 360);
}</pre>
<p><strong>Gravity:</strong><br />
the balls are under the force of gravity there for always pulled  down, to get this effect every tick  the Y vector decreased in just a  bit which simulated gravity and can be modified to have a stronger  gravitational pull if increased</p>
<pre>double gravity = 0.1;</pre>
<pre>moveY += gravity;</pre>
<p>also the X vector is changed to simulate fraction<br />
moveX *= 0.75;</p>
<p><strong>Collision:</strong><br />
balls that collide with one each other are calculated to bounce  away in the opposite direction of the impact, in this case some physics  is needed to calculate the direction of 2 collisions using the radios of  the circles equation to find if one ball entered another balls radios  space</p>
<pre>double distIn = Math.Sqrt(Math.Pow((int)x1 - (int)x2, 2) + Math.Pow((int)y1 - (int)y2, 2));</pre>
<pre>m = (y2 - y1) / (x2 - x1);
double b = y1 - (m * x1);</pre>
<p>and the velocity of the ball which absorbs the velocity from the ball  it collided with<br />
double difX = Math.Abs(oBall.moveX &#8211; moveX);<br />
double difY = Math.Abs(oBall.moveY &#8211; moveY);</p>
<p>if right clicking on a ball a small menu will open and allow some  functionality like make it bounce again(which will any way happen when  the ball stops movement) the tricky part is to catch the right click  event exactly when the pointer is over the ball good luck <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>here is the source code:</p>
<div id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:ea11d625-6c8e-4808-8ad2-cfe5ae8fec56">
<p>Visual studio 2005: <a href="http://f65s8a.blu.livefilestore.com/y1pMxfc5OYNlT80IYzPRxHa6Ra3XonNAwI2RajYBG6TeZeTp2t7_6YfnE9Wfj9uGeAjiChdOxWzlcUEXBKHbkE1Q-eX8vWomdvQ/BouncingBallSRC.zip?download&amp;psid=1">BouncingBall-SRC.zip</a></p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tsabar.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tsabar.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tsabar.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tsabar.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tsabar.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tsabar.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tsabar.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tsabar.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tsabar.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tsabar.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tsabar.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tsabar.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tsabar.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tsabar.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tsabar.wordpress.com&amp;blog=15944361&amp;post=29&amp;subd=tsabar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tsabar.wordpress.com/2009/09/18/balls-bouncing-and-colliding-on-the-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/12663d0176698e2ec0ac4fbf75c2ca82?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">poblico</media:title>
		</media:content>
	</item>
		<item>
		<title>set the Tab Key in Infragistics UltraTabWorkspace</title>
		<link>http://tsabar.wordpress.com/2009/09/18/set-the-tab-key-in-infragistics-ultratabworkspace/</link>
		<comments>http://tsabar.wordpress.com/2009/09/18/set-the-tab-key-in-infragistics-ultratabworkspace/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 13:23:47 +0000</pubDate>
		<dc:creator>Dan Gershony</dc:creator>
				<category><![CDATA[Win Forms]]></category>

		<guid isPermaLink="false">http://tsabar.wordpress.com/?p=14</guid>
		<description><![CDATA[In the Infragistics.Practices.CompositeUI.WinForms.UltraTabWorkspace workspace. one of the projects i worked on we needed to have the Tab item key property set with a unique key, unfortunately the key property is not set when the tab is created(actually it was never set and always resolved to be null). first of all create a custom SmartPartInfo that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tsabar.wordpress.com&amp;blog=15944361&amp;post=14&amp;subd=tsabar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In the <strong>Infragistics.Practices.CompositeUI.WinForms.UltraTabWorkspace</strong> workspace.<br />
one of the projects i worked on we needed to have  the Tab item key property set with a unique key, unfortunately the key  property is not set when the tab is created(actually it was never set  and always resolved to be null).</p>
<p>first of all create a custom  SmartPartInfo that will hold an extra property TabKey.</p>
<pre>public class CustomTabSmartPartInfo : Infragistics.Practices.CompositeUI.WinForms.UltraTabSmartPartInfo
{
    private string _TabKey;
    public string TabKey
    {
        get { return _TabKey; }
        set { _TabKey = value; }
    }
}</pre>
<p>next inherit from the <strong>UltraTabWorkspace</strong> control and override  two methods that will help set the key “manually”.</p>
<pre>/// &lt;summary&gt;
/// inherited UltraTabWorkspace object in order to get access to the override methods
/// &lt;/summary&gt;
/// &lt;remarks&gt;the reason is to set the TabKey property when the a workItem is created&lt;/remarks&gt;
public class CustomUltraTabWorkspace : Infragistics.Practices.CompositeUI.WinForms.UltraTabWorkspace
{
    private string addTabKey;

    protected override void OnShow(System.Windows.Forms.Control smartPart, Infragistics.Practices.CompositeUI.WinForms.UltraTabSmartPartInfo smartPartInfo)
    {
        if ((smartPartInfo) is CustomTabSmartPartInfo)
        {
            if (Strings.Len(((CustomTabSmartPartInfo)smartPartInfo).TabKey) &gt; 0)
            {
                addTabKey = ((CustomTabSmartPartInfo)smartPartInfo).TabKey;
            }
        }
        base.OnShow(smartPart, smartPartInfo);
        addTabKey = string.Empty;
    }

    protected override void OnControlAdded(System.Windows.Forms.ControlEventArgs e)
    {
        base.OnControlAdded(e);
        if (Strings.Len(addTabKey) &gt; 0)
        {
            if ((e.Control) is Infragistics.Win.UltraWinTabControl.UltraTabPageControl)
            {
                ((Infragistics.Win.UltraWinTabControl.UltraTabPageControl)e.Control).Tab.Key = addTabKey;
            }
        }
    }
}</pre>
<p>when <strong>OnShow()</strong> is called for the first time <strong>OnControlAdded()</strong> will be called as well, this is the point to set the Tab Key which is  extracted from the Custom <strong>smartPartInfo</strong> created earlier.</p>
<pre>CustomTabSmartPartInfo spi = new CustomTabSmartPartInfo();

spi.Title = tabText;
spi.TabKey = mSessionId + mName + ":" + viewId; ;
spi.ActivateTab = activateTab;

MyWorkspace.Show(thisView, spi);</pre>
<p>All set the <strong>Tab’s Key</strong> property is populated and we have  control over the <strong>content</strong> of the key, in my case it had to reflect  the active session and the view id.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tsabar.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tsabar.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tsabar.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tsabar.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tsabar.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tsabar.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tsabar.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tsabar.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tsabar.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tsabar.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tsabar.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tsabar.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tsabar.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tsabar.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tsabar.wordpress.com&amp;blog=15944361&amp;post=14&amp;subd=tsabar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tsabar.wordpress.com/2009/09/18/set-the-tab-key-in-infragistics-ultratabworkspace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/12663d0176698e2ec0ac4fbf75c2ca82?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">poblico</media:title>
		</media:content>
	</item>
		<item>
		<title>Raise an error in a Stored procedure</title>
		<link>http://tsabar.wordpress.com/2009/05/18/raise-an-error-in-a-stored-procedure/</link>
		<comments>http://tsabar.wordpress.com/2009/05/18/raise-an-error-in-a-stored-procedure/#comments</comments>
		<pubDate>Mon, 18 May 2009 13:37:39 +0000</pubDate>
		<dc:creator>Dan Gershony</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://tsabar.wordpress.com/?p=31</guid>
		<description><![CDATA[How to raise an error on an SP and catch the exception in code Some times, especially when working in a transactional environment,  we wound need to raise an exception from our SQL server Stored Procedure deliberately and catch this exception, for example, in a c# application within a try catch block in order to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tsabar.wordpress.com&amp;blog=15944361&amp;post=31&amp;subd=tsabar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>How to raise an error on an SP and catch the exception in code</p>
<p>Some  times, especially when working in a <strong>transactional environment</strong>,   we wound need to raise an exception from our SQL server Stored Procedure  deliberately and catch this exception, for example, in a <strong>c#  application</strong> within a try catch block in order to <strong>Roll Back</strong> the changes.</p>
<p>This is common behaviour when having the .NET code  manage the <strong>transaction logic</strong>, when the code will call several  Stored Procedures and the Roll Back is coordinated in code.</p>
<p>so  our call to the DB will look something like this:</p>
<pre>using (SqlDB db = new SqlDB(BusinessLogic.Constants.ConnectString))
{
     try
     {</pre>
<blockquote>
<pre>    SqlParameter p;
    SqlCommand cmd;</pre>
</blockquote>
<pre>         using (cmd = new SqlCommand("usp_MyUsp", db.Connection, db.Transaction))
         {
              p = new SqlParameter("@id", SqlDbType.NVarChar, 50); p.Value = data.id; cmd.Parameters.Add(p);
              p = new SqlParameter("@data1", SqlDbType.NVarChar, 40); p.Value = data.data1; cmd.Parameters.Add(p);
              p = new SqlParameter("@data1", SqlDbType.Int); p.Value = data.data1; cmd.Parameters.Add(p);</pre>
<pre>              cmd.CommandType = CommandType.StoredProcedure;</pre>
<pre>              cmd.ExecuteReader()</pre>
<pre>         }</pre>
<blockquote>
<pre>    db.Commit();</pre>
</blockquote>
<pre>     }
     catch (Exception ex)
     {
         db.Rollback();</pre>
<pre>     }</pre>
<pre>}</pre>
<p>To raise an error in the SP that will be caught in the catch block we  need to call the SQL server method RAISERROR() and immediately return a  value. the Stored Procedure to raise the error would look something  like this:</p>
<pre></pre>
<pre>  DECLARE @DocID int;</pre>
<pre>  --find the id
  SELECT @DocID = id FROM table WHERE id = @id

  --if not exist send back an error
  IF @DocID is null
  BEGIN
      RAISERROR('ID not Found', 16, 1)
      RETURN -1
  END
</pre>
<pre></pre>
<p>note: concatenating the error message might create an error.</p>
<p>This example is very general, the two numbered parameters passed in  to the method in this case (16 ,1) represent the severity and status of  the raised error.</p>
<p>for more detailed information you can read it on the MSDN pages. <a title="http://msdn.microsoft.com/en-us/library/ms178592.aspx" href="http://msdn.microsoft.com/en-us/library/ms178592.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/ms178592.aspx</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tsabar.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tsabar.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tsabar.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tsabar.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tsabar.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tsabar.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tsabar.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tsabar.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tsabar.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tsabar.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tsabar.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tsabar.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tsabar.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tsabar.wordpress.com/31/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tsabar.wordpress.com&amp;blog=15944361&amp;post=31&amp;subd=tsabar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tsabar.wordpress.com/2009/05/18/raise-an-error-in-a-stored-procedure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/12663d0176698e2ec0ac4fbf75c2ca82?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">poblico</media:title>
		</media:content>
	</item>
		<item>
		<title>focus tab items in a CAB workspace</title>
		<link>http://tsabar.wordpress.com/2008/09/18/focus-tab-items-in-a-cab-workspace/</link>
		<comments>http://tsabar.wordpress.com/2008/09/18/focus-tab-items-in-a-cab-workspace/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 13:27:07 +0000</pubDate>
		<dc:creator>Dan Gershony</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Win Forms]]></category>

		<guid isPermaLink="false">http://tsabar.wordpress.com/?p=20</guid>
		<description><![CDATA[In one of the projects i worked on we where implementing Microsoft CAB (Composite UI Application Blocks) one of the features of the CAB is the tab view workspace. Problem: Tab items (which in our application inherited from System.Windows.Forms.Control as one of its base classes) where created and added to the Infragistics.Practices.CompositeUI.WinForms.UltraTabWorkspace workspace from the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tsabar.wordpress.com&amp;blog=15944361&amp;post=20&amp;subd=tsabar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In one of the projects i worked on we where implementing <strong>Microsoft  CAB (Composite UI Application Blocks)</strong> one of the features of the  CAB is the tab view workspace.</p>
<p><strong><span style="text-decoration:underline;">Problem:</span></strong><br />
Tab  items (which in our application inherited from <strong>System.Windows.Forms.Control</strong> as one of its base classes) where created and added to the <strong>Infragistics.Practices.CompositeUI.WinForms.UltraTabWorkspace</strong> workspace from the work item class.<br />
When the tab got focus by  calling the <strong>Show(ByVal smartPart As Object)</strong> method on the <strong>SmartParts.IWorkspace</strong> workspace class,<br />
the last control to have the focus did not get  it back infect the focus was on the tab itself and not on one of its  child controls(as we required).</p>
<p>for example if a tab had a  Textbox as one of it&#8217;s child controls, when the focus is on the Textbox  then we change to another tab and change back the focus<br />
did not  return to the Textbox(but stayed on the tab header itself)</p>
<p>there  was no way to pick an event by the view after it was showed by the  workspace,<br />
so i had to inherit from the <strong>UltraTabWorkspace</strong> and override the <strong>OnSmartPartActivated</strong> method.</p>
<p>Another  problem was inner controls that had their child controls stored in a  panel.<br />
This was solved by having each of those controls implement  an interface IPanelControl which returned the panel property of that  control.</p>
<p><strong><span style="text-decoration:underline;">Solution:</span></strong><br />
the solution was to  iterate thru all controls and child controls(and panel child controls)  and listen to their <strong>GotFocus</strong> event,<br />
when it is invoked  save a reference to that control so we can refocus it later<br />
(another  problem was controls that where added dynamically i solved by  overriding the <strong>OnControlAdded</strong> method)</p>
<p>refocusing was  done by overriding the method <strong>OnSmartPartActivated</strong> on the <strong>UltraTabWorkspace</strong></p>
<p>here is the code:</p>
<pre>class TabView : System.Windows.Forms.Control
{
    /// &lt;summary&gt;
    /// 'monitor the views control add flow
    /// &lt;/summary&gt;
    /// &lt;param name="e"&gt;&lt;/param&gt;
    /// &lt;remarks&gt;&lt;/remarks&gt;
    protected override void OnControlAdded(System.Windows.Forms.ControlEventArgs e)
    {
        base.OnControlAdded(e);
        zSetFocusHandlers(e.Control);
        e.Control.ControlAdded += ControlAddedEvent;
        if ((e.Control) is IPanelControl &amp;&amp; ((IPanelControl)e.Control).PanelControl != null)
        {
            ((IPanelControl)e.Control).PanelControl.ControlAdded += ControlAddedEvent;
        }
    }

    /// &lt;summary&gt;
    /// 'monitor the views child controls flow
    /// &lt;/summary&gt;
    /// &lt;param name="sender"&gt;&lt;/param&gt;
    /// &lt;param name="e"&gt;&lt;/param&gt;
    /// &lt;remarks&gt;&lt;/remarks&gt;
    protected void ControlAddedEvent(object sender, System.Windows.Forms.ControlEventArgs e)
    {
        zSetFocusHandlers(e.Control);
        e.Control.ControlAdded += ControlAddedEvent;
        if ((e.Control) is IPanelControl &amp;&amp; ((IPanelControl)e.Control).PanelControl != null)
        {
            ((IPanelControl)e.Control).PanelControl.ControlAdded += ControlAddedEvent;
        }
    }

    /// &lt;summary&gt;
    /// this is a recursive method, that will
    /// loop throw all child controls and add a handler for the focus event
    /// &lt;/summary&gt;
    /// &lt;param name="cnt"&gt;&lt;/param&gt;
    /// &lt;remarks&gt;&lt;/remarks&gt;
    private void zSetFocusHandlers(Control cnt)
    {
        AddControlFocusHandler(cnt, false);
        foreach (Control cntm in cnt.Controls)
        {
            zSetFocusHandlers(cntm);
        }
    }

    /// &lt;summary&gt;
    /// 'add the focus event, her we can filter the controls that dont need handeling
    /// &lt;/summary&gt;
    /// &lt;param name="cnt"&gt;&lt;/param&gt;
    /// &lt;remarks&gt;&lt;/remarks&gt;
    protected virtual void AddControlFocusHandler(Control cnt, bool Force)
    {
        if (Force || (cnt) is IFocusHandeling
            || (cnt) is TextBox
            || (cnt) is ComboBox
            || (cnt) is Button
            || (cnt) is ListBox
            || (cnt) is CheckBox
            || (cnt) is RichTextBox
            || (cnt) is Infragistics.Win.UltraWinGrid.UltraGrid
            || (cnt) is Infragistics.Win.UltraWinEditors.UltraTextEditor)
        {
            cnt.GotFocus += Control_GotFocusEvent;
        }
    }

    /// &lt;summary&gt;
    /// 'when a control got a focus remember it for future use
    /// &lt;/summary&gt;
    /// &lt;param name="sender"&gt;&lt;/param&gt;
    /// &lt;param name="e"&gt;&lt;/param&gt;
    /// &lt;remarks&gt;&lt;/remarks&gt;
    protected void Control_GotFocusEvent(object sender, System.EventArgs e)
    {
        ControlToFocus = (Control)sender;
    }

    protected Control ControlToFocus;

    /// &lt;summary&gt;
    /// this happens when the smart part is activated, it origens in the Tab control
    /// &lt;/summary&gt;
    /// &lt;remarks&gt;&lt;/remarks&gt;
    public void SmartPartActivated()
    {
        if (ControlToFocus != null)
        {
            //calling a thread that will manage the focusing of the last focusd control
            FocusThread = new Threading.Thread(zFocusLastControl);
            FocusThread.Start();
        }
    }

    private Thread FocusThread;
    private bool FocusThreadTerminate;

    /// &lt;summary&gt;
    /// this method will loop and try to focus the last focusd control until the thread is aboarted or loop is finished
    /// this method is running in a nother thread
    /// &lt;/summary&gt;
    /// &lt;param name="obj"&gt;&lt;/param&gt;
    /// &lt;remarks&gt;&lt;/remarks&gt;
    private void zFocusLastControl(object obj)
    {
        try
        {
            FocusThreadTerminate = false;
            for (int i = 0; i &lt;= 10; i++)
            {
                zSetFocusFocus();
                if (FocusThreadTerminate) break;

                Threading.Thread.Sleep(200);
                //this code will normally never be reached
            }
        }
        catch (Threading.ThreadAbortException exa)
        {
        }
        //this is the thread exception that will be thrown when thread is aborted by the application
        catch (Exception ex)
        {
        }
        //any other error will apear here
    }

    /// &lt;summary&gt;
    /// try to set the focus to the control
    /// if succeeded then abort the calling thread else continue wating and try again in the next cicle
    /// &lt;/summary&gt;
    /// &lt;remarks&gt;&lt;/remarks&gt;
    private void zSetFocusFocus()
    {
        if (ControlToFocus == null)
        {
            //FocusThread.Abort()
            FocusThreadTerminate = true;
            return;
        }
        if (ControlToFocus.InvokeRequired)
        {
            //ControlToFocus.BeginInvoke(New Threading.ThreadStart(AddressOf setFocusFocus))
            ControlToFocus.Invoke(new Threading.ThreadStart(zSetFocusFocus));
        }
        else if (ControlToFocus.CanFocus())
        {
            ControlToFocus.Focus();
            //FocusThread.Abort()
            FocusThreadTerminate = true;
        }
    }
}

public interface IPanelControl
{
    Control PanelControl
    {
        get;
    }
}

/// &lt;summary&gt;
/// inherited UltraTabWorkspace object in order to get access to the override methods
/// &lt;/summary&gt;
/// &lt;remarks&gt;the reason is to set the TabKey property when the a workItem is created&lt;/remarks&gt;
public class UltraTabWorkspace : Infragistics.Practices.CompositeUI.WinForms.UltraTabWorkspace
{

    protected override void OnSmartPartActivated(Microsoft.Practices.CompositeUI.SmartParts.WorkspaceEventArgs e)
    {
        base.OnSmartPartActivated(e);
        if (e.SmartPart != null)
        {
            ((TabView)e.SmartPart).SmartPartActivated();
        }
    }
}</pre>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/tsabar.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/tsabar.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tsabar.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tsabar.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tsabar.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tsabar.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tsabar.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tsabar.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tsabar.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tsabar.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tsabar.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tsabar.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tsabar.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tsabar.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tsabar.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tsabar.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tsabar.wordpress.com&amp;blog=15944361&amp;post=20&amp;subd=tsabar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tsabar.wordpress.com/2008/09/18/focus-tab-items-in-a-cab-workspace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/12663d0176698e2ec0ac4fbf75c2ca82?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">poblico</media:title>
		</media:content>
	</item>
	</channel>
</rss>
