
You have to start the sample database before you can run the BlazeDS samples. The samples use an HSQLDB database that located in the [installdir]/sampledb directory.
To start the sample database:
The source code for all the sample applications is available in samples\WEB-INF\flex-src\flex-src.zip.
The objective of this test drive is to give you, in a very short amount of time, an understanding of how the BlazeDS data services work and what they can do. This test drive consists of a series of eight samples kept as concise as possible (typically between 10 and 50 lines of code) to clearly expose features of interest.
This application demonstrates how to use the RemoteObject to build a simple CRUD (Create/Update/Delete) application.
Click here to start the Inventory Management application
This example demonstrates how to use the message service to push data from the server to the client. At the server side, a Java component publishes simulated market data to a BlazeDS messaging destination. The Trader Desktop application subscribes to real time updates for the stocks specified in a configurable watch list. This application lets you experiment with the different types of channels (streaming, polling, long polling) supported by BlazeDS. BlazeDS also supports adaptive polling. Using the adaptive polling (using a per client outbound message queue processor), you have full control over how messages are handled by queue processors and delivered to individual clients. For example you can specify per-client delays for message delivery, and provide custom logic defining how messages are merged between deliveries.
The Collaboration Dashboard show how you can use the Message Service to build collaborative applications. To try this sample, open the application in two different browser windows and notice how selections made in one window are reflected in the other window. For example, the chart on the left shows total revenue across all regions on a monthly basis. When you select a month in this chart, the pie chart in the upper right panel is updated to display a regional breakdown for the selected month. If you select a region in the pie chart, the chart in the lower-right panel is updated to display the selected region's results compared to the average for the given time period.
Runtime configuration provides an alternative approach to defining destinations and adapters. In addition to statically defining destinations and adapters in the XML configuration files (remoting-config.xml and messaging-config.xml), you can create destinations and adapters programmatically at runtime. Your runtime destinations and adapters can be injected at server startup, or created as needed during the life cycle of an application. The remoting destination samples provide examples of destinations injected at server startup. The messaging sample provides an example of a destination created as needed.
See flex.samples.runtimeconfig.EmployeeRuntimeRemotingDestination.java to see how the "runtime-employee-ro" destination is created programmatically.
See flex.samples.runtimeconfig.ChatRoomService.java to see how the chat room destinations are created programmatically.
The Database Manager is a simple application that lets you explore and modify the database that comes with the BlazeDS samples. The Database Manager uses a RemoteObject class to access the server and display the results in Tree and DataGrid components. The application uses the HSQLDB database on the server. The Database Manager application shows one way to use the RemoteObject class, and map classes from Java to ActionScript. You can see in the DatabaseVO and TableVO ActionScript objects how the application uses the metadata tag to successfully map the Java objects to the client. The sample also shows how you can use the RemoteObject class in an MXML file, including how you can use the busy cursor to provide a better user experience.
© 2004-2007 Adobe Systems Incorporated. All rights reserved.