Results 1 to 4 of 4

Thread: Auto Proxy

  1. #1
    Join Date
    Aug 2005
    Posts
    2

    Default Auto Proxy

    Hi:
    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?

    Thanks.

  2. #2
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    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.

    Rob
    Rob Harrop
    Lead Engineer, dm Server
    SpringSource
    http://www.springsource.com

    Co-Author - Pro Spring

  3. #3
    Join Date
    Aug 2005
    Posts
    2

    Default

    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. #4
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    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.

    Rob
    Rob Harrop
    Lead Engineer, dm Server
    SpringSource
    http://www.springsource.com

    Co-Author - Pro Spring

Similar Threads

  1. Replies: 8
    Last Post: Oct 18th, 2007, 09:23 AM
  2. Replies: 1
    Last Post: Jul 29th, 2005, 11:17 AM
  3. Other Hibernate DAO LazyInitializationExceptions
    By bernardsirius in forum Data
    Replies: 5
    Last Post: Feb 18th, 2005, 04:09 PM
  4. Replies: 9
    Last Post: Feb 8th, 2005, 09:25 PM
  5. hibernate auto flush or custom transaction proxy?
    By qiao_lei1980@hotmail.com in forum Data
    Replies: 2
    Last Post: Nov 5th, 2004, 07:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •