<?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>My code repository</title>
	<atom:link href="http://pragmaticoder.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://pragmaticoder.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Mon, 12 Dec 2011 18:54:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='pragmaticoder.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>My code repository</title>
		<link>http://pragmaticoder.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://pragmaticoder.wordpress.com/osd.xml" title="My code repository" />
	<atom:link rel='hub' href='http://pragmaticoder.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Upload file in Flex</title>
		<link>http://pragmaticoder.wordpress.com/2011/12/12/upload-file-in-flex/</link>
		<comments>http://pragmaticoder.wordpress.com/2011/12/12/upload-file-in-flex/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 18:52:46 +0000</pubDate>
		<dc:creator>huanchh</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://pragmaticoder.wordpress.com/?p=216</guid>
		<description><![CDATA[&#160; // browse file private function browseFile():void { myFile = new  FileReference(); myFile.browse(); myFile.addEventListener(Event.SELECT,onFileSelect); myFile.addEventListener(Event.COMPLETE,onFileComplete); } // Called when a file is selected private function onFileSelect(event:Event):void { myFile.load(); } private function onFileComplete(event:Event):void { myFile = event.currentTarget as FileReference; var data:ByteArray = new ByteArray(); myFile.data.readBytes(data,0,myFile.data.length); var token:AsyncToken = AsyncToken( remoteBackendService.doSomething(data, myFile.name) ); }<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pragmaticoder.wordpress.com&amp;blog=10298765&amp;post=216&amp;subd=pragmaticoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>// browse file<br />
private function browseFile():void {<br />
myFile = new  FileReference();<br />
myFile.browse();<br />
myFile.addEventListener(Event.SELECT,onFileSelect);<br />
myFile.addEventListener(Event.COMPLETE,onFileComplete);<br />
}</p>
<p>// Called when a file is selected<br />
private function onFileSelect(event:Event):void {<br />
myFile.load();<br />
}</p>
<p>private function onFileComplete(event:Event):void<br />
{<br />
myFile = event.currentTarget as FileReference;<br />
var data:ByteArray = new ByteArray();<br />
myFile.data.readBytes(data,0,myFile.data.length);</p>
<p>var token:AsyncToken = AsyncToken(<br />
remoteBackendService.doSomething(data, myFile.name)<br />
);</p>
<p>}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pragmaticoder.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pragmaticoder.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pragmaticoder.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pragmaticoder.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pragmaticoder.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pragmaticoder.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pragmaticoder.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pragmaticoder.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pragmaticoder.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pragmaticoder.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pragmaticoder.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pragmaticoder.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pragmaticoder.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pragmaticoder.wordpress.com/216/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pragmaticoder.wordpress.com&amp;blog=10298765&amp;post=216&amp;subd=pragmaticoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pragmaticoder.wordpress.com/2011/12/12/upload-file-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f8e3dc82a0059c7f8454f8fdc99ecc50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">huanchh</media:title>
		</media:content>
	</item>
		<item>
		<title>item renderer</title>
		<link>http://pragmaticoder.wordpress.com/2011/12/07/item-renderer/</link>
		<comments>http://pragmaticoder.wordpress.com/2011/12/07/item-renderer/#comments</comments>
		<pubDate>Wed, 07 Dec 2011 01:45:33 +0000</pubDate>
		<dc:creator>huanchh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://pragmaticoder.wordpress.com/?p=214</guid>
		<description><![CDATA[Placing a textArea, richText, or anything that supports a textFlow property in an item renderer of a list seems to run into an issue &#60;s:RichEditableText textFlow=&#8221;{data.myTextFlow&#8221;} /&#62; as this sometimes cause a null pointer exception if one were to scroll up and down the list quickly. scrolling slowly doesn&#8217;t seem to cause the issue &#160; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pragmaticoder.wordpress.com&amp;blog=10298765&amp;post=214&amp;subd=pragmaticoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Placing a textArea, richText, or anything that supports a textFlow property in an item renderer of a list seems to run into an issue</p>
<p>&lt;s:RichEditableText textFlow=&#8221;{data.myTextFlow&#8221;} /&gt;</p>
<p>as this sometimes cause a null pointer exception if one were to scroll up and down the list quickly. scrolling slowly doesn&#8217;t seem to cause the issue</p>
<p>&nbsp;</p>
<p>what I ended up doing is setting the textFlow property in the onComplete handler and check for null as such</p>
<p>&nbsp;</p>
<p>if(data != null)</p>
<p>{</p>
<p>myRichEditableText.textFlow = data.myTextFlow;</p>
<p>}</p>
<p>&nbsp;</p>
<p>However then one must use the itemrendererFunction property of the list as supposed to use itemrenderer property to prevent virtualization</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pragmaticoder.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pragmaticoder.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pragmaticoder.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pragmaticoder.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pragmaticoder.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pragmaticoder.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pragmaticoder.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pragmaticoder.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pragmaticoder.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pragmaticoder.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pragmaticoder.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pragmaticoder.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pragmaticoder.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pragmaticoder.wordpress.com/214/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pragmaticoder.wordpress.com&amp;blog=10298765&amp;post=214&amp;subd=pragmaticoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pragmaticoder.wordpress.com/2011/12/07/item-renderer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f8e3dc82a0059c7f8454f8fdc99ecc50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">huanchh</media:title>
		</media:content>
	</item>
		<item>
		<title>Ant copy task windows 7 permission denied</title>
		<link>http://pragmaticoder.wordpress.com/2011/09/18/ant-copy-task-windows-7-permission-denied/</link>
		<comments>http://pragmaticoder.wordpress.com/2011/09/18/ant-copy-task-windows-7-permission-denied/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 15:44:32 +0000</pubDate>
		<dc:creator>huanchh</dc:creator>
				<category><![CDATA[AppBuiltAndDeployment]]></category>

		<guid isPermaLink="false">http://pragmaticoder.wordpress.com/?p=210</guid>
		<description><![CDATA[Had a ANT copy task to copy the created WAR file into the webapp directory, but runs into Error copying file: C:\MyGarage\EclipseWorkspace\myProject\project.war due to C:\Program Files\Apache Software Foundation\Tomcat 7.0 (Access is denied) Tried lowering user access control, granting full access permission to folder, nothing. The following seems to work, wrote a simple windows .bat file [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pragmaticoder.wordpress.com&amp;blog=10298765&amp;post=210&amp;subd=pragmaticoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Had a ANT copy task to copy the created WAR file into the webapp directory, but runs into</p>
<p><code><br />
Error copying file: C:\MyGarage\EclipseWorkspace\myProject\project.war due to C:\Program Files\Apache Software Foundation\Tomcat 7.0 (Access is denied)<br />
</code></p>
<p>Tried lowering user access control, granting full access permission to folder, nothing.</p>
<p>The following seems to work, wrote a simple windows .bat file</p>
<p><code>copy C:\MyGarage\EclipseWorkspace\myProject\project.war C:\"Program Files"\"Apache Software Foundation"\"Tomcat 7.0"\webapps /Y</code></p>
<p>and run it from ANT as such</p>
<p><pre class="brush: xml;">
	&lt;target name=&quot;buildAndDeploy&quot; depends=&quot;war&quot;&gt;
		&lt;!--&lt;copyfile dest=&quot;${deploy.dir}&quot; src=&quot;${dist.dir}/project.war&quot;/&gt; --&gt; this didn't work
		&lt;exec dir=&quot;.&quot; executable=&quot;cmd&quot; failonerror=&quot;true&quot;&gt;
		  &lt;arg line=&quot;/c copy.bat&quot;/&gt;
		&lt;/exec&gt;
	&lt;/target&gt;
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pragmaticoder.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pragmaticoder.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pragmaticoder.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pragmaticoder.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pragmaticoder.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pragmaticoder.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pragmaticoder.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pragmaticoder.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pragmaticoder.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pragmaticoder.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pragmaticoder.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pragmaticoder.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pragmaticoder.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pragmaticoder.wordpress.com/210/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pragmaticoder.wordpress.com&amp;blog=10298765&amp;post=210&amp;subd=pragmaticoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pragmaticoder.wordpress.com/2011/09/18/ant-copy-task-windows-7-permission-denied/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f8e3dc82a0059c7f8454f8fdc99ecc50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">huanchh</media:title>
		</media:content>
	</item>
		<item>
		<title>Things to consider when exposing Collection of Spring MVC command object via Forms:input</title>
		<link>http://pragmaticoder.wordpress.com/2011/08/31/things-to-consider-when-exposing-collection-of-spring-mvc-command-object-via-formsinput/</link>
		<comments>http://pragmaticoder.wordpress.com/2011/08/31/things-to-consider-when-exposing-collection-of-spring-mvc-command-object-via-formsinput/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 15:21:50 +0000</pubDate>
		<dc:creator>huanchh</dc:creator>
				<category><![CDATA[Hibernate Framework]]></category>
		<category><![CDATA[Spring Framework]]></category>

		<guid isPermaLink="false">http://pragmaticoder.wordpress.com/?p=206</guid>
		<description><![CDATA[First of all, to even to be able to use the syntax on JSP to expose a property of a collection, for example, the price of a list of items off a purchase order. &#60;form:input path=&#8221;items[${itemIndex}].price&#8221;/&#62; or even nested &#60;form:input path=&#8221;items[${itemIndex}].subItems[${subItemIndex}].value&#8221;/&#62; The items needs to be mapped as a Collection that supports the indexOf() method, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pragmaticoder.wordpress.com&amp;blog=10298765&amp;post=206&amp;subd=pragmaticoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>First of all, to even to be able to use the syntax on JSP to expose a property of a collection, for example, the price of a list of items off a purchase order.</p>
<p>&lt;form:input path=&#8221;items[${itemIndex}].price&#8221;/&gt;</p>
<p>or even nested</p>
<p>&lt;form:input path=&#8221;items[${itemIndex}].subItems[${subItemIndex}].value&#8221;/&gt;</p>
<p>The items needs to be mapped as a Collection that supports the indexOf() method, such as an ArrayList.  So something like a Set won&#8217;t work.</p>
<p>Second thing to consider is the iteration matters.  As when binding occurs the request parameter comes in with name such as &#8220;items[0].subItems[0], items[2].subItems[1], items[3].subItems[4]&#8220;.  So if your list is not sorted Spring will bind &#8220;items[0].subItems[0]&#8221; to whatever happen to be in that index at the time.</p>
<p>&nbsp;</p>
<p>When using Hibernate, sorting collection can be configured on the mapping side:</p>
<p>http://pragmaticoder.wordpress.com/2011/05/06/ordering-collection/</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pragmaticoder.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pragmaticoder.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pragmaticoder.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pragmaticoder.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pragmaticoder.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pragmaticoder.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pragmaticoder.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pragmaticoder.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pragmaticoder.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pragmaticoder.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pragmaticoder.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pragmaticoder.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pragmaticoder.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pragmaticoder.wordpress.com/206/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pragmaticoder.wordpress.com&amp;blog=10298765&amp;post=206&amp;subd=pragmaticoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pragmaticoder.wordpress.com/2011/08/31/things-to-consider-when-exposing-collection-of-spring-mvc-command-object-via-formsinput/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f8e3dc82a0059c7f8454f8fdc99ecc50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">huanchh</media:title>
		</media:content>
	</item>
		<item>
		<title>Consequence of cascading save</title>
		<link>http://pragmaticoder.wordpress.com/2011/08/24/consequence-of-cascading-save/</link>
		<comments>http://pragmaticoder.wordpress.com/2011/08/24/consequence-of-cascading-save/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 18:51:15 +0000</pubDate>
		<dc:creator>huanchh</dc:creator>
				<category><![CDATA[Hibernate Framework]]></category>

		<guid isPermaLink="false">http://pragmaticoder.wordpress.com/?p=202</guid>
		<description><![CDATA[Bids and Item has a many-to-one relationship.  Turn on cascade save via the mapping on the Bid object as such Now attempting to associate an existing Item to a new Bid object and cascade save from Bid, via the following: The problem is this will save not only the bid object, but the item object [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pragmaticoder.wordpress.com&amp;blog=10298765&amp;post=202&amp;subd=pragmaticoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Bids and Item has a many-to-one relationship.  Turn on cascade save via the mapping on the Bid object as such</p>
<p><pre class="brush: xml;">
&lt;many-to-one name=&quot;item&quot; lazy=&quot;false&quot; cascade=&quot;save-update&quot;&gt;
&lt;column name=&quot;ITEM_ID&quot; precision=&quot;15&quot; scale=&quot;0&quot; /&gt;
&lt;/many-to-one&gt;

</pre></p>
<p>Now attempting to associate an existing Item to a new Bid object and cascade save from Bid, via the following:</p>
<p><pre class="brush: java;">
   Item existingItem = new Item();
   existingItem.setId(1234); //this refers to an existing item

   bid.setItem(existingItem);
   session.save(bid);
</pre></p>
<p>The problem is this will save not only the bid object, but the item object with all its properties (except id) as null.<br />
The cascade save is useful with everything is new, but not when one needs to save something associated with another object already existent in the DB.</p>
<p>If cascade save needs to be turned on, and there exists the need to assign an existent object as a reference of another, the only option is via the use of session.load();<br />
The code above then looks like<br />
<pre class="brush: java;">
   Item existingItem = session.load(Item.class, new Long(1234));
   bid.setItem(existingItem);
   session.save(bid);
</pre></pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pragmaticoder.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pragmaticoder.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pragmaticoder.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pragmaticoder.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pragmaticoder.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pragmaticoder.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pragmaticoder.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pragmaticoder.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pragmaticoder.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pragmaticoder.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pragmaticoder.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pragmaticoder.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pragmaticoder.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pragmaticoder.wordpress.com/202/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pragmaticoder.wordpress.com&amp;blog=10298765&amp;post=202&amp;subd=pragmaticoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pragmaticoder.wordpress.com/2011/08/24/consequence-of-cascading-save/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f8e3dc82a0059c7f8454f8fdc99ecc50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">huanchh</media:title>
		</media:content>
	</item>
		<item>
		<title>Securing web service using Tomcat managed http-level security</title>
		<link>http://pragmaticoder.wordpress.com/2011/08/21/securing-web-service-using-tomcat-managed-http-level-security/</link>
		<comments>http://pragmaticoder.wordpress.com/2011/08/21/securing-web-service-using-tomcat-managed-http-level-security/#comments</comments>
		<pubDate>Sun, 21 Aug 2011 20:04:31 +0000</pubDate>
		<dc:creator>huanchh</dc:creator>
				<category><![CDATA[SOA]]></category>

		<guid isPermaLink="false">http://pragmaticoder.wordpress.com/?p=199</guid>
		<description><![CDATA[configure secured resources under web service&#8217;s web.xml &#160; notice security is applied only to POST requests via the &#60;http-method&#62; tags, the reason been the client code needs to access the WSDL via GET see the local access log from Tomcat when such a service is called, WSDL is access via GET before POST is called [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pragmaticoder.wordpress.com&amp;blog=10298765&amp;post=199&amp;subd=pragmaticoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>configure secured resources under web service&#8217;s web.xml</p>
<p><pre class="brush: xml;">

&lt;servlet-mapping&gt;
&lt;servlet-name&gt;MyServerImpl&lt;/servlet-name&gt;
&lt;url-pattern&gt;/myServerSecure&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;

&lt;security-role&gt;
&lt;role-name&gt;bigshot&lt;/role-name&gt;
&lt;/security-role&gt;

&lt;security-constraint&gt;
&lt;web-resource-collection&gt;
&lt;web-resource-name&gt;my security&lt;/web-resource-name&gt;
&lt;url-pattern&gt;/myServerSecure&lt;/url-pattern&gt;
&lt;http-method&gt;POST&lt;/http-method&gt;
&lt;/web-resource-collection&gt;
&lt;auth-constraint&gt;
&lt;role-name&gt;securedRole&lt;/role-name&gt;
&lt;/auth-constraint&gt;
&lt;user-data-constraint&gt;
&lt;transport-guarantee&gt;NONE&lt;/transport-guarantee&gt;
&lt;/user-data-constraint&gt;
&lt;/security-constraint&gt;


&lt;login-config&gt;
&lt;auth-method&gt;BASIC&lt;/auth-method&gt;
&lt;/login-config&gt;




</pre></p>
<p>&nbsp;</p>
<p>notice security is applied only to POST requests via the &lt;http-method&gt; tags, the reason been the client code needs to access the WSDL via GET</p>
<p>see the local access log from Tomcat when such a service is called, WSDL is access via GET before POST is called</p>
<p>127.0.0.1 &#8211; - [21/Aug/2011:15:40:22 -0400] &#8220;GET /JAX-WS-Container/myServerSecure?wsdl HTTP/1.1&#8243; 200 2114<br />
127.0.0.1 &#8211; victor [21/Aug/2011:15:40:22 -0400] &#8220;POST /JAX-WS-Container/myServerSecure HTTP/1.1&#8243; 200 259</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pragmaticoder.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pragmaticoder.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pragmaticoder.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pragmaticoder.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pragmaticoder.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pragmaticoder.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pragmaticoder.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pragmaticoder.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pragmaticoder.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pragmaticoder.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pragmaticoder.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pragmaticoder.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pragmaticoder.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pragmaticoder.wordpress.com/199/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pragmaticoder.wordpress.com&amp;blog=10298765&amp;post=199&amp;subd=pragmaticoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pragmaticoder.wordpress.com/2011/08/21/securing-web-service-using-tomcat-managed-http-level-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f8e3dc82a0059c7f8454f8fdc99ecc50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">huanchh</media:title>
		</media:content>
	</item>
		<item>
		<title>Sample ANT script to create WAR file</title>
		<link>http://pragmaticoder.wordpress.com/2011/08/21/sample-ant-script-to-create-war-file/</link>
		<comments>http://pragmaticoder.wordpress.com/2011/08/21/sample-ant-script-to-create-war-file/#comments</comments>
		<pubDate>Sun, 21 Aug 2011 14:59:48 +0000</pubDate>
		<dc:creator>huanchh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://pragmaticoder.wordpress.com/?p=196</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pragmaticoder.wordpress.com&amp;blog=10298765&amp;post=196&amp;subd=pragmaticoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><pre class="brush: xml;">

&lt;project default=&quot;buildAndDeploy&quot;&gt;

&lt;property name=&quot;dist.dir&quot; value=&quot;dist&quot;&gt;&lt;/property&gt;
&lt;property name=&quot;build.dir&quot; value=&quot;build&quot;&gt;&lt;/property&gt;
&lt;property name=&quot;jaxWSSEIClass.dir&quot; value=&quot;C:\Users\victor\MyGarage\EclipseWorkspace\default\JAX-WS-SEI\bin&quot;&gt;&lt;/property&gt;
&lt;property name=&quot;deploy.dir&quot; value=&quot;C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps&quot;&gt;&lt;/property&gt;

&lt;target name=&quot;clean&quot;&gt;
&lt;delete dir=&quot;${build.dir}&quot;&gt;&lt;/delete&gt;
&lt;mkdir dir=&quot;${build.dir}&quot;/&gt;
&lt;delete dir=&quot;${dist.dir}&quot;&gt;&lt;/delete&gt;
&lt;mkdir dir=&quot;${dist.dir}&quot;/&gt;
&lt;/target&gt;

&lt;!--
&lt;target name=&quot;compile&quot;&gt;
&lt;mkdir dir=&quot;build/classes&quot;/&gt;
&lt;javac srcdir=&quot;src&quot; destdir=&quot;build/classes&quot;/&gt;
&lt;/target&gt;
--&gt;
&lt;target name=&quot;jarJaxWSSEI&quot; depends=&quot;clean&quot;&gt;
&lt;jar destfile=&quot;${build.dir}/JAX-WS-SEI.jar&quot; basedir=&quot;${jaxWSSEIClass.dir}&quot;&gt;
&lt;/jar&gt;
&lt;/target&gt;

&lt;target name=&quot;war&quot; depends=&quot;jarJaxWSSEI&quot;&gt;
&lt;war destfile=&quot;${dist.dir}/JAX-WS-Container.war&quot; webxml=&quot;WebContent/WEB-INF/web.xml&quot;&gt;
&lt;fileset dir=&quot;WebContent&quot;/&gt;
&lt;lib&gt;
&lt;fileset dir=&quot;${build.dir}&quot; id=&quot;externalJar&quot;&gt;
&lt;include name=&quot;*.jar&quot;/&gt;
&lt;/fileset&gt;
&lt;fileset dir=&quot;WebContent/WEB-INF/lib&quot;&gt;
&lt;include name=&quot;*.jar&quot;/&gt;
&lt;/fileset&gt;
&lt;/lib&gt;
&lt;classes dir=&quot;WebContent/WEB-INF/classes&quot;/&gt;
&lt;/war&gt;
&lt;/target&gt;

&lt;target name=&quot;buildAndDeploy&quot; depends=&quot;war&quot;&gt;
&lt;copyfile dest=&quot;${deploy.dir}&quot; src=&quot;${dist.dir}/JAX-WS-Container.war&quot;/&gt;
&lt;/target&gt;

&lt;/project&gt;

&amp;nbsp;

</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pragmaticoder.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pragmaticoder.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pragmaticoder.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pragmaticoder.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pragmaticoder.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pragmaticoder.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pragmaticoder.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pragmaticoder.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pragmaticoder.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pragmaticoder.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pragmaticoder.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pragmaticoder.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pragmaticoder.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pragmaticoder.wordpress.com/196/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pragmaticoder.wordpress.com&amp;blog=10298765&amp;post=196&amp;subd=pragmaticoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pragmaticoder.wordpress.com/2011/08/21/sample-ant-script-to-create-war-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f8e3dc82a0059c7f8454f8fdc99ecc50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">huanchh</media:title>
		</media:content>
	</item>
		<item>
		<title>Misc JQuery</title>
		<link>http://pragmaticoder.wordpress.com/2011/08/15/jquery-selector-for-element-with-period-in-id-attribute/</link>
		<comments>http://pragmaticoder.wordpress.com/2011/08/15/jquery-selector-for-element-with-period-in-id-attribute/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 21:26:08 +0000</pubDate>
		<dc:creator>huanchh</dc:creator>
				<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://pragmaticoder.wordpress.com/?p=188</guid>
		<description><![CDATA[JQuery selector on ID containing period Iterating through JQuery selected DOM The following won't work Do this instead<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pragmaticoder.wordpress.com&amp;blog=10298765&amp;post=188&amp;subd=pragmaticoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre><strong><span style="text-decoration:underline;">JQuery selector on ID containing period</span></strong></p>
<p><pre class="brush: jscript;">

alert($('[id=contact.firstName]').val());  //works
alert($('[id=contact.firstName]').value); //returns undefined
alert($('#contact\\.firstName\\]').val()); //throws exception

</pre></p>
<p><span style="text-decoration:underline;"><strong>Iterating through JQuery selected DOM</strong></span></p>
<p>The following won't work</p>
<p><pre class="brush: jscript;">
    var myInputs = $('#myForm :input');
    for(var i=0; i &lt; myInputs.length ; i++)
    {
      alert(myInputs[i].val());
    }

</pre></p>
<p>Do this instead</p>
<p><pre class="brush: jscript;">
    $('#myForm :input').each(function(index){

        $(this).val();

     })


</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pragmaticoder.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pragmaticoder.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pragmaticoder.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pragmaticoder.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pragmaticoder.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pragmaticoder.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pragmaticoder.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pragmaticoder.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pragmaticoder.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pragmaticoder.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pragmaticoder.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pragmaticoder.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pragmaticoder.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pragmaticoder.wordpress.com/188/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pragmaticoder.wordpress.com&amp;blog=10298765&amp;post=188&amp;subd=pragmaticoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pragmaticoder.wordpress.com/2011/08/15/jquery-selector-for-element-with-period-in-id-attribute/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f8e3dc82a0059c7f8454f8fdc99ecc50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">huanchh</media:title>
		</media:content>
	</item>
		<item>
		<title>Tomcat and Apache web server connector</title>
		<link>http://pragmaticoder.wordpress.com/2011/08/07/tomcat-and-apache-web-server-connector/</link>
		<comments>http://pragmaticoder.wordpress.com/2011/08/07/tomcat-and-apache-web-server-connector/#comments</comments>
		<pubDate>Sun, 07 Aug 2011 16:44:33 +0000</pubDate>
		<dc:creator>huanchh</dc:creator>
				<category><![CDATA[ServerAdmin]]></category>

		<guid isPermaLink="false">http://pragmaticoder.wordpress.com/?p=181</guid>
		<description><![CDATA[Assumption: Apache web server running on 192.168.1.7  Tomcat server running on 192.168.1.6 step1: verify AJP13 is listening on tomcat server on port 8009 (default) run netstat -an to verify step2: verify 192.168.1.6: 8009 is accessible from Apache web server (check firewall) step3: create workers.properties on web server # Define 1 real worker named ajp13 worker.list=ajp13 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pragmaticoder.wordpress.com&amp;blog=10298765&amp;post=181&amp;subd=pragmaticoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Assumption: Apache web server running on 192.168.1.7  Tomcat server running on 192.168.1.6</p>
<p>step1: verify AJP13 is listening on tomcat server on port 8009 (default) run netstat -an to verify</p>
<p>step2: verify 192.168.1.6: 8009 is accessible from Apache web server (check firewall)</p>
<p>step3: create workers.properties on web server</p>
<p><code><br />
# Define 1 real worker named ajp13<br />
worker.list=ajp13</code></p>
<p># Set properties for worker named ajp13 to use ajp13 protocol,<br />
# and run on port 8009<br />
worker.ajp13.type=ajp13<br />
worker.ajp13.host=192.168.1.6<br />
worker.ajp13.port=8009<br />
worker.ajp13.cache_timeout=600<br />
worker.ajp13.socket_keepalive=true<br />
worker.ajp13.socket_timeout=0<br />
worker.ajp13.maintain=120</p>
<p>step4: ensure mod_jk module is available under web server (mine was under C:\Program Files\Apache Software Foundation\Apache2.2\modules)</p>
<p>step5: edit conf/httpd.conf as follows (or add as supplemental conf using the following<br />
include &#8220;C:/Program Files/Apache Software Foundation/Apache2.2/conf/mod_jk.conf&#8221;)</p>
<p><code><br />
# Load mod_jk module<br />
# Update this path to match your modules location<br />
LoadModule jk_module "C:/Program Files/Apache Software Foundation/Apache2.2/modules/mod_jk-1.2.28-httpd-2.2.3.so"</code></p>
<p># Where to find workers.properties<br />
# Update this path to match your conf directory location<br />
JkWorkersFile &#8220;C:/Program Files/Apache Software Foundation/Apache2.2/conf/workers.properties&#8221;</p>
<p># Where to put jk logs<br />
# Update this path to match your logs directory location<br />
JkLogFile &#8220;C:/Program Files/Apache Software Foundation/Apache2.2/logs/mod_jk.log&#8221;</p>
<p># Set the jk log level [debug/error/info]<br />
JkLogLevel info</p>
<p># Select the log format<br />
JkLogStampFormat &#8220;[%a %b %d %H:%M:%S %Y]&#8220;</p>
<p># JkOptions indicate to send SSL KEY SIZE,<br />
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories</p>
<p># JkRequestLogFormat set the request format<br />
JkRequestLogFormat &#8220;%w %V %T&#8221;</p>
<p># do not forward the following URI<br />
#SetEnvIf Request_URI &#8220;/phisWeb/images*&#8221; no-jk</p>
<p>JkMount /TestWeb ajp13<br />
JkMount /TestWeb/* ajp13</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pragmaticoder.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pragmaticoder.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pragmaticoder.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pragmaticoder.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pragmaticoder.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pragmaticoder.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pragmaticoder.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pragmaticoder.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pragmaticoder.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pragmaticoder.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pragmaticoder.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pragmaticoder.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pragmaticoder.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pragmaticoder.wordpress.com/181/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pragmaticoder.wordpress.com&amp;blog=10298765&amp;post=181&amp;subd=pragmaticoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pragmaticoder.wordpress.com/2011/08/07/tomcat-and-apache-web-server-connector/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f8e3dc82a0059c7f8454f8fdc99ecc50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">huanchh</media:title>
		</media:content>
	</item>
		<item>
		<title>example of configuring transaction with AOP</title>
		<link>http://pragmaticoder.wordpress.com/2011/08/07/example-of-configuring-transaction-with-aop/</link>
		<comments>http://pragmaticoder.wordpress.com/2011/08/07/example-of-configuring-transaction-with-aop/#comments</comments>
		<pubDate>Sun, 07 Aug 2011 15:23:15 +0000</pubDate>
		<dc:creator>huanchh</dc:creator>
				<category><![CDATA[Spring Framework]]></category>

		<guid isPermaLink="false">http://geekybear.wordpress.com/?p=12</guid>
		<description><![CDATA[Configure business service with transaction property while injecting the persistence layer service &#60;bean id=&#8220;myBusinessServiceLayer&#8221; class=&#8220;org.springframework.transaction.interceptor.TransactionProxyFactoryBean&#8221;&#62; &#60;property name=&#8220;transactionManager&#8221; ref=&#8220;transactionManager&#8221; /&#62; &#60;property name=&#8220;transactionAttributes&#8221;&#62; &#60;props&#62; &#60;prop key=&#8220;create*&#8221;&#62;PROPAGATION_REQUIRED&#60;/prop&#62; ***** define other propagation properties &#60;/props&#62; &#60;/property&#62; &#60;property name=&#8220;target&#8221;&#62; &#60;bean class=&#8220;gov.usda.aphis.phis.services.business.impl.myBusinessSeriveLayerImpl&#8221;&#62; &#60;property name=&#8220;myPersistenceLayer&#8221; ref=&#8220;myPersistenceLayer &#8220; /&#62; &#60;/bean&#62; &#60;/property&#62; &#60;/bean&#62;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pragmaticoder.wordpress.com&amp;blog=10298765&amp;post=12&amp;subd=pragmaticoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Configure business service with transaction property while injecting the persistence</strong></p>
<p><strong>layer service</strong></p>
<p>&lt;bean id=<em>&#8220;myBusinessServiceLayer&#8221;</em></p>
<p>class=<em>&#8220;org.springframework.transaction.interceptor.TransactionProxyFactoryBean&#8221;</em>&gt;</p>
<p>&lt;property name=<em>&#8220;transactionManager&#8221;</em> ref=<em>&#8220;transactionManager&#8221;</em> /&gt;</p>
<p>&lt;property name=<em>&#8220;transactionAttributes&#8221;</em>&gt;</p>
<p>&lt;props&gt;</p>
<p>&lt;prop key=<em>&#8220;create*&#8221;</em>&gt;PROPAGATION_REQUIRED&lt;/prop&gt;</p>
<p>***** define other propagation properties</p>
<p>&lt;/props&gt;</p>
<p>&lt;/property&gt;</p>
<p>&lt;property name=<em>&#8220;target&#8221;</em>&gt;</p>
<p>&lt;bean class=<em>&#8220;gov.usda.aphis.phis.services.business.impl.myBusinessSeriveLayerImpl&#8221;</em>&gt;</p>
<p>&lt;property name=<em>&#8220;myPersistenceLayer&#8221;</em> ref=<em>&#8220;myPersistenceLayer &#8220;</em> /&gt;</p>
<p>&lt;/bean&gt;</p>
<p>&lt;/property&gt;</p>
<p>&lt;/bean&gt;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pragmaticoder.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pragmaticoder.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pragmaticoder.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pragmaticoder.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pragmaticoder.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pragmaticoder.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pragmaticoder.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pragmaticoder.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pragmaticoder.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pragmaticoder.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pragmaticoder.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pragmaticoder.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pragmaticoder.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pragmaticoder.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pragmaticoder.wordpress.com&amp;blog=10298765&amp;post=12&amp;subd=pragmaticoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pragmaticoder.wordpress.com/2011/08/07/example-of-configuring-transaction-with-aop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f8e3dc82a0059c7f8454f8fdc99ecc50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">huanchh</media:title>
		</media:content>
	</item>
	</channel>
</rss>
