Saccfug - Introduction to CVS Presentation

Coldfusion 2 Comments »

For those who attended the saccfug meeting this last Tuesday here is the powerpoint presentation used. Feel free to contact me if you have any questions and thanks for coming.

 Download the file here.

A great example on why to use varScoper

Gurus , Coldfusion 2 Comments »

Mike Schierberl just posted a great example on why to user varScoper. It's a must read for those who have not fully understood the reasoning behind var scoping.

You can catch the post here:
http://www.schierberl.com/cfblog/index.cfm/2008/7/21/Thread-safety-and-the-var-scope--live-example

Spry & multiple nested data sets - Mach-II / ColdSpring

Frameworks , Coldfusion , Spry No Comments »

A little while back I created a small app that shows how you can use Spry Datasets with Mach-II. Since then I have made a few modifications to help show ways you can use other frameworks within the app (ColdSpring is used within this example). I strongly suggest reviewing  Chris Scott's example on AOP in ColdSpring if you need to know more about that subject.

I've updated my original example to use/do the following:

  • ColdSpring to hold the gateway/DAO/Factory being used now.
  • ColdSpring AOP is enabled to show simple logging capabilities
  • An optional ColdSpring service injector using its built in createBeanDefinition method:
    • found within lib.com.machii.listeners.BaseListener
    • can be turned on from within the MessageListener (lib.com.machii.MessageListener) Line# 38
      NOTE: Turning this on will keep AOP functionality from working as my current code does not support working with AOP dynamically when working with createBeanDefinition

Read more...

List of Cold Fusion 8 admin API property names

Coldfusion 1 Comment »

Recently I have started to assist on a project that is meant to talk to Cold Fusion 8’s adminAPI to help with environment setups. One main task I have in front of me is to update setting within administrator through such methods as setRuntimeProperty and setCacheProperty. 

My issue has been that I have not yet found a good list of property names that the above methods need in order to work. So I started to dig and found the below property names. For those who use these method and know of other lists please feel free to post their locations as I would be more than interested to reviewing them.

I’ve broken them down by section and “friendly” location within cf administrator.

 

 

CF ADMINISTRATOR SECTION: SERVER SETTINGS – Settings

  • [{timeoutRequests}] Timeout Requests after (seconds) [{timeoutRequestTimeLimit}]
  • [{enablePerAppSettings}] Enable Per App Settings
  • [{uuidcftoken}] Use UUID for cftoken
  • [{HttpStatusCodes}] Enable HTTP status codes
  • [{whitespace}] Enable Whitespace Management
  • [{cfcTypeCheck}] Disable CFC Type Check
  • [{disableServiceFactory}] Disable access to internal ColdFusion Java components
  • [{secureJSON}] Prefix serializedf JSON with [{secureJSONPrefix}]
  • [{globalScriptProtect}] Enable Global Script Protection
  • Default ScriptSrc Directory [{CFFORMScriptSrc}]
  • Missing Template Handler [{MissingTemplateHandler}]
  • Site-wide Error Handler [{SiteWideErrorHandler}]
  • Maximum size of post data [{postSizeLimit}] MB
  • Request Throttle Threshold [{requestThrottleThreshold}] MB
  • Request Throttle Memory [{requestThrottleMemory}] MB

CF ADMINISTRATOR SECTION: SERVER SETTINGS – Request Tuning

  • Maximum number of simultaneous Template requests [{requestLimit}]
  • Maximum number of simultaneous Flash Remoting requests [{flashRemotingLimit}]
  • Maximum number of simultaneous Web Service requests [{webserviceLimit}]
  • Maximum number of simultaneous CFC function requests [{CFCLimit}]
  • Maximum number of running JRun threads [{JRunActiveHandlerThreads}]Maximum number of queued JRun Threads [{JRunMaxHandlerThreads}]
  • Maximum number of simultaneous Report threads [{ReportThread}]
  • Maximum number of threads available for CFTHREAD [{CFThreadLimit}]
  • Timeout requests waiting in queue after [{requestQueueTimeout}] seconds
  • Request Queue Timeout Page [{requestQueueTimeoutPage}]

CF ADMINISTRATOR SECTION: SERVER SETTINGS – Caching

  • Maximum number of cached templates [{TemplateCacheSize}]
  • [{trustedCache}] Trusted cache
  • [{saveClassFiles}] Save class files
  • [{cacheRealPath}] Cache web service paths
  • Maximum number of cached queries [{MaxCacheQuery}]

As I find more I will update them accordingly, but at least it’s a start.

How to access underlying Java regular expression functionality in ColdFusion to get around "RE" function limitations

Coldfusion No Comments »

Currently in ColdFusion there are functions that easily provide regular expression functionality. These function preceed with "RE" in front of the function name (eg REFind). For those unfamiliar to regular expressions, these functions allow you to provide regular expression patterns against a provided string to help find, replace, etc complex strings.

 

Now I would think for most of us ColdFusion programmers we don't look any further than to use these provided functions, BUT there does come a time when you could hit a limitation on how ColdFusion interacts with the regular expression engine (eg. cannot do negative/positive look behinds). To get around this you need to work with the underlying engine itself provided in Java.

 

To do this you only need to do the following adjustments when running against regular expression functions:

ColdFusion example:
REReplace(strString,"for\s?\(","","all")

Underlying Java example:
strString.ReplaceAll("for\s?\(","")

 

It's pretty much that simple. You don't need to do a cfobject to the library or any other setup to use this feature as the string object in ColdFusion already has access to such functionality when it is initially created.

 

Below is a link to the matcher java class reference, which contains other possible underlying methods. I say "possible" because I have not tested them myself yet.
http://java.sun.com/docs/books/tutorial/essential/regex/

 

NOTE: I have tested this type of approach in a ColdFusion 6.1 environment and it works.

Powered by Mango Blog. Design and Icons by N.Design Studio
RSS Feeds