Expand my Community achievements bar.

SOLVED

Newbie question: in what configuration file do <flex:remoting-destination> tags go?

Avatar

Level 2

I've seem to have read the Spring/Blaze integration document about 10 times, but I can't figure out where to put all of my <flex:remoting-destination ref="yaddayaddaService" /> tags.  I don't want to use annotation to define these remoting destinations.

Should it go into the Spring configuration file I use for the AMF endpoint servlet (as specified by its contextConfigLocation parameter).  Or do these go in a high level cross-servlet configuration file?

Whats the usual way to treat these?

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi,

The convention is to declare:

1. Declare the Spring beans (e.g yaddayaddaService) in files specified by contextConfigLocation parameter.

2. Add the Spring - Flex specific configuration (configure message broker, declare destinations) in <webapp_dir>WEB-INF\flex-servlet.xml, assuming you configured the Message Broker URL pattern as follows in web.xml:

    <servlet>
        <servlet-name>flex</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>flex</servlet-name>
        <url-pattern>/messagebroker/*</url-pattern>
    </servlet-mapping>

The BlazeDS SVN depot/distribution contains spring sample webapp (spring-samples.war) that you can look at as well.

Hope that helps.

Rohit

View solution in original post

2 Replies

Avatar

Correct answer by
Employee

Hi,

The convention is to declare:

1. Declare the Spring beans (e.g yaddayaddaService) in files specified by contextConfigLocation parameter.

2. Add the Spring - Flex specific configuration (configure message broker, declare destinations) in <webapp_dir>WEB-INF\flex-servlet.xml, assuming you configured the Message Broker URL pattern as follows in web.xml:

    <servlet>
        <servlet-name>flex</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>flex</servlet-name>
        <url-pattern>/messagebroker/*</url-pattern>
    </servlet-mapping>

The BlazeDS SVN depot/distribution contains spring sample webapp (spring-samples.war) that you can look at as well.

Hope that helps.

Rohit

Avatar

Level 2

Thanks a lot Rohit -- that is a huge help.