Note to Self: Running GroovyConsole with a Maven Project's Classpath

It's pretty useful to have the ability to eperiment interactively with some API using the (desktop) Groovy Console
Continue reading →

Most interesting links of September

Recommended Readings


Continue reading →

Inspect Your Webapp in a Live Environment Interactively with GroovyConsole

Have you ever needed to check the state of your webapp's objects/Session/.. to find out why the hell something doesn't work or have you had to learn a weird 3rd party API that is only available on the server? Then you were doomed ... until the publication of GroovyConsole. JeeUtils GroovyConsole provides a JSP page that let you execute any Groovy/Java code on the server side, with access to server-side objects like request/session etc.

Here is a screenshot of my recent troubleshooting session, where I needed to check the state of a session-scoped JSF Managed Bean:


Continue reading →

Link: Advanced Usage of JUnit Theories, Multiple DataPoints, and ParameterSuppliers

It is surprising how difficult it is to find documentation for some JUnit features such as Theories. May be they haven't bothered to write it because it is still considered "experimental" (even though included in JUnit since 4.4). As usually we have to rely on Jens Schauder's blog
Continue reading →

JUnit Tip: Verifying that an Exception with a Particular Message was Thrown

JUnit has a hidden treasure which makes it easy to do something we have long longed for - namely not only to verify that an exception of a particular type has been thrown but also that its message contains the expected message. The hidden pearl is the @Rule ExpectedException and its JavaDoc documents well how to use it (slightly modified):


Continue reading →

Correct your URL

The page you want to access is Practical Introduction into Code Injection with AspectJ, Javassist, and Java Proxy
Continue reading →

Practical Introduction into Code Injection with AspectJ, Javassist, and Java Proxy

The ability to inject pieces of code into compiled classes and methods, either statically or at runtime, may be of immense help. This applies especially to troubleshooting problems in third-party libraries without source codes or in an environment where it isn't possible to use a debugger or a profiler. Code injection is also useful for dealing with concerns that cut across the whole application, such as performance monitoring. Using code injection in this way became popular under the name Aspect-Oriented Programming (AOP). Code injection isn't something used only rarely as you might think, quite the contrary; every programmer will come into a situation where this ability could prevent a lot of pain and frustration.

This post is aimed at giving you the knowledge that you may (or I should rather say "will") need and at persuading you that learning basics of code injection is really worth the little of your time that it takes. I'll present three different real-world cases where code injection came to my rescue, solving each one with a different tool, fitting best the constraints at hand.


Continue reading →

DRY: Use JUnit @Rule Instead of Repeating Setup/@Before in Each Test

I was for a long time unhappy that DbUnit Express users have to create a @Before method in each test just to get the test database initialized. Fortunately since version 1.3.0 they don't need to do it anymore thanks to JUnit Rules (if you are not familiar with them, they are an alternative to @Before/@After and @BeforeClass/@AfterClass, read this rules introduction).

As true coders you are certainly annoyed by so many words so let get to the source code.


Continue reading →

DbUnit Express 1.3 is Even Easier to Use and Still Better

The DbUnit Express
Continue reading →

Most interesting links of August

Recommended Readings


Continue reading →

A Funny Story about the Pain of Monthly Deployments

The end of our one-month iteration approached and the levels of fear and agitation started to rise. What will happen when we deploy it? Will everything crash? Will all hell break loose? Will there be a flood of midnight severity-one issues? Will the features developed work together or are there going to be unexpected and fatal interactions?

Continue reading →

DbUnit Express Tips: Setup Simplification, Custom Data File Convention

I've recently introduced here DbUnit Express, a wrapper around DbUnit intended to get you started with testing DB-related code in no time, and now I'd like to share two productivity tips: simplifying db tester setup with a parent test and implementing your own convention for data set files, for example one data set per test class.


Continue reading →

Most interesting links of July

Recommanded Readings


Continue reading →

Experiencing JSF 1.2: Good but Needs a Framework

I've got an opportunity to experiment with JSF 1.2 while preparing a lecture about DbUnit Express
Continue reading →

Simple Logging HTTP Proxy with Grinder

Sometimes I need to observe HTTP communication between my and another machine. I usually use Eclipse' integrated TCP/IP monitor for it's simple and does its job well but today for a large response it just displayed "The HTTP content is too large to display." so I started searching for alternatives and found the Grinder TCPProxy
Continue reading →

Copyright © 2026 Jakub Holý
Powered by Cryogen
Theme by KingMob