<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.1" -->
<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/"
	>

<channel>
	<title>IT with Passion</title>
	<link>http://dawelbeit.info</link>
	<description>Rich Internet Applications design methodologies</description>
	<pubDate>Mon, 25 May 2009 19:46:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>
	<language>en</language>
			<item>
		<title>JPA annotated classes in archive</title>
		<link>http://dawelbeit.info/2009/05/25/jpa-annotated-classes-in-archive/</link>
		<comments>http://dawelbeit.info/2009/05/25/jpa-annotated-classes-in-archive/#comments</comments>
		<pubDate>Mon, 25 May 2009 19:46:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://dawelbeit.info/2009/05/25/jpa-annotated-classes-in-archive/</guid>
		<description><![CDATA[I had&#160; this problem where I created a number of JPA annotated classes in side a jar file. Without listing these in my application persistence.xml these JPA annotated classes are not detected. I tried adding orm.xml and persistence.xml to META-INF directory in the jar file, but then my Webapp persistence.xml wasn’t loaded.
Eventually I ended up [...]]]></description>
			<content:encoded><![CDATA[<p>I had&#160; this problem where I created a number of JPA annotated classes in side a jar file. Without listing these in my application persistence.xml these JPA annotated classes are not detected. I tried adding orm.xml and persistence.xml to META-INF directory in the jar file, but then my Webapp persistence.xml wasn’t loaded.</p>
<p>Eventually I ended up removing persistence.xml and orm.xml from the jar file and adding the JPA annotated classes in the jar file to my Webapp persistence.xml. It worked, but Eclipse JPA claims it can’t resolve the class and shows an error on persistence.xml.</p>
</p>
<p> <a href="http://www.omer.dawelbeit.info/images/JPAannotatedclassesinarchive_12425/persistence.jpg"><img title="persistence" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="61" alt="persistence" src="http://www.omer.dawelbeit.info/images/JPAannotatedclassesinarchive_12425/persistence_thumb.jpg" width="244" border="0" /></a>
<p>The Webapp works fine so in the meantime I won’t bother about the Eclipse error, but obviously one day I will be Googling for a solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://dawelbeit.info/2009/05/25/jpa-annotated-classes-in-archive/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Installing OpenVPN in Windows Vista</title>
		<link>http://dawelbeit.info/2009/02/20/installing-openvpn-in-windows-vista/</link>
		<comments>http://dawelbeit.info/2009/02/20/installing-openvpn-in-windows-vista/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 21:49:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://dawelbeit.info/2009/02/20/installing-openvpn-in-windows-vista/</guid>
		<description><![CDATA[I decided to finally install and explore the OpenVPN addon (ZERINA-0.9.5b) for my IPCop firewall (build 1.4.18). The two articles below were very good in explaining the whole proctess from start to finish:
HOWTO: IPCop-OpenVPN: http://thinkhole.org/wp/2006/03/28/ipcop-openvpn-howto/
HOWTO:Roadwarrior:http://www.zerina.de/zerina/?q=documentation/howto-roadwarrior

Creating the server certificate took ages in my IPCop machine, bearing in mind it&#8217;s a Pentium MMX processor 233MHz :-). The [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to finally install and explore the OpenVPN addon (ZERINA-0.9.5b) for my IPCop firewall (build 1.4.18). The two articles below were very good in explaining the whole proctess from start to finish:</p>
<p>HOWTO: IPCop-OpenVPN: <a href="http://thinkhole.org/wp/2006/03/28/ipcop-openvpn-howto/">http://thinkhole.org/wp/2006/03/28/ipcop-openvpn-howto/</a></p>
<p>HOWTO:Roadwarrior:<a href="http://www.zerina.de/zerina/?q=documentation/howto-roadwarrior">http://www.zerina.de/zerina/?q=documentation/howto-roadwarrior</a></p>
<p><img src="http://omer.dawelbeit.info/images/ipcop.jpg" /></p>
<p>Creating the server certificate took ages in my IPCop machine, bearing in mind it&#8217;s a Pentium MMX processor 233MHz :-). The certificate generation doesn&#8217;t use that much memory, but it&#8217;s CPU intensive.</p>
<p>I first thought it would be better to connect using the Vista wizard, but as usual username &amp; password authentication was easy to setup, however the client certificate setup was a fiddly one. I opted to save my time, abandon Vista Wizard and install <a href="http://openvpn.net/index.php/downloads.html" target="_blank">OpenVPN</a> client.</p>
<p>After installing the OpenVPN client for Windows (the recent openvpn-2.1_rc15 include OpenVPN GUI as well) remember to review the README file as it includes important information for Vista users.</p>
<p>Due to elevation restrictions in Vista, OpenVPN client will fail to add routes to the routing table if not run as an Administrator. Simply right click on the OpenVPN GUI icon and select run as Administrator. Check the status log for any errors.</p>
<p>I managed to test my VPN connection using my mobile broadband after disabling my LAN wireless connection.</p>
<p><script src="http://w.sharethis.com/button/sharethis.js#tabs=web%2Cpost%2Cemail&amp;charset=utf-8&amp;style=default&amp;publisher=f5a77c50-e505-45e2-b267-b13a167128c6" type="text/javascript"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://dawelbeit.info/2009/02/20/installing-openvpn-in-windows-vista/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Fedora 10 and my story with Linux</title>
		<link>http://dawelbeit.info/2009/02/09/fedora-10-and-my-story-with-linux/</link>
		<comments>http://dawelbeit.info/2009/02/09/fedora-10-and-my-story-with-linux/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 23:11:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Linux &amp; Networking]]></category>

		<guid isPermaLink="false">http://dawelbeit.info/2009/02/09/fedora-10-and-my-story-with-linux/</guid>
		<description><![CDATA[I finally managed to install Fedora 10 on my idle and wasted Pentium 4 desktop. The desktop has really good spec, but was run down with Window XP Home edition and adding to this I installed Kaspersky anti-virus on it (which is very slow). Since I work on my laptop most of the time (as [...]]]></description>
			<content:encoded><![CDATA[<p>I finally managed to install Fedora 10 on my idle and wasted Pentium 4 desktop. The desktop has really good spec, but was run down with Window XP Home edition and adding to this I installed Kaspersky anti-virus on it (which is very slow). Since I work on my laptop most of the time (as I tend to sit on the sofa and watch TV at the same time) the desktop is hardly being switched on. But, whenever I switch it on I feel so frustrated that I still keep windows on that good machine. Adding to this I always wanted some useful educational programs for my two daughter aged 3 and 4.5. The deal breaker for me was a new experiment that I&#8217;m hoping to do, which involve application servers clustering with a front-end Web server. Given the fact that my P3 Fedora Core 5 server is already been utilized as a firewall/router, web server, file server and svn server I didn&#8217;t want to carryout my experiment on it,  so my only option was to make a move and put Fedora on my Pentium 4 desktop.  </p>
<p>I have always been a fan of Red Hat Linux, starting from RHL8,9 and I was there when Red Hat decided to split it into the Fedora project. And I was there when Fedora Core 1 came out, I tried it and tried Fedora Core 3, I adopted Fedora 5 as my server&#8217;s OS and I went to tightly secure Fedora 8 as part of my uni security course. I always loved Red Hat and loved their Linux. In-fact I have never tried any other linux distro other than RHL and Fedora (Although I did install IPCop, a linux firewall distro).I downloaded the Fedora 10 DVD image and as usual for some reason it was corrupt and ended up wasting a couple of hours on the installation, which I then abandoned and decided to download the netintall image which worked perfectly, but I had to leave it overnight to download the required packages.
<p style="text-align: center">  <img src="http://www.omer.dawelbeit.info/images/splash.jpg" onmouseout="undefined" onmouseover="undefined" title="Fedora 10 splash screen" /></p>
<p style="text-align: left"> </p>
<p style="text-align: left">Amazingly there was a large number of Educational programs and kids games, plus hundreds of other packages of useful stuff. My daughter were so happy to play the games, so I left them on the console and I used vnc from my laptop to have my own X desktop and finish off the installation of other stuff. It just makes realize how powerful Linux is. Anyway as usual with any of my Linux installations I had to add the static routes to manage my sub-nets, I ran the commands then put them in /etc/rc.d/rc.local</p>
<p style="text-align: left"><span class="Apple-style-span" style="font-style: italic">route add -net 192.168.3.0 netmask 255.255.255.0 gw 192.168.1.5 dev eth0</span></p>
<p style="text-align: left"><span class="Apple-style-span" style="font-style: italic">route add -net 192.168.3.0 netmask 255.255.255.0 gw 192.168.1.5 dev eth1</span></p>
<p style="text-align: left"> </p>
<p style="text-align: left">All in all, performance was good, the installation was easy, all the hardware was recognised automatically, the only problem I encountered was my fault due to my corrupt image, but other than that it an easy install. Definitely Linux has come a long way and specially Fedora and at version 10 it looks awesome.</p>
<p style="text-align: left"> </p>
]]></content:encoded>
			<wfw:commentRss>http://dawelbeit.info/2009/02/09/fedora-10-and-my-story-with-linux/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Amazon EC2 is too expensive for startups</title>
		<link>http://dawelbeit.info/2008/12/24/amazon-ec2-is-too-expensive-for-startups/</link>
		<comments>http://dawelbeit.info/2008/12/24/amazon-ec2-is-too-expensive-for-startups/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 20:38:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://dawelbeit.info/2008/12/24/amazon-ec2-is-too-expensive-for-startups/</guid>
		<description><![CDATA[I&#8217;ve just read this article regarding the Amazon Web Services Startup Challenge and I was all eager to give EC2 a try. To be honest, I have heard about Amazon Web Services for quite sometime now, but finally I thought it was time to have a look. The motivation was the fact that I have [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just read this article regarding the Amazon Web Services Startup Challenge and I was all eager to give EC2 a try. To be honest, I have heard about <a href="http://aws.amazon.com/ec2/" target="_blank">Amazon Web Services</a> for quite sometime now, but finally I thought it was time to have a look. The motivation was the fact that I have tried <a href="http://dawelbeit.info/2008/12/23/stax-cloud/" target="_blank">Stax Cloud</a> and noticed it is build on top of Amazon EC2 (Elastic Compute Cloud). I quickly signed up using my existing account hoping there would be a trial or some sort of free access for developers, I was wrong. As soon as I tried to signup for EC2 &amp; S3 I was asked to confirm my credit card details, so I stopped there and had a quick look at the pricing.</p>
<p>Using Amazon&#8217;s pricing calculator I tried to enter the same specifications offered by a <a href="http://www.poundhost.com/dedicated-servers/" target="_blank">PoundHost</a> A2 dedicated server and to my shock Amazon EC2 monthly pricing was three times that of PoundHost A2 dedicated server. So what I don&#8217;t understand is how would a startup be able to afford using a more expensive service such as EC2?, may be it&#8217;s the buzz word &#8216;Cloud&#8217; and lots of cash coming out of VC funding rounds!</p>
<p>Personally I think Amazon is still got a great deal to do in regards to pricing if they want to compete with the dedicated server hosting market.</p>
]]></content:encoded>
			<wfw:commentRss>http://dawelbeit.info/2008/12/24/amazon-ec2-is-too-expensive-for-startups/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Stax Cloud</title>
		<link>http://dawelbeit.info/2008/12/23/stax-cloud/</link>
		<comments>http://dawelbeit.info/2008/12/23/stax-cloud/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 23:03:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://dawelbeit.info/2008/12/23/stax-cloud/</guid>
		<description><![CDATA[The term Cloud Computing is used to refer to the whole infrastructure required to deploy and run Web applications on the Internet. The term is used to hide away all the complexity associated with the actual infrastructure, businesses simply have to worry about deploy their applications on the Cloud and pay for resources usage. Amazon, [...]]]></description>
			<content:encoded><![CDATA[<p>The term <a href="http://en.wikipedia.org/wiki/Cloud_computing" target="_blank">Cloud Computing</a> is used to refer to the whole infrastructure required to deploy and run Web applications on the Internet. The term is used to hide away all the complexity associated with the actual infrastructure, businesses simply have to worry about deploy their applications on the Cloud and pay for resources usage. Amazon, Microsoft, Google, Aptana, etc&#8230; are all offering Cloud Computing service.</p>
<p>A few months ago I was excited by the idea when it was announced by Google, and applied to go on the <a href="http://code.google.com/appengine/">Google app</a> waiting list. Finally when I got an email to join I had a quick look and I lost interest as the service is based on Python and I don&#8217;t do Python I know Java quite well and I waited for a Java stack Cloud. Recently I stumbled upon a <a href="http://www.techcrunch.com/2008/12/16/stax-networks-launches-google-app-engine-for-java/" target="_blank">TechCrunch</a> article about <a href="http://www.stax.net/">Stax</a>, a new cloud computing service for Java.</p>
<p>Straight away I watched the screen-cast and applied for an account, the following day I got an invitation code and created my first application and database. I&#8217;ve selected to create an Struts application, and lucky enough it turned out to be a Struts 2.0 application. The service is only Beta, but looks very promising, the next step I&#8217;m going to try to create a fully fledged Struts2, Spring, Hibernate with JPA and Ext application and see how it all hangs together.</p>
<p><a href="http://www.omer.dawelbeit.info/images/stax.jpg" target="_blank"><img src="http://www.omer.dawelbeit.info/images/stax.jpg" /></a></p>
<p>I can see the advantage of using such Cloud service for development and testing, but I&#8217;m not sure of the advantages of using it for a production environment. Obviously many factors will need to be taken into consideration such as cost, security, performance, etc&#8230; compared to to dedicated server hosting or any other solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://dawelbeit.info/2008/12/23/stax-cloud/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Installing Trac in Fedora Core 5</title>
		<link>http://dawelbeit.info/2008/12/08/installing-trac-in-fedora-core-5/</link>
		<comments>http://dawelbeit.info/2008/12/08/installing-trac-in-fedora-core-5/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 16:24:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Linux &amp; Networking]]></category>

		<guid isPermaLink="false">http://dawelbeit.info/2008/12/08/installing-trac-in-fedora-core-5/</guid>
		<description><![CDATA[Trac is an Open Source web application for bug tracking. I have reviewed the available Open Source bug tracking software such as Trac and Bugzilla and none of them seems to have an easy straight forward install. So I started with Trac as I have used it before and its installation instructions seem to be less that the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://trac.edgewall.org/" target="_blank">Trac</a> is an Open Source web application for bug tracking. I have reviewed the available Open Source bug tracking software such as Trac and <a href="http://www.bugzilla.org/about/" target="_blank">Bugzilla</a> and none of them seems to have an easy straight forward install. So I started with Trac as I have used it before and its installation instructions seem to be less that the Bugzilla ones. So here is my try on my Fedora 5 Linux server.</p>
<p><img src="http://www.omer.dawelbeit.info/images/trac.jpg" /></p>
<p><u><strong>Trac Requirements (quoted from Trac website):</strong></u></p>
<p><span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: Verdana; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px">To install Trac, the following software packages must be installed:</span></p>
<ul>
<li><a href="http://www.python.org/" class="ext-link" style="border-bottom: 1px dotted #bbbbbb; text-decoration: none; color: #bb0000"><span class="icon" style="background-image: url('http://www.edgewall.org/chrome/common11/extlink.gif'); background-repeat: no-repeat; padding-left: 16px; background-position: 0% 50%">Python</span></a>, version &gt;= 2.3
<ul>
<li>if using mod_python together with xml-related things, use python-2.5. expat is namespaced there and does not cause apache to crash any more(see<span class="Apple-converted-space"> </span><a href="http://www.dscpl.com.au/wiki/ModPython/Articles/ExpatCausingApacheCrash" class="ext-link" style="border-bottom: 1px dotted #bbbbbb; text-decoration: none; color: #bb0000"><span class="icon" style="background-image: url('http://www.edgewall.org/chrome/common11/extlink.gif'); background-repeat: no-repeat; padding-left: 16px; background-position: 0% 50%">here</span></a><span class="Apple-converted-space"> </span>for details).</li>
<li>For RPM-based systems you might also need the<span class="Apple-converted-space"> </span><tt>python-devel</tt><span class="Apple-converted-space"> </span>and<span class="Apple-converted-space"> </span><tt>python-xml</tt><span class="Apple-converted-space"> </span>packages.</li>
<li>See instructions in<span class="Apple-converted-space"> </span><a href="/wiki/TracOnWindows/Python2.5" class="wiki" style="border-bottom: 1px dotted #bbbbbb; text-decoration: none; color: #bb0000">TracOnWindows/Python2.5</a></li>
</ul>
</li>
<li><a href="http://peak.telecommunity.com/DevCenter/setuptools" class="ext-link" style="border-bottom: 1px dotted #bbbbbb; text-decoration: none; color: #bb0000"><span class="icon" style="background-image: url('http://www.edgewall.org/chrome/common11/extlink.gif'); background-repeat: no-repeat; padding-left: 16px; background-position: 0% 50%">setuptools</span></a>, version &gt;= 0.6</li>
<li><a href="http://genshi.edgewall.org/wiki/Download" class="ext-link" style="border-bottom: 1px dotted #bbbbbb; text-decoration: none; color: #bb0000"><span class="icon" style="background-image: url('http://www.edgewall.org/chrome/common11/extlink.gif'); background-repeat: no-repeat; padding-left: 16px; background-position: 0% 50%">Genshi</span></a>, version &gt;= 0.5 (was version &gt;= 0.4.1 on previous 0.11 release candidates)</li>
<li>You also need a database system and the corresponding python drivers for it. The database can be either SQLite, PostgreSQL or<span class="Apple-converted-space"> </span><em>MySQL (experimental)</em>.</li>
<li>Optional if some plugins require it:<span class="Apple-converted-space"> </span><a href="http://www.clearsilver.net/" class="ext-link" style="border-bottom: 1px dotted #bbbbbb; text-decoration: none; color: #bb0000"><span class="icon" style="background-image: url('http://www.edgewall.org/chrome/common11/extlink.gif'); background-repeat: no-repeat; padding-left: 16px; background-position: 0% 50%">ClearSilver</span></a></li>
</ul>
<p><u><strong>Verify Python is installed:  </strong></u></p>
<p><code>$ yum list python</code></p>
<p>and if need be</p>
<p><code>$ yum update python</code></p>
<p>I had version  2.4.3-9.FC5 installed.</p>
<p><u><strong>Install  setuptool</strong></u></p>
<p><code># wget http://pypi.python.org/packages/2.4/s/setuptools/setuptools-0.6c9-py2.4.egg#md5=260a2be2e5388d66bdaee06abec6342a</code></p>
<p><code># chmod +x setuptools-0.6c9-py2.4.egg</code></p>
<p><code>#./setuptools-0.6c9-py2.4.egg</code></p>
<p><code># easy_install</code><br />
<code>error: No urls, filenames, or requirements specified (see --help)</code></p>
<p>all good, now over to the next step</p>
<p><u><strong>Install Genshi</strong></u></p>
<p>I don&#8217;t even know what Genshi is <img src='http://dawelbeit.info/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> anyway installing it was so easy:</p>
<p><code>[root@future ~]# easy_install Genshi<br />
Searching for Genshi<br />
Reading http://pypi.python.org/simple/Genshi/<br />
Reading http://genshi.edgewall.org/<br />
Reading http://genshi.edgewall.org/wiki/Download<br />
Best match: Genshi 0.5.1<br />
Downloading http://ftp.edgewall.com/pub/genshi/Genshi-0.5.1-py2.4-linux-i686.egg<br />
Processing Genshi-0.5.1-py2.4-linux-i686.egg<br />
Moving Genshi-0.5.1-py2.4-linux-i686.egg to /usr/lib/python2.4/site-packages<br />
Adding Genshi 0.5.1 to easy-install.pth file</code></p>
<p><code>Installed /usr/lib/python2.4/site-packages/Genshi-0.5.1-py2.4-linux-i686.egg<br />
Processing dependencies for Genshi<br />
Finished processing dependencies for Genshi<br />
[root@future ~]#</code></p>
<p>Cool, job done, now next step</p>
<p><u><strong>Installing the database system and python drivers</strong></u></p>
<p><code>[root@future ~]# yum list sqlite<br />
sqlite.i386                              3.3.3-1.2              installed</code></p>
<p>[root@future ~]# yum list python-sqlite2</p>
<p><code>Available Packages<br />
python-sqlite2.i386                      1:2.3.3-1.fc5          extras</code></p>
<p><code>[root@future ~]# yum install python-sqlite2</code></p>
<p>Installed: python-sqlite2.i386 1:2.3.3-1.fc5<br />
Complete!</p>
<p>Sweet, now what is next?</p>
<p><u><strong>Optional Requirements</strong></u></p>
<p><u><strong>Webserver check</strong></u></p>
<p><code>[root@future ~]# yum list mod_python</code></p>
<p><code>Installed Packages<br />
mod_python.i386                          3.2.8-3                installed</code></p>
<p><u><strong>Subversion check</strong></u></p>
<p><code>[root@future ~]# yum list subversion<br />
Installed Packages<br />
subversion.i386                          1.3.0-4.2              installed<br />
Available Packages</code></p>
<p><code>subversion.i386                          1.3.2-2.1              updates<br />
[root@future ~]# yum update subversion</code></p>
<p>Updated: subversion.i386 0:1.3.2-2.1<br />
Complete!</p>
<p><u><strong>Install Trac</strong></u><br />
<code><br />
[root@future ~]# easy_install http://svn.edgewall.org/repos/trac/tags/trac-0.11.2.1<br />
Downloading http://svn.edgewall.org/repos/trac/tags/trac-0.11.2.1<br />
Doing subversion checkout from http://svn.edgewall.org/repos/trac/tags/trac-0.11.2.1 to /tmp/easy_install-OpAx-y/trac-0.11.2.1<br />
Processing trac-0.11.2.1<br />
Running setup.py -q bdist_egg --dist-dir /tmp/easy_install-OpAx-y/trac-0.11.2.1/egg-dist-tmp-ssiwz5<br />
Adding Trac 0.11.2.1 to easy-install.pth file<br />
Installing trac-admin script to /usr/bin<br />
Installing tracd script to /usr/bin</code></p>
<p><code>Installed /usr/lib/python2.4/site-packages/Trac-0.11.2.1-py2.4.egg<br />
Processing dependencies for Trac==0.11.2.1<br />
Finished processing dependencies for Trac==0.11.2.1<br />
[root@future ~]#</code></p>
<p><u><strong>Installing the Trac environment</strong></u></p>
<p><code>[root@future trac]# trac-admin /backup1/trac/TestProj initenv</code></p>
<p><code>Project environment for 'TestProj' created.<br />
You may now configure the environment by editing the file:<br />
/backup1/trac/TestProj/conf/trac.ini<br />
If you'd like to take this new project environment for a test drive,<br />
try running the Trac standalone web server `tracd`:<br />
tracd --port 8000 /backup1/trac/TestProj</code></p>
<p><code>Then point your browser to http://localhost:8000/TestProj.<br />
There you can also browse the documentation for your installed<br />
version of Trac, including information on further setup (such as<br />
deploying Trac to a real web server).<br />
</code><br />
<code>The latest documentation can also always be found on the project<br />
website:</code></p>
<p><code>http://trac.edgewall.org/</code></p>
<p><code>Congratulations!</code></p>
<p><code>[root@future trac]#</code></p>
<p>All Done.</p>
]]></content:encoded>
			<wfw:commentRss>http://dawelbeit.info/2008/12/08/installing-trac-in-fedora-core-5/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Minimizable ExtJS Windows</title>
		<link>http://dawelbeit.info/2008/11/18/minimizable-extjs-windows/</link>
		<comments>http://dawelbeit.info/2008/11/18/minimizable-extjs-windows/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 21:40:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://dawelbeit.info/2008/11/18/minimizable-extjs-windows/</guid>
		<description><![CDATA[
Introduction
This extension provides an implementation to minimize ExtJS Windows by showing a 48&#215;48 icon on the window container, the window title is shown under the icon. When the user click the minimize button on a minimizable Ext window an icon is shown and the window gets hidden. The icon is draggable so can rearraged. Double [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><img src="http://www.omer.dawelbeit.info/images/minwindow.jpg" height="231" width="402" /></p>
<p><strong>Introduction</strong></p>
<p>This extension provides an implementation to minimize <a href="http://www.extjs.com">ExtJS</a> Windows by showing a 48&#215;48 icon on the window container, the window title is shown under the icon. When the user click the minimize button on a minimizable Ext window an icon is shown and the window gets hidden. The icon is draggable so can rearraged. Double clicking ont the icon shows the window and hides the icon. Right clicking on the icon show a context menu to either show or close the window. Closing the window will remove the icon.</p>
<p>This behaviour is ideal for Web Applications that follow the MDI (Multiple Document Interface) approach, where unused windows can be minimized to the main container background. If the window has unfinished work the user can minimize the window and come back to it later, double click on the icon, finish the work save and close the window.</p>
<p>In a Multiple Document Interface application each UI functionality is implemented in its own window that lives in a larger window container. The control of the various windows is usually done through the use of command menus. This type of design is suitable for Web applications that offers direct replacement of tradition  thick clients.</p>
<p><strong>Demo</strong></p>
<p><a href="http://omer.dawelbeit.info/ext/window.html">http://omer.dawelbeit.info/ext/window.html</a></p>
<p><strong>Download</strong></p>
<p><a href="http://www.extjs.com/forum/showthread.php?t=52923">http://www.extjs.com/forum/showthread.php?t=52923</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dawelbeit.info/2008/11/18/minimizable-extjs-windows/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The frustration with IE</title>
		<link>http://dawelbeit.info/2008/07/13/the-frustration-with-ie/</link>
		<comments>http://dawelbeit.info/2008/07/13/the-frustration-with-ie/#comments</comments>
		<pubDate>Sun, 13 Jul 2008 15:15:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://dawelbeit.info/2008/07/13/the-frustration-with-ie/</guid>
		<description><![CDATA[Until recently I did not like JavaScript, mainly due to the inability to find bugs and debug the code. Years of developing for IE I learnt that using JavaScript is a muddy path full of IE error popups. Until I came across Firebug and I started using Firefox for developing and testing Web pages that [...]]]></description>
			<content:encoded><![CDATA[<p>Until recently I did not like JavaScript, mainly due to the inability to find bugs and debug the code. Years of developing for IE I learnt that using JavaScript is a muddy path full of IE error popups. Until I came across Firebug and I started using Firefox for developing and testing Web pages that use JavaScript. Slowly I could write and debug JavaScript code and understand the DOM and the JavaScript OO nature by inspecting objects in Firebug. Now I can write OO JavaScript for any purpose without the frustration about loose JavaScript typing or the unexplained error messages.</p>
<p>Sounds great, but I get really frustrated when I write JavaScript code that works fine in Firefox and Safari, but errors in IE. These errors usually result in hours of cursing and hair pulling, which lead me to believe that if Microsoft did not bundle IE free with Windows in the first place it would have never been the first browser anyway. Normal people do not really care, but for developers IE is a great pain. You either develop for IE or other browsers, or go to great length and cost to ensure your code works in at least IE, Firefox, Safari and may be Opera. The cross browser compatibility issue is hindering the adoption of browser based Rich Internet Applications that are based on JavaScript, DHTML and CSS. Many toolkits such as Dojo and ExtJS are compatible with many browsers, but you have to write your own JavaScript code which might not be compatible with all browsers.</p>
<p>I have faced two issues with IE where I pulled my hair for a while, but was glad to find some answers in Google before I ended up with no hair, apparently many other developers experienced the hair pulling over IE behaviour and if you feel the same you are not alone.</p>
<p><strong>First problem: tr.innerHTML</strong>, I developed a nice piece of JavaScript that manipulates a table and dynamically create and delete table rows based on available data and user’s actions. Since I developed it in Firefox I used the innerHTML function to populate the table columns in the table rows, a piece of code that worked fine in Firefox, but failed miserably in IE, after some hair pulling and Googling the answer was you can not use innerHTML with TR in IE. You have to use the tr.deleteCell and insertCell functions I had to grow my code considerably to also work in IE.</p>
<p><strong>Second problem: IE error message ‘Expected identifier, string or number’</strong>. I got this error message on some code that worked successfully in Firefox. And although the Microsoft Script debugger pointed me at the error location, I just could not see any problem with the code. A couple of hours of frustration and hair pulling I decided to search for the error message in Google and voila I found the answer it is to do with comma in the code below which will work successfully in Firefox, but fail in IE:</p>
<p><font color="blue"><br />
// private functions<br />
/**<br />
* @return window if found<br />
* @param {Object} windowName<br />
*/<br />
var getWindow = function(windowName) {<br />
var win = Ext.WindowMgr.get(windows[windowName]);<br />
if(!win)    {<br />
// create a new window<br />
win = new Church.windows.addChurchWindow({<br />
id: &#8216;add-church&#8217;<font color="red"><strong><u>,</u></strong><u></u></font><br />
});<br />
if (desktopEl) {<br />
win.render(desktopEl);<br />
}<br />
}<br />
return win;<br />
};</font><br />
I think I left this comma in place by mistake after deleting a second line. Anyway I would not expect more from IE, I just wish everyone will be convinced to move away from IE and use Firefox or Safari, so we developers don’t have to go through the pain of developing for IE. And I also wish that IE would degrade gracefully in case of the issues mentioned above and many others.</p>
]]></content:encoded>
			<wfw:commentRss>http://dawelbeit.info/2008/07/13/the-frustration-with-ie/feed/</wfw:commentRss>
		</item>
		<item>
		<title>An alternative to SOHO routers</title>
		<link>http://dawelbeit.info/2008/06/29/an-alternative-to-soho-routers/</link>
		<comments>http://dawelbeit.info/2008/06/29/an-alternative-to-soho-routers/#comments</comments>
		<pubDate>Sun, 29 Jun 2008 19:54:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Linux &amp; Networking]]></category>

		<guid isPermaLink="false">http://dawelbeit.info/2008/06/29/an-alternative-to-soho-routers/</guid>
		<description><![CDATA[I had many routers in the past and had problems with almost all of them. ISP supplied routers are usually okay for casual usage, if you want something where you have advanced configurations such as custom routing, VPN, etc…you have to shed £50+ on a decent router. For me I had a reliable network with [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><span lang="EN-GB">I had many routers in the past and had problems with almost all of them. ISP supplied routers are usually okay for casual usage, if you want something where you have advanced configurations such as custom routing, VPN, etc…you have to shed £50+ on a decent router. For me I had a reliable network with two subnets, but the weakest point was the router, so I set on a quest to replace my router.</span></p>
<p class="MsoNormal">&nbsp;</p>
<p> <img src="http://www.omer.dawelbeit.info/images/homelan_network.jpg" title="My Homelan Layout" alt="My Homelan Layout" /></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><st1:place w:st="on"><span lang="EN-GB">SOHO</span></st1:place><span lang="EN-GB"> routers are not designed for heavy use or to handle a large number of UDP connections usually required by VPN connections. This is a great pain for someone working from home and using VPN to connect to their company’s network. So cheap <st1:place w:st="on">SOHO</st1:place> and ISP supplied routers tend to run very slow and drop the connections sometimes if they get overheated or if they have to handle many VPN or P2P connections. There is a good article on the &#8217;slow running&#8217; of routers on <a href="http://www.dd-wrt.com/wiki/index.php/Router_Slowdown">dd-wrt.com</a> website. For me I’ve decided to ditch my router and look for an alternative, reliable and cheap solution.</span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p></o:p>Using a computer as a router seemed as a good idea at the time, after all <st1:place w:st="on">SOHO</st1:place> routers have the following features:</span></p>
<ul style="margin-top: 0cm" type="disc">
<li><span lang="EN-GB"><o:p> </o:p></span><span lang="EN-GB">Microprocessors run at around 75MHz </span></li>
<li class="MsoNormal"><span lang="EN-GB">Have a number of RJ45 interfaces, at least one for WAN and one      for LAN access </span></li>
<li class="MsoNormal"><span lang="EN-GB">Use IP Masquerading (NAT) to allow LAN computers to access the      WAN using a single WAN IP address.</span></li>
</ul>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p><br />
Now all the above features are achievable using a computer. I looked around and couldn’t find a 75MHz computer and I regretted throwing away my old 8086 Amstrad. Anyway I had a Pentium 1 233MHz MMX motherboard with a processor lingering around since 1998 so I decided to use it to build a computer and use as a network router. This is what I needed:</span></p>
<ul style="margin-top: 0cm" type="disc">
<li><span lang="EN-GB"><o:p> </o:p></span><span lang="EN-GB">Pentium 1 233MHz MMX motherboard with a processor</span></li>
<li class="MsoNormal"><span lang="EN-GB">2 Network cards, one for WAN (Red Interface) and one for LAN      (Green Interface)</span></li>
<li class="MsoNormal"><span lang="EN-GB">An old 5GB hard disk</span></li>
<li class="MsoNormal"><span lang="EN-GB">256MB of memory</span></li>
<li class="MsoNormal"><span lang="EN-GB">An old VGA display adapter</span></li>
<li class="MsoNormal"><span lang="EN-GB">Some sexy neon lights and bio-hazard logo to spicen up things.</span></li>
<li class="MsoNormal"><span lang="EN-GB">Keyboard and monitor only needed to setup the OS, after that      they can be taken away</span></li>
</ul>
<p><img src="http://www.omer.dawelbeit.info/images/pc_router.JPG" title="PC Router Hardware" alt="PC Router Hardware" /></p>
<p class="MsoNormal"><span lang="EN-GB">For the operating system, using a lightweight Linux distro seemed like a good option, so searching around on Google I found two good Linux distros for firewall routers: <a href="http://www.smoothwall.org/">SmoothWall</a> and <a href="http://www.ipcop.org/">IPCop</a>. Having briefly looked at the manual for both, it seemed like IPCop has most of the features I needed specially the ability to setup custom routing. I run two subnets with the traffic between them hitting the router, so the router needed to forward the traffic between the two subnets as configured, bearing in mind the router is not the gateway between these two subnets, I use a Fedora Core server for this purpose.</span></p>
<p class="MsoNormal">&nbsp;</p>
<p><img src="http://www.omer.dawelbeit.info/images/ipcop_ui.jpg" title="IPCop Admin Web UI" alt="IPCop Admin Web UI" /></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span lang="EN-GB">IPCop is basically a cut-down Linux destro with an Admin Web interface. There is no graphical interface, but remote login through SSH is available and can be switched on or off as required. There are so many other features available from the Admin Web interface such as Intrusion Detection, Traffic Shaping and Dynamic DNS, to mention only a few. Ever since it was installed, my IPCop Firewall Router is running effortlessly day-in and day-out without any issues so farewell routers.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://dawelbeit.info/2008/06/29/an-alternative-to-soho-routers/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Mapping ER-Model into JPA Annotations</title>
		<link>http://dawelbeit.info/2008/06/24/mapping-er-model-into-jpa-annotations/</link>
		<comments>http://dawelbeit.info/2008/06/24/mapping-er-model-into-jpa-annotations/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 22:30:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://dawelbeit.info/2008/06/24/mapping-er-model-into-jpa-annotations/</guid>
		<description><![CDATA[&#160;
Java Persistence API  (JPA) coined with Java 5 Annotations made Object to Relational Mapping (ORM) a bliss. The problem is most of the detailed documentations available usually consider JPA from the POJOs perspective, but what if we are creating a JPA application that should persist to an existing database. An Entity Relationship diagram can [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="text-align: justify">&nbsp;</p>
<p class="MsoNormal" style="text-align: justify">Java Persistence API  (JPA) coined with Java 5 Annotations made Object to Relational Mapping (ORM) a bliss. The problem is most of the detailed documentations available usually consider JPA from the POJOs perspective, but what if we are creating a JPA application that should persist to an existing database. An Entity Relationship diagram can easily be constructed for existing databases using a tool such as <a href="http://www.toadsoft.com/toaddm/toad_data_modeler.htm">Toad Data Modeler</a>. From the ER Model we can work backwards to create the JPA annotations required to presist to the existing database. This article provides a mapping that can be used to create the JPA annotations for an existing database&#8217;s ER Model using Hibernate&#8217;s implementation of JPA.</p>
<p class="MsoNormal" style="text-align: justify"><span lang="EN-GB">I prefer to use the <a href="http://openlearn.open.ac.uk/mod/resource/view.php?id=190584" target="_blank">crow’s feet notation</a> in the ER model to represent the cordiality of the relations and the participation conditions as explained in Table 1 below. An example of an ER model that uses this notation is shown in Figure 1 below.<br />
</span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="StyleCaptionJustified"><a title="_Toc199911587" name="_Toc199911587"></a><span lang="EN-GB">Table </span><!--[if supportFields]><span style='mso-bookmark:_Toc199911587'></span><span style='mso-element:field-begin'></span><span style='mso-bookmark:_Toc199911587'><span lang=EN-GB><span style='mso-spacerun:yes'> </span>SEQ Table \* ARABIC <span style='mso-element: field-separator'></span></span></span><![endif]--><span><span lang="EN-GB"><span>1</span></span></span><!--[if supportFields]><span style='mso-bookmark:_Toc199911587'></span><span style='mso-element:field-end'></span><![endif]--><span><span lang="EN-GB"> – Crow’s feet notation used in the ER- modelling</span></span></p>
<table class="MsoTableGrid" style="border: medium none ; border-collapse: collapse" border="1" cellpadding="0" cellspacing="0">
<tr>
<td style="border: 1pt solid windowtext; padding: 0cm 5.4pt; background: #e6e6e6 none repeat scroll 0% 50%; width: 221.55pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial" valign="top" width="295">
<p class="MsoNormal"><strong><span lang="EN-GB">Symbol<o:p></o:p></span></strong></p>
</td>
<td style="border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0cm 5.4pt; background: #e6e6e6 none repeat scroll 0% 50%; width: 221.55pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial" valign="top" width="295">
<p class="MsoNormal"><strong><span lang="EN-GB">Meaning<o:p></o:p></span></strong></p>
</td>
</tr>
<tr>
<td style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 221.55pt" valign="top" width="295">
<p class="MsoNormal"><span lang="EN-GB">Open blob - <!--[if gte vml 1]><v:shapetype    id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t"    path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">    <v:stroke joinstyle="miter"/>    <v:formulas>     <v:f eqn="if lineDrawn pixelLineWidth 0"/>     <v:f eqn="sum @0 1 0"/>     <v:f eqn="sum 0 0 @1"/>     <v:f eqn="prod @2 1 2"/>     <v:f eqn="prod @3 21600 pixelWidth"/>     <v:f eqn="prod @3 21600 pixelHeight"/>     <v:f eqn="sum @0 0 1"/>     <v:f eqn="prod @6 1 2"/>     <v:f eqn="prod @7 21600 pixelWidth"/>     <v:f eqn="sum @8 21600 0"/>     <v:f eqn="prod @7 21600 pixelHeight"/>     <v:f eqn="sum @10 21600 0"/>    </v:formulas>    <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>    <o:lock v:ext="edit" aspectratio="t"/>   </v:shapetype><v:shape id="_x0000_i1028" type="#_x0000_t75" style='width:10.5pt;    height:11.25pt'>    <v:imagedata src="file:///C:\DOCUME~1\omerio\LOCALS~1\Temp\msohtml1\12\clip_image001.emz"     o:title=""/>   </v:shape><![endif]--><!--[if !vml]--><img src="http://www.omer.dawelbeit.info/downloads/blob1.gif" v:shapes="_x0000_i1028" height="15" width="14" /><!--[endif]--></span></p>
</td>
<td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 221.55pt" valign="top" width="295">
<p class="MsoNormal"><span lang="EN-GB">Zero or one participation</span></p>
</td>
</tr>
<tr>
<td style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 221.55pt" valign="top" width="295">
<p class="MsoNormal"><span lang="EN-GB">Closed blob - <!--[if gte vml 1]><v:shape    id="_x0000_i1025" type="#_x0000_t75" style='width:10.5pt;height:10.5pt'>    <v:imagedata src="file:///C:\DOCUME~1\omerio\LOCALS~1\Temp\msohtml1\12\clip_image003.emz"     o:title=""/>   </v:shape><![endif]--><!--[if !vml]--><img src="http://www.omer.dawelbeit.info/downloads/blob2.gif" v:shapes="_x0000_i1025" height="14" width="14" /><!--[endif]--></span></p>
</td>
<td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 221.55pt" valign="top" width="295">
<p class="MsoNormal"><span lang="EN-GB">Exactly one participation</span></p>
</td>
</tr>
<tr>
<td style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 221.55pt" valign="top" width="295">
<p class="MsoNormal"><span lang="EN-GB">Open blob and crow’s foot - <!--[if gte vml 1]><v:shape    id="_x0000_i1026" type="#_x0000_t75" style='width:12.75pt;height:13.5pt'>    <v:imagedata src="file:///C:\DOCUME~1\omerio\LOCALS~1\Temp\msohtml1\12\clip_image005.emz"     o:title=""/>   </v:shape><![endif]--><!--[if !vml]--><img src="http://www.omer.dawelbeit.info/downloads/blob3.gif" v:shapes="_x0000_i1026" height="18" width="17" /><!--[endif]--></span></p>
</td>
<td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 221.55pt" valign="top" width="295">
<p class="MsoNormal"><span lang="EN-GB">Zero or more participation</span></p>
</td>
</tr>
<tr>
<td style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 221.55pt" valign="top" width="295">
<p class="MsoNormal"><span lang="EN-GB">Closed blob and crow’s foot - <!--[if gte vml 1]><v:shape    id="_x0000_i1027" type="#_x0000_t75" style='width:12.75pt;height:12pt'>    <v:imagedata src="file:///C:\DOCUME~1\omerio\LOCALS~1\Temp\msohtml1\12\clip_image007.emz"     o:title=""/>   </v:shape><![endif]--><!--[if !vml]--><img src="http://www.omer.dawelbeit.info/downloads/blob4.gif" v:shapes="_x0000_i1027" height="16" width="17" /><!--[endif]--></span></p>
</td>
<td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 221.55pt" valign="top" width="295">
<p class="MsoNormal"><span lang="EN-GB">One or more participation</span></p>
</td>
</tr>
</table>
<p class="MsoNormal" style="text-align: justify">&nbsp;</p>
<p class="MsoNormal" style="text-align: justify">&nbsp;</p>
<p class="MsoNormal" style="text-align: justify"><a href="http://www.omer.dawelbeit.info/downloads/ER-Diagram%20final.gif" target="_blank"><img src="http://www.omer.dawelbeit.info/downloads/ER-Diagram%20final.gif" height="412" width="605" /></a></p>
<p class="MsoNormal" style="text-align: justify" align="center"> Figure 1 - Sample ER Model using crow&#8217;s feet annotation</p>
<p class="MsoNormal" style="text-align: justify">&nbsp;</p>
<p class="MsoNormal" style="text-align: justify"><span lang="EN-GB">The approach that can be used to map relations form the E-R model into JPA annotations is summarised in Table 2 below. This approach can be followed to map the entity classes into the existing data schema using JPA annotations.  Good database design should resolve all the Many to Many relationships during the logical database design stage by introducing a third dependent relation, and hence there was no need to use @ManyToMany JPA mapping. </span></p>
<p class="MsoNormal" style="text-align: justify"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-align: justify"><span lang="EN-GB">I have also discovered that the Cascade annotation for foreign key updates on the parent table should not be included in the child entity as this will result in the deletion of the parent row whenever a child row is deleted. It was clear that this constraint should be implemented in the database schema and not included in the JPA annotation as it does not have the desired effect.</span></p>
<p><span lang="EN-GB"><o:p></o:p></span><a title="_Toc199911588" name="_Toc199911588"></a><span lang="EN-GB">Table 2</span><span><span lang="EN-GB"><span></span></span></span><!--[if supportFields]><span style='mso-bookmark:_Toc199911588'></span><span style='mso-element:field-end'></span><![endif]--><span><span lang="EN-GB"> – ER-Model and Relational Mode to JPA and Hibernate mappings</span></span></p>
<table class="MsoTableGrid" style="border: medium none ; border-collapse: collapse" border="1" cellpadding="0" cellspacing="0">
<tr>
<td style="border: 1pt solid windowtext; padding: 0cm 5.4pt; background: #e0e0e0 none repeat scroll 0% 50%; width: 86.4pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial" valign="top" width="115">
<p class="MsoNormal"><strong><span style="font-size: 10pt" lang="EN-GB">ER-Model <o:p></o:p></span></strong></p>
</td>
<td style="border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0cm 5.4pt; background: #e0e0e0 none repeat scroll 0% 50%; width: 187.85pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial" valign="top" width="250">
<p class="MsoNormal"><strong><span style="font-size: 10pt" lang="EN-GB">Relational   Mode <o:p></o:p></span></strong></p>
</td>
<td style="border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0cm 5.4pt; background: #e0e0e0 none repeat scroll 0% 50%; width: 168.85pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial" valign="top" width="225">
<p class="MsoNormal"><strong><span style="font-size: 10pt" lang="EN-GB">JPA   Annotation<o:p></o:p></span></strong></p>
</td>
</tr>
<tr>
<td style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 86.4pt" valign="top" width="115">
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">Entity<o:p></o:p></span></p>
</td>
<td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 187.85pt" valign="top" width="250">
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">Relation<o:p></o:p></span></p>
</td>
<td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 168.85pt" valign="top" width="225">
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">@Entity<o:p></o:p></span></p>
</td>
</tr>
<tr>
<td style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 86.4pt" valign="top" width="115">
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">Identifier<o:p></o:p></span></p>
</td>
<td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 187.85pt" valign="top" width="250">
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">Primary key<o:p></o:p></span></p>
</td>
<td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 168.85pt" valign="top" width="225">
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">@Id<o:p></o:p></span></p>
</td>
</tr>
<tr>
<td style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 86.4pt" valign="top" width="115">
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><o:p> </o:p></span></p>
</td>
<td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 187.85pt" valign="top" width="250">
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">Alternate Key<o:p></o:p></span></p>
</td>
<td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 168.85pt" valign="top" width="225">
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">@UniqueConstraint(columnNames   = {&#8221;staff_id&#8221;, &#8220;holiday_year&#8221;})<o:p></o:p></span></p>
</td>
</tr>
<tr>
<td colspan="3" style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 443.1pt" valign="top" width="591">
<p class="MsoNormal"><strong><span style="font-size: 10pt" lang="EN-GB">Relationships:<o:p></o:p></span></strong></p>
</td>
</tr>
<tr>
<td style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 86.4pt" valign="top" width="115">
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">One to One<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 10pt" lang="EN-GB"><!--[if gte vml 1]><v:shapetype id="_x0000_t75"    coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe"    filled="f" stroked="f">    <v:stroke joinstyle="miter"/>    <v:formulas>     <v:f eqn="if lineDrawn pixelLineWidth 0"/>     <v:f eqn="sum @0 1 0"/>     <v:f eqn="sum 0 0 @1"/>     <v:f eqn="prod @2 1 2"/>     <v:f eqn="prod @3 21600 pixelWidth"/>     <v:f eqn="prod @3 21600 pixelHeight"/>     <v:f eqn="sum @0 0 1"/>     <v:f eqn="prod @6 1 2"/>     <v:f eqn="prod @7 21600 pixelWidth"/>     <v:f eqn="sum @8 21600 0"/>     <v:f eqn="prod @7 21600 pixelHeight"/>     <v:f eqn="sum @10 21600 0"/>    </v:formulas>    <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>    <o:lock v:ext="edit" aspectratio="t"/>   </v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" style='width:63.75pt;    height:102.75pt'>    <v:imagedata src="file:///C:\DOCUME~1\omerio\LOCALS~1\Temp\msohtml1\01\clip_image001.emz"     o:title=""/>   </v:shape><![endif]--><!--[if !vml]--><img src="http://www.omer.dawelbeit.info/downloads/Image1.gif" v:shapes="_x0000_i1025" height="137" width="85" /><!--[endif]--><o:p></o:p></span></p>
</td>
<td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 187.85pt" valign="top" width="250">
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">Primary key +   Foreign key mechanism – plus declaring the Foreign key as alternate key. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><u><span style="font-size: 10pt" lang="EN-GB">Mandatory   participation condition:<o:p></o:p></span></u></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">Left side – can   be achieved using a constraint. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">Right side – not   allowing null for Foreign key.<o:p></o:p></span></p>
</td>
<td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 168.85pt" valign="top" width="225">
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">@OneToOne<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><u><span style="font-size: 10pt" lang="EN-GB">Declaring   alternate key:<o:p></o:p></span></u></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">@UniqueConstraint(columnNames   = {&#8221;staff_id&#8221;, &#8220;holiday_year&#8221;})<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><u><span style="font-size: 10pt" lang="EN-GB">Declaring a   check constraint:<o:p></o:p></span></u></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">@org.hibernate.annotations.Check(<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><span>            </span><span>      </span>constraints = &#8220;(mileage is not null) or (amount is not   null)&#8221;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><u><span style="font-size: 10pt" lang="EN-GB">Declaring not   null:<o:p></o:p></span></u></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">@Column(nullable   = false)<o:p></o:p></span></p>
</td>
</tr>
<tr>
<td style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 86.4pt" valign="top" width="115">
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">One to Many<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 10pt" lang="EN-GB"><!--[if gte vml 1]><v:shape id="_x0000_i1026"    type="#_x0000_t75" style='width:67.5pt;height:108.75pt'>    <v:imagedata src="file:///C:\DOCUME~1\omerio\LOCALS~1\Temp\msohtml1\01\clip_image003.emz"     o:title=""/>   </v:shape><![endif]--><!--[if !vml]--><img src="http://www.omer.dawelbeit.info/downloads/Image2.gif" v:shapes="_x0000_i1026" height="145" width="90" /><!--[endif]--><o:p></o:p></span></p>
</td>
<td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 187.85pt" valign="top" width="250">
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">Primary key +   Foreign key mechanism.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><u><span style="font-size: 10pt" lang="EN-GB">Mandatory   Participation condition:<o:p></o:p></span></u></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">Left side – can   be achieved using a constraint.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">Right side – not   allowing null for Foreign key.<o:p></o:p></span></p>
</td>
<td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 168.85pt" valign="top" width="225">
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">@OneToMany   annotation created in the owning class<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><u><span style="font-size: 10pt" lang="EN-GB">Declaring a   check constraint:<o:p></o:p></span></u></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">@org.hibernate.annotations.Check(<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><span>            </span><span>      </span>constraints = &#8220;(mileage is not null) or (amount is not   null)&#8221;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><u><span style="font-size: 10pt" lang="EN-GB">Declaring not   null:<o:p></o:p></span></u></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">@Column(nullable   = false)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><u><span style="font-size: 10pt" lang="EN-GB">Cascading:<o:p></o:p></span></u></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">Cascading works   well when annotating the owning relationship<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">@OneToMany(cascade   = {CascadeType.ALL})<o:p></o:p></span></p>
</td>
</tr>
<tr>
<td style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 86.4pt" valign="top" width="115">
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">Many to One<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 10pt" lang="EN-GB"><!--[if gte vml 1]><v:shape id="_x0000_i1027"    type="#_x0000_t75" style='width:70.5pt;height:114pt'>    <v:imagedata src="file:///C:\DOCUME~1\omerio\LOCALS~1\Temp\msohtml1\01\clip_image005.emz"     o:title=""/>   </v:shape><![endif]--><!--[if !vml]--><img src="http://www.omer.dawelbeit.info/downloads/Image3.gif" v:shapes="_x0000_i1027" height="152" width="94" /><!--[endif]--><o:p></o:p></span></p>
</td>
<td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 187.85pt" valign="top" width="250">
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">Primary key +   Foreign key mechanism.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><u><span style="font-size: 10pt" lang="EN-GB">Mandatory   Participation condition:<o:p></o:p></span></u></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">Left side – not   allowing null for Foreign key.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">Right side – can   be achieved using a constraint.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><o:p> </o:p></span></p>
</td>
<td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 168.85pt" valign="top" width="225">
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">@ManyToOne   annotation created in the owned class<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><u><span style="font-size: 10pt" lang="EN-GB">Declaring a   check constraint:<o:p></o:p></span></u></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">@org.hibernate.annotations.Check(<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><span>            </span><span>      </span>constraints = &#8220;(mileage is not null) or (amount is not   null)&#8221;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><u><span style="font-size: 10pt" lang="EN-GB">Declaring not   null:<o:p></o:p></span></u></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">@Column(nullable   = false)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><u><span style="font-size: 10pt" lang="EN-GB">Cascading:<o:p></o:p></span></u></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">Cascading   annotation should not be used in the child class, as will result in the   primary key table being updated. Should be included in the database schema<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><o:p> </o:p></span></p>
</td>
</tr>
<tr>
<td style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 86.4pt" valign="top" width="115">
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">Many to Many<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 10pt" lang="EN-GB"><!--[if gte vml 1]><v:shape id="_x0000_i1028"    type="#_x0000_t75" style='width:75pt;height:107.25pt'>    <v:imagedata src="file:///C:\DOCUME~1\omerio\LOCALS~1\Temp\msohtml1\01\clip_image007.emz"     o:title=""/>   </v:shape><![endif]--><!--[if !vml]--><img src="http://www.omer.dawelbeit.info/downloads/Image4.gif" v:shapes="_x0000_i1028" height="143" width="100" /><!--[endif]--><o:p></o:p></span></p>
</td>
<td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 187.85pt" valign="top" width="250">
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">Should be   resolved at the Logical database design, by resolving the M-N relationships   into 3 relations<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><u><span style="font-size: 10pt" lang="EN-GB">Mandatory   Participation condition:<o:p></o:p></span></u></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">Implemented as   above for One to Many relationships on the One side of the two owning   relations<o:p></o:p></span></p>
</td>
<td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 168.85pt" valign="top" width="225">
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">@ManyToMany<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size: 10pt" lang="EN-GB">The expected   name for the intermediate table is table1_table2 unless specified otherwise   in the annotation.<o:p></o:p></span></p>
</td>
</tr>
</table>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://dawelbeit.info/2008/06/24/mapping-er-model-into-jpa-annotations/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
