Masthead

Flex Data Services, Hibernate and Eclipse

Enterprise Adobe Flash Platform Series

About
Contents
Free tools
Forums
Change history

PDF $32usd

Source code is provided with your personalized PDF.

Table of Contents

The following table of contents is a working guideline and may change prior to publication. Completed chapters are shown with a vertical bar to the left.

Preface

About This Series

About This Book

Target Audience

How to Read This Book

About the Code Examples

Java EE or J2EE?

Why Eclipse?

Why Not Maven?

Why Hibernate?

Why Tomcat?

Why not Spring?

Why not JBoss, WebSphere, Weblogic, IAS, etc?

Why BlazeDS and LiveCycle Data Services ES?

Why not GraniteDS, WebOrb or Pimento?

What about WebOrb?

Why JMS?

Acknowledgements

PART 1 - TUTORIAL

1.    Overview

POJOs and Persistence

Client-Server Architecture

2.    Tooling

Operating System

Updating JDK 6

Macintosh

Installing and Configuring Eclipse

Obtaining an Up-to-Date Flex SDK

Source Control

Network

Database

Windows Issues

Database Instances

Unit Testing With Database Snapshots

3.     Hibernate Basics

Hibernate Packages

Installing Hibernate

User Libraries vs. Catch-all lib directory vs. Working Sets

Eclipse Working Sets

Adding Eclipse Libraries to the Project Build Path

4.    Configuring Hibernate

Matching a Developer Database to Production

Manual Table Creation

Table Creation Using a GUI

Hibernate Configuration Files

Connecting Hibernate to a Database

Hibernate Initialization

5.     Mapping POJOs to Tables

Creating POJOs and Mapping Files from Tables

Running hbm2java from Eclipse

Listing of the Generated POJOs

Discussion of the Generated POJOs

Declaring ActionScript Class References

Solution – Calling out ActionScript Class Dependencies

6.    Testing Hibernate Annotations

Entity Relationships

Hibernate Sessions

Testing with JUnit 4

Setting up

Sample JUnit 4 Test

Debugging Hibernate

7.    Creating Database Tables from Annotated POJOs

8.    Data Services

About Flex Data Services

Data Services Architecture

Documentation Issues

Channels, Endpoints and Destinations

Channel Types

Client Channels in Combination with Server Endpoints

Channel Sets

Flex Data Services Channel Designer

Common properties

Client channel properties

Server Endpoint properties

XML Channel Definition

NIO and RTMP Server Endpoints

Polling

Long Polling

Streaming

Server endpoint properties

RTMP

Services

Data Services Configuration

RPC Visibility Rules

About Flex Data Services

Serialization and Deserialization

Introspective Serialization

Explicit Serialization

TypeMarshaller

Serialization Practicalities

[RemoteClass]

registerClassAlias()

[Transient]

[Managed]

Deserialization RPC and Messaging Results

AMF

JSON

XML

Performance

TypeMarshaller Example Project

IExternalizable Example Project

Data Compression

Tomcat

Apache

9. Working With BlazeDS

Installing the BlazeDS Turnkey package

Installing the BlazeDS binary distribution

BlazeDS Files and Directories

BlazeDS Binary Package Contents

BlazeDS Configuration

Tomcat and AMF

Tunneling and Proxying AMF

Eclipse Project Setups

Defining Application Server Instances

Macintosh Server Setup Problem

Combined Flex / Java Project Setup

Combined Flex / Java Project Directories

Retrofitting Flex to an Existing Java WST Project

Multiple Flex Projects for a Single Java Project

Server-side WST Projects

Creating a WST Project

Relocating an Eclipse Project

Testing the Eclipse Web Project

Editing Eclipse Server Configuration

Testing the Server

Adding BlazeDS Libraries

10. Remoting Service

Channels

Destinations

Creating the Destination Source

Testing the Destination Source

Adapters

Assemblers

Statically Bound Technique Overview

Using the Statically Bound Technique

Modifying web.xml

Setting Java EE Web Library Dependencies

Setting Inter-Project Dependencies

Creating the echoTest Client form

Debugging the echoTest Client

Dynamic Configuration Technique

The Service

Server-side Logging

Flex data services logging

Log4j

Discovering the Originating URL

Constructing the Endpoint

Obtaining a Service Instance

AmfFactory.as

AmfServices.as

StopWatch.as

Event Classes

dynamicServer.mxml

Creating the Flex Builder Project

11.    Messaging Service

Channels

Destinations

Adapters

Programmable ChannelSet Sample Project

How the program works

Client logging

Automatically Filtering Messages

ActionScript

Subtopics

Java

Custom Adapter Project

12.    Proxy Service

Channels

Destinations

Adapters

HTTPService and WebService Review

Translation AJAX / JSON Project

HTTPService, WebService and the Proxy Service

Proxy Service Properties

External Proxies

Simple Project

13.    Automatically Generating ActionScript Value Objects from POJOs

Enhancing the POJO

Granite ActionScript 3 Code Generator

Auto-Refresh

Installing Granite Eclipse Builder

Adding the GraniteDS Nature to a Java EE Project

Updating the POJO

14.    LiveCycle Data Services ES

Choosing between BlazeDS and LCDS

Threading Models

LCDS Licensing

Purchasing an Enterprise License

OEM Licenses

Installing LCDS

Data Management Service

Channels

Destinations

Adapters

Assemblers

Hibernate Assemblers

HibernateAnnotationsAssembler

HibernateAssembler

Custom Assemblers

[Managed]

Properties

Test Drive

How the Program Works

Syncing Occasionally Connected AIR Clients

DataService Properties for Synchronization

Sync Project

Defining a Launch Configuration for the HSQLDB Database

About the Application

Running the Application

How the Program Works

Edge Servers

15.    Integrating BlazeDS and Hibernate

FlexUnit, BlazeDS and Hibernate

16. Lazy Loading

   Lazy Loading with the LCDS DMS

dpHibernate

Gilead

17.    LCDS Modeling

18.    JMS

PART 2 - REFERENCE

19.    For Further Reading

Flex and ActionScript

Data Services

BlazeDS

LiveCycle DS

GraniteDS

Java EE

Java Servlets

EJB

Hibernate

Database

20.    Eclipse Tips and Techniques

Hot Keys

Defining Hot Keys

TCP/IP Monitor

Other TCP Monitors

Apache TCPMon

Charles Proxy

Updating a Flex Builder Project for BlazeDS or LCDS

Creating an Eclipse User Library

Installing Eclipse Tools for Eclipse

Multi-User Deployment Issues

Multiple Eclipse Installations

GuideLines

Workspace Organization

Project Organanization

Remote Debugging

Remotely Debugging Server-side Java programs

Remotely Debugging Client-side Flex programs

Remote Debugging

Debugging BlazeDS and LCDS

Eclipse Problems

HTML and JSP Validation Errors

Setting property 'source' to 'org.elipse.jst.Java EE.server

Flex Builder 3 / Ganymede Issues

Apache httpd Port Misuse

TODO and FIXME

21.    Annotation Summary

Java Persistence Annotations

Hibernate Annotations

22.    Tomcat Connector Configuration

23.    BlazeDS and LCDS Features

BlazeDS Features

LCDS Features

24.    Data Services

History of Flex Data Services

Comparison of BlazeDS and LCDS

Client Channel / Server Endpoint Combinations

Servlet-based endpoints and their client channels

NIO-based server endpoints and their client channels

Properties of Client Channels and Server Endpoints

General Properties

Client channel properties

Server endpoint properties

Polling

Client channel properties

Server endpoint properties

Streaming

Client channel properties

Server endpoint properties

RTMP

Destination Properties and Elements

Common Elements

RPC and Data Management Service Properties

Data Management Service Properties

Network elements

Hibernate Assembler elements

Hibernate Assembler fill-configuration elements

Hibernate Assembler metadata elements

Hibernate Assembler server elements

SQL Assembler elements

SQL Assembler metadata properties

SQL Assembler server elements

SQL Assembler server database elements

SQL Assembler server count, CRUD and fill elements

HTTP Service Properties

Web Service Properties

Java to ActionScript Type Mappings

ActionScript to Java Type Mappings

Logging Filter Patterns

BlazeDS Files and Directories

BlazeDS JARs

LCDS Files and Directories

LCDS JARS

25.    Glossary

Index