Clustering with Tomcat (full setup, benchmark)

This article explains how to set up simple cluster using couple of Tomcat instances and the load balancer. It’s divided into 3 sections: Environment setup (how to run load balancer and Tomcat instances on the separate machines) Creating simple JEE web application, that can demonstrate operation of the cluster underneath Benchmark results done during on […]

XML-less web application with Spring 3.x

Since latest Spring 3.x version we can (but don’t have too) fully get rid of the XML configuration files. This tutorial is for the developers, who know (at least basics) of Spring 3.x (or eventually 2.x) and would like to try XML-less configuration in their projects. Concept We will create sample application that utilizes Maven, […]

Fail to execute javadoc-plugin on Mac OSX (JAVA_HOME issue)

While building project with maven following error occurs: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.7:jar (attach-javadocs) on project api: MavenReportException: Error while creating archive:Unable to find javadoc command: The environment variable JAVA_HOME is not correctly set. -> [Help 1] This happens, because JAVA_HOME points to JRE instead of JDK dir. In my case it’s being set […]

Reverse engineering – Spring-Roo (DBRE) and Microsoft SQL Server 2005

Spring 1.2.1 introduced us very powerful tool for the reverse engineering. Recently I’ve got occasion to try it out with MS SQL Server 2005 (Express) database – it didn’t go as smooth as expected, but after several hours spent online I’ve fixed some of the problems. Here is a quick tutorial showing what should be […]

Windows useful tools and addons

This time some useful and freeware addons to your Windows machine. Windows Rapid Environment Editor – better editor of paths and variables 3RVX – mouse/keyboard oriented volume control hotkeys (when no volume keys available on your keyboard…) openterminal.reg – windows registry script that adds “Open terminal prompt here” option to your windows menu

Everyday git

Some git commands useful on a daily basis gathered in one place. Note based on the book Pragmatic Version Control Using Git by Travis Swicegood – click. Basics, status git init git add <filename|*> git add -i # interactive mode git commit -a -m "comment text" git log -10 –pretty=oneline #–pretty=oneline, short, long, medium, raw…, […]

Ubuntu/Linux useful commands and tips

Some useful tips/commands gathered in one place. Global environment variables Edit global vars in /etc/environment Reload with source /etc/environment Better prompt export PS1="w $ " ssh ssh-keygen -t rsa ssh user.name@host mkdir -p .ssh cat .ssh/id_rsa.pub | ssh user.name@host ‘cat >> .ssh/authorized_keys’ Ubuntu 10.04 + firefox 4 sudo add-apt-repository ppa:mozillateam/firefox-stable sudo apt-get update sudo apt-get […]

Handling IDN in java.

Java does not handle IDNs (internationalized Domain Names) by default. Using the localized domain, i.e. öbb.at in your code with for example UrlConnection will cause: java.net.UnknownHostException: öbb.at if you need to deal with this issue, here is a snippet how to convert your url to the so called ponycode format: URL url = //….. String […]

KeyGrab – grab key combinations using TextField in Swing/Java.

h3>Description. This small component was cut out form the bigger project. It’s extension of JTextLabel which easily can be added to you java swing project, to provide text box which can easily grab and display key combinations. Features. Open source, free to use. Free access to current key combination associated with TextBox. Callbacks while new […]