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

  • Auto Proxy

    Seems unless you create objects using Spring framework the POJO objects in my very complex swing/web application cannot be traced using AOP Functionality.
    Does this also hold true for Dynamic Auto Proxy Functionality?
    In this case, the advantage that we get from Static AspectJ Compiler that requires a completely new compiler is lost in terms of Lots of Code Modifications.

    I think there should be a way to trace POJO using Auto Proxy in someway which requires minimum modifications. Does anyone know or can summarize the Minimum Code Changes with the Most Advanced Auto Proxy class?


  • #2
    If you want to proxy all instances of an object without additional configuration then I would recommend that you use AspectJ.

    In general, you can split the feature set of Spring AOP into these categories:

    1. Advise a Spring managed bean
    2. Advise a set of Spring managed beans that meet some criteria using auto proxying
    3. Advise a given instance of an object at runtime using programmatic AOP configuration.

    In the current version of Spring, you can take full advantage of Spring configuration for your singleton AspectJ aspects. In 1.3/AJ5 we will support AJ aspects of all lifecycles for Spring configuration.



    • #3
      For 3. Advise a given instance of an object at runtime using programmatic AOP configuration
      that also should be created using Spring framework.
      I have 100's of these objects and these are all created in different files using new operator. How do I convert all of these to be created using Spring framework? Probably manually.
      I don't want to use AspectJ Compilation approach. I find the dynamic approach much more appealing.

      So, we have to basically find an easy way for this conversion to make Spring more useful for existing projects....any suggestions? Can looking at the source code for Spring help me to contribute in this direction.


      • #4
        You can create your own objects and then proxy them using the ProxyFactory class - so you can create your own proxies for your own objects at runtime.