Flex 4 Sample Application using a Java Back-End, BlazeDS 4 and Flash Builder 4 Data Wizards

I put together a new Test Drive environment to allow you to explore the development of Flex 4 applications with a Java back-end using the new “Data-Centric Development” features of Flash Builder 4. These features include service introspection, value object and service stub generation, etc. This Test Drive is still work in progress: it currently consists of a single application called InSync (a complete Flex 4 rewrite of my contact management sample application), but I think it’s already valuable to understand the impact of the new Flash Builder 4 data features. Insync also demonstrates some of the new features of Flex 4: skinning, skinnable components, layout managers, etc.

Watch the video below to get familiar with the Test Drive environment and the sample application:

Installation Instructions

  1. Download flex-java-testdrive.zip, and unzip the file in your root directory.
  2. Open a Command Window or Shell, navigate to /flex-java-testdrive/tomcat/bin, and start Tomcat (for instance: catalina run).
  3. Open a browser and access http://localhost:8400/testdrive/InSync/InSync.html.

Importing the projects in Flash Builder 4

  1. In Flash Builder 4, click File > Import > General > Existing Projects into Workspace.
  2. Specify flex-java-testdrive/projects as the root directory and click finish.
  3. Explore the projects: InSync is the Flex project and java-testdrive is the Java project for the server-side classes.

In the InSync project, the classes in the services and valueObjects packages have been generated automatically by Flash Builder 4. My next blog post will show you how to generate these classes based on existing Java services deployed in BlazeDS.

NOTE: Because BlazeDS 4 hasn’t yet been released, this version of the Test Drive uses a nightly build of BlazeDS 4.

  • Pingback: Flex 4 SDK e Flash Builder 4 liberados oficialmente | Erko Bridee()

  • Pingback: Video: Using the Flash Builder 4 Data Wizards with BlazeDS 4()

  • Pingback: Goddess Workout with Dolphina pt. 1 | Ab Toner()

  • Pingback: Windows XP – Error mix dj kid()

  • Pingback: I have to write a java interface to control network ports on various switches. Any ideas on how to start? | Network Security()

  • Pingback: Flex 4 samples using Java « All Things Flex()

  • N shen

    Could you demo on how to use RemoteObject on this example? thx

  • Pingback: Top Picks For Flex tutorials & books | Flex Certification()

  • Hi Christophe,

    Thanks for sharing this cool way to bind server side object with Flex componenet. Could the same DataGrid be linke to two different service operations base on clicking on different button?


  • Jeff

    I have my AS3 code generation working from BlazeDS spring beans but running into an issue and not sure if its a configuration issue or a limitation of the Data Services in Flash Builder. If my service returns an array of Shape(s) but Shape is the base class, really it can be a Circle or Square (i.e. simple polymorphism example coming). I found out how to get the Circle and Square to generate via the configure return type but that creates 3 classes which are not related to one another in any way.

    Is this a limitation of Flash Builder data services?

    (maybe this will be answered in another blog post later)

  • Pingback: Using the Flash Builder 4 Data Centric Features with Parsley (and other frameworks) | Flash Player roundup()

  • Mickel

    Mr. Coenraets:

    Great Demo as usual. Can you please do a demo using the Annotation-based ORM framework approach?

    Again, great job on the new demo.


  • John

    Thanks very much for the sample! The application runs great on my Mac except for the ability to turn on the camera and take a picture. When I try to turn the camera on, I get a request to allow and I approve it but the camera never actually turns on. The screen remains black. I can click on the take a picture icon and that makes a sound, but it doesn’t actually capture any image other than the black screen. Any thoughts?


  • herber

    cant follow the whole story…when i import those project i get errors and cant compile; anyway i am able to reach http://localhost:8400/testdrive/InSync/InSync.html.. the errors seems to be because of import flex.messaging.config.ConfigMap and another import… I cant reach the flex.messaging package …
    What have to be configured to reach the flex classes with the java project?

    Many wishes

  • Hii ,

    Thanks for nice example , plz also put data base of this project , and why dont you put tomcat saprate , so that it can download fast.


  • thank you for all the helpful information, I will definitely put this information to use!

  • http://lifeinsurancemn.org/

    People use life insurance for many different reasons. For example, to protect their family, to cover a home mortgage, to fund buy sell agreement, to pay off debt and settle estate taxes. The amount of covergae you need will vary depending on the purpose of your policy. A general rule of thumb is 8 to 10 times your annual income will provide your family with adequate protection.

  • Flex 4 applications seem really cool. Chris thanks for sharing this.


    transform photos into works of art by printing them onto high quality real fibre artist cotton canvas prints.

  • Manoj Kumar Garwa

    HI, I am new guy with flash builder 4.I am trying to connect flex application through java using blazeds as shown in your video but still getting a problem.when i connect by clicking on Data->Connect to BlazeDS.it ask for username and password so i clicked on No Password Required and than OK.after click on ok it shows following error:
    RDS Server Message
    Error executing RDS Command.Status Code 500, Reason : Internal Server Error.

    I have already replaced web.xml of BlazeDS to web.xml of my working directory by setting useAppserverSecurity to false and uncommented to RDS server declaration and mapping.

    can you pls solve this problem

  • gh


  • The most important thing to remember when considering health and life insurance
    is that you have to do your research. An informed consumer protects himself and is not vulnerable to the insurance companies. When researching health and life insurance coverage it is wise to use as many resources as possible.

  • By reading we enrich the mind; by conversation we polish it.

  • adrian s

    I have just noticed that there are 2 separate locations of the java database .class files:
    1) C:\flex-java-testdrive\projects\java-testdrive\src\flex\samples\contact\*.class
    2) c:\flex-java-testdrive\tomcat\webapps\testdrive\WEB-INF\classes\flex\samples\contact\*.class

    And if you modify something in path 1) then y0u have to copy the .class files into path 2) your self other wise the change will not be visible.

    Is there a way to have the WEB-INF updated it self when you edit from sources located on path 1) directly ?


  • I keep getting an error when I try to do this. The window keeps closing when I try to download….Is anyone else having this problem?

  • yumiko

    My name is Yumiko and I work at the company related to IT in Japan.

    The reason why I am writing this email to you is I’d like to ask some questions about BlazeDS.

    In the processing of something,
    As for data, push is done from the server side to the client(Flash).
    It uses streaming.

    That time,
    When a browser is shut,
    Data that does push keeps collecting, until the session cuts.

    Is the judgment of “Tough push to the client, There is because a browser is shut doing push ahead. ” possible?
    Or, Is the setting that can judge it necessary?

    By the way, The session time-out is not 0.

    Please teach to me who doesn’t haveknowledge.

  • mohan


    I got a problem while executing the application ie unable to open service-config.xml.
    please help this problem.


  • Ganzorig

    Hello, Coenraets. Great demo. I’m trying to work on the source code and deploy it to my own server. But I do have one problem. How do I use your Database in hsqldb. I saw that there’s a h2-1.2.131.jar, which is very likely to contain information about the DB (I mean DDL). So how do I use it in my hsqldb? Thanks in advance.

  • A few things i will not recognized is that if in all honesty how you happen to be no more a legitimate much more smartly-preferred as compared to you may be at this time. You might be very clever. You realize as a result considerably in relation to this particular subject matter, created me personally for my part consider it coming from so many varied angles. The like people aren’t fascinated besides it is something related to Lady crazy! Your own personal things great. All the time take care of it up!

  • Tim

    The TabNavigator on your demo, is there a way to set a background image on the same .
    I tried to set it through css style, skin it – nothing works.

    Is this possible ? if possible any snippets please.
    Thanks in advance,

  • Sun

    The link to download the code is broken!

  • Cristiano

    Hello Christophe,

    You did a great job in your blog. I’m trying to download the zip file: flex-java-testdrive.zip and it’s not opening the link. Can you tell how can I get this zip file from your blog ?

    Best Regards,

    Cristiano Borges

  • Jesus Bravo

    Hi Christopher!

    I tried to download the flex-java-testdrive.zip file through the link above, and it through me a 404 error message. Do you think I could get the source files for your example somewhere else?


    Jesus Bravo

  • Cristiano

    Hello Christophe,

    I need so much your example: flex-java-testdrive.zip to go ahead in my studies and in my project.
    Can you send for me your file: flex-java-testdrive.zip by my email: crisbol27@hotmail.com ?

    Warm Regards and Thanks in adavance,

    Cristiano Borges

  • Jarno

    From where I can download sample project? Current link is dead.

  • Anon
  • Ahmed

    Hi, Christophe Coenraets
    Please, i can’t download flex-java-testdrive.zip ……………… URL not found.

  • Aymen

    Hi Cristophe,

    I got 404 error when trying to download flex-java-testdrive.zip
    Can you please provide us a correct link for the ref app.

  • Learn about the following research-backed methods of helping your child fight obesity.
    ” Slimple’s

  • Having read this I believed it was very enlightening. I appreciate you taking the time and effort to put this information together. I once again find myself spending way too much time both reading and commenting. But so what, it was still worthwhile!

  • You may want to invest in real estate because you need to
    live in your own home. ‘ Difficult to rent if the building was modified to suit a particular.
    It doesn’t matter what you like, Honua Kai Resort & Spa features fantastic alternatives for any Maui getaway sure to captivate all
    kinds of people. No money down to make a real estate purchase is possible according to real
    estate experts. In terms of time, negotiation may seem like a small part of an extensive process, but the rewards resulting from negotiation can be quite financially rewarding.
    The building, on the other hand is 100% depreciable. Immediately,
    tsunami warnings for the Indian Ocean were given. Homes must rent for at least $750 per month,
    sell for under $65,000 while fulfilling their cap rate requirements.
    There are several things to consider though before you advertise land for lease.

    Authorizing the transfer of $5,413 from Fund 448, Projects to be Determined to Fund 561 and
    appropriate the same to account 561-1303-562.

  • Great beat ! I would like to apprentice while you amend your site, how could i subscribe for a blog website?
    The account helped me a applicable deal.
    I have been a little bit familiar of this your broadcast provided vibrant clear idea

  • The older you get, the more likely it is that you’ll start to experience thinning and
    hair loss. Traction Alopecia (often caused by excessive or tight braiding or ponytails).
    The Hair Transplant Network gives an estimate of $4 to $8 per graft for
    a FUT procedure and $6 to $10 per graft for a FUE procedure.

  • Khalid

    I need to do Spring 4 and Adobe Flex 4 integration.
    Any help/pointers in this direction.

    Thanks and Regards,