Using Spring BlazeDS Integration 1.0 |
|

Today we announced the public availability of the 1.0 GA release of the newest member of the open source Spring project portfolio, Spring BlazeDS Integration. Corresponding with this event, I thought it time to bring my previous getting started post up to date. To recap:
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.
Taking Spring BlazeDS Integration for a Test Drive
We have really expanded the feature set since that first M1 release to include:
- full Spring Security integration
- asynchronous messaging support (with 3 different message destination types)
- a complete XML configuration namespace
- annotation-based configuration options for remoting
- numerous advanced customization hooks
Now included with the project distribution is a thorough collection of samples built in collaboration with Adobe that demonstrate use of the various features, known as the Spring BlazeDS Integration Test Drive. These samples are a great way to get up and running with the project, and here I'm going to give you a quick tour of how everything fits together.
If you'd like to follow along in your IDE, go ahead and download the distribution and follow these instructions for building the samples with Maven and importing them into Eclipse. The end result is that you'll have quite a few new projects imported into your Eclipse workspace. Most of the projects are for the individual Flex samples (i.e., they contain .mxml and .as source and compile to .swf files). The actual WTP-deployable web application structure is found in the "testdrive" project, and that is where we'll focus first.
The first thing worth taking a look at in the project is /testdrive/src/main/webapp/WEB-INF/web.xml. Here you will see a fairly typical setup for a root web application context configured via the ContextLoaderListener, a basic setup of the Spring Security filter chain, and this configuration for the Spring DispatcherServlet:
<servlet>
<servlet-name>testdrive</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>testdrive</servlet-name>
<url-pattern>/messagebroker/*</url-pattern>
</servlet-mapping>
This takes the place of the MessageBrokerServlet configuration that you would find in a typical standalone BlazeDS application. The mapping of the /messagebroker/* path corresponds to the typical setup of the BlazeDS AMF communication channels that you will find in /testdrive/src/main/webapp/WEB-INF/flex/services-config.xml, such as this one:
<channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
<endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf"
class="flex.messaging.endpoints.AMFEndpoint"/>
</channel-definition>
This is the main configuration file for BlazeDS. While examining this file in the sample, note that there is no reference in the "services" section to either a remoting-config.xml nor messaging-config.xml. One of the benefits of Spring BlazeDS Integration is that the settings that previously would have been defined in those BlazeDS-specific files can now be defined completely through the provided Spring XML configuration namespace and Java annotations. This allows for a lot less mental context switching, plus if you are using the free SpringSource Tool Suite you get full code-completion support when editing the Spring configuration files.
Now let's take a look at some aspects of the Spring application context for the sample.

The application is set up with a root web application context that is assembled from the *-context.xml files found in /testdrive/src/main/webapp/WEB-INF/spring, as well as a child application context that is local to the aforementioned DispatcherServlet and assembled from /testdrive/src/main/webapp/WEB-INF/testdrive-servlet.xml (whose name and location is determined by convention). We have separated all of the Flex-specific configuration into this child context.
Let's examine testdrive-servlet.xml in further detail. The file starts with the necessary XML prologue to set up the standard Spring "beans" configuration namespace as well as the new "flex" namespace. Then the first thing you'll see is the basic setup for the BlazeDS MessageBroker:
<flex:message-broker>
<flex:message-service
default-channels="my-streaming-amf,my-longpolling-amf,my-polling-amf" />
<flex:secured />
</flex:message-broker>
The message-broker tag is what triggers the boot-strapping of the MessageBroker as a Spring-managed bean and automatically sets up all of the necessary Spring MVC infrastructure including a HandlerMapping and HandlerAdapter. You can further customize things through optional attributes and tags such as the location of services-config.xml, the specific paths that get mapped to the MessageBroker, etc., but in the common case this is all that is needed.
The message-service child tag is setting up default communication channels (in order of preference) for the BlazeDS MessageService. This tag is entirely optional, but a similar setup is commonly needed as the communication channel requirements for pub/sub messaging tend to differ from those of direct remoting. See this section of the BlazeDS Documentation for some guidelines.
The secured tag is all that is needed to enable the integration with the existing Spring Security setup defined in /testdrive/src/main/webapp/WEB-INF/spring/security-context.xml. With this tag present, Authentication requests driven by use of the Flex client-side ChannelSet API will be routed to the Spring Security AuthenticationManager. The resulting ActionScript object returned by a successful authentication contains some additional useful information such as an array of the user's granted authorities. (There are several additional security features and configuration options available that are outside the scope of this post, so I will refer you to the relevant docs if you'd like more detail.)
Once this basic setup is in place, you can start creating remoting and messaging destinations to connect your Flex client applications to Spring-powered services. If you take a look at /testdrive/src/main/webapp/WEB-INF/spring/services-context.xml, you will see definitions for several data access objects, including this one:
<bean id="contactService" class="org.springframework.flex.samples.contact.ContactDAO">
<constructor-arg ref="dataSource" />
</bean>
That basic Spring bean is then exposed for remoting to the Flex client with the following from testdrive-servlet.xml:
<flex:remoting-destination ref="contactService" />
This exposes the bean as a remote destination named "contactService" (by default the destination name is the same as the exported bean's id). To access this destination from the client, we just need to use the Flex RemoteObject class. For example, see the following snippet from /insync01/src/main/flex/insync01.mxml:
<mx:RemoteObject id="ro" destination="contactService"/>
<mx:ApplicationControlBar width="100%">
<mx:TextInput id="searchStr"/>
<mx:Button label="Search" click="ro.findByName(searchStr.text)"/>
</mx:ApplicationControlBar>
<mx:DataGrid id="dg" dataProvider="{ro.findByName.lastResult}" width="100%" height="100%"/>
As you can see, once the RemoteObject is connected, you can easily invoke methods on it and bind the results to Flex UI controls such as the DataGrid. The Spring-managed MessageBroker takes care of the routing of incoming HTTP messages and the serialization between AMF and Java. The POJO-based Spring programming model remains intact on the server side as is evident in the implementation of the "findByName" method in /testdrive/src/main/java/org/springframework/flex/samples/contact/ContactDAO.java:
public List<Contact> findByName(String name) {
return this.template.query("SELECT * FROM contact WHERE UPPER(CONCAT(first_name, ' ', last_name)) LIKE ? ORDER BY first_name, last_name",
this.rowMapper, "%" + name.toUpperCase() + "%");
}
Asynchronous pub/sub style communication is just as simple. Spring BlazeDS Integration provides integrated support for three different messaging adapters:
- BlazeDS ActionScriptAdapter for basic AMF messages, including the ability to push those messages to subscribed clients from a simple POJO using the provided MessageTemplate
- JmsAdapter for connecting to Spring-managed JMS destinations
- IntegrationAdapter for connecting to a Spring Integration MessageChannel
Message destinations that use these adapters are set up using the XML namespace in a similar manner to the remoting destinations. For example, see following definition in testdrive-servlet.xml:
<flex:message-destination id="chat" />
This sets up a basic AMF destination named "chat". With this destination defined, Flex clients can communicate through it using the Producer and Consumer APIs. To see how this particular destination is used, take a look at the Flex chat sample source at /chat/src/main/flex/chat.mxml.
Wiring up message destinations that are backed by a JMS destination is similar, using the jms-message-destination variation of the tag:
<flex:jms-message-destination id="jms-chat" jms-destination="chatTopic" />
This version references a Spring-managed JMS topic (defined in this case in /testdrive/src/main/webapp/WEB-INF/spring/infrastructure-context.xml). Looking at the source code for the Flex jms-chat sample at /jmschat/src/main/flex/jmschat.mxml, you'll notice that it is identical to the version using the basic AMF "chat" destination.
Likewise, connecting to a Spring Integration MessageChannel is a matter of using the integration-message-destination tag. Be sure to check out the "POJO Messaging" sample in the test drive to see how easy it is to bring simple POJO message handlers into the mix.
Further Explorations
With this quick introduction, we're really just scratching the surface of what you can do with Spring BlazeDS Integration. If you're interested in building a Spring-powered RIA, I encourage you to go through all of the samples in the test drive to learn more. While you're at it, check out these additional samples built by some of our active community members, and take a look at the community-driven Spring ActionScript project to bring the value of DI to the Flex client.
As always, if you've got ideas for how we can further add value or any other feedback to share, we invite you to get involved through the forum and Jira.
Similar Posts
- Using Spring BlazeDS Integration 1.0.0.M1
- Introducing the Flex Addon for Spring Roo
- Spring Integration 1.0.3 Samples: just add Maven
- New Spring Integration Samples
- Spring Integration 2.0 GA Released









Hans Melgers says:
Added on June 11th, 2009 at 7:22 amHello,
Very nice blog to get started from. I'd a small issue when building and deploy the jar using maven.
When building using maven from the spring-flex-1.0.0.RELEASE/projects/org.springframework.flex the resulting jar does not contain the spring-flex-1.0.xsd it points to in the spring.schema file (http\://www.springframework.org/schema/flex/spring-flex-1.0.xsd=org/springframework/flex/config/xml/spring-flex-1.0.xsd). It's small but it results in a sax error when deploying in tomcat.
Kind regards,
Hans Melgers
Jeremy Grelle (blog author) says:
Added on June 11th, 2009 at 9:32 amHans,
We use Ant Ivy as our main build system, thus the main module is not really intended to be built with Maven. We provide the Maven build for the samples just because it requires a bit less setup (i.e., doesn't require manual configuration of the Flex SDK) to get going.
Thanks,
Jeremy
Simon Barber says:
Added on June 12th, 2009 at 10:28 amHi Jeremy,
I managed to build your Simple Flex Webapp example with Maven successfully. I then deployed it to a Tomcat server (6.0.20) and tried to run the server but get this error.
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personController': Injection of persistence methods failed.
Any ideas?
Regards,
Simon
Jeremy Grelle (blog author) says:
Added on June 12th, 2009 at 1:48 pmSimon,
It looks like you've got another application deployed besides the Test Drive, because there is no 'personController' bean anywhere in the Test Drive sample.
Cheers,
Jeremy
Paolo Denti says:
Added on June 13th, 2009 at 5:56 amIf blazeDS will continue to miss lazy loading support for jpa persistence layer, it will remain a useless project for the most of the applications. And this, unfortunately, applies to Spring BlazeDS Integration too.
Ajrarn says:
Added on June 14th, 2009 at 9:15 pmHi Jeremy!
I'm trying to use Spring BlazeDS Integration Test Drive in my Eclipse 3.4.
I follow the instructions and Maven (2.1.0) builds correctly.
I import all of the projects in a new clean workspace and add project "testdrive" in my Tomcat 6.0 using WTP.
When I start my server, I've got this :
GRAVE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_messageBrokerDefaultHandlerMapping': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_messageBroker': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/apache/xpath/CachedXPathAPI
…
Any ideas?
Need to add a new Maven dependency?
Thanks!
Ajrarn says:
Added on June 14th, 2009 at 9:32 pmHi again!
I solved my problem adding xalan.jar in my {project distribution root}/spring-flex-samples/spring-flex-testdrive/testdrive/target/testdrive/WEB-INF/lib.
It would be good to add dependency in pom.xml.
Regards
Vasil says:
Added on June 17th, 2009 at 10:43 pmAre there some special steps to be taken when using this in combination with injecting a JPA EntityManager with @PersistenceContext annotation?
It seems that when I try to expose objects which use EntityManager injection with annotations null gets injected in the exposed object. I'm sure my configuration is ok since it works with a regular spring mvc controller in the same xml file.
Alfredo says:
Added on June 22nd, 2009 at 8:41 pmI was wondering if I could run Spring BlazeDS integration with Spring 1.29 distribution.
thanks,
Alfredo
Andrew says:
Added on June 24th, 2009 at 4:23 pmAlfredo,
http://static.springframework.org/spring-flex/docs/1.0.x/reference/html/ch01s02.html
Hope that helps
3fr41n says:
Added on June 30th, 2009 at 9:05 amAfter i fix the Xalan dependency problem i deploy the war file to Tomcat 6.0.20 everything seems to work fine but when i run the first example i get this error on flex:
[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://localhost:8080/messagebroker/amf'"]
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()
at mx.rpc::Responder/fault()
at mx.rpc::AsyncRequest/fault()
at mx.messaging::ChannelSet/faultPendingSends()
at mx.messaging::ChannelSet/channelFaultHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.messaging::Channel/connectFailed()
at mx.messaging.channels::PollingChannel/connectFailed()
at mx.messaging.channels::AMFChannel/statusHandler()
It seems like is a context problem, how can i fix it?
3fr41n says:
Added on June 30th, 2009 at 10:00 amOK, i make it work, i deploy the target\testdrive folder to the ROOT context on Tomcat and works, is not practical but it work.
ahuebel says:
Added on July 1st, 2009 at 9:57 amI also ran into the problems that Ajrarn (needed to add xalan.jar to POM) and 3fr41n (need to deploy app in ROOT of Tomcat) found. It seems the project assumes a certain level of Flex 'knowledge' (does BlazeDS.war need to be deployed? Should services-config.xml refer to local host or the IP?). I too ran into annotation weirdness when trying to integrate with GraniteDS (see Vasil above). The project looks promising and I hope to learn more.
Bill42 says:
Added on July 6th, 2009 at 8:04 amI modified my Tomcat web.xml like so (just as a temporary fix):
org.apache.jsp.index_jsp
<!–/index.jsp–>
/tomcat
This will allow the testdrive index.html to be the home page.
As an alternative to deploying the testdrive into the ROOT.
Bill42 says:
Added on July 6th, 2009 at 8:10 amSorry, my XML got munged. Here's the change:
<servlet-mapping>
<servlet-name>org.apache.jsp.index_jsp</servlet-name>
<!–<url-pattern>/index.jsp</url-pattern>–>
<url-pattern>/tomcat</url-patter>>
</servlet-mapping>
Kannan says:
Added on August 10th, 2009 at 5:02 amHi,
When SpringBlazeDs will support lazy loading. Can you please let us know.
Paolo Denti says:
Added on August 10th, 2009 at 5:43 amKennan, i think your question, which is anyway crucial for the usefulness of this project, should go to the blazeds team.
German says:
Added on August 18th, 2009 at 4:47 pmi'm trying to build the samples with Maven 2.2.1 but it keeps failing "org/jdom/input/SAXBuilder" (class not found).BTW I hate Maven.
Chris says:
Added on August 21st, 2009 at 8:54 amHello there,
I don't really get the concept behind the Consumer/Producer thing.
if I use this tag how can i wire it to a POJO?
Greetings
Chris
Curt says:
Added on August 26th, 2009 at 3:38 pmI wish maven gave more explanation of what failed in my maven 2.2.1 install of the 1.0.0 BlazeDS integration example.
Can someone suggest what's wrong with my env from this error?
tnx curt
[ERROR] BUILD ERROR
[INFO] ————————————————————————
[INFO] Result of java -jar D:\development\spring-flex-1.0.0.RELEASE\projects\spring-flex-samples\spring-flex-testdrive\insync-air-spring/libs/adt.jar -package -storetype pkcs12 -keystore testdrivecert.p12 -storepass 12345 -keypass 12345 insync-air-spring.air D:\development\spring-flex-1.0.0.RELEASE\projects\spring-flex-samples\spring-flex-testdrive\insync-air-spring/../testdrive/src/main/webapp/insync-air-spring/main-app.xml -C D:\development\spring-flex-1.0.0.RELEASE\projects\spring-flex-samples\spring-flex-testdrive\insync-air-spring/../testdrive/src/main/webapp/insync-air-spring main.swf -C D:\development\spring-flex-1.0.0.RELEASE\projects\spring-flex-samples\spring-flex-testdrive\insync-air-spring\src\main\flex assets execution is: '10'.
[INFO] ————————————————————————
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Result of java -jar D:\development\spring-flex-1.0.0.RELEASE\projects\spring-flex-samples\spring-flex-testdrive\insync-air-spring/libs/adt.jar -package -storetype pkcs12 -keystore testdrivecert.p12 -storepass 12345 -keypass 12345 insync-air-spring.air D:\development\spring-flex-1.0.0.RELEASE\projects\spring-flex-samples\spring-flex-testdrive\insync-air-spring/../testdrive/src/main/webapp/insync-air-spring/main-app.xml -C D:\development\spring-flex-1.0.0.RELEASE\projects\spring-flex-samples\spring-flex-testdrive\insync-air-spring/../testdrive/src/main/webapp/insync-air-spring main.swf -C D:\development\spring-flex-1.0.0.RELEASE\projects\spring-flex-samples\spring-flex-testdrive\insync-air-spring\src\main\flex assets execution is: '10'.
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
…
Caused by: org.apache.maven.plugin.MojoExecutionException: Result of java -jar D:\development\spring-flex-1.0.0.RELEASE\projects\spring-flex-samples\spring-flex-testdrive\insync-air-spring/libs/adt.jar -package -storetype pkcs12 -keystore testdrivecert.p12 -storepass 12345 -keypass 12345 insync-air-spring.air D:\development\spring-flex-1.0.0.RELEASE\projects\spring-flex-samples\spring-flex-testdrive\insync-air-spring/../testdrive/src/main/webapp/insync-air-spring/main-app.xml -C D:\development\spring-flex-1.0.0.RELEASE\projects\spring-flex-samples\spring-flex-testdrive\insync-air-spring/../testdrive/src/main/webapp/insync-air-spring main.swf -C D:\development\spring-flex-1.0.0.RELEASE\projects\spring-flex-samples\spring-flex-testdrive\insync-air-spring\src\main\flex assets execution is: '10'.
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:208)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor
Maodo DIOP says:
Added on September 4th, 2009 at 3:38 amWe need a step-by-step tutorial for spring flex integration (with blazeds) for example. Why not a hello word service for beginners?
kudos ltda. says:
Added on September 16th, 2009 at 3:48 pmI'm trying to use spring blazeds integration 1.0 with spring-framework-3.0.0.M4 , spring-security-3.0.0.M2 and Hibernate 3.3.0 but It seems that there is an incompatibility between blazeds integration 1.0 and spring-security-3.0.0.M2:
Error creating bean with name '_messageBrokerLoginCommand': Resolution of declared constructors on bean Class [org.springframework.flex.security.SpringSecurityLoginCommand] from ClassLoader [WebappClassLoader]
Caused by: java.lang.ClassNotFoundException: org.springframework.security.Authentication
any idea?
thanks for your help
German says:
Added on September 16th, 2009 at 3:57 pmto kudos ltda.: I had the same problem. I had to fall back to spring security 2.0.5. If you check distribution 3.x and 2.0.x the class org.springframework.security.Authentication is in different folders.
kudos ltda. says:
Added on September 16th, 2009 at 4:39 pmThat issue is open in Jira: Ensure compatability with Spring Security 3.0 http://jira.springframework.org/browse/FLEX-65
Oltar says:
Added on September 28th, 2009 at 9:29 amHello.
I think I solved the context problem encountered by 3fr41n and other developers. My solution doesn't require deployment to the Tomcat's ROOT, or any changes in servlet mappings.
Cause of the problem
The {context.root} token in services-config.xml is substituted at compile time by a parameter passed to the mxmlc. The value of this parameter is defined separately in each project's pom.xml, by the element of flexmojos' plugin configuration. By default, it is set to "/". That's why Flex clients try to access Tomcat's ROOT context in search of the AMF channel, instead of [application name] context created by Tomcat.
Solution
1. Open testdrive's main pom.xml : [Examples dir]\spring-flex-samples\spring-flex-testdrive\pom.xml
2. Add the following property:
testdrive
3. Open [Examples dir]\spring-flex-samples\spring-flex-testdrive\testdrive\pom.xml
4. Set final war-file name according to the previously defined property:
${app.context.root}
5. In all [Examples dir]\spring-flex-samples\spring-flex-testdrive\[Project dir]\pom.xml build files, set the context root used by Flex client to:
/${app.context.root}
6. Rebuild and redeploy testdrive.war to Tomcat's webapps directory.
Now the app.context.root keeps everything in sync and Flex clients use valid url's when sending RPC requests. It is probably not the most elegant solution, but it works
Hope this helps and inspires somebody to invent something better.
Regards,
Oltar
Oltar says:
Added on September 28th, 2009 at 9:36 amThe solution once again – thought the message box was somewhat more sophisticated…
Solution
1. Open testdrive's main pom.xml : [Examples dir]\spring-flex-samples\spring-flex-testdrive\pom.xml
2. Add the following property:
<properties>
<app.context.root> testdrive </app.context.root>
</properties>
3. Open [Examples dir]\spring-flex-samples\spring-flex-testdrive\testdrive\pom.xml
4. Set final war-file name according to the previously defined property:
<finalName>${app.context.root}</finalName>
5. In all [Examples dir]\spring-flex-samples\spring-flex-testdrive\[Project dir]\pom.xml build files, set the context root used by Flex client to:
<contextRoot>/${app.context.root}</contextRoot>
6. Rebuild and redeploy testdrive.war to Tomcat's webapps directory.
Oltar says:
Added on September 28th, 2009 at 9:42 amSolution – after adding some semicolons…
1. Open testdrive's main pom.xml : [Examples dir]\spring-flex-samples\spring-flex-testdrive\pom.xml
2. Add the following property:
<properties>
<app.context.root> testdrive </app.context.root>
</properties>
3. Open [Examples dir]\spring-flex-samples\spring-flex-testdrive\testdrive\pom.xml
4. Set final war-file name according to the previously defined property:
<finalName>${app.context.root}</finalName>
5. In all [Examples dir]\spring-flex-samples\spring-flex-testdrive\[Project dir]\pom.xml build files, set the context root used by Flex client to:
<contextRoot>/${app.context.root}</contextRoot>
6. Rebuild and redeploy testdrive.war to Tomcat's webapps directory.
Sorry for the mess – some preview feature would be useful…
Thanuj Kumar says:
Added on November 23rd, 2009 at 12:28 pmAlready there is an application built using Spring technology and uses JSF as view technology. This is a client-server model, i am looking at solution where JSF is replaced with Adobe Flex and using Adobe Flex on desktop version of the application using Adobe AIR. At this point there isn't possibility to use existing code from Spring to move on to desktop application. I would like to know how much of the Spring code can be used for desktop application from client-server model. Is it possible to retain Business and Persistent layer of spring for desktop application using Adobe Flex and AIR instead of Java Swings?
Please let me know is this possible?
Manish says:
Added on March 4th, 2010 at 8:21 amCan this be integrated with Spring.net?
Anant says:
Added on April 9th, 2010 at 7:08 pmhi,
I imported your testdrive sample project in my Flex builder (with WTP). Works fine.
But if I want to change some flex mxml file and get new compiled swf how can I do it? Tried to run build.xml but get some errors.
Thanks
agungdmt says:
Added on April 14th, 2010 at 11:26 pmhi jeremy…
i'm have try your sample project (spring-test-drive), and it so good learning for newbie like me. but, i have little problem, in part secured. when implementation into Flex Project, my question how to setting remote-config, service-config and web-xml? if the java class like this
package org.springframework.flex.samples.secured;
import java.util.Map;
import org.springframework.flex.security.AuthenticationResultUtils;
public class SecurityHelper {
public Map getAuthentication() {
return AuthenticationResultUtils.getAuthenticationResult();
}
}
please help me
thanks….
Royston says:
Added on May 25th, 2010 at 5:25 amIn the mxml file, when I only use:
I'll get error:
[MessagingError message='Destination xxx' either does not exist or the destination has no channels defined....]
However, it can be solved by adding the below codes to the mxml file:
Did I miss out anything or the channel has to be explicitly coded in the mxml file?
Thanks!!
Royston says:
Added on May 25th, 2010 at 5:29 amApologies, I think my codes are automatically removed for security reasons.
In short, I need to add in mx:AMFChannel and mx:ChannelSet in my mxml codes to solve the error.
J D says:
Added on June 16th, 2010 at 5:48 amVery useful. Your earlier post talks about Spring MVC but you haven't mentioned it here. Would the following remain the same
/messagebroker/*=mySpringManagedMessageBroker
derrick says:
Added on June 18th, 2010 at 9:25 amWhen I hover over your code elements, I keep getting an extremely irritating error, because I have the flash debug player.
Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed.
Jeremy Flowers says:
Added on October 9th, 2010 at 5:27 pmThe sample project you developed for MAX DEV2009: (Jeremy Grelle/Mark Fisher):
http://tv.adobe.com/watch/max-2009-develop/integrating-spring-with-blazeds-and-livecycle-data-services
Is that downloadable as an example somewhere?
dongdong246 says:
Added on January 17th, 2012 at 9:38 pmorg.springframework.beans.factory.BeanCreationException: Error creating bean with name '_messageBroker' defined in ServletContext resource [/WEB-INF/config/web-application-config.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/apache/xpath/CachedXPathAPI