Tuesday 10 January 2012

Byteman 2.0.0 Released

Byteman 2.0.0 has been released. It includes a small number of bug fixes and new features and is available from the Byteman download page. If you are using Byteman from maven then the jars are available via the JBoss repository.

The release is accompanied by part two of the Byteman tutorial series, Fault Injection Testing With Byteman.

Monday 9 January 2012

Byteman Squashes Drools Bug

Martin Vecera is a senior member of our JBoss QE staff and one the Byteman project power users. He recognised Byteman's potential in its very early days and has provided valuable feedback during its development and been the project evangelist to our QE team. Martin has written up a very nice example of using Byteman for debugging and diagnosing a problem in Drools.

Using a conventional debugger is infeasible when a program repeatedly invokes the routine you want to investigate inside a long-running control loop. Product trace can help in such circumstances but it often fails because switching it on produces far more data than you actually need and does not always print the information you actually want to see.

So, Martin injected a simple Byteman rule into precisely the calls he is interested in and used a helper class to dump the critical data to a file in exactly the format he wants. Using Byteman he was able to inject the specific, controlled tracing behaviour he needed just where he needed it with out incurring any extra overheads. Enjoy.