Configuring CXF Logging To Go Through Log4J

Apparently, CXF has chosen the JSE logging API as their API against logging. But you can make CXF log through Log4J quite easily. In the org.apache.cxf.common.logging package of the CXF apidocs, I found the Log4JLogger class, which is a specialization of the JSE logging api java.util.logging.Logger class, delegating logging to a Log4J implementation.
Configuring Log4J in [...]

January 30, 2008  Tags: , , ,   Posted in: Programming  25 Comments

Oracle ReadTimeout – A Really Useful Oracle Driver Property

For some time now, I have been bugged by a firewall somewhere along the path between my development machine and our Oracle database. The firewall seems to close the open database connections after some time of inactivity. It was particularly irritating, as my favourite SQL plugin in IDEA locked up IDEA totally, needing a kill [...]

January 28, 2008  Tags: , , ,   Posted in: Programming  No Comments

Log4J Configuration Not Loading Properly With maven-surefire-plugin

Today, I had a strange problem with maven, the maven surefire plugin and log4j.xml configuration not really getting into the action. No matter what I did, I could not get log4j logging statements lower than WARN level to show on stdout. But only when the tests ran from maven surefire! If I executed them directly [...]

January 24, 2008  Tags: , ,   Posted in: Tools  No Comments

Faking a Valid Acegi SecurityContext in a UnitTest

When using acegi security in your code, you will often have a setup, where the authentication information is put on a ThreadLocal somewhere inside SecurityContextHolder and then used later on in the application code. Actually, acegi operates with strategies for how to store the security information, but more often than not, it is on a [...]

January 24, 2008  Tags: , , ,   Posted in: Programming, Testing  No Comments

Going from EJB2 to JPA Made Us Discover Bad Data

It is funny, how going from EJB2.x CMP data access code to JPA ORM data access code in one of my projects, made us discover bad data.
Over a serious of years, this project has moved through EJB1.x, EJB2.0 and EJB.2.1. Our use of the old EJB standard have made the impact, that the domain modelling [...]

January 10, 2008  Tags: ,   Posted in: Design, Programming  No Comments

One ActiveRecord Naming Convention To Take With Me

You can say what you want about the way ActiveRecord pluralizes table names. I for one, do not like it much! But hey, I could get used to it, so what the heck. But one naming convention I noticed that I have taken with me back into Java land, is the one about naming properties [...]

January 10, 2008  Tags: , ,   Posted in: Programming  No Comments