Announcement Announcement Module
Collapse
No announcement yet.
Annotations + flex:remote-service Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Annotations + flex:remote-service

    Hi,

    Using ref guide + Christophe's example, I've begun work on a branch that integrates SpringFlex into one of my current projects.

    In this project, almost all my beans are loaded via annotation(@Service, @Repository) and I'd like to expose to spring flex w/ annotations as well.

    Looking at all examples, the only way to expose to <flex:remote-service appears to be via xml config. Is this correct? Is there a way I can also expose via annotation?

    Cheers

  • #2
    There is a @RemotingDestination annotation that can now be used as an alternative. This is available in the latest nightly builds.

    Comment


    • #3
      Hi Jeremy,

      Thanks for the reply. I'll give it a go. One quick question though; can I also annotate include, exclude methods like

      <flex:remote-service ref="productService" include-methods="read, update" exclude-methods="create, delete" channels="my-amf, my-secure-amf" />

      Cheers

      Comment


      • #4
        Yes, there are corresponding @RemotingInclude and @RemotingExclude annotations that can be used at the method level.

        Comment


        • #5
          I'm trying to use @RemoteDestination with a class that has an @Autowired constructor, but @RemoteDestination seems to require a no arg constructor. Is there anyway around this or am I just doing it wrong?

          Comment


          • #6
            I can't think of any reason why this wouldn't work, but I've added a Jira to check it just in case.

            http://jira.springframework.org/browse/FLEX-38

            Comment


            • #7
              There was indeed a problem in the way we were getting at the annotated bean metadata that was causing things to initialize in the wrong order. This has been fixed and the change will be available in tonight's build.

              Comment

              Working...
              X