Results 1 to 2 of 2

Thread: Referencing autoproxied target

  1. #1
    Join Date
    Aug 2004
    Location
    Amsterdam, Netherlands
    Posts
    450

    Default Referencing autoproxied target

    A user in the webforum (http://forum.springframework.org/showthread.php?t=10357) was wondering whether or not it's possible to reference or reach a proxied object creating by an AutoProxyCreator (so not hte proxy, but target itself).

    The FactoryBean has support for reaching the factorybean itself instead of objects it creates (prefix an ampersand). Wouldn't it be a nice features to allow autoproxied objects to referenced the same way?

    Rod, anyone, opinions?
    Last edited by robyn; May 14th, 2006 at 04:49 PM.

  2. #2
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    Programmatically you can cast the reference to Advised and get the target source from there. If it's a simple target, it will be of type SingletonTargetSource.

    The problem with a mechanism like the ampersand is that it wouldn't work for dynamic target sources, which may return a different target instance on each invocation.
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

Similar Threads

  1. Replies: 9
    Last Post: Oct 14th, 2005, 09:38 AM
  2. Target Class Name in ProxiedBean
    By Leonets in forum Container
    Replies: 3
    Last Post: Sep 7th, 2005, 09:11 AM
  3. Replies: 2
    Last Post: May 12th, 2005, 03:54 PM
  4. Replies: 1
    Last Post: Jan 15th, 2005, 04:50 PM
  5. Replies: 2
    Last Post: Aug 30th, 2004, 01:36 PM

Posting Permissions

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