Flex and Java Integration Adobe Flex Meet August09
Flex and Java
Java technology can be used to create both client- and server-side applications.
While the server-side implementation is widely accepted, the browser-based client-side applications have been less successful because the file sizes are large and the installation is bulky.
Flex is a great solution for Java developers because it enables them to utilize the power of Java servers while creating expressive and interactive interfaces.
Different techniques for accessing existing web application.
Direct socket connections:
Flex client can also open a direct socket connection to network services. This is an important tool mainly for streaming media-type applications.
RTMP(Real Time Messaging Protocol) is primarily used to stream data, audio, and video over the Internet to Flash Player. RTMP maintains a persistent connection with an endpoint and allows real-time communication.
Technology for integration BlazeDS LCDS WebORB AMFPhp
BlazeDS provides a set of services that lets you connect a client-side application to server-side data, and pass data
among multiple clients connected to the server.BlazeDS implements real-time messaging between clients.
A BlazeDS application consists of two parts: a client-side application and a server-side J2EE web application.
The client-side application
A BlazeDS client application is typically an Adobe Flex application.
Flex applications use Flex components to communicate with the BlazeDS server, including the RemoteObject, HTTPService, WebService, Producer, and Consumer components.
All these components are part of the Flex Software Development Kit (SDK).
The BlazeDS server
The BlazeDS server runs in a J2EE application server.
Configure an existing J2EE web application to support BlazeDS:-
Add the BlazeDS JAR files and dependent JAR files to the WEB-INF/lib directory.
Edit the BlazeDS configuration files in the WEB-INF/flex directory.
Define MessageBrokerServlet in WEB-INF/web.xml.
Key Services of BlazeDS
The Remoting Service allows our Flex application to directly invoke methods of Java object deployed in our application server.
The Message Service provides a publish/subscribe infrastructure that allows our Flex application to publish messages and subscribe to a messaging destination. That enabling the development of real-time data push and collaborative application.
The Proxy Services allows our Flex application to make cross-domain service requests in a secure manner. It allows our Flex application to access a services available on a different domain.
Without having to deploy a crossdomain policy file on the target domain.
Take a look of
Config file setting
Finally, you must add the class destination in WEB-INF/flex/remoting-config.xml,