Uploaded image for project: 'Grails'
  1. Grails
  2. GRAILS-5701

Conventional support for scoped service proxies

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 3.1
    • Component/s: None
    • Labels:
      None

      Description

      Support for creating scoped proxies

      class MyService {
          static scope = 'session'
          static proxy = true // <-- create a proxy
      }
      
      // Spring config
      myServiceProxy(org.springframework.aop.scope.ScopedProxyFactoryBean) {
      	targetBeanName = 'myService'
      	proxyTargetClass = true
      }
      

        Issue Links

          Activity

          Hide
          Stéphane Maldini added a comment -

          Too bad it didn't fit the 1.3

          Show
          Stéphane Maldini added a comment - Too bad it didn't fit the 1.3
          Hide
          Luke Daley added a comment -

          Moving to 2.0... for now people can use the scoped proxy plugin.

          Show
          Luke Daley added a comment - Moving to 2.0... for now people can use the scoped proxy plugin.
          Hide
          Andre added a comment -

          shouldnt this be in scope for 2.0 instead of 3.0 as fix version?

          Show
          Andre added a comment - shouldnt this be in scope for 2.0 instead of 3.0 as fix version?
          Hide
          Luke Daley added a comment -

          Unsure when this will go in core.

          In the meantime you can use https://github.com/alkemist/grails-scoped-proxy

          Show
          Luke Daley added a comment - Unsure when this will go in core. In the meantime you can use https://github.com/alkemist/grails-scoped-proxy
          Hide
          Alex Beardsley added a comment - - edited

          Note that at the time of writing, the grails-scoped-proxy plugin does not compile with 2.4 because of the removal of PluginManagerHolder. I initiated a pull request to fix this. The current 0.2 version is based on a very old version of Grails (though 0.3-SNAPSHOT is 2.3.4), so be weary.

          Show
          Alex Beardsley added a comment - - edited Note that at the time of writing, the grails-scoped-proxy plugin does not compile with 2.4 because of the removal of PluginManagerHolder. I initiated a pull request to fix this. The current 0.2 version is based on a very old version of Grails (though 0.3-SNAPSHOT is 2.3.4), so be weary.
          Hide
          Henry Zaccak added a comment -

          Any update on this? The plugin is out of date now and it looks like a pretty quick change to the core.

          Show
          Henry Zaccak added a comment - Any update on this? The plugin is out of date now and it looks like a pretty quick change to the core.

            People

            • Assignee:
              Unassigned
              Reporter:
              Luke Daley
            • Votes:
              14 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

              • Created:
                Updated:
                Last Reviewed: