Conditional Page Rendering in Java Web Frameworks – Best Practices?

This is a post, that requires your input I want to harvest the information in your brains, on how your favourite web framework is best at not cluttering the view pages, when you need to show them differently for each user or state of the application.
Definition: Conditional Views
I have no better name, than [...]

May 17, 2008  Tags: ,   Posted in: Design, Programming  8 Comments

SpringSource Application Platform

So, Spring Source has been able to keep a secret from us Secretly, they have been developing what looks a lot like a new application server, not like the JEE market, but with the springframework at its core. A well kept secret, which I did not see coming, even though we might have [...]

May 5, 2008  Tags: , , , ,   Posted in: Tools  2 Comments

Ping failed in MysqlValidConnectionChecker in JBoss/MySQL-ConnectorJ Combination

Today I was battling an issue for some of my colleagues. They were getting this exception from JBoss/Mysql ConnectorJ driver:

java.sql.SQLException: Ping failed: java.lang.IllegalArgumentException: object is not an instance of declaring class

in the JBoss console.
A look at the stacktrace told me, that it was coming from inside the method com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker.isValidConnection, so naturally, I dived into the [...]

April 11, 2008  Tags: , ,   Posted in: Uncategorized  7 Comments

Log5j and The State of Log4j Version 2

I just took log5j for a spin. For those who does not know, log5j is a Java5 enhancement of the log4j api. It provides two new features on top of log4j, where one is made possible by Java5:

Feature 1: Obtain a logger without giving the logger name (which is bad, I think)
Feature 2: Using printf-style [...]

March 9, 2008  Tags: , ,   Posted in: Programming  2 Comments

Kudos To JetBrains and Open Source

It is absolutely great, that JetBrains has open sourced a great deal of their plugins!
Today, I installed the latest and greatest Selena EAP (early access) version of IntelliJ IDEA, to get some of the latest flex plugin features. Sadly, my ruby plugin then got turned off, as it was not built for the latest IDEA [...]

February 29, 2008  Tags: , ,   Posted in: Tools  2 Comments

Making CXF Log RuntimeExceptions From Server Implementations

Here is a bit more on CXF logging.
If you are using CXF to host web-service implementations (as opposed to using CXF as a client to consume web services with), you might wanna know about any un-caught RuntimeExceptions, your server-side implementation is throwing. CXF already catches and logs this for you, before sending them back as [...]

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

4 Ways To Stream Pdf and Some Tips

When it comes to streaming pdf content to a browser, suprisingly enough, a good how-to or reference on how to do this properly, is hard to find. It turns out, that there are numerous ways to do this, each with its own pros and cons. In this post, I show 4 different ways to [...]

February 27, 2008  Tags: , ,   Posted in: Programming  8 Comments

Java5: From Ordinal Value To Enum Instance

The enum type introduced in Java5 is quite powerful, but I miss a factory method to get an enum instance from its ordinal value. The existing factory method in Enum.valueOf(Class, String) lets you get an enum instance from its type and name, but there is no valueOf which lets you get it from the ordinal [...]

February 5, 2008  Tags: ,   Posted in: Programming  2 Comments

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  Tags: ,   Posted in: Tools  4 Comments

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  Tags: , ,   Posted in: Programming  2 Comments