Hibernate Column Level Lazy Loading
Suppose we have "Event.hbm.xml" with a "formula" in one of its properties called "name". The formula is a big select statement that I don’t want to call every time I fetch the object. Hibernate 3...
View ArticleInner Iterator Loop
I made this stupid mistake again recently! I want to iterate two Sets. One inside another for every element.Iterator itr1 = set1.iterator(); Iterator itr2 = set2.iterator(); while (itr2.hasNext()) {...
View ArticleUML Designer with JavaFX
I was planning to write an online UML designer with JavaFX. I found a couple of similar applications such as http://www.websequencediagrams.com/ and one more that I think was flash based and I can't...
View ArticleInvocation of init method failed; nested exception is...
I was getting this error: Invocation of init method failed; nested exception is org.hibernate.AnnotationException: OneToOne or ManyToOne on com....channelCategory references an unknown entity:...
View ArticleDell XPS M1330 vs. Leveno SL 300
I ordered a 13" XPS M1330 Dell online from Dell Australia and I got it damn fast from their factory in china! But there was a small problem with that. The left palm rest area was getting a bit warm. It...
View ArticleFrom Pragmatic Programmer
These are some tiny portions of the Book: The Pragmatic Programmer From Journeyman to Master Be a Pragmatic ProgrammerIn order to be a Pragmatic Programmer, we're challenging you to think about what...
View ArticleLeft Handed Laptop
I am looking for a left handed laptop! It might seem odd but I am serious.I have a Lenovo SL300. The problem with that is the heat exhaust is on the left and sometimes I can't use my own wired mouse as...
View ArticleRemote Debug Tomcat 6 in Windows
This might look like a stupid post but it took me 20 minutes to be done! I was trying to configure tomcat 6 for remote debugging with Eclipse in Windows. The only catch was putting: "-Xdebug" and...
View ArticleScrollable Windows cmd
Sometimes the Windows command line window is not scrollable by mouse and you just have to use the side scrolls which is a bit annoying. If you right click on the window title and tick QuickEdit Mode...
View ArticleChoosing a VPS
I was after a good/cheap VPS provider to host some small projects using Tomcat/Apache/MySql. My criteria were: RAM: around 1 GBHDD: more than 4 GBBandwidth: more than 60 GB (Calculate yours roughly...
View ArticleApache - DWR - Tomcat
I had this stupid problem: My application works fine under http://localhost:8080/mycontext/ but when I try to remove the ports using Apache ProxyPass OR mod_jk then DWR does not work. Solution: I...
View ArticleConfiguring Apache VirtualHost
The complete configuration is as follows for CentOS 5.x, Tomcat 6.x and Apache 2.2.x. Looking at my previous post I am using mod_jl in order to direct DWR calls to Tomcat too, but you ignore...
View ArticlePost HTML friendly code into JRoller
I use this great tool: http://www.elliotswan.com/postable/ when I need to post HTML/XML into my posts. It escapes them.
View ArticleLinux Security Applicaitons
For a quick Linux security you can consider these products:iptables : They are complicated and powerful like assembly. The package is usually already installed in most of the distros and there are many...
View ArticleGoogle Apps instead of Apache James
I was struggling with Apache James for the past couple of weeks on my VPS but having a secure, reliable and 24/7 mail server is not easy! This was until I found Google Apps! It can empower you domain...
View ArticleAccess Eclipse SVN Through Proxy
You just simply need to edit [global] section in this file: C:\Documents and Settings\\Application Data\Subversion\servers and set:http-proxy-exceptions = you might want to exclude your usual...
View ArticleAdding Authentication to Squid3 on Ubuntu
Configuration file location: /etc/squid3/squid.confCreate file passwd in /etc/squid3/sudo chmod o+r passwdAdd username and passwords you want using: sudo htpasswd passwd your_username. You can find...
View ArticleQuick EasyMock
EasyMock documentation sucks! Stages of using EasyMock:Creating mock objectsExpectations setting and behaviour. As EasyMock documentations says: if you would like to use matchers in a call, you have to...
View ArticleSend email when JUnits fails using ant
In your junit tag you at least need these attributes: haltonfailure="false" haltonerror="false". This is the portion of script to call junit and see if it is failed and then send email: <target...
View ArticlePaypal and Dynamic Price
If you want to use Paypal for your online purchases and prices are dynamic (come from database and are not hardcoded) your need to use a a non hosted/non code protected button. Follow these steps:In...
View Article