<?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>Mostafa Hashem</title>
	<atom:link href="http://mhashem.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mhashem.wordpress.com</link>
	<description>technical java, linux</description>
	<lastBuildDate>Thu, 29 Dec 2011 03:31:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='mhashem.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Mostafa Hashem</title>
		<link>http://mhashem.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://mhashem.wordpress.com/osd.xml" title="Mostafa Hashem" />
	<atom:link rel='hub' href='http://mhashem.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Java: Quartz scheduler , EJB 3.0 timer service and Java Timer Task, when to use each.</title>
		<link>http://mhashem.wordpress.com/2010/03/29/java-quartz-scheduler-ejb-3-0-timer-service-and-java-timer-task-when-to-use-each/</link>
		<comments>http://mhashem.wordpress.com/2010/03/29/java-quartz-scheduler-ejb-3-0-timer-service-and-java-timer-task-when-to-use-each/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 21:01:09 +0000</pubDate>
		<dc:creator>Mostafa</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[ejb timer service]]></category>
		<category><![CDATA[quartz]]></category>
		<category><![CDATA[scheduler]]></category>
		<category><![CDATA[TimerTask]]></category>

		<guid isPermaLink="false">http://mhashem.wordpress.com/?p=117</guid>
		<description><![CDATA[In Java you have Many tools to schedule job to be executed in exact time in the future, here is a list of tools I have learned and used: Open Symphony Quartz EJB timer service Java built-in Timer Task If your are working in a web application that supports EJB 3.0 I strongly recommend using [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mhashem.wordpress.com&amp;blog=2106745&amp;post=117&amp;subd=mhashem&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In Java you have Many tools to schedule job to be executed in exact time in the future, here is a list of tools I have learned and used:</p>
<ul>
<li>Open Symphony Quartz</li>
</ul>
<ul>
<li>EJB timer service</li>
</ul>
<ul>
<li>Java built-in Timer Task</li>
</ul>
<p>If your are working in a web application that supports EJB 3.0 I strongly recommend using <strong>EJB timer service</strong> for the following:</p>
<ul>
<li>Transaction support.</li>
</ul>
<ul>
<li>Persistency.</li>
</ul>
<ul>
<li>Repetitive executions.</li>
</ul>
<ul>
<li>No need for 3<sup>rd</sup> party implementations- the service provided by the EJB container</li>
</ul>
<ul>
<li>Ease of use.</li>
</ul>
<ul>
<li>Rich interfaces.</li>
</ul>
<p>If your are working in standalone application with no container support I recommend <strong>Quartz</strong> for the following:</p>
<ul>
<li>Using separate schema with support for many RBMS such mysql, oracle &#8230;etc.</li>
</ul>
<ul>
<li>Persistency.</li>
</ul>
<ul>
<li>Repetitive executions.</li>
</ul>
<ul>
<li>Rich interfaces.</li>
</ul>
<p>Regarding using the <strong>Timer Task</strong> I’m not recommend using this utility at all in large scale web applications for the following:</p>
<ul>
<li>Does not provide any persistency, so simply if your application terminated for any reason, all your task are gone.</li>
</ul>
<ul>
<li>It is not transactional.</li>
</ul>
<ul>
<li>This class does not offer real-time guarantees.</li>
</ul>
<ul>
<li>Internally, it uses a binary heap to represent its task queue, so the cost to schedule a task is O(log n), where n is the number of concurrently scheduled tasks.</li>
</ul>
<ul>
<li>Timer Task has a know low performance as it creates many threads to schedule your tasks.</li>
</ul>
<ul>
<li>If you schedule a task the current bean or caller class will still continue running in the memory because the created thread.</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mhashem.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mhashem.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mhashem.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mhashem.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mhashem.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mhashem.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mhashem.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mhashem.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mhashem.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mhashem.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mhashem.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mhashem.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mhashem.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mhashem.wordpress.com/117/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mhashem.wordpress.com&amp;blog=2106745&amp;post=117&amp;subd=mhashem&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mhashem.wordpress.com/2010/03/29/java-quartz-scheduler-ejb-3-0-timer-service-and-java-timer-task-when-to-use-each/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7abcc2ecb5fe138887ddb16fcf86532b?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Mostafa Hashem</media:title>
		</media:content>
	</item>
		<item>
		<title>Java send email using JavaMail API through SMTP with Password</title>
		<link>http://mhashem.wordpress.com/2010/02/24/java-send-email-using-javamail-api-through-smtp-with-password/</link>
		<comments>http://mhashem.wordpress.com/2010/02/24/java-send-email-using-javamail-api-through-smtp-with-password/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 22:20:22 +0000</pubDate>
		<dc:creator>Mostafa</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[javamail]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[send mail]]></category>
		<category><![CDATA[smtp]]></category>

		<guid isPermaLink="false">http://mhashem.wordpress.com/?p=114</guid>
		<description><![CDATA[Some times you need to send an email from your java application through a SMTP server. here is how you can do it simply using JavaMail API: 1- Instantiate  properties object, that contains the host name and authentication. 2- Instantiate Java Mail Session. 3- Create and fill you message. 4- Get Java Mail Transporter. 5- [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mhashem.wordpress.com&amp;blog=2106745&amp;post=114&amp;subd=mhashem&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Some times you need to send an email from your java application through a SMTP server. here is how you can do it simply using JavaMail API:</p>
<p>1- Instantiate  properties object, that contains the host name and authentication.</p>
<p>2- Instantiate Java Mail Session.</p>
<p>3- Create and fill you message.</p>
<p>4- Get Java Mail Transporter.</p>
<p>5- Connect the Transporter.</p>
<p>6- Send the message by the Transporter.</p>
<p>and here is the code:</p>
<p>/* create properties object */</p>
<p>Properties properties = new Properties();<br />
properties.setProperty(&#8220;mail.smtp.host&#8221;, &#8220;smtp.mailserver.com&#8221;);<br />
properties.setProperty(&#8220;mail.smtp.auth&#8221;, &#8220;true&#8221;);</p>
<p>/* get session */</p>
<p>Session session = Session.getDefaultInstance(properties, null);</p>
<p>/* create and fill the message */</p>
<p>MimeMessage message = new MimeMessage(session);<br />
try {<br />
message.setFrom(new InternetAddress(&#8220;sender@company.com&#8221;));<br />
message.addRecipient(RecipientType.TO, new InternetAddress(&#8220;user@company.com&#8221;));<br />
message.addRecipient(RecipientType.CC, new InternetAddress(&#8220;user@mail.com&#8221;));<br />
message.setSubject(&#8220;testing java mail again and again!!!&#8221;);<br />
message.setText(&#8220;Salam there, \nThis is a test from java mail&#8221;);</p>
<p>/* get transport */</p>
<p>Transport transport = session.getTransport(&#8220;smtp&#8221;);</p>
<p>/* connect to smtp server */<br />
transport.connect(&#8220;smtp.mailserver.com&#8221;, &#8220;username&#8221;, &#8220;password&#8221;);</p>
<p>/* send the message to the recipients */<br />
transport.sendMessage(message, message.getAllRecipients());<br />
System.out.println(&#8220;message sent successfuly&#8221;);<br />
} catch (AddressException e) {</p>
<p>e.printStackTrace();<br />
} catch (MessagingException e) {</p>
<p>e.printStackTrace();<br />
}</p>
<p>and enjoy sending mails from you application</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mhashem.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mhashem.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mhashem.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mhashem.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mhashem.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mhashem.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mhashem.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mhashem.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mhashem.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mhashem.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mhashem.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mhashem.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mhashem.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mhashem.wordpress.com/114/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mhashem.wordpress.com&amp;blog=2106745&amp;post=114&amp;subd=mhashem&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mhashem.wordpress.com/2010/02/24/java-send-email-using-javamail-api-through-smtp-with-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7abcc2ecb5fe138887ddb16fcf86532b?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Mostafa Hashem</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu convert wmv to mp3 with lame and mencoder</title>
		<link>http://mhashem.wordpress.com/2009/12/27/ubuntu-convert-wmv-to-mp3-with-lame-and-mencoder/</link>
		<comments>http://mhashem.wordpress.com/2009/12/27/ubuntu-convert-wmv-to-mp3-with-lame-and-mencoder/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 20:01:17 +0000</pubDate>
		<dc:creator>Mostafa</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[lame]]></category>
		<category><![CDATA[mencoder]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wmv]]></category>

		<guid isPermaLink="false">http://mhashem.wordpress.com/?p=110</guid>
		<description><![CDATA[Salam all, i have downloaded some videos in wmv format and i needed to convert them into mp3 to play on my mp3 player. after searching google for how to do this on ubuntu i found a solution: - first install lame and mencoder: $ sudo apt-get install lame mencoder - Run mencoder command to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mhashem.wordpress.com&amp;blog=2106745&amp;post=110&amp;subd=mhashem&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Salam all,</p>
<p>i have downloaded some videos in wmv format and i needed to convert them into mp3 to play on my mp3 player. after searching google for how to do this on ubuntu i found a solution:</p>
<p>- first install lame and mencoder:</p>
<p><strong> $ sudo apt-get install lame mencoder </strong></p>
<p>- Run mencoder command to convert wmv file to mp3 file:</p>
<p><strong> $ mencoder audioFileName.wmv -oac mp3lame -ovc frameno -of rawaudio -o audioFileName.mp3</strong></p>
<ul></ul>
<p>it is too straight and too easy. enjoy your mp3s.</p>
<p><img style="border:medium none;position:absolute;z-index:2147483647;opacity:0.6;display:none;" src="image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAADsElEQVR4nK2VTW9VVRSGn33OPgWpYLARbKWhQlCHTogoSkjEkQwclEQcNJEwlfgD/AM6NBo1xjhx5LyJ0cYEDHGkJqhtBGKUpm3SFii3vb2956wPB/t+9raEgSs52fuus89613rftdcNH8/c9q9++oe/Vzb5P+3McyNcfm2CcPj9af9w6gwjTwzvethx3Bx3x8xwd1wNM8dMcTNUHTfFLPnX6nVmZpeIYwf3cWD/PhbrvlPkblAzVFurKS6GmmGqqComaS+qmBoTI0Ncu3mXuGvWnrJ+ZSxweDgnkHf8ndVTdbiT3M7cQp2Z31dRTecHAfqydp4ejhwazh6Zezfnu98E1WIQwB3crEuJ2Y45PBTAQUVR9X4At66AppoEVO1Q8sgAOKJJjw6Am6OquDmvHskZ3R87gW+vlHz98zpmiqphkkRVbQtsfPTOC30lJKFbFTgp83bWh7Zx/uX1B6w3hI3NkkZTqEpBRDBRzG2AQHcwcYwEkOGkTERREbLQ/8HxJwuW7zdYrzfZ2iopy4qqEspKaDYravVm33k1R91Q69FA1VBRzFIVvXbx5AgXT44A8MWP81yfu0utIR2aVK3vfCnGrcUNxp8a7gKYKiLCvY2SUvo/aNtnM3e49ucK9S3p0aDdaT0UAVsKi2tVi6IWwNL9JvdqTdihaz79/l+u/rHMxmaJVMLkS2OoKKLWacdeE3IsSxctc2D5Qcl6vUlVVgNt+fkPPcFFmTw1xruvT7SCd7nuVhDQvECzJH90h0azRKoKFRkAmP5lKTWAGRdefoZL554FQNUxB92WvYeA5UN4PtSqwB2phKqsqMpBgAunRhFR3j49zuU3jnX8k6fHEQKXzh1jbmGDuYU6s4t1rt6socUeLLZHhYO2AHSHmzt19ihTZ48O8Hzl/AmunD/BjTvrvPfNX3hWsNpwJCvwYm+ngug4UilSCSq6k8YPtxDwfA+WRawIWFbgscDiULcCEaWqBFOlrLazurupOSHLqGnEKJAY8TwBEHumqUirAjNm52vEPPRV4p01XXMPAQhUBjcWm9QZwijwokgAeYHlHYA06KR1cT6ZvoV56pDUJQEjw0KeaMgj1hPEY4vz2A4eW0/e1qA7KtQdsxTYAG0H3iG4xyK1Y+xm7XmEPOJZDiENzLi2WZHngeOjj2Pe+sMg4GRYyLAsx7ME4FnsyTD9pr0PEc8zPGRAwKXBkYOPEd96cZRvf11g9MDe7e3R4Z4Q+vyEnn3P4t0XzK/W+ODN5/kPfRLewAJVEQ0AAAAASUVORK5CYII%3D" alt="" width="24" height="24" /></p>
<p><img style="border:medium none;position:absolute;z-index:2147483647;opacity:0.6;display:none;" src="image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAADsElEQVR4nK2VTW9VVRSGn33OPgWpYLARbKWhQlCHTogoSkjEkQwclEQcNJEwlfgD/AM6NBo1xjhx5LyJ0cYEDHGkJqhtBGKUpm3SFii3vb2956wPB/t+9raEgSs52fuus89613rftdcNH8/c9q9++oe/Vzb5P+3McyNcfm2CcPj9af9w6gwjTwzvethx3Bx3x8xwd1wNM8dMcTNUHTfFLPnX6nVmZpeIYwf3cWD/PhbrvlPkblAzVFurKS6GmmGqqComaS+qmBoTI0Ncu3mXuGvWnrJ+ZSxweDgnkHf8ndVTdbiT3M7cQp2Z31dRTecHAfqydp4ejhwazh6Zezfnu98E1WIQwB3crEuJ2Y45PBTAQUVR9X4At66AppoEVO1Q8sgAOKJJjw6Am6OquDmvHskZ3R87gW+vlHz98zpmiqphkkRVbQtsfPTOC30lJKFbFTgp83bWh7Zx/uX1B6w3hI3NkkZTqEpBRDBRzG2AQHcwcYwEkOGkTERREbLQ/8HxJwuW7zdYrzfZ2iopy4qqEspKaDYravVm33k1R91Q69FA1VBRzFIVvXbx5AgXT44A8MWP81yfu0utIR2aVK3vfCnGrcUNxp8a7gKYKiLCvY2SUvo/aNtnM3e49ucK9S3p0aDdaT0UAVsKi2tVi6IWwNL9JvdqTdihaz79/l+u/rHMxmaJVMLkS2OoKKLWacdeE3IsSxctc2D5Qcl6vUlVVgNt+fkPPcFFmTw1xruvT7SCd7nuVhDQvECzJH90h0azRKoKFRkAmP5lKTWAGRdefoZL554FQNUxB92WvYeA5UN4PtSqwB2phKqsqMpBgAunRhFR3j49zuU3jnX8k6fHEQKXzh1jbmGDuYU6s4t1rt6socUeLLZHhYO2AHSHmzt19ihTZ48O8Hzl/AmunD/BjTvrvPfNX3hWsNpwJCvwYm+ngug4UilSCSq6k8YPtxDwfA+WRawIWFbgscDiULcCEaWqBFOlrLazurupOSHLqGnEKJAY8TwBEHumqUirAjNm52vEPPRV4p01XXMPAQhUBjcWm9QZwijwokgAeYHlHYA06KR1cT6ZvoV56pDUJQEjw0KeaMgj1hPEY4vz2A4eW0/e1qA7KtQdsxTYAG0H3iG4xyK1Y+xm7XmEPOJZDiENzLi2WZHngeOjj2Pe+sMg4GRYyLAsx7ME4FnsyTD9pr0PEc8zPGRAwKXBkYOPEd96cZRvf11g9MDe7e3R4Z4Q+vyEnn3P4t0XzK/W+ODN5/kPfRLewAJVEQ0AAAAASUVORK5CYII%3D" alt="" width="24" height="24" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mhashem.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mhashem.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mhashem.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mhashem.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mhashem.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mhashem.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mhashem.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mhashem.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mhashem.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mhashem.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mhashem.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mhashem.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mhashem.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mhashem.wordpress.com/110/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mhashem.wordpress.com&amp;blog=2106745&amp;post=110&amp;subd=mhashem&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mhashem.wordpress.com/2009/12/27/ubuntu-convert-wmv-to-mp3-with-lame-and-mencoder/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7abcc2ecb5fe138887ddb16fcf86532b?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Mostafa Hashem</media:title>
		</media:content>
	</item>
		<item>
		<title>Minbar , Athan ogg, azan ogg , mecca azan ogg</title>
		<link>http://mhashem.wordpress.com/2009/11/14/minbar-athan-ogg-azan-ogg-mecca-azan-ogg/</link>
		<comments>http://mhashem.wordpress.com/2009/11/14/minbar-athan-ogg-azan-ogg-mecca-azan-ogg/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 17:16:08 +0000</pubDate>
		<dc:creator>Mostafa</dc:creator>
				<category><![CDATA[Islam]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://mhashem.wordpress.com/2009/11/14/minbar-athan-ogg-azan-ogg-mecca-azan-ogg/</guid>
		<description><![CDATA[I have searched for azan ogg files to run on my minbar program on ubuntu but i didn&#8217;t find any azan on ogg format. I have converted some mp3s azan to ogg files. you can find it here: - Aqssa 1 - aqssa 2 - makka<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mhashem.wordpress.com&amp;blog=2106745&amp;post=105&amp;subd=mhashem&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>I have searched for azan ogg files to run on my minbar program on ubuntu but i didn&#8217;t find any azan on ogg format. I have converted some mp3s  azan to ogg files. you can find it here: </strong></p>
<p>- <a href="http://www.nile-sys.com/islamic/azan/alaqsa_adhaan.ogg">Aqssa 1</a><br />
- <a href="http://www.nile-sys.com/islamic/azan/alaqsa_adhaan_2.ogg">aqssa 2</a><br />
- <a href="http://www.nile-sys.com/islamic/azan/makka.ogg">makka</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mhashem.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mhashem.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mhashem.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mhashem.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mhashem.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mhashem.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mhashem.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mhashem.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mhashem.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mhashem.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mhashem.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mhashem.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mhashem.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mhashem.wordpress.com/105/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mhashem.wordpress.com&amp;blog=2106745&amp;post=105&amp;subd=mhashem&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mhashem.wordpress.com/2009/11/14/minbar-athan-ogg-azan-ogg-mecca-azan-ogg/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
<enclosure url="http://www.nile-sys.com/islamic/azan/makka.ogg" length="2687395" type="audio/ogg" />
<enclosure url="http://www.nile-sys.com/islamic/azan/alaqsa_adhaan_2.ogg" length="2615092" type="audio/ogg" />
<enclosure url="http://www.nile-sys.com/islamic/azan/alaqsa_adhaan.ogg" length="2213792" type="audio/ogg" />
	
		<media:content url="http://1.gravatar.com/avatar/7abcc2ecb5fe138887ddb16fcf86532b?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Mostafa Hashem</media:title>
		</media:content>
	</item>
		<item>
		<title>Spring JAX-WS integration: Invocation of init method failed Error</title>
		<link>http://mhashem.wordpress.com/2009/07/26/spring-jax-ws-integration-simplejaxwsserviceexporter-invocation-of-init-method-failed-not-supported-operation/</link>
		<comments>http://mhashem.wordpress.com/2009/07/26/spring-jax-ws-integration-simplejaxwsserviceexporter-invocation-of-init-method-failed-not-supported-operation/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 13:12:50 +0000</pubDate>
		<dc:creator>Mostafa</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JAX-WS]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://mhashem.wordpress.com/2009/07/26/spring-jax-ws-integration-simplejaxwsserviceexporter-invocation-of-init-method-failed-not-supported-operation/</guid>
		<description><![CDATA[when i tried to manage DI JAX-WS web services by configuring them as beans in Spring application context xml file like this: &#60;bean class=&#8221;org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter&#8221; /&#62; &#60;bean id=&#8221;partyService&#8221; class=&#8221;com.nilesys.ocean.services.party.PartyServiceImpl&#8221; &#62; &#60;property name=&#8221;partyDAO&#8221; ref=&#8221;partyDAO&#8221;/&#62; &#60;/bean&#62; I got this exception: org.springframework.beans.factory.BeanCreationException: Error creating bean with name &#8216;org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter#0&#8242; defined in ServletContext resource [/WEB-INF/spring-conf/services.xml]: Invocation of init method failed; nested [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mhashem.wordpress.com&amp;blog=2106745&amp;post=98&amp;subd=mhashem&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>when i tried to manage DI JAX-WS web services by configuring them as beans in Spring application context xml file like this:</p>
<p><strong>&lt;bean class=&#8221;org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter&#8221; /&gt;<br />
</strong></p>
<p><strong>&lt;bean id=&#8221;partyService&#8221; class=&#8221;com.nilesys.ocean.services.party.PartyServiceImpl&#8221; &gt;<br />
&lt;property name=&#8221;partyDAO&#8221; ref=&#8221;partyDAO&#8221;/&gt;<br />
&lt;/bean&gt;</strong></p>
<p>I got this exception:</p>
<p>org.springframework.beans.factory.BeanCreationException: Error creating bean with name &#8216;org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter#0&#8242; defined in ServletContext resource [/WEB-INF/spring-conf/services.xml]: Invocation of init method failed; nested exception is java.lang.<strong>UnsupportedOperationException: NOT SUPPORTED</strong></p>
<p>after 4 hours of googing  and searching i figured out that adding lazy-init=&#8221;true&#8221; to the SimpleJaxWsServiceExporter bean will solve the problem like this:</p>
<p><strong>&lt;bean class=&#8221;org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter&#8221; lazy-init=&#8221;true&#8221; /&gt;<br />
</strong></p>
<p><strong>&lt;bean id=&#8221;partyService&#8221; class=&#8221;com.nilesys.ocean.services.party.PartyServiceImpl&#8221; &gt;<br />
&lt;property name=&#8221;partyDAO&#8221; ref=&#8221;partyDAO&#8221;/&gt;<br />
&lt;/bean&gt;</strong></p>
<p>i wish this could help you as i didn’t found a solution for this exact problem by googling it.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mhashem.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mhashem.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mhashem.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mhashem.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mhashem.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mhashem.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mhashem.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mhashem.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mhashem.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mhashem.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mhashem.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mhashem.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mhashem.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mhashem.wordpress.com/98/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mhashem.wordpress.com&amp;blog=2106745&amp;post=98&amp;subd=mhashem&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mhashem.wordpress.com/2009/07/26/spring-jax-ws-integration-simplejaxwsserviceexporter-invocation-of-init-method-failed-not-supported-operation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7abcc2ecb5fe138887ddb16fcf86532b?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Mostafa Hashem</media:title>
		</media:content>
	</item>
		<item>
		<title>Linux remote copy using scp command</title>
		<link>http://mhashem.wordpress.com/2009/04/04/linux-remote-copy-using-scp-command/</link>
		<comments>http://mhashem.wordpress.com/2009/04/04/linux-remote-copy-using-scp-command/#comments</comments>
		<pubDate>Sat, 04 Apr 2009 20:54:57 +0000</pubDate>
		<dc:creator>Mostafa</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[remote copy]]></category>
		<category><![CDATA[scp]]></category>
		<category><![CDATA[secure copy]]></category>

		<guid isPermaLink="false">http://mhashem.wordpress.com/2009/04/04/linux-remote-copy-using-scp-command/</guid>
		<description><![CDATA[some times you need to copy a file or directory from your machine to another machine using command line, if so you can use the scp command : suppose that the file needed to be copied /home/mostafa/file.txt, and you have access to the other machine mostafa@nile-sys.com $ scp /home/mostafa/file.txt&#160; mostafa@nile-sys.com:/home/mostafa/ this command will copy the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mhashem.wordpress.com&amp;blog=2106745&amp;post=93&amp;subd=mhashem&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>some times you need to copy a file or directory from your machine to another machine using command line, if so you can use the scp command :</p>
<p>suppose that the file needed to be copied /home/mostafa/file.txt, and you have access to the other machine <a href="mailto:mostafa@nile-sys.com">mostafa@nile-sys.com</a></p>
<p>$ scp /home/mostafa/file.txt&#160; <a href="mailto:mostafa@nile-sys.com:/home/mostafa/">mostafa@nile-sys.com:/home/mostafa/</a></p>
<p>this command will copy the file.txt to the the path /home/mostafa/file.txt in the remote machine nile-sys.com</p>
<p>also you can copy files between 2 remote machine with the same command as follows:</p>
<p>$ scp mostafa@www.nile-sys.com :/home/mostafa/file2.sh <a href="mailto:mostafa@ns1.nile-sys.com:/home/mostafa">mostafa@ns1.nile-sys.com:/home/mostafa</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mhashem.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mhashem.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mhashem.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mhashem.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mhashem.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mhashem.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mhashem.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mhashem.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mhashem.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mhashem.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mhashem.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mhashem.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mhashem.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mhashem.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mhashem.wordpress.com&amp;blog=2106745&amp;post=93&amp;subd=mhashem&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mhashem.wordpress.com/2009/04/04/linux-remote-copy-using-scp-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7abcc2ecb5fe138887ddb16fcf86532b?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Mostafa Hashem</media:title>
		</media:content>
	</item>
		<item>
		<title>Log4j roll log file daily</title>
		<link>http://mhashem.wordpress.com/2009/02/02/log4j-roll-log-file-daily/</link>
		<comments>http://mhashem.wordpress.com/2009/02/02/log4j-roll-log-file-daily/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 09:46:56 +0000</pubDate>
		<dc:creator>Mostafa</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[daily]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[log4j]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[rolling]]></category>

		<guid isPermaLink="false">http://mhashem.wordpress.com/?p=90</guid>
		<description><![CDATA[sometimes you need to configure the log4j to daily roll the log file, this will help when you trace an error happened in a specific day. in your log4j.properties file create an appender of type DailyRollingFileAppender: log4j.appender.R=org.apache.log4j.DailyRollingFileAppender define the date pattern which will be used in naming the log files: log4j.appender.R.DatePattern=&#8217;-'yyyy-MM-dd&#8217;.log&#8217; define the path of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mhashem.wordpress.com&amp;blog=2106745&amp;post=90&amp;subd=mhashem&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>sometimes you need to configure the log4j to daily roll the log file, this will help when you trace an error happened in a specific day.</p>
<p>in your log4j.properties file create an appender of type DailyRollingFileAppender:</p>
<p>log4j.appender.R=org.apache.log4j.DailyRollingFileAppender</p>
<p>define the date pattern which will be used in naming the log files:</p>
<p>log4j.appender.R.DatePattern=&#8217;-'yyyy-MM-dd&#8217;.log&#8217;</p>
<p>define the path of your log files:</p>
<p>log4j.appender.R.File=log/application</p>
<p>and configure how logs should appear inside the file:</p>
<p>log4j.appender.R.layout=org.apache.log4j.PatternLayout    <br />log4j.appender.R.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L &#8211; %m%n</p>
<p>### direct log messages to stdout ###    <br />log4j.appender.stdout=org.apache.log4j.ConsoleAppender     <br />log4j.appender.stdout.Target=System.out     <br />log4j.appender.stdout.layout=org.apache.log4j.PatternLayout     <br />log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L &#8211; %m%n     <br />log4j.rootLogger=debug, stdout, R</p>
<p>now you will have a separate log file for every day and will be in path</p>
<p>log/application-yyyy-MM-dd.log</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mhashem.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mhashem.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mhashem.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mhashem.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mhashem.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mhashem.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mhashem.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mhashem.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mhashem.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mhashem.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mhashem.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mhashem.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mhashem.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mhashem.wordpress.com/90/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mhashem.wordpress.com&amp;blog=2106745&amp;post=90&amp;subd=mhashem&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mhashem.wordpress.com/2009/02/02/log4j-roll-log-file-daily/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7abcc2ecb5fe138887ddb16fcf86532b?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Mostafa Hashem</media:title>
		</media:content>
	</item>
		<item>
		<title>setting HTTP header for SOAP message</title>
		<link>http://mhashem.wordpress.com/2009/01/29/set-http-header-in-soap-message/</link>
		<comments>http://mhashem.wordpress.com/2009/01/29/set-http-header-in-soap-message/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 12:21:13 +0000</pubDate>
		<dc:creator>Mostafa</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[http header]]></category>
		<category><![CDATA[soap]]></category>

		<guid isPermaLink="false">http://mhashem.wordpress.com/?p=86</guid>
		<description><![CDATA[To set HTTP header in a SOAP message : SOAPConnectionFactory factory = SOAPConnectionFactory.newInstance(); SOAPConnection soapConnection =factory.createConnection(); SOAPMessage message = MessageFactory.newInstance().createMessage(null,yourInputStream); message.getMimeHeaders().addHeader(&#34;header name&#34;, &#34;header value&#34;); soapConnection.call(message, &#34;server url&#34;);<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mhashem.wordpress.com&amp;blog=2106745&amp;post=86&amp;subd=mhashem&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>To set HTTP header in a SOAP message :</p>
<p>SOAPConnectionFactory factory = SOAPConnectionFactory.newInstance();</p>
<p>SOAPConnection soapConnection =factory.createConnection();</p>
<p>SOAPMessage message = MessageFactory.newInstance().createMessage(null,yourInputStream);</p>
<p>message.getMimeHeaders().addHeader(&quot;header name&quot;, &quot;header value&quot;);</p>
<p>soapConnection.call(message, &quot;server url&quot;);</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mhashem.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mhashem.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mhashem.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mhashem.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mhashem.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mhashem.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mhashem.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mhashem.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mhashem.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mhashem.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mhashem.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mhashem.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mhashem.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mhashem.wordpress.com/86/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mhashem.wordpress.com&amp;blog=2106745&amp;post=86&amp;subd=mhashem&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mhashem.wordpress.com/2009/01/29/set-http-header-in-soap-message/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7abcc2ecb5fe138887ddb16fcf86532b?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Mostafa Hashem</media:title>
		</media:content>
	</item>
		<item>
		<title>change author name in eclipse</title>
		<link>http://mhashem.wordpress.com/2009/01/17/change-author-name-in-eclipse/</link>
		<comments>http://mhashem.wordpress.com/2009/01/17/change-author-name-in-eclipse/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 14:38:43 +0000</pubDate>
		<dc:creator>Mostafa</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[author name]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[eclipse args]]></category>

		<guid isPermaLink="false">http://mhashem.wordpress.com/?p=83</guid>
		<description><![CDATA[some time you need to change the author name of the files you create by eclipse rather than the system user name. to do so: 1- open eclipse.ini file in the eclipse directory. 2- add the following line after -vmargs line -Duser.name=your name References: http://dev.eclipse.org/newslists/news.eclipse.newcomer/msg07148.html<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mhashem.wordpress.com&amp;blog=2106745&amp;post=83&amp;subd=mhashem&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>some time you need to change the author name of the files you create by eclipse rather than the system user name.</p>
<p>to do so:</p>
<p>1- open eclipse.ini file in the eclipse directory.</p>
<p>2- add the following line after -vmargs line</p>
<p>-Duser.name=<strong>your name</strong></p>
<p>References:</p>
<p>http://dev.eclipse.org/newslists/news.eclipse.newcomer/msg07148.html</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mhashem.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mhashem.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mhashem.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mhashem.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mhashem.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mhashem.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mhashem.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mhashem.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mhashem.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mhashem.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mhashem.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mhashem.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mhashem.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mhashem.wordpress.com/83/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mhashem.wordpress.com&amp;blog=2106745&amp;post=83&amp;subd=mhashem&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mhashem.wordpress.com/2009/01/17/change-author-name-in-eclipse/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7abcc2ecb5fe138887ddb16fcf86532b?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Mostafa Hashem</media:title>
		</media:content>
	</item>
		<item>
		<title>Java CORBA Server with sample code</title>
		<link>http://mhashem.wordpress.com/2008/12/24/corba-java-server/</link>
		<comments>http://mhashem.wordpress.com/2008/12/24/corba-java-server/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 04:35:57 +0000</pubDate>
		<dc:creator>Mostafa</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[corba]]></category>
		<category><![CDATA[corba server]]></category>
		<category><![CDATA[iiop]]></category>
		<category><![CDATA[java corba server]]></category>
		<category><![CDATA[java iiop]]></category>

		<guid isPermaLink="false">http://mhashem.wordpress.com/?p=78</guid>
		<description><![CDATA[In this post will explain how to create a CORBA Java server using the Java sdk. here a pref. description of what needed to be done: 1- create an idl (Interface Description Language) file that will be the contract between the Server and client regarding the object that needed to be referenced from the client [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mhashem.wordpress.com&amp;blog=2106745&amp;post=78&amp;subd=mhashem&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In this post will explain how to create a CORBA Java server using the Java sdk.</p>
<p>here a pref. description of what needed to be done:</p>
<p>1- create an idl (Interface Description Language) file that will be the contract between the Server and client regarding the object that needed to be referenced from the client and implemented on the server.</p>
<p>2- generate java skeleton from the idl by using idltojava compiler or idlj.</p>
<p>3- create the concrete class that will be instantiated by the server and its objects referenced by the client.</p>
<p>4- instantiate an ORB object to handle all Marshalling and un-Marshalling for the object calls and all IIOP stuff.</p>
<p>5- create naming context object.</p>
<p>6- create naming component for the object that will be exposed by CORBA.</p>
<p>7- bind the object with the name component in the name context.</p>
<p>the following the a sample code for the above steps:</p>
<p><strong>1- create an IDL file:</strong> create a file and name it helloWorld.idl and add the following lines into it:</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p><span style="font-family:Lucida Console;font-size:x-small;">module <strong>helloWorld</strong> {<br />
interface Greetings                             {<br />
<strong>string sayHello</strong>();<br />
};<br />
}; </span></p>
<p><span style="font-family:Lucida Console;font-size:x-small;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
</span></p>
<p>in this idl we define one interface called Greetings that interface has one method or operation called sayHello and will return a String.</p>
<p><strong>2- generate server skeleton from the idl by idlj:</strong></p>
<p>in your terminal go to the directory contains the idl file and run the following command</p>
<p>$ idlj  -fserver -oldImplBase helloWorld.idl</p>
<p>the idlj will create the following:</p>
<p>- Greetings interface.</p>
<p>- GreetingsOperations class.</p>
<p>- _GreetingsImplBase class.</p>
<p><strong>3- create a concrete class contains your business</strong>:</p>
<p>you need now to create the concrete class which you need its objects to be exposed through CORBA. To do so you need to create GreetingsServer class that extend the _GreetingsImplBase class.</p>
<p>by extending _GreetingsImplBase class you need to implement the sayHello method, here is code sample:</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>public class GreetingsServer extends _GreetingsImplBase {</p>
<p>public String sayHello () {</p>
<p>return &#8221; Hello CORBA&#8221;;</p>
<p>}</p>
<p>}</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>save this class and create a new class the will run as the server for IIOP calls name the new class CorbaServer</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>package Corba;</p>
<p>import org.omg.CORBA.ORB;<br />
import org.omg.CORBA.Object;<br />
import org.omg.CORBA.ORBPackage.InvalidName;<br />
import org.omg.CosNaming.NameComponent;<br />
import org.omg.CosNaming.NamingContext;<br />
import org.omg.CosNaming.NamingContextHelper;<br />
import org.omg.CosNaming.NamingContextPackage.AlreadyBound;<br />
import org.omg.CosNaming.NamingContextPackage.CannotProceed;<br />
import org.omg.CosNaming.NamingContextPackage.NotFound;</p>
<p>public class CorbaServer {</p>
<p>/**<br />
* @param args<br />
*/<br />
public static void main(String[] args) {<br />
// 4- create ORB object<br />
ORB orb = ORB.init(args, null);</p>
<p>// create an instance of the GreetingsServer , this instance will be exposed by the ORB</p>
<p>GreetingsServer greetings = new GreetingsServer();<br />
// register the instance to ORB object<br />
orb.connect(greetings);</p>
<p>try {<br />
// create naming context root, the NameService is the root NameService for any ORB<br />
Object initNameService = orb.resolve_initial_references(&#8220;NameService&#8221;);<br />
// narrowing the naming service object<br />
NamingContext ncRef = NamingContextHelper.narrow(initNameService);<br />
// create a name component for the GreetingsServer object<br />
NameComponent nc = new NameComponent(&#8220;Greetings&#8221;,&#8221;");<br />
// create name component array that will hold the greeting name component</p>
<p>NameComponent[] path = {nc};</p>
<p>// bind the greetings object with name component<br />
ncRef.rebind(path, greetings);<br />
// to keep the application waiting for calls</p>
<p>Thread.currentThread().join();</p>
<p>} catch (InvalidName e) {<br />
// TODO Auto-generated catch block<br />
e.printStackTrace();<br />
} catch (NotFound e) {<br />
// TODO Auto-generated catch block<br />
e.printStackTrace();<br />
} catch (CannotProceed e) {<br />
// TODO Auto-generated catch block<br />
e.printStackTrace();<br />
} catch (org.omg.CosNaming.NamingContextPackage.InvalidName e) {<br />
// TODO Auto-generated catch block<br />
e.printStackTrace();<br />
}  catch (InterruptedException e) {<br />
// TODO Auto-generated catch block<br />
e.printStackTrace();<br />
}</p>
<p>}</p>
<p>}<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>now you have the CORBA server we need to run the naming service that will be used by the CORBA server</p>
<p>$ tnameserv</p>
<p>this will start the naming service</p>
<p>at last you can start your CORBA server name and wait for calls from corba clients that used your idl.</p>
<p>references:</p>
<p>http://members.tripod.com/gsraj/corba/chapter/javaidl_1.html &#8212; this was very helpful to me.</p>
<p>http://java.sun.com/j2se/1.4.2/docs/guide/corba/index.html</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mhashem.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mhashem.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mhashem.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mhashem.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mhashem.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mhashem.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mhashem.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mhashem.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mhashem.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mhashem.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mhashem.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mhashem.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mhashem.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mhashem.wordpress.com/78/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mhashem.wordpress.com&amp;blog=2106745&amp;post=78&amp;subd=mhashem&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mhashem.wordpress.com/2008/12/24/corba-java-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7abcc2ecb5fe138887ddb16fcf86532b?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Mostafa Hashem</media:title>
		</media:content>
	</item>
	</channel>
</rss>
