Hey Ben,

It's not a stupid question at all.

An instance of a CFC is like any other variable, and defaults to the
variables/unnamed scope, so you're right in that it only lasts within
the current page.

If you use cfinvoke, the instance is never placed into any scope -
instead, the result you specify becomes a variable.  If you want to
create an instance of a Web Service and then repeatedly use the same
instance, you can use CreateObject() or the CFObject tag to create the
instance.

Boss needs me :)

-Joe


On 4/28/05, Ben Mueller <[EMAIL PROTECTED]> wrote:
> This is probably a *really* stupid question, but I'm going to ask it anyway...
> 
> If I make a call to a <cfcomponent>, specifically as a web service, the 
> object that it instantiates only persists for that single page request, 
> correct?  Meaning, there is no simple way to make 1 web service call to 
> instantiate the object, and then make subsequent calls against that 
> particular instantiation later, right?
> 
> It would appear that two <cfinvoke> calls, one right after the other on a 
> page, and calling the same remote web service, creates a new session each 
> time on the remote server.  So, I couldn't even set the object to a session 
> scope variable if I wanted to--at least not easily.
> 
> It doesn't entirely sound like any of what I suggest is a good idea to begin 
> with, but I just need to make sure I understand this point.
> 
> Also...if I invoke a cfcomponent locally (not as a web service), does the 
> object still only last for that one page request?  I assume if I call it 
> locally that I would have an easier time setting the object to a session 
> variable (even if that's still a bad practice), right?
> 
> Thanks in advance, and be gentle.  (-;
> 
> Ben Mueller
> Sr. Software Engineer
> Cognitive Arts
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204999
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to