CF8 - dbvarname supported or not?

ColdFusion 7 Comments »

A question arose in the Adobe ColdFusion forums as to whether or not CF8 supported named attributes (dbvarname) with CFPROCPARAM. There’s been a little confusion regarding using named parameters since CF5 supported them, CF6 dropped them, CF7 didn’t include them but then hotfix 7.0.2 added support for them which was then updated 1 day later with support removed.

CF8, now using JDBC 3.0 had initial support for dbvarname in early betas but then was removed in the final release. However, you still see occasional suggestions that dbvarname may be still support, indeed - if you’ve seen any of Charlie Areharts CF8 Hidden Gems presentation he has it listed and the odd code sample that pop up in the ether eludes to it being supported so i thought I’d try it out for my self…

So, i took a really simple SP call and started playing with it;








and then modified it to use dbvarname attributes as per samples floating around…









sure enough it worked - but that’s not a real test since the procparams are still in the same order as the SP parameters - sure enough, changing them around caused the SP call to break!









So in conclusion it appears that named parameters with stored procedure calls on CF8 IS NOT SUPPORTED!

what i learnt yesterday: [ ] in CFC return types

ColdFusion 2 Comments »

After Sean learnt something earlier this week it was my turn. After playing around for the first time with the Eclipse CF Wizards I was looking at some of the code it generated in particular the CFCs. In some of the gateways i saw stuff like returntype=”myapp.somebean[]” - I’d never seen this syntax before and had always used a returntype of array but turns out i’ve been missing a treat for returning an array of objects of a certain type!

xmlsearch() with namespace

ColdFusion No Comments »

Note to self - when using xmlsearch() to search xml packets (in this case the response of using http://maps.google.com/maps/geo) which is returned with a namespace defined as;


the xmlsearch() would need to include a colon (:),eg

Omitting the colon returns no results when a search is performed. It’s not a CF bug as Steve Erat points out.

ColdFusion Virtual Machine Licensing

ColdFusion 27 Comments »

It’s a question that seems to pop up all the time and whilst i don’t work for Adobe I thought i’d put a post up here on it for prosperity as i’ve answered it enough times - so Adobe, if i’ve got it wrong please feel free to update me!

Prior to the recent CF8 release - CF had a very simple licensing model - a CF license (Standard or Enterprise) covered you for 2 PHYSICAL CPUs. Back then virtualisation was pretty new and hadn’t need to be addressed in the EULAs so many hosting providers (HostmySite, cfmxhosting) had offerings for ‘Virtual Private Servers’ where they’d host usually a maximum of 4 virtual servers on 1 piece of physical hardware and get away with using a single CF Standard license

Enter CF8 and all change. Firstly the CF8 license is available to view here. The changes are pretty key, starting with section 1.10a. It’s the normal legal mumbo jumbo but the upshot is that each Virtual Machine is now deemed to be 2 CPUs and your required license count is the number of VMs (running CF obviously) installed multipled by 2 PLUS the number of PHYSICAL processors in the box. So, 2 VMs running running on a dual proc box would require 2 x 2 + 2 = 6 CPUs to license so you’d need to buy 3 CF licenses. NOTE: Don’t forget that Dual Core procs are still one physical CPU so dual core duos (effectively 4 CPUs) is still 2 physical CPUs.

If you’ve got deep pockets then, you’ll be glad to know that the Enterprise version (section 3.1 in the EULA) says that the number of VMs is irrelevant and that licensing is solely based on the number of physical CPUs.

Now i had started writing a rant on the whole VM licensing and that hosting companies will simply ditch offering it under this new license but i can’t be bothered to start the discussion as it will be pretty fruitless.

CF7 - Settings, a weird one

ColdFusion 2 Comments »

I wonder if anyone else has experienced this - when you make changes to the CF administrator (eg, enable Whitespace management) it works fine. But then, when you restart the server the setting isn’t persisted? I’ve made sure it’s not a file permissions problem - but even with a fresh reinstall of my CF server and then copying in the backup neo*.xml files to the relevant folder, restarting the service it still does it. I can Any ideas? Apart from not restarting the server?

ColdFusion 8 released

ColdFusion No Comments »

Check it out!

read more

SQL 2005 CTEs - you gotta try them!

ColdFusion, SQL 3 Comments »

Introduced in SQL 2005, CTEs or Common Table Expressions are a pretty cool feature to use. Rather than using a temporary table, a CTE is able to create temporary tables on the fly and perform then performing recursive queries - perfect for building a tree heirarchy.

Take for example, the following code - a pretty normal pageid, parentid relationship exists between nodes (in this case pages within a CMS system).


WITH PageTree(pageid, pageparentid, level,pathstr)
AS
(
select
pageid, pageparentid, 0,cast(pageid as varchar(max)) from pages where pageparentid is null
UNION ALL
Select v.pageid, v.pageparentid, t.level +1 , t.pathstr + ',' + cast(v.pageid as varchar(max)) from pages v
INNER JOIN
PageTree t
ON
t.pageid = v.pageparentid
)

select pageid, pageparentid, level, pathstr
from pagetree
order by pathstr, pageid

Firstly, notice the WITH statement at the top that defines the CTE and the columns that are going to be in your resultant table. Then the initial ’seed’ row is retrieved before the recursion begins. Outside of the WITH statement is the SELECT statement that selects against the CTE. In this example, i’ve create a column named ‘pathstr’ which will contain a comma seperated list of the pages in their heirarchy. Here’s the results;

Clustered CF Instances suddenly broken

ColdFusion 5 Comments »

For the best part of two years now we’ve been running two load balanced ColdFusion Enterprise servers, each with two clustered instances of ColdFusion. We’ve recently started using Fusion Reactor and we can clearly see that one particular instance is not processing any requests. The cluster was created identically on both boxes (and has been running previously) - i’ve checked via the admin instance that the cluster is setup correctly, both the instances on the box are started, I can access the CFIDE for the instance. I’ve restarted instances and IIS but to no avail - any ideas? Is it a case of removing the connector and reinstalling it?

Installing FusionReactor when using a non default service account

ColdFusion No Comments »

At last we’re purchasing FusionReactor to keep a watchful eye across our CF Servers. I ran into a problem whilst installing it because we run CF as a domain user account and not the default System account on windows.

If you install FR out of the box, restart your CF server (i’m running on Jrun4 instances here) then it’ll fail to start. The reason is that it needs a couple of permission changes, firstly your service account needs to have read/write permission to the FusionReactor installation folder (default c:\FusionReactor) also FR stores its license key in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Prefs - i didn’t have this branch present so for the short term i added my service account to my local Power Users group so it could create the branch - on returning post installation the branch was created as my service account so i could remove it from the power users group. Now when i restart the instance it starts ok. I’ve been in touch with Intergral and they should be adding this to their FAQ shortly.

First steps with FusionDebug

ColdFusion, Fusebox No Comments »

I got to play with FusionDebug for the first time the other day and i’ve got to say i’m impressed. Since the year dot i’ve lived without step debugging in ColdFusion - it’s always been present in Visual Studio but we were always limited to dotting CFDUMPs around cf templates to aid in debugging. No more…or rather, I’m just catching up!

FusionDebug 2.0 was released not so long ago, I never saw v1.0 but the sales team at Integral say that 2.0 is leaps and bounds better that the first release.

Anyway, my first playing with it was with a Fusebox5 application i was building - I’d set it all up as the instructions say and all worked great, even going cross project in Eclipse to a project of CFCs - as i stepped through code it jumped between my open projects in Eclispe. Anyway, at one point i put a breakpoint in a layout file and that caused FusionDebug issues with looking up the source code - due to the parsed files that Fusebox uses. So i pinged the FusionDebug mailing list and found out about a feature of Eclispe I never knew about - linked folders in projects. It’s only accessible via FILE > NEW > FOLDER and then you click the Advanced button you enter a folder alias but then a path to the folder. In my case, I removed the existing ‘parsed’ folder and added a new parsed folder linked via a UNC path to the parsed folder on the file server - and now when i debug FusionDebug is all happy as it has access to the source code that it requires.

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in