//richinternet.blog

Viewing By Category : ColdFusion / Main
Friday, March 25, 2011
Creating Remoting channels at runtime in ColdFusion

In a recent project I had to dynamically create a Flex Remoting endpoint (Channels) at runtime in the embedded BlazeDS of ColdFusion (this was due to the fact that we did not wanted the customer to mess around with the services-config.xml file).

By default, the "ColdFusion" Remoting destination only uses a non-secure AMFChannel but we wanted to use the SecureAMFChannel on that destination as well. Usually, you'd need to edit the remoting-config.xml file, add the "my-cfamf-secure" channel to the list of channels for the "ColdFusion" destination and then restart the server. With runtime channel configuration, you can just add (or even remove) channels at runtime with no server restart. Actually, you can do anything you want as long as the BlazeDS API supports it.

In my case, I use the onApplicationStart methode of the Application.cfc to call the configureChannels method which will add the existing "my-cfamf-secure" channel to the "ColdFusion" endpoint in case it has not been done already:

<cffunction name="configureChannels" returntype="void" access="private">
   <cfscript>
   var cls = createObject("java", "flex.messaging.MessageBroker");
   var broker = cls.getMessageBroker(javacast("null", ""));
   var service = broker.getService("remoting-service");
   if (service.getDefaultChannels().size() == 1)
   {
      service.addDefaultChannel("my-cfamf-secure");
   }
   destination = service.getDestination("ColdFusion");
   if (destination.getChannels().size() == 1)
   {
      destination.addChannel("my-cfamf-secure");
   }
   </cfscript>
</cffunction>

That's it.

Dirk.

Wednesday, June 10, 2009
CFLOOP: undocumented charset attribute for reading files

ColdFusion 8 introduced a new feature which allows to use CFLOOP to read in a file line by line. This is a nice convenience method but I noticed that by default CFLOOP in this mode always uses iso-8859-1 encoding to read the file's content which of course causes trouble when the encoding of the file is e.g. utf-8. By accident I found that there's an undocumented attribute on the CFLOOP tag to set the charset to use when reading in a file:

<cfloop file="#path#" index="line" charset="utf-8">
...
</cfloop>

Dirk.


Enabling SSL on ColdFusion 8 with integrated JRun

I had a hard time configuring SSL on my local CF8 running with the integrated JRun (Developer Edition). I followed the common instructions for enabling SSL on CF (like here and here) but in the end I always kept getting strange error messages like "sec_error_bad_signature" in the browser when I accessed CF via https.

Finally, I found that the error was related to the Java JRE. When I switched the JRE from the one shipping with CF8 (1.6.0_04-b12) to a Java 5 JRE ( 1.5.0_16-b02) the error went away and SSL works like a charm. I'm not yet sure if this is a bug in the JRE or CF8 but for my testing purposes it's just fine now.

Dirk.

Tuesday, May 12, 2009
Pass CF Array as serialized ArrayCollection from CF to Flex

UPDATE: Sorry, my assumption was plain wrong. See my comment in the Comments section.

By default, a CF Array is serialized to a native Flash Array when when using AMF3/Remoting between Flex and CF. If you want to pass a CF Array directly as an ArrayCollection to Flex instead of wrapping in into an ArrayCollection on the Flex client side, then just wrap the CF Array into a java.util.ArrayList in your CFC:

<cfreturn createObject("java", "java.util.ArrayList").init(someArray)>

Dirk.

Friday, May 8, 2009
Distinguish between Flex Remoting and "normal" HTTP requests in ColdFusion

After a lot of Flex and Java coding I'm currently doing a CF/Flex project again. I haven't really touched CF for quite some time and decided to use ColdSpring in this project just for getting an idea of it. I've used Spring in my past Java projects and wanted to get a feeling for ColdSpring - and it really rocks! Make sure to check it out!

One thing I remembered from my past Flex/CF projects was that it always was not that easy to build a CF backend that can both serve Flex clients with AMF over HTTP (i.e. Remoting) and "normal" HTTP clients (standard-browser-HTML-you-know-what-I-mean). For example, the error handling is a bit difficult as you want CF runtime exceptions to get transported back to Flex clients as FaultEvents but for HTML clients you want a nice HTML output with error information. I never found a decent solution for this... until now :) Sometimes it is good to change perspectives (or to switch languages).

In the past Java projects we either used BlazeDS or LC on the backend side. The server side API offers a broad set of ways to access the incoming HTTP requests and the AMF payload. A main class in the BlazeDS and LCDS API to access all that information is the flex.messaging.FlexContext class. The idea is quite simle: in your server side Java code you can use the FlexContext class to get the current client (wrapped in a FlexClient object), the sessions (wrappers around the HTTPSession) and so on. So to check if a method was called from a Flex client you just have to check if FlexContext.getFlexClient() is != null.

Thanks to the fact that CF8 uses the same (or parts of) server side Flex API to implement the Flex <-> CF Remoting infrastructure you can also use the same method in your CFCs making it *much* easier to distinguish between Flex and HTML-client requests. A simple example goes like this - it could be used inside your Application.cfc's onError method:

<cfset var ctx = createObject("java", "flex.messaging.FlexContext")>
<cfif ctx.getFlexClient() neq "">
<!--- this is a request from a Flex cliet --->
...
<cfelse>
<!--- this is a standard http request --->
...
</cfif>

Dirk.

Wednesday, October 10, 2007
My MAX Europe Session description

For some reason, the session description for my session "Building a CRM system using ColdFusion, Flex and LiveCycle Data Services" is not online anymore so I had to enter it again. In case it does not show up at the MAX site here it is:

Learn how to combine the power of Flex, ColdFusion and LiveCycle Data Services to create a feature-rich, innovative CRM system. This session talks about the lessons learned during the development cycle of a feature-rich, innovative CRM system and gives you in-depth information on how to tackle CRM specific requirements.

So - if you want to know how to successfully combine Flex, ColdFusion and LCDS (and what problems occured during development) be my guest on Tuesday from 4-5pm!

Dirk.

Tuesday, August 28, 2007
Speaking at MAX Europe

Sven and I will be speaking at MAX Europe in Barcelona - I'm sure this will be great fun!

Sven's session is "Introduction to LiveCycle Data Services for Flex Developers" and will show the great fetaures the LiveCycle Data Services have to offer. Sven did a similar session last year at MAX Las Vegas.

My session is "Building a CRM system using ColdFusion, Flex and LiveCycle Data Services" where I'll give in-depth tips and tricks on how to marry Flex 2, ColdFusion 8 and LCDS.

Dirk.

Thursday, August 2, 2007
Sending messages from CF8 to Flex 2 and vice versa

A very cool new feature in ColdFusion 8 is the ability to send messages from a Flex 2 client to a CFC and vice versa by using the new DataServicesMessaging Event Gateway in CF8 over the real time RTMP protocol. This is possible because CF8 adds a Service Adapter to LiveCycle Data Services 2.5 (which you can now install as an integrated web application inside CF8).

Sending a message from Flex 2 to a CFC is as simple as creating a new DataServicesMessaging Gateway instance and assign it a CFC that handles the message. The CFC (in its simplest form) just needs to implement a onIncomingMessage method. In your Flex 2 client you then create a new Producer instance and set the destination to ColdFusionGateway (the default name as configured in LCDS' messaging-config.xml file). Finally, you create a new AsyncMessage instance in Flex, add the Gateway's ID to the header and send it away. This will invoke the CFC's onIncomingMessage

To send a message from any CFC or CFML page to Flex clients you just send a Struct (including a DESTINATION and BODY field) to the Adpater using the SendGatewayMessage() method including the Gateway's ID - that's it! A great feature and super-easy to use!

The best thing is that Event Gateways are now also available in CF8 Standard - you do not need an Enterprise license for it anymore!

Tuesday, July 31, 2007
Solved: upload bug

Finally... it turned out that it was neither an issue with Flash Player 9 nor with ColdFusion MX 7.02 but with the firewall configuration (*ouch*). The firewall's integrated intrusion protection system filetered out the potential security risk - although an XDP file itself will never be harmful the IPS just found the <script/> sequence and stopped the HTTP request. So sorry for the noise - File uploads work fine in FP 9 and of course also in CF7 :)


Update on upload bug

After some more testing it turns out as if not Flash Player is causing the upload problems but ColdFusion MX 7.02 - we found this as we tested the application with the new ColdFusion 8 version and there the upload works just fine. In ColdFusion 7 neither an upload with Flash Player nor with a simple HTML upload form works as soon as a <script>...</script> sequence is present in the file.

Using CF 8 is not an option in our project however as we need to deploy on Solaris 8 which is not a supported platform for CF8. Any ideas on how to workaround this bug in CF 7 are highly appreciated!

Tuesday, February 20, 2007
Did you know that CFR files are plain old CFCs?

Yes - sounds funny but it is true. I tried to generate a report from a CFR file (a report file created with ColdFusion Report Builder) today and received tons of exceptions. In one of the exceptions I stumbled across the fact that the stacktrace showed line numbes from inside the CFR file - and even more interestingly some weird looking method signatures like:

cfReport2ecfc332043841$funcGETCHARTDATA_0GENERATEDQUERY_0.runFunction(...)

which looked pretty similar to plain old CFC stacktraces.

So I renamed my Report.cfr file to Report.cfc and tried to instantiante it by using createObject() on it - and it works :) Don't know if that's of any use for any of you but you never know!

UPDATE: hmm - one interesting method that is available after you created an instance of the CFR/CFC is the getReportXML() method. Seems to return a XML structure that is used by the underlying JasperReports engine to create the report.

Dirk.

Thursday, November 23, 2006
Looping over a CFQUERY in CFSCRIPT

In case you did not know, here's how to loop over a CFQUERY object in CFSCRIPT (the same as using cfloop to loop over it). In case the query is called bla then looping over it goes like this:

while (bla.next())
{
  p = createObject("Java", "de.richinternet.utils.Person");
  p.setLastname(bla.lastname);
  p.setFirstname(bla.firstname);
  ArrayAppend(a, p);
}

Dirk.

Tuesday, June 20, 2006
Flex 2 around the corner, new blog online

Now that Flex 2 is around the corner (according to some sources) we're pleased to announce our new blog Flexperten.

This blog is especially targeted towards our German readership and so we'll blog in German only there. We'll focus on Flex and CF on the new blog and will bring you tips & tricks, tutorials and other useful information.

Btw: this does not mean that richinternet.blog will be discontinued - we just want to add some momentum to the German Flex community and hope that you'll like it :)

There's not too much content there yet and still only default styling etc. but we'll add new stiff within the next days so stay tuned!

Dirk.

Tuesday, May 16, 2006
CF/FlexBuilder 2 Application Generation Wizard Available

The CF/FlexBuilder 2 Application Generation Wizard is available at labs.adobe.com, it's included in the latest drop of the CF Extensions for Flex Builder. To get an overview of the great feature set check out this 11 minute demo Damon Cooper put on his blog. Pretty neat stuff.

Dirk.

Wednesday, May 10, 2006
RAD Wizard for Flex Builder 2 and ColdFusion

Cool: Damon Cooper has some news about the Rapid Application Development Wizard the ColdFusion team is currently working on:

We're currently putting the final touches on the ColdFusion / Flex 2 DB Application Generation Wizard, and we hope to refresh the CF / FlexBuilder 2 plugins soon to add this exciting functionality that will bring hyper-RAD productivity to ColdFusion customers using FlexBuilder 2, to dramatically jump-start Flex 2 /CF DB application RIA construction.

Can't wait to see it in action!

Dirk.

Monday, March 13, 2006
ColdFusion 7.01 Clustering ... missing attribute in JRUN.XML

If you install ColdFusion 7.01 with the Multi-Server Option (JRun4 with ColdFusion automatically deployed to JRun4) and you want to cluster ColdFusion Instances you will find out, that your Cluster, after you have defined it in the ColdFusion Cluster Manager, is not recognized by the Webserver Connectior (wsconfig.jar). This is because there is a parameter missing in the jrun.xml of each ColdFusion Instance. So search for the jrun.xml. Inside the ProxyServer-Section add the Parameter "bindToJNDI" which is not there by default:

<service class="jrun.servlet.jrpp.JRunProxyService" name="ProxyService">
<attribute name="bindToJNDI">true</attribute>

Restart each ColdFusion Instance and the Wsconfig.jar now recognizes your ColdFusion Cluster!

Sven.

Friday, March 10, 2006
Some more CF Flash Form add-ons

Artur wasn't idle and has released three new "Pimp my Flash Form" articles. The coolest bit is a CustomTags that allow you to use the Slider control inside a CF Flash Form :)

Dirk.

Thursday, March 2, 2006
Using Flex-style RemoteObjects in CFForms

Very nice: Artur has just released his first "Pimp my Flash Form" article. He really got down to the guts of ColdFusion's CFForm tag and explains how to use the Flex 1.5 RemoteObject tag inside CFForm :)

Dirk.

Monday, February 13, 2006
Flex 1.5: Mapping CF objects to AS value objects

I've often been asked how to best pass complex objects to Flex 1.5 while enforcing automatic type mapping between the CF and the Flex side. Due to the typeless nature of CF there isn't a built-in way to get this working in CF 6/7 and Flex 1.5 (of course, the next CF updater codenamed "Mystic" introduces a better way to map CFCs to AS classes but targets CF 7 and Flex 2). I've already posted a working approach here - however, the _remoteClass field usage is deprecated in Flex 1.5 and introduces several drawbacks during deserialization.

We've used the following approach in several projects and it worked out quite well:

To return a typed object from CF to Flex:

  • inside a CFC method create a new instance of flashgateway.io.ASObject
  • set the type of the object (see below)
  • fill the object with data
  • for nested objects, repeat the above
  • return the object
  • in Flex, create a mapping between the type set above and the AS class

Ok, here's a simple example - first, the CFC method "getPerson" which should return a Person value object:

<cffunction name="getPerson" access="remote" returntype="struct">
<cfset obj = createObject("java", "flashgateway.io.ASObject").init()>
<cfset obj.setType("Person")>
<cfset obj.put("firstName", "John")>
<cfset obj.put("lastName, "Doe")>
<cfreturn obj>
</cffunction>

And here's the Person AS file:

class foo.bar.Person {
  public var firstName:String;
  public var lastName:String;

  private static var rc:Boolean = Object.registerClass("Person", foo.bar.Person);

  public function toString():String
  {
    return "My name is " + firstName + " " + lastName";
  }

}

This also mimics the way Flex 1.5 interacts with Java POJOs quite well - in theory you shouldn't have to bother if your Flex client is working against a CF or a generic Java backend

Dirk.

Tuesday, January 31, 2006
Force recompilation of external AS files in cfform

A major nuisance when using external AS classes inside a cfform is the fact that recompilation of the resulting SWF only takes place if you change the cfform itself - changing the external AS files/classes seems to has no effect.

The reason behind this is that the cfform engine uses the same caching as Flex 1.5 does - this means once a SWF is compiled, its bytecode is stored in the server's RAM, every new request only serves the compiled version. So, to get a fresh SWF for every request we simply have to disable caching.

The caching is configured in ColdFusion's web.xml file by assigning a Java Servlet Filter called CFCacheFilter to the CFSWFServlet Servlet (look for the <filter-mapping/> block at around line 66 in the default web.xml). To disable this mapping simple comment the according block in the web.xml and restart CF. Every cfform should now recompile by default.

Update: Another (less subtle) way to disable the caching is to set <content-size> to 0 inside the WEB-INF/cfform/flex-config.xml file (line 151)

Dirk.

Friday, January 20, 2006
Using createChild in your cfform

Ever wanted to use createChild inside your cfform tag to dynamically add UI controls? Try this:
<cfform format="Flash" onLoad="initForm()">
   
   <cfformitem type="script">
   
      function initForm():Void {
         this[gotcha()](mx.controls.Button, null, {label: "Gotcha!"});
      }
   
       function gotcha():String {
         var arr:Array = ["c", "r", "e", "a", "t", "e", "C", "h", "i", "l", "d"];
         return arr.join("");
      }
   </cfformitem>
   
</cfform>

The funny thing about it - it really works :)

Dirk.

Tuesday, November 29, 2005
Using custom AS 2.0 classes in CFForms

Very nice: the fact that ColdFusion Flash Forms are generated by an embedded Flex 1.5 instance allows you to add your own ActionScript 2.0 classes to your CFForms project. Artur and I found this out while doing some CFForm stuff.

You simply need to modify the flex-config.xml file inside the [CFROOT]/WEB-INF/cfform directory (this file gets used by the embedded Flex server and is a stripped down version of the original Flex config file). To add your own code and class libraries simply define additional AS class paths. E.g. to add the directory D:\dev\asclasses open the config file and look out for the actionscript-classpath node:

<-- path locations of actionscript class files -->
<actionscript-classpath>
   <path-element>D:\dev\asclasses</path-element>
</actionscript-classpath>

The best thing: classes linked in this way aren't restricted - you can happily create new instances by using new inside external AS 2.0 classes :)

Artur has some more information on his blog about this, so make sure to check it out!

Dirk.

Tuesday, November 15, 2005
CF Trace Panel?

Ok, here are some questions for you: Are you a Flex developer? Are you also a ColdFusion developer? Are you calling CFCs from Flex as RemoteObjects? Are you using the Flex Trace Panel? Have you ever thought about how cool it would be to have something like the Flex Trace Panel for ColdFusion? Something that works like cfdump but displays the dump in a standalone window? Especially when trying to debug Flex-->CFC calls and there's no way to cfdump because there's simply no browser window to display the dump...?

If you're still reading this post then you probably answered every question with "YES!!!" - which is good. I'm currently creating a tool that does all this and I hope to put it online by the end of the week. So stay tuned!

Dirk.

Tuesday, September 13, 2005
Ever wanted to take a look at the source code of Flex powered CFForms?

If you want to take a look at the guts of a Flex-powered CFForm in ColdFusion 7, check out what Artur found out.

Dirk.

Tuesday, August 30, 2005
Did you know ? JRun Updater 6 is here

I just found out, that there is an Updater 6 for JRun4.

http://www.macromedia.com/support/jrun/updaters.html

Sven.

Wednesday, July 13, 2005
JRun Updater 6 ??

http://www.macromedia.com/go/f760350a

For JRun 4 Updater 6 on HP-UX, only PA-RISC is supported, and only in 32-bit mode

--> JRun Updater 6 ?? Mistake ?

Sven.

Sunday, May 22, 2005
JDBC drivers 3.4 new features and more performance(?)

MM has released a new version of the JDBC-Drivers. (http://www.macromedia.com/go/1a3c2ad0). In the MM Release Notes for that driver version there is nothing about the following features, which came from the Datadirect Site (http://www.datadirect.com/products/jdbc/release_highlights/index.ssp, see 3.4 section):

So has anyone made some experiences with more SQLServer performance or with the Connection Fail-over-Retry so far??

Release 3.4:

All Drivers

  • Connection Fail-over Retry – The drivers continue to retry servers until they connect. System recovery is an example of where this is useful. If the server is not available when the application tries to connect, the driver waits and retries the connection again.
  • Client Side Load Balancing - Allows the driver to randomly connect to one of the servers in the servers list to balance the load on the servers. This prevents the driver from always connecting to the first server in the fail-over list and distributes the load more evenly.
  • Improved Diagnostics - Allows users more flexibility and ease of use for DataDirect Spy, which is a diagnostic utility included to trace calls in running programs.
  • Enhanced Parameter MetaData support – For database servers that do not provide parameter metadata information, the driver will provide the parameter metadata for simple inserts and updates. (SQLServer, Oracle, DB2 v7.x for Unix, Windows and Linux and DB2 v5R1 and v4R5 for AS/400 would make use of this functionality).
  • Get and set client information on a Connection – Useful in Application Server environment and other environments that use Connection Pools shared amongst applications.

MS SQL Server

  • Performance enhancements
  • XATransaction Timeout support
  • Improved XATransaction cleanup and recovery
  • Improved trigger result handling

Sven.

Wednesday, April 27, 2005
Using Remoting with Flex and ColdFusion CFCs - Part 1

Finally, here's the first part of a series of articles about Flex/CF interconnectivity. This first part explains how to use CFCs as named and unnamed RemoteObjects.

Enjoy!

Dirk.

Monday, April 18, 2005
Merge my day...

Ok, here's a little anecdote concerning the Adobe/Macromedia acquisition:

Back in the late 80s, a small company in Richardson, Texas called Altsys developed an illustration program called FreeHand. Freehand was licensed to another company called Aldus and Aldus published and sold FreeHand for quite some time.

In September 1994 Aldus was taken over by Adobe. Altsys was afraid that Adobe would drop Freehand in favour of their own Illustrator product so Altsys filed suit against Aldus to take FreeHand back. Finally, marketing rights to FreeHand got back to Altsys. Shortly after (in 1995), Macromedia bought Altsys - and FreeHand.

Some more info:

Dirk.


Adobe aquires Macromedia for $3,4 billion

Adobe aquires Macromedia! I'd never thought of that before - and still I can't see how this fits together. Ok, Adobe and Macromedia have been competitors for years in the graphics/tools market but how do the mobile and server solutions fit in here?

So I'm gonna use Adobe ColdFusion and Adobe Flex 2.0 in a couple of months... strange. Also, what will this mean to the competing technologies FlashPaper/PDF, Flash/SVG, Dreamweaver/GoLive?

Here's some more information I found quite useful:

Dirk.

Thursday, March 24, 2005
Did you know?... there is a JRun Updater 5 available

It was not on the blogs ... but there really is a JRun Updater 5.

You will find the Release Notes here: http://www.macromedia.com/support/documentation/en/jrun/4/releasenotes_4_updater5.html

You can download the Updater 5 here: http://www.macromedia.com/support/jrun/updaters.html

MM says that in CFMX 7 there already is the Updater 5 of JRun included. But my CFMX7 J2EE Installation of JRun has the build number 91015. So the JRun 4 Version in CFMX7 is just between JRun Updater 4 and Updater 5 ... what ever that means.

JRun 4 Updater 4 (build 84683)
JRun 4 Updater 5 (build 92909)

PS: JRun Updater 5 can run with JRE 1.5 ... so who has experience with that?


Using Remoting with Flex and ColdFusion CFCs (introduction)

I've decided to write a series of articles on how to use the Flex RemoteObject servicetag to invoke ColdFusion CFCs and to exchange data between both systems. Every few days a Flex/CFC related question pops up on the flexcoders list so I thought it's time to do something about it :)

I haven't created an outline for this series of articles yet but the topics I'd like to include are:

  • setting up the RemoteObject tag to call CFCs
  • building and calling a facade.cfc that delegates calls
  • passing complex arguments to the CFC
  • processing data inside the CFC
  • returning results from the CFC to Flex
  • other stuff...

So, stay tuned - and Happy Easter!

Dirk.

Tuesday, February 15, 2005
Tim Buntel (CF Productmanager) has a ColdFusion Licence Problem

Maybe Macromedia should donate Tim a full licence for his blog ... (www.buntel.com/blog)

Saturday, February 12, 2005
ColdFusion MX 7.0 List of fixed and open issues - where is it?

Normaly the release notes of the ColdFusion MX Versions had contained a complete list of fixed and open issues. But in the actual ColdFusion MX 7.0 Release notes (http://www.macromedia.com/support/documentation/en/coldfusion/mx7/releasenotes.html) there is nothing about that.

I only have found things like "ColdFusion MX 7 - Documentation Known Issues" or "Search on your issue in the knowledge base" ... ;(

But this is not enough for me, any Ideas?

Sven.

Wednesday, February 9, 2005
Dreamweaver extensions for CFMX 7 support breaks Flex Builder 1.5 code hinting

Beware if you're planning to download and install the updated Dreamwever MX 2004 extension that adds code hinting support for ColdFusion MX 7 when you've got Flex Builder 1.5 installed. For some reason, the extension also gets added to Flex Builder (at least on my machine) and breaks some of the MXML/AS 2.0 code hinting.

Make sure to backup your FB configuration before you're applying this update so you can roll it back if it gets corrupted, too.

Dirk.

Friday, November 26, 2004
Using CFCs and _remoteClass in Flex 1.5

Here's something for your pleasure: it is possible to invoke a CFC as a RemoteObject and to take advantage of the built-in mechanism in Flex that creates instances of a custom AS 2.0 class during deserialization. This way you can pass over structs from your CF application and have them automatically mapped to your client side AS 2.0 classes

I've put together a little example that shows this technique. Basically, you only have to make sure that the struct you're passing over the wire contains a "field" (i.e. a key) called _remoteClass - pretty much the same as when you're invoking POJO's with Flex. The example invokes a CFC that returns an array of structs. Every struct contains a key called _remoteClass that contains the name of the AS 2.0 class to use for deserialization on the client side.

Adjust the number of objects to create by using the NumericStepper and hit the "invoke" button. The result is rendered in the List control (by taking advantage of a implicit getter function called "label" that's defined in the custom AS 2.0 class). Selecting an item in the List calls the toString method of the current item and renders the text in the Label control.

You can download this sample here

Edit: if you want to return CFC instances rather than structs then you'll have to change the static property FLEX_CLASS_FIELD of the mx.utils.ClassUtil class to "_REMOTECLASS". Additionally, all members of the AS 2.0 class should be written in uppercase.

Have fun!

Dirk.

Friday, September 24, 2004
Cumulative Security Patches for JRun and ColdFusion MX 6.1

Macromedia has released two cumulative patches for JRun and ColdFusion yesterday, both are categorized as being critical. Release notes and installation instructions:

Dirk.

Friday, September 10, 2004
ColdFusion Blackstone Beta started!

It's there: Tim Buntel just announced the start of the ColdFusion Blackstone beta program - according to his article you can still apply for becoming a beta tester. The release date for Blackstone is announced to be in "early 2005" - I would interpret this as "within the first 3 months" so I bet there's still a good chance to get into the beta club.

Dirk.

Friday, September 3, 2004
Cold Fusion back from the Dead

Not exactly what you might expect: Cold Fusion back from the Dead :-)

Have a nice weekend!

Dirk.

Monday, August 9, 2004
ColdFusion "Blackstone" Sneak Preview

If you haven't had the chance to take a look at the next ColdFusion release (codenamed "Blackstone") during one of live presentations then check out this article.

You might wonder why those "Rich Forms" look so Flex'ish? Well, unfortunately I cannot quote anything official here... ;-)

Dirk.

Wednesday, July 21, 2004
Performance Problems with IIS6 and ColdFusion MX 6.1 / JRun 4 under heavy load solved

We have had big problems with the IIS6 and ColdFusion MX 6.1 /JRun 4 under a heavy load condition. Over the past two days we have made lots of load tests ... so here are the results:

ColdFusion MX 6.1 is actually based on JRun Updater 2. We have downloaded JRun Updater 3 and used the wsconfig.jar (this is the file which installs and includes all the WebServer Connector stuff).

Under load in our environment the JRun Connector to IIS6 usually has a processor load from 50 to 60%. But during that load test I noticed, that sometimes (after intervalls of 30 min.) the processor gets down to 0% for up to 5 min. After that it goes up again to 50 and 60% and everything is fine again. 

After contacting the Macromedia Support, they told me the following: "If you'd like, you can use the latest QAed JRun updater available at XXX. This is a non-public update for JRun (meaning it hasn't been generally released) but it has been fully tested and is fully supported."

So I downloaded that "JRun Updater 3plus" and extracted the wsconfig.jar which has a much more higher version number. Again I started my load test. The Prozessor load for IIS6 is 50 to 60% again. But now the prozessor only gets down to 0% after intervalls of 30 min. just for one second or two and then up to 50 and 60% again. So with that new wsconfig.jar the problem seems to be solved.

So thanks to John Cummings from Macromedia Support for that help.

Sven.

 

Friday, July 2, 2004
Did you know that ColdFusion Verity CFSearch-Tag is limited to 64K Resultsetsize

We have had lots of trouble with the Verity Searchengine included in ColdFusion MX with very large Datavolumes. We tried to index 12.000 Word, PDF, HTML and Excel Files - thats about 4 GB Data.

We solved the problems and know it works. A funny thing was, that we tried to test the Verity Index with CFSearch by searching for * and we alway wondered why we did not get a result set.

Ok, the answer is: The CFSEARCH is limited to 64K results but in reality (in my tests), it means that you could only have 8192 results (8192 * 13bytes = 64Kb).

So I am planning to write down my Verity experiences especially with MKVDK in the "Ultimate Guide to ColdFusion Verity", anyone interested in that Guide?

Sven.

Monday, June 28, 2004
The ultimate ColdFusion MX 6.1 Cluster Installation guide

This documentation is based on several articles by Brandon Purcell and Steven Erat. 

http://www.bpurcell.org/viewContent.cfm?ContentID=121

http://www.macromedia.com/devnet/mx/coldfusion/j2ee/articles/endtoend.html

http://www.talkingtree.com/blog/index.cfm?data=20040225

In addition to that I have added some notes and a specific scenario. In this specific scenario I do not use ColdFusion Session Variables because in a Cluster Environment I think it is better to put that kind of information in the database and write your own kind of session management …

Click here for downloading the PDF

Comments are welcome!

Tuesday, June 22, 2004
[UPDATE] Ben Forta visits Germany on July 15th

Agent K has just released more information on Ben Forta's visit in Germany, check it out here.

Dirk.

Wednesday, June 16, 2004
Ben Forta visits Germany on July 15th

Ben Forta's current world tournee makes a stop in Germany. On Thursday, July 15th. Ben will be at the Hilton Hotel in Cologne

Here's the schedule so far (all GMT+1):

  • approx. 14:30 - 17:30: Forta speaks on ColdFusion's next major release "Blackstone", Flex and other topics
  • approx. 17:30 - ???: drinks, food and small talk

Location:

More infomation will be available soon.

Dirk.

Monday, June 14, 2004
Forcing exact case when returning structures from a CFC

Structure identifiers (i.e. keys in an assosiative array) returned from a CFC are all UPPERCASE by default, a key called sessionID will be passed to the calling side as SESSIONID. This is extremely annoying if you are supposed to work with strict typed environments. Luckily, there's one way to pass the identifiers in mixed case also - just setup all keys initially inside the CFC with StructInsert(structure, "keyName", value, true) and you'll be fine. After this, it's save to set the key's value directly, the case will stay just as you wanted it.

<!--- create new structure --->
<cfset result=#StructNew()#>
<!--- now add the key --->
<cfset tmp = #StructInsert(result, "sessionID", 0, true)#>
<!--- no matter how you access it later, case will stay! --->
<cfset result.SEsSIoNiD = "12345">
<cfreturn result>

Dirk.

PS: maybe it's only a question of style but I definitely prefer strict typing.

Wednesday, June 9, 2004
Most recent ColdFusion Technotes

This article reflects the most recent ColdFusion Technotes by Macromedia. The technotes are updated regularly so make sure you check this page often.

Sorry, the links couldn't be loaded.


Refreshing Web Service Stubs in ColdFusion MX

This is not completely new and I found it in an other blog some times ago ... but it is an very important tip if you are working on Webservices with ColdFusion!

This one comes courtesy of David Stanten in Macromedia Product Support - If you have worked on webservices in CF you will run into a problem - when making a change to the signature of a webservice, there is no easy way to 'refresh' the webservice stubs created by CFMX if a developers doesn't have access to the administrator. I've also found that even if you manage to figure out the name of the directory containing a given webservices' stub files, you can't simply delete it without causing errors. (It seems some of these files are stored in memory). Anyhow, once again, the service factory comes to the rescue, with a funny named 'refreshWebService' function:

<cfobject type="JAVA" action="Create" name="factory" class="coldfusion.server.ServiceFactory">

<cfset RpcService = factory.XmlRpcService>

<cfset RpcService.refreshWebService("<http://localhost:8500/MX/components/dude.cfc?wsdl>;")>

You can either pass the full path to your wsdl - or, if you've registered a name for the webservice through the administrator, pass that name to this refreshWebService function - i.e. <cfset RpcService.refreshWebService("dude")>

After refreshing your stubs, you're good to go ... AND ready to rock!

Sven.

Monday, June 7, 2004
New Technotes

Friday, June 4, 2004
ColdFusion Technical Summit 2004

Just a little reminder that the company I work at organizes a whole day ColdFusion event on June 16th. The agenda is promising, topics are J2EE clustering, CFCs, WebServices and a short session on the differences between ColdFusion and Flex. A special highlight will be a Breeze Live session with ColdFusion guru Ben Forta.

More info is available here (in German).

Dirk.

Friday, May 21, 2004
Endlich - ColdFusion Hotfixes für Verity mit aktuellen Linux Versionen

Macromedia has created a hot fix for Verity to support additional versions of Linux. Verity is now supported with ColdFusion MX 6.1 on the following Linux versions:

  • Red Hat 7.2, 7.3, 8, 9
  • Red Hat AS 2.1, 3.0
  • Red Hat ES 2.1, 3.0
  • Suse 7.2, 7.3, 8.0

Das wurde ja auch mal endlich Zeit. Schliesslich konnte man ja eigentlich keinem Kunden wirklich klar machen, warum die Verity unter Linux nur bis Version 7.2 bei Red Hat und SuSe unterstützt wurde. Nun, mit diesem Hotfix werden wieder die aktuellen Versionen unterstützt und alles wird gut ...

http://www.macromedia.com/support/coldfusion/ts/documents/hotfix_verity_linux.htm

Sven.

Monday, May 17, 2004
CFEclipse Plugin für Eclipse 3

Das CFEclipse Plugin für die Eclipse 3 Plattform ist in der Version 1.1.8 erhältlich. Neue Features sind unter anderem ein CFC Method Viewer, diverse Wizards für CFML/CFCs und erweiterte Snippets. So etwas wünsche ich mir für Flex!

Dirk

Friday, April 23, 2004
ColdFusion BlackStone

BlackStone ist der Codename für die nächste Major Version von ColdFusion MX. Diese wurde bereits auf der MAX 2003 (Macromedia Entwickler Konferenz) im November 2003 in Salt Lake City mit einem potentiellen Erscheinungsdatum "im ersten Halbjahr 2004" angekündigt.

Ich denke das mit dem ersten Halbjahr wird nichts mehr ... aber die damals angekündigten Features lassen tolles vermuten, was ich inzwischen ... ZENSUR

Schwerpunkte werden wie damals bereits grob skizziert die folgenden sein:

  • Reporting und Erzeugen von PDFs / Flashpapers
  • CFFORMs-Zeugs auf Flash Basis (Flex läßt grüssen)
  • Anwendungsdeployment ohne CFM-Quellcode ... darauf warten wir alle schon seit Jahren
  • bessere Cluster-Untersützung und Deployment 

Sven Ramuschkat

Thursday, April 22, 2004
Technische Möglichkeiten beim Aufbau eines ColdFusion Clusters

Nachdem nun bekannt wurde, dass ClusterCats nicht mehr weiterentwickelt wird, existieren für ein ColdFusion MX Clustering auf Softwarebasis die folgenden Optionen:

JRun Cluster

Installation von CF-MX 6.1 Enterprise aus J2EE JRun Basis und dann Aufbau eines JRun Clusters. Das läuft super. Infos dazu unter beim Macromedia Support Spezialisten Brandon Purcell unter http://www.bpurcell.org/viewContent.cfm?ContentID=121. Es existiert ein WebServer, in den sich der JRun Connector einklingt und dann auf Round Robin Basis die Requests auf die entsprechenden JRun-Server im Cluster verteilt. Auch Failover bei den JRun Servern wird unterstützt, das einzige Problem ist dann nur, dass wenn der WebServer mit dem JRun Connector "abschmiert" gar nichts mehr geht, da dieser nicht geclustert ist.

WebServer Cluster

Man kann aber auch einen Cluster auf HTTP-Basis (WebServer-Basis) aufsetzen. Das konnte man bisher mit ClusterCats von Macromedia machen. Allerdings wird ClusterCats nicht mehr weiterentwickelt und unterstützt auch nicht mehr den IIS6 (Windows 2003) und Apache 2.x.  Bei Windows 2003 Systemen kann man allerdings das von Microsoft mitgelieferte NLB Verfahren nehmen. Infos hierzu auch bei Brandon Purcell unter http://www.bpurcell.org/printcontent.cfm?contentID=131.

Übrigens, man kann auch beide Varianten kombinieren ... mehr Infos erteile ich gerne auf Nachfrage. SRamuschkat@herrlich-ramuschkat.de

Sven Ramuschkat

Thursday, April 15, 2004
Programmatisches de- und aktivieren des Trusted Caches von CF-MX


Der Trusted Cache in CF-MX bringt einiges an Performance, da dann die die Überpüfung im Filesystem entfällt, ob die entsprechende CFM-Datei aktueller ist, als die im Cache befindliche. Daher sollte aus Performancegründen auf Produktionsservern, wo sich der Quellcode nicht mehr ändert oder nicht mehr so oft ändert in der Regel der Trusted Cache aktiviert werden. Normalerweise wird die de- und aktivierung des Trusted-Cache über den CF-Admin vorgenommen, in manchen Situationen möchte man es aber lieber programmatisch über ein Skript machen.

<CFOBJECT class=coldfusion.server.ServiceFactory name="factory" type="JAVA" action="CREATE">
<cfset request.runtime = factory.getRuntimeService()>
<cfset dummy = request.runtime.setTrustedCache(FALSE)>
<cfset dummy = request.runtime.setTrustedCache(TRUE)>
Sven Ramuschkat



Sun Mon Tue Wed Thu Fri Sat
   1234
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

About this blog
www.aws-blog.de
www.richinternet.de
www.flexforum.de
www.die-flexperten.de

AIR (10)
Apollo (3)
BlazeDS (8)
Breeze (1)
Central (5)
Cocoon P2P (1)
ColdFusion (55)
Flash (61)
Flash Media Server (8)
Flex (170)
Flex Trace Panel (6)
FXUG (3)
J2Flex (4)
MAX (31)
Mobile (1)
mxmlc (1)
Other topics (47)
Plugins (9)
Video (7)


Recent Flex Technotes
Recent ColdFusion Technotes
Recent Flash Technotes

http://www.aws-blog.de
http://www.die-flexperten.de
http://www.flexforum.de
http://www.flex.org

Aggregated by fullasagoog.com
Aggregated by MXNA

Short Mode | Full Mode

Herrlich & Ramuschkat