Tuesday, September 30, 2008

Debugging JBoss AOP Apps Tutorial - Part1

Now and then I run into users complaining they don't know how to debug JBoss AOP applications. Targetting those users, I decided to write this tutorial, that will explain you the basics on debugging JBoss AOP application to have you started right away. As we will see, it is extremely easy to debug a JBoss AOP application using an IDE as Eclipse. The tricky part is how to set up your environment and to get familiar with the JBoss AOP classes that will trigger your advices.

Debugging JBoss AOP Apps Tutorial - Part 1

In this tutorial we are going to show you how you can debug an application that uses JBoss AOP using Eclipse.

For this, you need to have your project set up in Eclipse without compilation errors.

Now, follow in these steps:

  1. Open the debug drop-down menu and click on Debug... as shown in the image below:

  2. On the Debug window, click the New launch configuration button:

  3. Configure your test as you would if your application didn't use JBoss AOP.
  4. On the Arguments tab, add the javaagent argument and define the system property “jboss.aop.path” as in the example:


    Notice you have to fill those values with the path of the jboss-aop-jdk50.jar and the jboss-aop.xml in your system.

Now you are ready to go. Just add the breakpoints to the points you want to debug and start the debugging.

In the next part of this tutorial, we are going to explain the JBoss AOP classes you will run into when debugging and what you need to know about them in order to debug your application and your aspects successfully. Stay tuned!

Tuesday, September 9, 2008

JustJava and JBoss Brasil

Hello everyone!

I have great news from Brazil. First, I'm going to do two talks at JustJava, the largest Brazilian Java event.
The title of the first talk is "Dynamic Aspect-Oriented Programing and Adaptable Systems", and it will be held tomorrow at 16:00h. The second one will take place on Friday, 12th and has the title "Designing a JavaEE Server with IoC and AOP - A Study Case".
If you are attending to JustJava this year, go check out my presentations and let me know what you think of those subjects.

The second news is that Edgar Silva has founded a Brazilian JBUG, the JBoss Brasil. I've added an internal group dedicated to JBoss AOP project exclusively. I you are Brazilian or at least speaks Portuguese, feel free to join our group. For those that don't speak Portuguese, you are always welcome to join our forums and feel free to contact us in case you want to get involved in JBoss AOP project.

See you around!