5 Good Things Maven Brought To The Table

Maven is getting a good deal of backlash these times, latest from Tapestry God Howard and from Graeme Rocher the Grails God, but I have also not been holding back myself. We get so frustrated sometimes, when tools doesn’t feel right, while at the same time, we cannot do better ourselves! I thought I wanted [...]

January 31, 2008 · polesen · 4 Comments
Tags: ,  Â· Posted in: Tools

Viewing Inbound and Outbound Messages in CXF

When using CXF either as a client or to serve services, you can quickly get the wish to view the raw inbound and outbound messages sent and received. Turns out, it is rather easy to enable this. There are various ways to enable this, ranging from a pure programmatic approach, to various forms of configuration. [...]

January 30, 2008 · polesen · 2 Comments
Tags: , ,  Â· Posted in: Programming

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 [...]

January 30, 2008 · polesen · 34 Comments
Tags: , , ,  Â· Posted in: Programming

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 · polesen · One Comment
Tags: , , ,  Â· Posted in: Programming

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 · polesen · No Comments
Tags: , ,  Â· Posted in: Tools

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 · polesen · No Comments
Tags: , , ,  Â· Posted in: Programming, Testing

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 [...]

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

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 · polesen · No Comments
Tags: , ,  Â· Posted in: Programming