Just an idea. If the session is created but not the instance, couldn't
you use something like the IsCFC UDF from cflib.org
(http://www.cflib.org/udf.cfm?ID=743) to check if the CFC has been
instantiated. If is not, then instantiate the component as in:
<cfif IsDefined("session.FOO")>
<cfif not isCFC(session.FOO)>
<cfset session.FOO = createObject("component",
"pathToFoo").init(whatever)>
</cfif>
<cfset session.FOO.sendMessage("hello world")>
</cfif>
You still wouldn't have the data that was associated with the CFC in the
first place, but this may work. Either that or switch to Blue Dragon,
which does full session replication.
Just wondering.
regards,
Larry
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of RADEMAKERS Tanguy
Sent: Wednesday, September 20, 2006 8:00 AM
To: [email protected]
Subject: RE: [CFCDEV] pls forgiv OT: layer7 switches and sessions - is
this correct?
If you go down the "java session variables and session replication"
route, don't forget that you can replicate "regular" variables stored in
the session (from strings and numbers to structs and arrays), but NOT
cfc instances. Not only that, but it fails in a bad way: if you put a
cfc instance FOO in the session on server one, replication will create a
variable FOO on server two, but that variable won't point to a cfc
instance. In other words:
<cfif IsDefined("session.FOO")> <--- you will get through here, there is
a variable called FOO in the session...
<cfset session.FOO.sendMessage("hello world")> <-- will fail because
session.FOO does not point to a cfc instance on this machine...
</cfif>
/t
You are subscribed to cfcdev. To unsubscribe, please follow the instructions at
http://www.cfczone.org/listserv.cfm
CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com
An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]