RE: Can I Use This CFScript Like This?

2008-08-29 Thread Rick Faircloth
Thanks, Chuck!  I'll give that a go.

Rick

> -Original Message-
> From: Weidler, Wilfred C. [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 29, 2008 3:50 PM
> To: CF-Talk
> Subject: RE: Can I Use This CFScript Like This?
> 
> Rick,
> 
> That code is ran in a  block.
> 
> You only have to create the object one.  So the code would look
> something like this.
> 
> 
>   go_to = createObject("java", "java.lang.Thread");
> 
> Or if you prefer tags
> 
> 
> 
> 
> 
>   
>   go_to.sleep(5000); //sleep time in milliseconds
>   
>   Or if you prefer tags
>   
> 
> 
> Run queries, etc...
> 
> 
> 
> 
> 
> Chuck



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311807
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Can I Use This CFScript Like This?

2008-08-29 Thread Weidler, Wilfred C.
Rick,

That code is ran in a  block.

You only have to create the object one.  So the code would look
something like this.


go_to = createObject("java", "java.lang.Thread");

Or if you prefer tags






go_to.sleep(5000); //sleep time in milliseconds

Or if you prefer tags



Run queries, etc...


 


Chuck

-Original Message-
From: Rick Faircloth [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 29, 2008 3:44 PM
To: CF-Talk
Subject: RE: Can I Use This CFScript Like This?

Well... my attempt didn't work.

After emptying the database tables that are filled with data upon
running the .cfm file with the threads, all the tables were filled but
the one with the cfscript in it.

Chuck,

I guess that I would use your java sleep code like so?





go_to = createObject("java", "java.lang.Thread");
go_to.sleep(5000); //sleep time in milliseconds



Run queries, etc...



Is your good just like it is or does it need script tags around it?

Such as:



go_to = createObject("java", "java.lang.Thread");
go_to.sleep(5000); //sleep time in milliseconds



Thanks,

Rick




> -Original Message-
> From: Weidler, Wilfred C. [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 29, 2008 12:57 PM
> To: CF-Talk
> Subject: RE: Can I Use This CFScript Like This?
> 
> 
> Rick,
> 
> I have not tried it the way you have described, but I do use the Java 
> sleep like so:
> 
>   go_to = createObject("java", "java.lang.Thread");
>   go_to.sleep(5000); //sleep time in milliseconds
> 
> Chuck
> 
> -Original Message-
> From: Rick Faircloth [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 29, 2008 12:10 PM
> To: CF-Talk
> Subject: Can I Use This CFScript Like This?
> 
> I'm trying to set up a way to check the status of threads and 
> implement a sleep function that loops and delays a following thread's 
> initialization until the status of the first thread is "Completed".
> 
> I found an example in the CF8 docs using a sleep timer this is placed 
> just inside the opening  tag of the cfthread that needs 
> to wait.
> 
> 
> thread.sleepTimes=0;
> thread.initialized=false;
> while ((2_hmls_offices.Status != "COMPLETED") && 
> (2_hmls_offices.Status
> != "TERMINATED")) {
> sleep(2000);
> thread.sleeptimes++;
> }
> // Only do the post-initilization code if 2_hmls_offices is 
> complete.
> If (threadA.Status == "COMPLETED") {
> thread.initialized=true;
> // Post-initialization code would go here.
> }
> 
> 
> I understand what's happening inside the cfscript, but I'd like to 
> continue the processing *outside* the cfscript tag and use regular 
> CFML, not cfscript for the thread.
> 
> This example states, in the last line "//Post-initialization code 
> would go here".
> 
> Can I just use the cfscript as is and follow the cfscript block with 
> my cfqueries, etc., or would all my thread processing have to occur 
> within the cfscript block?  Is there a way to break out of the 
> cfscript block once the status of the first thread, "2_hmls_offices",
is "Completed"
> and go on to process regular CFML code?
> 
> Thanks,
> 
> Rick
> 
> 
> 
> 
> 



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311804
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Can I Use This CFScript Like This?

2008-08-29 Thread Rick Faircloth
Well... my attempt didn't work.

After emptying the database tables that are filled with data
upon running the .cfm file with the threads, all the tables were filled but
the one with the cfscript in it.

Chuck,

I guess that I would use your java sleep code like so?





go_to = createObject("java", "java.lang.Thread");
go_to.sleep(5000); //sleep time in milliseconds



Run queries, etc...



Is your good just like it is or does it need script tags around it?

Such as:



go_to = createObject("java", "java.lang.Thread");
go_to.sleep(5000); //sleep time in milliseconds



Thanks,

Rick




> -Original Message-
> From: Weidler, Wilfred C. [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 29, 2008 12:57 PM
> To: CF-Talk
> Subject: RE: Can I Use This CFScript Like This?
> 
> 
> Rick,
> 
> I have not tried it the way you have described, but I do use the Java
> sleep like so:
> 
>   go_to = createObject("java", "java.lang.Thread");
>   go_to.sleep(5000); //sleep time in milliseconds
> 
> Chuck
> 
> -Original Message-
> From: Rick Faircloth [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 29, 2008 12:10 PM
> To: CF-Talk
> Subject: Can I Use This CFScript Like This?
> 
> I'm trying to set up a way to check the status of threads and implement
> a sleep function that loops and delays a following thread's
> initialization until the status of the first thread is "Completed".
> 
> I found an example in the CF8 docs using a sleep timer this is placed
> just inside the opening  tag of the cfthread that needs to
> wait.
> 
> 
> thread.sleepTimes=0;
> thread.initialized=false;
> while ((2_hmls_offices.Status != "COMPLETED") &&
> (2_hmls_offices.Status
> != "TERMINATED")) {
> sleep(2000);
> thread.sleeptimes++;
> }
> // Only do the post-initilization code if 2_hmls_offices is
> complete.
> If (threadA.Status == "COMPLETED") {
> thread.initialized=true;
> // Post-initialization code would go here.
> }
> 
> 
> I understand what's happening inside the cfscript, but I'd like to
> continue the processing *outside* the cfscript tag and use regular CFML,
> not cfscript for the thread.
> 
> This example states, in the last line "//Post-initialization code would
> go here".
> 
> Can I just use the cfscript as is and follow the cfscript block with my
> cfqueries, etc., or would all my thread processing have to occur within
> the cfscript block?  Is there a way to break out of the cfscript block
> once the status of the first thread, "2_hmls_offices", is "Completed"
> and go on to process regular CFML code?
> 
> Thanks,
> 
> Rick
> 
> 
> 
> 
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311803
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Can I Use This CFScript Like This?

2008-08-29 Thread Weidler, Wilfred C.
 
Rick,

I have not tried it the way you have described, but I do use the Java
sleep like so:

go_to = createObject("java", "java.lang.Thread");
go_to.sleep(5000); //sleep time in milliseconds 

Chuck

-Original Message-
From: Rick Faircloth [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 29, 2008 12:10 PM
To: CF-Talk
Subject: Can I Use This CFScript Like This?

I'm trying to set up a way to check the status of threads and implement
a sleep function that loops and delays a following thread's
initialization until the status of the first thread is "Completed".

I found an example in the CF8 docs using a sleep timer this is placed
just inside the opening  tag of the cfthread that needs to
wait.


thread.sleepTimes=0;
thread.initialized=false;
while ((2_hmls_offices.Status != "COMPLETED") &&
(2_hmls_offices.Status 
!= "TERMINATED")) {
sleep(2000);
thread.sleeptimes++;
}
// Only do the post-initilization code if 2_hmls_offices is
complete.
If (threadA.Status == "COMPLETED") {
thread.initialized=true; 
// Post-initialization code would go here.
}


I understand what's happening inside the cfscript, but I'd like to
continue the processing *outside* the cfscript tag and use regular CFML,
not cfscript for the thread.

This example states, in the last line "//Post-initialization code would
go here".

Can I just use the cfscript as is and follow the cfscript block with my
cfqueries, etc., or would all my thread processing have to occur within
the cfscript block?  Is there a way to break out of the cfscript block
once the status of the first thread, "2_hmls_offices", is "Completed"
and go on to process regular CFML code?

Thanks,

Rick




~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311786
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4