Hello,
OK, from reading the HORRIBLE adobe doc's on data services, I
am thinking that I just need to alter the below files.... but it
still doesn't work. I get a "No destination 'Employee' exists in
service flex.data.DataService" error when running the
application...... what am I missing?????:
1. add call to dataservice in the mxml file:
<"mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"creationComplete="onCreationComplete()">
<mx:DataService id="ds" destination="Employee"
conflict="logEvent(event)" fault="logEvent(event)"
message="logEvent(event)"/>
<mx:VDividedBox width="800" height="100%">
<mx:Panel title="Employee::getEmployees()" width="800"
2. alter the data-management-config.xml to map the data
service id to the java class file
<destination id="Employee">
<adapter ref="java-dao"/>
<properties>
<source>com.theriabook.datasource.EmployeeAssembler</source>
<scope>application</scope>
3. The com.theriabook.datasource.EmployeeAssembler java class
abstracts the EmployeeDataServiceDAO class which contains the call
to the j2ee connection pool:
conn = JDBCConnection.getConnection("jdbc/theriabook");
if( logger.isDebugEnabled() ) logger.debug(" SQL: "+sql);
stmt = conn.prepareStatement(sql);