Vinny:

I don't think you can call remote methods on persistant objects.  As I
said before, when you call a remote method, you get a new instance of
the CFC each time.

Try this:

in application.cfm (note the <cfset ...  object is scoped to
application): 

<cfif not structKeyExists(application,"employeeManager")>
  <cflock name="#APPLICATION.ApplicationName#_employeeManager"
type="exclusive" timeout="10">
     <cfif not structKeyExists(application,"employeeManager")>
          <cfset application.employeeManager =
createObject("component","atlantis.model.employeemanager").init() />
     </cfif>
  </cflock>
</cfif>

In employeeManager (note access="public" in getAllEmployees) :
  
  <cffunction name="getAllEmployees" access="public"
returntype="query"
output="false" displayname="Get All Employees" hint="I return a query
containing all employees.">
    <cfreturn VARIABLES.employeeGateway.getEmployees() />
  </cffunction>

>From here, you will need a CFC to serve as your data gateway to flash.
(You were trying to use employeeManager.cfc, but that won't work if you
want it to persist in the application scope):

<cfcomponent>
  <cffunction name="getAllEmployees" access="remote"
returntype="query"
output="false" hint="I return employees to flash">
    <cfreturn application.employeeManager.getAllEmployees() />
  </cffunction>
</cfcomponent>


let me know if this helps.

-dave
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to