Adobe FLEX 2-MIGRATING APPLICATIONS TO FLEX 2 Manual page 138

Migrating applications to flex 2
Table of Contents

Advertisement

The syntax for statefulness has changed. In Flex 1.5, you set the
or
class
stateful-class
or
. The default was
request
stateless.
Flex 1.5 syntax
In Flex 1.5, you could specify the RemoteObject component's source and type in the MXML
tag, while adding an entry in the
MXML tag:
<mx:RemoteObject id="MyService" source="credit.CreditCardAuth"
type="stateless-class"/>
flex-config.xml file:
<remote-objects>
<whitelist>
<unnamed>
<source>credit.*</source>
</unnamed>
</whitelist>
</remote-objects>
Flex 2 syntax
In Flex 2, every remote object must be configured as a Remoting Service destination in the
services-config.xml file, or a file that it includes by reference, such as the remoting-config.xml
file. You reference a destination in the
MXML tag:
<mx:RemoteObject id="MyService" destination="SalaryEmployeeRO"/>
remoting-config.xml file:
<remoting-service>
<destination id="SampleEmployeeRO" adapter="java-object">
<properties>
<source>samples.explorer.EmployeeManager</source>
<scope>application</scope>
</properties>
</destination>
</remoting-service>
138
Data Services
. In Flex 2, you set the
stateless-class
<remote-objects>
destination
type
attribute to
scope
application
, and is now
request
whitelist.
property of the
<mx:RemoteObject>
to either
stateless-
,
session
, which is equivalent to
tag.
,

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex 2

Table of Contents