Hi Al,
The one in question is super simple. The data is sent via HTTP post.

Thanks,
Charles

<cffunction name="PostData" access="remote" returnType="struct" 
returnFormat="json" output="false">
    <cfargument name="encodedData">

    <cfset response = {} />
    <cfset response[ "errorno" ] = "0" />
    <cfset response[ "errormsg" ] = "" />
    <cfset response[ "result" ] = "" />

    <cfset var rawData = ToString(ToBinary(Trim(arguments.encodedData)))>

    <cftry>
        <cfset jvmObj = 
CreateObject("java","java.lang.System").getProperties() />
        <!--- Figureout if Jetty Or Tomcat --->
        <cfif IsDefined("jvmObj.catalina.base")>
            <cfset dataPath = #jvmObj.catalina.base# & "/Data">
        <cfelseif IsDefined("jvmObj.jetty.home")>
            <cfset dataPath = #jvmObj.jetty.home# & "/Data">
        </cfif>
        <!--- Create Nessasary Dirs --->
        <cfif DirectoryExists(dataPath) EQ False>
            <cfset tmpD = DirectoryCreate(dataPath)>
        </cfif>

        <cfset dataPathFiles = #dataPath# &"/Files">
        <cfif DirectoryExists(dataPathFiles) EQ False>
            <cfset tmpD = DirectoryCreate(dataPathFiles)>
        </cfif>

        <cfset filePath = #dataPathFiles# & "/" & #CreateUuid()# & ".mpd">
        <cffile action="write" NAMECONFLICT="makeunique" file="#filePath#" 
output="#rawData#">

        <cfcatch type="any">
            <cfset response[ "errorno" ] = "1" />
            <cfset response[ "errormsg" ] = "[PostData]: #cfcatch.Detail#, 
#cfcatch.message#" />
            <cfreturn response>
        </cfcatch>
    </cftry>

    <cfreturn response>
</cffunction>




On Thursday, August 20, 2015 at 12:44:49 PM UTC-7, Al Holden wrote:
>
> If you could post a simplified version of your method - and the way you 
> call it - we may be able to suggest some good places to add a timeout or 
> even prevent your response from "running forever" (which is not a good 
> thing to let continue, even if the request itself times out).
>
> Al Holden
>
> On 8/17/2015 8:30 AM, Skellington wrote:
>
> Hello, 
> I've been having some issues with my OpenBD implementation with Tomcat, 
> where the CPU is using up 700% of the CPU. I recently installed Fusion 
> Reactor and have discovered that one of my web service methods, a request 
> or more will run forever.
>
> Is there a way to set a timeout on a CFC remote request with OpenBD? I see 
> that ColdFusion has setCFCTimeout.
>
> Thanks,
> Charles
> -- 
> -- 
> online documentation: http://openbd.org/manual/
> http://groups.google.com/group/openbd?hl=en
>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Open BlueDragon" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
-- 
online documentation: http://openbd.org/manual/
 http://groups.google.com/group/openbd?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Open 
BlueDragon" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to