Announcement Announcement Module
No announcement yet.
Conceptual AOP Question Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Conceptual AOP Question

    Hello All,

    Sorry if this is a question which has been answered elsewhere, I was not able to find it doing a quick search.

    The project I am working on currently uses the Beehive JDBCControls for the DAO layer. What I would like to do is to apply AOP advice on some of the methods of the objects that are created on those objects.

    I would like to know if it's possible to do this. It makes sense to me that Spring wouldn't be able to apply advice for something it didn't create, I just wanted to double check my understanding.

    Also, if this is the case, is there an "easy" way to do transform these objects into something Spring is aware of using a Spring factory?

    I again thank you for your time and response.

    -Justin N.
    Chicago, IL

  • #2
    You are right in thinking that Spring AOP may be applied only to Spring beans. While you can programmatically create proxies for non-beans, it still requires that you control the creation of such objects. I do not know if Beehive provides such a possibility.

    You may want to consider AspectJ that doesn't require the objects to be either Spring beans or you to control their creation.



    • #3
      Thanks for your quick reply Ramnivas.

      Just to make sure I understand the suggestion, you aren't referring to AspectJPointcutExpressions in the Spring configuration, you are saying making a switch to AspectJ to control the entire AOP process correct?

      Thanks in advance for the useful feedback!
      - Justin


      • #4
        Yes, the full power AspectJ weaving.