Archive for June, 2004
Getting started with MySQL
Jun 30th
If you have just installed the MySQL RPMs and wonder what to do next, check out Getting Started with MySQL.
This is a wonderful concise to-the-point comprehensible “getting started”, including an intro to the MySQL privilege tables.
Deployment in Tomcat 4.1.30 using Eclipse
Jun 30th
With Eclipse 2.1.3 using the SysDeo plugin for Tomcat (I’m using Tomcat 4.1.30) I am not able to un/redeploy an application: the old code isn’t replaced by the new. Consequently, I have to manually remove my application in TOMCAT_HOME/webapps before deploying my newly modified code.
Anyone had similar problems and/or solutions?
Database access with Ant!
Jun 30th
You can access a database with Ant. This can be useful when you want to create a database and fill it with some default data at the start/deployment of a project, but also when you want to reset the contents of your database just before invoking your tests!
Example of an Ant target to create a table:
CREATE TABLE br_vote
(
voteid INTEGER NOT NULL,
reviewid INTEGER NOT NULL,
votevalue INTEGER DEFAULT 5 NOT NULL
);
The accompanying build.properties for MySQL access in this case reads:
mysql.password = MyDatabaseUserPassword
mysql.user = MyDatabaseUserName
mysql.driver = com.mysql.jdbc.Driver
mysql.url = jdbc:mysql://localhost/myDatabase
mysql.classpath = /classpath/to/mysql-jdbc.jar
Mutatis mutandum for the build.properties, I was also able to successfully access an Oracle DB (LUDO).
Of course, you can also populate a DB this way, by just formulating a different target and putting the appropriate SQL statements in.
Pro Jakarta Commons
Jun 28th

Title: Pro Jakarta Commons
Authors: Harshad Oak
Published by: Apress
Abstract
This book describes in some detail all functionality in the Jakarta Commons components. Jakarta Commons actually is a collection of common tools which were sprung to live during the development of other Jakarta Projects. As the name suggest it provides common functionality .
The book describes among others the lang, Logging, BeanUtils, Digester and Collections components. Some simple examples are given.
The writer of this book actually wrote a very thin wrapper around the documentation provided on the Jakarta web-page.
Personal opinion
I don’t say you should not read this book. There is a lot to be learned. But none of the information in this book is new. All of it can be found on the Commons website or in the JavaDoc. Furthermore I think the author was at the border of his own knowledge. This does not stop him constantly belitling his readers, something which I found rather annoying. The biggest plus for this book is that it reminds you not to reinvent the wheel.
Jakarta Commons rules!
JUnit in action, Vincent Massol with Ted Husted
Jun 24th
|*Title*: |JUnit in action|
|*Authors*: |Vincent Massol, Ted Husted|
|*Published by*: |Manning Publications Co.|
h3. Abstract
Although the emphasis in _JUnit in action_ is on unit testing (of course!), it offers more. It details the JUnit test framework, while at the same time putting unit testing in a broader context (unit -> integration -> functional -> acceptance testing).
h3. Summary
After a (detailed) introduction of the basics of the JUnit framework (chapters 1..3), the author distinguishes between different software tests in chapter 4 and after looking more closely at integrating JUnit tests with Ant, Eclipse and Maven, he continues with testing strategies in general in chapter 5.
The second part of the book (chapters 6..8) discuss testing strategies, such as stubs, mock objects and in-container testing with Cactus.
Part III applies all these testing strategies on different small applications/projects. This encompasses various techniques/frameworks, such as servlets, JSPs, (custom) taglibs, DB apps and EJBs.
h3. Personal opinion
The book discusses every aspect of unit testing. Consequently, the book is excellent as a reference on how to design/implement unit tests in various frameworks. The sample code can easily be downloaded and incorporated in de Eclipse IDE. However, I sometimes got the feeling that some of these examples are too much dependent on external libraries and hence require quite some additional bandwidth (-: Apart from Part I, which does an excellent job as a JUnit tutorial, the other chapters involve quite some prerequisite knowledge and are in my opinion more meant for diagonal reading: you would only read (some of) these chapters if you are working on a project that involves the issues of those particular chapters.
Textism2 plugin activated
Jun 10th
Activated textism2 plugin, which makes formatting HTML posts much more convenient: see also “this link”:http://textism.com/tools/textile/index.html
Wordpress operational
Jun 10th
Per 10-06-2004 the wordpress interface on the Amis technology corner server is operational.

