'Spring BlazeDS Integration'에 해당되는 글 2건

  1. 2013.09.05 spring blazeds integration
  2. 2013.09.02 Spring BlazeDS Integration
반응형

출처 : http://lahuman.tistory.com/55

 

주요 몇가지 소스를 간단히 소개 하면,

1. /WEB-INF/web.xml


 <!-- The front controller of this Spring Web application, responsible for handling all application requests -->
 <servlet>
     <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
     <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
     <init-param>
         <param-name>contextConfigLocation</param-name>
         <param-value>/WEB-INF/config/web-application-config.xml</param-value>
     </init-param>
     <load-on-startup>1</load-on-startup>
 </servlet>

 <!-- Map all *.spring requests to the DispatcherServlet for handling -->
    <servlet-mapping>
        <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
        <url-pattern>/spring/*</url-pattern>
    </servlet-mapping>


2. /WEB-INF/flex/services-config.xml

        <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
            <endpoint url="http://{server.name}:{server.port}/{context.root}/spring/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
        </channel-definition>


3. application-context.xml

 <!-- Maps request paths at /* to the BlazeDS MessageBroker -->
 <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
     <property name="mappings">
         <value>
             /*=mySpringManagedMessageBroker
         </value>
     </property>
 </bean>
 
 <!-- Dispatches requests mapped to a MessageBroker -->
 <bean class="org.springframework.flex.messaging.servlet.MessageBrokerHandlerAdapter"/>
 <!-- Bootstraps and exposes the BlazeDS MessageBroker -->
 <bean id="mySpringManagedMessageBroker" class="org.springframework.flex.messaging.MessageBrokerFactoryBean" /> 
    <!-- Implementation of ProductDAO using low-level JDBC -->
    <bean id="productDAO" class="flex.spring.samples.product.ProductDAO" >
        <constructor-arg ref="dataSource"/>
    </bean>
   
 <!-- Expose the productDAO bean for BlazeDS remoting -->
 <bean id="product" class="org.springframework.flex.messaging.remoting.FlexRemotingServiceExporter">
     <property name="messageBroker" ref="mySpringManagedMessageBroker"/>
     <property name="service" ref="productDAO"/>
 </bean>
   



위 예제를 보면 Spring MVC를 이용해서 flex BlazeDS를 호출 한다.

아래 파일을 찬찬히 봐라!

Posted by 1010
반응형

Spring Projects

Spring Flex

Spring BlazeDS Integration is a top-level Spring project, and a component of the complete Spring Web stack.  This project's purpose is to make it easier to build Spring-powered Rich Internet Applications using Adobe Flex as the front-end client.  It aims to achieve this purpose by providing first-class support for using the open source Adobe BlazeDS project and its powerful remoting and messaging facilities in combination with the familiar Spring programming model.

The Flex Addon for Spring Roo is a new component that raises the bar for productivity in building Flex clients backed by Spring BlazeDS Integration on the server-side. By utilizing the next-generation code-generation and management facilities of Spring Roo, it provides the fastest way to get up and running with a new Spring-based Flex project by letting developers focus on doing what they do best - write code.

 

Spring BlazeDS Integration is a top-level Spring project, and a component of the complete Spring Web stack.  This project's purpose is to make it easier to build Spring-powered Rich Internet Applications using Adobe Flex as the front-end client.  It aims to achieve this purpose by providing first-class support for using the open source Adobe BlazeDS project and its powerful remoting and messaging facilities in combination with the familiar Spring programming model.

The Flex Addon for Spring Roo is a new component that raises the bar for productivity in building Flex clients backed by Spring BlazeDS Integration on the server-side. By utilizing the next-generation code-generation and management facilities of Spring Roo, it provides the fastest way to get up and running with a new Spring-based Flex project by letting developers focus on doing what they do best - write code.

#maven

Latest News

Spring Flex Resources

Spring Flex Presentations

Spring Flex Articles and Tutorials

 

Maven Artifacts

Here is the Spring External Repository needed for BlazeDS dependencies:

<repository>
<id>spring-external</id>
<name>Spring External Repository</name>
<url>http://maven.springframework.org/external</url>
</repository>

Here is the Spring Flex dependency definition:

<dependency>
<groupId>org.springframework.flex</groupId>
<artifactId>spring-flex-core</artifactId>
<version>1.5.2.RELEASE</version>
</dependency>

 

Posted by 1010