7.4. A Rudimentary Approach to Integration with JPA and Hibernate

Let me start with an effortless but a limited way to integrate Flex and JPA/Hibernate. This time, the sample application that maintains a list of open source software products and its contributors will have a Flex interface.

7.4.1. Setting Up

To create this project, I leverage the facility to create a joint Flex and Java WTP project in Eclipse. Here are the steps that you need to follow:

  • Using the Flash Builder plug-in for Eclipse-with WTP, first create a new Flex Project. You will be prompted with a screen as in Figure 7-10.

Give your project a name. I call it FlexOSSCatalog. Choose a J2EE server type and opt to create a joint Java/Flex project using WTP. Also select a LifeCycle Data Services (LCDS) remote object service type. Although it reads LCDS, the settings work just fine for BlazeDS as well.

  • On clicking Next, a new screen is presented to you. This new screen allows inputs for J2EE settings, compilation options, and the output directory. Figure 7-11 shows the details. I selected JBoss AS 4.2 as the deployment environment and point to blazeds.war version 3.2.0.3978 archive file as the Flex WAR file.

    Figure 7.10. Figure 7-10
    Figure 7.11. Figure 7-11
  • Finally edit and confirm the source folder name, main application ...

Get Professional BlazeDS: Creating Rich Internet Applications with Flex® and Java® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.