JavaBean Aspect Page Up

After about a month of tinkering with the concept, I finally posted a page detailing how I was able to use the JBoss AOP framework to make plain old java objects support bound properties so I could use them with the JGoodies Binding framework. You can read about the Java Bean Aspect here. It’s still a work in progress and I welcome any comments, suggestions, etc.

6 thoughts on “JavaBean Aspect Page Up

  1. Hi. nice article. I developped the same kind of aspect a few weeks ago, and our solutions are quite close. the main difference is that you seem to advise the modification of the field (the ‘set’ pointcut) when I advise the execution of the set* method. Your solution is then simpler (to get the old value, I have to use some reflection to call the get* method associated with the property), but my solution is closer what we would have if we would have coded the firePropertyChangeEvents manually (they go in the setter, right?). So this shall resolve the problem of events fired from the constructor of the bean, or when loading the bean with hibernate (I don’t want 1 event per field when loading). But there might be some drawbacks I haven’t seen yet (still prototyping the system…). I did it using AspectJ 5, and I can share the code somebody is interested. I would be glad to have some feedback!

    Like

  2. Hi. nice article. I developped the same kind of aspect a few weeks ago, and our solutions are quite close. the main difference is that you seem to advise the modification of the field (the ‘set’ pointcut) when I advise the execution of the set* method. Your solution is then simpler (to get the old value, I have to use some reflection to call the get* method associated with the property), but my solution is closer what we would have if we would have coded the firePropertyChangeEvents manually (they go in the setter, right?). So this shall resolve the problem of events fired from the constructor of the bean, or when loading the bean with hibernate (I don’t want 1 event per field when loading). But there might be some drawbacks I haven’t seen yet (still prototyping the system…). I did it using AspectJ 5, and I can share the code somebody is interested. I would be glad to have some feedback!

    Like

  3. Very nice. If one of the goals is to minimize the impact on the original (deficient) bean, any thought of delegating to an instance of javax.swing.event.SwingPropertyChangeSupport to standardize the added function and minimize new in-bean code? Not sure it would be much of a win — more an interesting alternative.

    Like

  4. Very nice. If one of the goals is to minimize the impact on the original (deficient) bean, any thought of delegating to an instance of javax.swing.event.SwingPropertyChangeSupport to standardize the added function and minimize new in-bean code? Not sure it would be much of a win — more an interesting alternative.

    Like

Comments are closed.