I can get the query count and the names of the datasources, but not Cached
queries.

<cffunction name="getCache" returntype="any">   
   <cfset result="">   
   <CFTRY>
      <!--- Get "factory" --->
      <CFOBJECT ACTION="CREATE" TYPE="JAVA"
CLASS="coldfusion.server.ServiceFactory" NAME="factory">
      <!--- Get Cache --->  
          <!--- pick one to uncomment --->    
          <cfset result = factory.DataSourceService.getMaxQueryCount()>
          <!---<cfset result =
factory.DataSourceService.getNames().toString()>--->
          <!--- Can't get this to work....
          <cfset result =
factory.DataSourceService.getCachedQuery().toString()>
          --->            
      <!--- If any error, return FALSE --->
          <CFCATCH TYPE="Any">
                ERROR!!! - <cfoutput>#cfcatch.Message#</cfoutput>
          </CFCATCH>
   </CFTRY>
   <CFRETURN result>
</cffunction>

<cfoutput>#getCache()#</cfoutput>


-----Original Message-----
From: Stacy Young [mailto:[EMAIL PROTECTED]] 
Sent: Monday, July 15, 2002 3:24 PM
To: CF-Talk
Subject: RE: coldfusion.server.ServiceFactory ?


Thanks Ryan...Ya I noticed the following:

getCachedQuery (returns java.lang.Object)
setCachedQuery (returns void)
purgeQueryCache (returns void)

I've tried invoking them but to no avail...

<CFOBJECT ACTION="CREATE"
          TYPE="JAVA"
          CLASS="coldfusion.sql.Executive"
          NAME="exec">
<CFDUMP VAR="#exec#">

<cfset tmp = exec.getCachedQuery()>

also tried

<cfset tmp = exec.getCachedQuery("queryName")>

Anyway thanks!

______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to