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

  • @RemotingDestination annotation

    I just tried using the @RemotingDestination annotation and I must be missing something with the configuration.

    I commented out the xml configuration:

        <flex:remoting-destination ref="productRepository"/>
    and added the @RemotingDestination annotation:

    My component scan is this:

    <context:component-scan base-package="com.flexproj" />
    The scanner is finding the @Repository annotation when I use the xml configuration so I know that it is finding it. Is there something else I am missing?


  • #2
    I'm getting the same problem moving from M2 to RC1, following the docs about adding annotation support. It does seem like a step is missing.


    • #3
      That should be all you have to do. Are you just not seeing the log message showing the destination has been created? Are you getting any other errors?


      • #4
        Found my problem...

        I made the switch to RC1 at the same time as adding the RemoteDestination annotation. Turns out my component-scanner was in a different context (loaded with the ContextLoaderListener rather than the SpringMVC servlet location). It was picking up my Hibernate Annotations (in that context), but not my Flex ones (a different context). I have since taken EVERYTHING out of the xml file that the servlet needs and just loaded everything through the ContextLoaderListener.


        • #5
          Jeremy the error I am getting is
          "No destination with id 'referenceData' is registered with any service."

          My destination does have a different name to my bean, but I have put this on the annotation (@RemotingDestination("referenceData")).

          What log messages should we be seeing? I have put on TRACE but can't see anything to do with desintation creation. I am very confident the bean is being created as they we already annotation driven in when using M2. I do have some aspects applied to my class, could that cause problems?


          • #6
            You should see the same logging message that you see with the xml-configured destinations. Something such as:

            May 11, 2009 11:21:44 AM org.springframework.flex.remoting.RemotingDestinat ionExporter initializeDestination
            INFO: Remoting destination 'referenceData' has been started started successfully.

            How do you have you app context config files structured?


            • #7
              Just to confirm bh5k has found the problem: It is not checking the parent application contexts for bean definitions.

              e.g This scenario does not work.

              Loaded by listener common.xml
              <context:component-scan />
              <flex:message-broker >
                <flex:secured />
              If you move the flex defintions into common.xml then everything is fine. If I combine them I see the logging message you describe. If I split them then they do not appear.


              • #8
                Hmmm...ideally it should be able to find the beans from the parent context as well. I've opened an issue for this:

                I'm not actually certain we'll be able to do this (may be an inherent limitation of our BeanFactoryPostProcessor approach) for 1.0, but I'd like to at least make an attempt. If we can't fix it, then maybe we can adopt a bytecode scanning approach for 1.1.


                • #9
                  Thanks Jeremy. If it isn't possible it would be good to have a warning about it in the docs. I would think the configuration layout described above would be quite common, such as if you were sharing services between a Flex interface and another view mechanism.


                  • #10
                    Turned out to be simpler than I expected. FLEX-49 has been resolved and the fix will be available in tonight's build.


                    • #11
                      Release DATE

                      Hi, im quite interested in this bug fix.

                      When the next build (RC2) is going to be released or where can i find the nightly build versions which already has the fix.



                      • #12
                        I will be publishing RC2 either sometime this weekend, or Monday at the latest. Nightly builds are available here:


                        • #13
                          I have absolutely no idea where I've gone wrong at

                          I downloaded Chris Congraet's testdrive RC2 version. and tried to use the annotations.

                          I dont get any logging messages that says that Remoting destination or service is being registered.

                          i get this error in flex client:
                          [RPC Fault faultString="No destination with id 'basicService' is registered with any service." faultCode="Server.Processing" faultDetail="null"]

                          I cannot figure out if it's component-scan or @Autowired that's not working.

                          I am quite sure that there were few other ppl having similar problems but i could not find a satisfying solution to this.

                          can anyone help in troubleshooting this?