As a lot of you out there know, I write a lot about flex and java. For my flex posts I use a sample called books-overview. You can find the sourcecode on google code. A lot of different frameworks released new versions. In this post I describe the some of the upgrades that are important to me

  • flex-mojos (3.1) – the maven flex plugin
  • Mate ( – a flex framework
  • Spring BlazeDS Integration 1.0.0.RC1

Read on to find out the changes I had to make, the problems I ran into (not that much actually).

Maven build

Let us start with the build system. I want to upgrade to the latest and greatest 3.1 version of the flex-mojos plugin. This is not hard, there is excellent documentation available in the form of this open source book.

I did not have to make a lot of changes, the groupId and the artifactId of the plugin have changed, but that is easy. I do have problems running the tests on a mac. The mentioned book does give a method to make the flex unit tests work, but it does not work for me like I would have wanted it to. It seems that the call to the flash executable is wrong. The suggested way is to cp the Flash to the /Applications folder. Please do not do this using sudo, I prefer to do it by hand using the Finder. Another problem is the call from the plugin. It calls, I think It should be Flash\ Player. Therefore I add the following directive to the maven command:

-DflashPlayer.command=Flash\ Player

This only works if you make sure the player is on the path, I included the following line in my .bash_profile file:

export PATH=$PATH:/Applications/Flash\

Now the application is running again. Time to move on.


Mate is now upgraded to the released version I did not find a good repository containing this release for maven. Therefore I had to add it manually. I did not really go into the new features. I see there are mock objects now for services. I have not come up with the right way to use them without changing my code in for instance unit tests. Therefore there are no exiting things to do for mate. Feel free to add a comment if I missed something.

Spring BlazeDS Integration

It seems to be a small step, but I had to make some adjusments. I had to change the bean from flex:remote-service into flex:remoting-destination. Beware to change the service-id into destination-id if you need another name of the destination than the default name deduced from the exposed bean. This was not right at the moment in the documentation.

The flex:remoting-destination configuration than becomes:

<flex:remoting-destination destination-id="remoteBookManager" ref="bookManager" exclude-methods="internalUseStoreBook"/>

To make this all work, I had to add a dependency which is optional by default but I did need it. Not sure why.


The next problem I ran into, had to do with the following error message. I do only show the first line, not the complete stacktrace.

Problem with the : org.springframework.beans.factory.NoSuchBeanDefinitionException: 
        No bean named '_filterChainList' is defined

As described is this forum post, this can be resolved by disabling session fixation in the http configuration of spring security. Jeremy has tested this as well and stated it is indeed a bug. A fix is committed and will be in the next release.

Now everything is working again. I am personally not fond of the spring dependencies labelled 2.5.6.A. These have to do with the special OSGi enabled jars. But they give a lot of double dependencies on external jars. Luckily Jeremy has promised to create a version without the OSGi versions as well. Check this post. The responsiveness of the community and the committers is great, this is what I like so much about the spring framework. I had to say it :-)

Some additional remarks

Next to the framework upgrades I also want to mention some things you can find in the sample. I added a unit test based on FlexUnit. I took the flex security out of the normal project and placed it into a seperate swc project.

What is left? Well I need to add the old features in the new mate version. You cannot add new books at the moment. I also want to have a good look at the security integration in the BlazeDS integration project of the spring framework. I also want to do some messaging, which I have done already in another project. Finally I have a nice maven solution to print a build version number in the flex application. If you like that idea, be patient. I’ll try to write my next post about that topic.

Thanks for reading, hope to see you back soon. Do not forget to connect to me via linkedin, gridshore has it’s own group. You can also stay up to date using twitter.


Tagged on:             

4 thoughts on “Upgrading the flex based books-overview sample

  • June 22, 2009 at 7:47 pm

    Hi Pawel, thanks for the comment. Have a look at the Main.mxml. Than check the method onLoaderComplete which is actually a lifecycle method and therefore called by the framework.

    Hope that helps

  • June 22, 2009 at 10:40 am

    Hi, thanks for your inspiring examples. I liked your concept of creating Config object using controller but unfortunately I can’t understand how come the Config object is being instantiated with proper properties when calling default constructor:

    [Bindable] public var props:Config = new Config();

    I mean how come controller comes into action here? I will appreciate your answer. Thanks in advance.

  • May 10, 2009 at 10:20 pm

    And, by the way flexmojos is already 3.2, it’s impossible to keep up with all these releases!

  • May 10, 2009 at 10:19 pm

    Hi, I did add the same dependency found as optional in the spring-flex pom:


    looks like it is required but the configuration part for optional blazeds adapters that uses JSON, which I find to be really a hack by the way, the only thing I don’t like in this great release, especially for the spring integration stuff that does publish-subscribe messaging without JMS as demoed by Iwein Fuld from SpringSource last week at the JUG Milano Meeting.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>