Tech Per

29 Feb

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

28 Feb

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

27 Feb

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

05 Feb

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

31 Jan

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

30 Jan

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

30 Jan

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

28 Jan

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

24 Jan

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

24 Jan

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

© 2009 Tech Per | Entries (RSS) and Comments (RSS)

GPS Reviews and news from GPS Gazettewordpress logo