Coldfusion Programming

code-complete

Monday, November 19. 2007

0-Byte CFMail files in Spool and Undeliv Directories - scripts to delete

Way back in the olden days of Coldfusion 4.5/5 I would occasionally see a 0-Byte file sitting in coldfusions mail spool directory which seemed to cause Coldfusion to hang and mail to queue up in the spool folder. Well, since then in CFMX 7/8 when the server notices this file in the spool directory, it moves it immediately into the Undelivr directory. However, it seems that the 0-Byte file in Undelivr does have some effects on the CF server, and we have seem Coldfusion MX7 become unreponsive to requests after a period of time when the 0-Byte file is present. Here are a couple ways to get rid of that file. The first is a windows batch file that can be called as a scheduled task, and the second is a coldfusion script that could be invoked as cf scheduled task or via GET or curl from the command line:

Here's the batch file:

:: file rem0bytefiles.bat
:: SpireMedia, Inc. Thaddeus Batt thad@spiremedia.com
:: windows batch file for removing 0 byte files to be called on a scheduled
:: basis when 0-byte files get written to the cfmx mail undeliv folder
:: causing cfmx to go into a death spiral

@echo off

for /f "tokens=* delims=" %%F in ('dir /s/b/a-d C:\CFusionMX7\Mail\Undelivr') do (
if 0 equ %%~zF del "%%F"
)


And here's the cfscript:

<!---
:: file rem0bytefiles.bat
:: SpireMedia, Inc. Thaddeus Batt thad@spiremedia.com
:: windows batch file for removing 0 byte files to be called on a scheduled
:: basis when 0-byte files get written to the cfmx mail undeliv folder
:: causing cfmx to go into a death spiral
--->

<cfparam name=\"url.do\" default = \"nothing\">
<cfdirectory action=\"list\" directory=\"#ExpandPath(\"./\")#\" name=\"dir\">
<cfif url.do eq \"delete\">
<cfif \"#dir.size#\" eq 0 and \"#dir.type#\" eq \"File\">
<cffile action = \"delete\" file = \"#dir.Directory#\#dir.name#\">
</cfif>
<cfdirectory action=\"list\" directory=\"#ExpandPath(\"./\")#\" name=\"dir1\">
<cfdump var=\"&dir1;\">
</cfif>

<cfdirectory action=\"list\" directory=\"#ExpandPath(\"./\")#\" name=\"dir1\">
<cfdump var=\"&dir1;\">

Peace!

Posted by thaddeus in Coldfusion Programming, Coldfusion Server, Win2K3 Server at 14:41 | Comments (3) | Trackbacks (0)

Tuesday, October 16. 2007

IIS Resource Pools and CFMX Web Services

We have a CFMX-based Web Content Management System that manages multiple websites. The system uses name-based virtual hosting and the public facing website(s) and the ESM application can live on the same box running on a single IP address or on seperate machines with seperate IPs. The Enterprise Site Manager uses web services extensively as do the sites that are being managed. The webservices are invoked using the same URL on the seperate sites:

http://www1.clientwebsite.com/wsdl/index.cfc?wsdl
http://www2.clientwebsite.com/wsdl/index.cfc?wsdl
http://www3.clientwebsite.com/wsdl/index.cfc?wsdl
http://ECMS.clientwebsite.com/wsdl/index.cfc?wsdl


Using name-based virtual hosting with a single IP, there are no problems with this when running cfmx under apache, everything works fine. But if you run this kind of set up under IIS some strange things happen: Once the wsdl URL is invoked it is cached in the Default Application pool simply as /wsdl/index.cfc?wsdl so whether you are calling the ESM wsdl, or any of the client site wsdls you may of may not get the right one. What this means is that if you have name-based virtual host applications running under IIS that have the same URLs as one another, you MUST run each site under it's own application pool otherwise you can expect to see some wacky results on your URL calls.

Posted by thaddeus in Coldfusion Programming, Win2K3 Server, Windows Server 2008 at 10:54 | Comments (0) | Trackbacks (0)

Tuesday, September 25. 2007

OO Programming Opportunities in Denver

SpireMedia, ranked by DBJ as one of Denver's Best Places to Work and Denver's Top Web Development Firm, seeks multiple Web developers with advanced Web application programming abilities. We are developing Rich Internet applications on the leading edge of technology and are seeking like-minded developers who are able to leverage their existing skillset as well as learn new methodologies. You must be results-oriented and able to work in a team-based development environment.

If you are an experienced OO developer with a CFMX , Java, C#.NET, or Ruby background familiar with programming within MVC frameworks and are interested in growing your skillset to include Flex, AJAX, Silverlight, and AIR RIA development, we’re interested in talking to you.

Must have demonstrated experience programming .NET Assemblies in C# or developing custom java classes, packaging and deploying WAR/EAR applications under tomcat. Database experience with SQL Server 200-2005 and/or Oracle/PostgreSQL is a requirement. Any RIA development including AJAX and/or Flex is highly desirable, but we can train the right candidate on using Flex Remoting/Actionscript 3 and AJAX to build RIAs. You will be leveraging WebORB and LiveCycle server components and code generators. The applications we build work on the Web and within the Enterprise, so your knowledge of scalability will help. You also need to be able to multi-task across multiple projects and manage your time well.

Secondary Skills Include:

DOM 2, CSS, XHTML
XML, XSLT
CFMX - component object model development
Cairngorm Microarchitecture
Spring Framework
iBATIS Data Mapper framework
Hibernate/NHibernate
XAML
Quality Assurance
Posted by thaddeus in .NET, Apollo, Coldfusion Programming, Flex, Java, Silverlight at 12:50 | Comments (0) | Trackbacks (0)

Thursday, May 24. 2007

jr. tech writers are so amusing

according to this ridiculous assertion:
http://www.computerworld.com

CF is the in 5th place for the most dead computer skill after Cobol (yes! a programming language), VAX IDMS (non-relational database), Non-IP Networks (honestly, i didn't even know these still existed), and cc:Mail (not sure what the "skill" here is)

C fits in there as well. but oddly no mention of eiffel, fortran, logo, VB, Apple Basic, etc (all of which i see on resumes, still!).

The reporter may have tried visiting http://www.tiobe.com/index.htm?tiobe_index for some research. And for cf, maybe checking the list here:
http://www.gotcfm.com/thelist.cfm

This was my comment:

Perhaps you haven't been paying attention to cf for past 4 years, and that's fine. But calling CF a scripting engine sorta shows your hand. CF is an abstraction layer to make java programming more efficient and faster, and it does a very good job of that. Putting an OO programmer in front of a cfmx app base that has been architected using component-based SOA design-patterns produces results quickly and reliably. Plus, we can package and deploy our cfmx apps in java byte code as .war or .ear files under most j2ee app servers. additionally, using bluedragon, those apps can be deployed under .NET.

The only gripe I have with it is 64-bit native (un)compatibility. I'll be installing beta scorpian on 64-bit FC6 to see how it handles memory for the JVM.
Posted by thaddeus in Coldfusion Programming, Coldfusion Server at 20:17 | Comment (1) | Trackbacks (0)
(Page 1 of 1, totaling 4 entries)

About Me

Thaddeus Wakefield Batt
Thaddeus Wakefield Batt

blogging from: denver, co.

blogging about: web technologies

Links

Tech Blogs
Fullasagoog - RIA
John Wilker
William .NET
Graphex

Links
SpireMedia, Inc.
The CMS Matrix




Lijit Search

Archives

  • September 2010
  • August 2010
  • July 2010
  • Recent...
  • Older...

Categories

  • XML .NET
  • XML Apollo
  • XML Coldfusion Programming
  • XML Coldfusion Server
  • XML Flex
  • XML Information Architecture
  • XML Java
  • XML Livecycle
  • XML postgreSQL
  • XML Redhat Linux
  • XML Silverlight
  • XML SpireMedia
  • XML SQL Server 2k5
  • XML Tools of the Trade
  • XML Vista
  • XML Win2K3 Server
  • XML Windows Server 2008
  • XML Zimbra


All categories

Syndicate This Blog

  • XML RSS 0.91 feed
  • XML RSS 1.0 feed
  • XML RSS 2.0 feed
  • ATOM/XML ATOM 0.3 feed
  • ATOM/XML ATOM 1.0 feed
  • XML RSS 2.0 Comments

Blog Administration

Open login screen

Thaddeus Batt

Creative Commons License - Some Rights Reserved
Original content in this work is licensed under a Creative Commons License