<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>RSS feed for InstantSpot site Blog of Dave</title><link>http://daveshuck.instantspot.com</link><description>Dave Shuck&apos;s ramblings on - ColdFusion, Flex, and Java, and life.</description><language>en-us</language><copyright>This work is Copyright &#xA9; 2009 by Blog of Dave</copyright><generator>RSSVille ColdFusion FeedMaker, version 1.0</generator><pubDate>Sat, 21 Nov 2009 11:53:46 GMT</pubDate><item><title>Create SSL sites in Apache on Windows with OpenSSL</title><link>http://daveshuck.instantspot.com/blog/2009/11/12/Create-SSL-sites-in-Apache-on-Windows-with-OpenSSL</link><description>To get a secure SSL site up and running on Apache under Windows, there are a few hoops to jump through that are not very intuitive.&amp;nbsp; To that end, I am going to document my approach to setting up SSL using OpenSSL.&amp;nbsp; This approach assumes that you already have Apache up and running on your machine, so if you have not done that, head over to the &lt;a href=&quot;http://httpd.apache.org/download.cgi&quot;&gt;HTTPD download page&lt;/a&gt; and set that up before continuing.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Setting up OpenSSL&lt;br /&gt;&lt;/b&gt;First we need to get &lt;a href=&quot;http://www.openssl.org&quot;&gt;OpenSSL&lt;/a&gt; setup on our system, which is not included with the Apache Windows binaries.&amp;nbsp; In fact the OpenSSL project doesn&apos;t even provide the binaries themselves, but you can find them at &lt;a href=&quot;http://www.slproweb.com/products/Win32OpenSSL.html&quot;&gt;Shining Light Productions&lt;/a&gt;.&amp;nbsp; For this example, I will be choosing the &lt;a href=&quot;http://www.slproweb.com/download/Win32OpenSSL_Light-0_9_8k.exe&quot;&gt;Win32 OpenSSL v0.9.8k Light&lt;/a&gt; version.&amp;nbsp; If you see a message like the one below, you will need to install the &lt;a href=&quot;http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&amp;amp;displaylang=en&quot;&gt;Microsoft Visual C++ 2008 Redistributable Package&lt;/a&gt; and then attempt the OpenSSL installation again.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://daveshuck.instantspot.com/userfiles/073006/91/c++error.png&quot; /&gt;&lt;br /&gt;&lt;br /&gt;Once you have it installed, you can do a quick test to make sure that it is set up properly:&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://daveshuck.instantspot.com/userfiles/073006/91/openssltest.png&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Creating Certificates&lt;br /&gt;&lt;/b&gt;Next, we will use the OpenSSL terminal interface to create our self-signed certificates.&amp;nbsp; To explain a bit about what is going on below, I have a site already existing on my system that can be reached at http://scribble.&amp;nbsp; What we are doing is creating a secure subdomain of https://secure.scribble. &amp;nbsp; Typically when I create certificates, I name the files with the host/domain obvious so that they can be easily identified later.&amp;nbsp; Obviously you will want to replace the domain name to match your setup, but type the following in the terminal in the OpenSSL/bin directory:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;[codeblock 433]&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;That will generate what you see below.&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://dl.dropbox.com/u/101948/blog/entries/ssl_on_apache/create-cert1.png&quot; height=&quot;420&quot; width=&quot;650&quot; /&gt;&lt;br /&gt;&lt;br /&gt;You may notice that I left a lot of the prompts blank.&amp;nbsp; Considering this is a dummy certificate in a development environment, that approach makes sense.&amp;nbsp; You may choose to be more explicit based on your needs.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If we were to use this key as it is, we would be prompted for the password every time that Apache starts.&amp;nbsp; Since that is less than ideal, we will now generate a non-protected key from the one we created in the previous step by typing the following:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;[codeblock 434]&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://dl.dropbox.com/u/101948/blog/entries/ssl_on_apache/create-cert2.png&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You can see that I was prompted for a pass phrase.&amp;nbsp; This is the same password that you created when we generated the certificate above.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now we need to need to build the certificate that we will actually import into Apache.&amp;nbsp; You can do so by typing:&lt;br /&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;br /&gt;[codeblock 435]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will result in the following output:&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://dl.dropbox.com/u/101948/blog/entries/ssl_on_apache/create-cert3.png&quot; height=&quot;443&quot; width=&quot;650&quot; /&gt;&lt;br /&gt;&lt;br /&gt;You can see that we now have a .cert, .csr, .key, and .pem file for our domain.&amp;nbsp; We will use a combination of the .key and the .cert&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Configuring Apache&lt;br /&gt;&lt;/b&gt;Now we need to make sure that your Apache server is ready to serve SSL requests.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;First, let&apos;s put the .key and .cert files that we created above into a directory under Apache.&amp;nbsp; In your &quot;conf&quot; directory, create a subdirectory named &quot;ssl&quot; and move secure.scribble.key and secure.scribble.cert into that new directory.&lt;br /&gt;&lt;br /&gt;Next we need to make sure that the mod_ssl module is enabled.&amp;nbsp; Open up the httpd.conf file for your Apache webserver.&amp;nbsp; Search for &quot;mod_ssl&quot; and you should find a line that looks like this:&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://daveshuck.instantspot.com/userfiles/073006/91/mod_sso.png&quot; /&gt;&lt;br /&gt;&lt;br /&gt;Yours will likely be commented out with a &apos;#&apos; sign in front of the line.&amp;nbsp; You will want to delete that &apos;#&apos; so that it looks like the highlighted line above.&lt;br /&gt;&lt;br /&gt;Next you will need to make sure that you have uncommented the line that includes the httpd-ssl.conf file like you see below:&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;max-width: 800px;&quot; src=&quot;http://daveshuck.instantspot.com/userfiles/073006/91/conf_ssl.png&quot; /&gt;&lt;br /&gt;&lt;br /&gt;The last thing we need to do is configure our site.&amp;nbsp; Open up the conf/extra/httpd-ssl.conf file in an editor.&amp;nbsp; You will see that there is an amazingly huge and complex site definition in there already that starts with &lt;virtualhost _default_:443=&quot;&quot;&gt; and ends about 150 lines later with &lt;/virtualhost&gt;.&amp;nbsp; We need to disable this site.&amp;nbsp; If you are feeling bold, you can simply delete it.&amp;nbsp; However, I take the approach of commenting it out entirely so that I still have it as a reference, which is my recommendation as well.&amp;nbsp;&amp;nbsp; Starting with the line &lt;virtualhost _default_:443=&quot;&quot;&gt;, put a &apos;#&apos; at the start of every line that doesn&apos;t already have one and continue until you comment out the &lt;/virtualhost&gt; line.&lt;br /&gt;&lt;br /&gt;Now it is finally time for us to create the site definition for our https://secure.scribble site.&amp;nbsp; We will use some of the concepts in the example, but eliminate most of them.&amp;nbsp; Here is what mine looks like after paring down all the excess:&lt;br /&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;[codeblock 436]&lt;br /&gt;&lt;br /&gt;In that code you can see where we are pointing to the .key and .cert files that we created above.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;Now, restart your Apache server and you are now serving up securely! &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;zemanta-pixie&quot;&gt;&lt;img class=&quot;zemanta-pixie-img&quot; alt=&quot;&quot; src=&quot;http://img.zemanta.com/pixy.gif?x-id=9d1b1403-fab2-8595-83d6-897a928c54c5&quot; /&gt;&lt;/div&gt;</description><pubDate>Fri, 13 Nov 2009 03:47:33 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2009/11/12/Create-SSL-sites-in-Apache-on-Windows-with-OpenSSL</guid><category>Tips and Tricks,Servers,Windows,Technology</category></item><item><title>The Jungle Rockers</title><link>http://daveshuck.instantspot.com/blog/2009/11/09/The-Jungle-Rockers</link><description>This past weekend I made a trip down to The &lt;a href=&quot;http://www.double-wide.com/&quot;&gt;Doublewide&lt;/a&gt; in Dallas and caught a really cool band called &lt;a href=&quot;http://www.myspace.com/thejunglerockers&quot;&gt;The Jungle Rockers&lt;/a&gt; (a few streamed tracks on there).&amp;nbsp; They are Austin transplants from Cleveland but now hail from ATX, playing regularly around Texas.&amp;nbsp; Their vibe is kind of a modern rockabilly sound with obvious influences from 50s rock and roll.&amp;nbsp;&amp;nbsp; They have a 6 track EP available that I bought at the show that is definitely a great listen, and if you get the chance to catch them live, I highly recommend it.&lt;br /&gt;&lt;br /&gt;Here is a vid I found of them...&lt;br /&gt;&lt;div class=&quot;youtube-video&quot;&gt;&lt;object height=&quot;355&quot; width=&quot;425&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/d1GCsl24Qt0&amp;amp;feature=youtube_gdata&quot;&gt; &lt;/param&gt;&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt; &lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/d1GCsl24Qt0&amp;amp;feature=youtube_gdata&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot; height=&quot;355&quot; width=&quot;425&quot;&gt; &lt;/embed&gt;   &lt;/object&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The Jungle Rockers &quot;Shake It&quot;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;zemanta-pixie&quot;&gt;&lt;img class=&quot;zemanta-pixie-img&quot; alt=&quot;&quot; src=&quot;http://img.zemanta.com/pixy.gif?x-id=40a821c2-eb9a-8347-ac85-538ea8994d56&quot; /&gt;&lt;/div&gt;</description><pubDate>Mon, 09 Nov 2009 20:07:21 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2009/11/09/The-Jungle-Rockers</guid><category>Music</category></item><item><title>Talking through some current issues with ColdFusion Event Gateways</title><link>http://daveshuck.instantspot.com/blog/2009/11/09/Talking-through-some-current-issues-with-ColdFusion-Event-Gateways</link><description>Normally on my blog I attempt to throw out some tip, trick, or nugget of some sort.&amp;nbsp; This time?&amp;nbsp; Not so!&amp;nbsp;&amp;nbsp; I am currently trying to find a solution to a problem at hand and am brainstorming the best way to handle a few things.&amp;nbsp; I am really just talking this out for my own benefit, but I would love to hear thoughts from others that have perhaps solved similar issues.&lt;br /&gt;&lt;br /&gt;On a project that I am currently engaged in I am leveraging ColdFusion Event Gateways which work as a subscriber to a SonicMQ JMS server.&amp;nbsp; My gateway instance listens for messages on the ESB (Enterprise Service Bus) on a particular destination name (topic/queue).&amp;nbsp; When it receives a message, it parses the XML that it received, and plays traffic cop pushing data into various services that need it.&amp;nbsp; I have this working flawlessly in my small development environment.&amp;nbsp; However, I have a couple of complexities ahead of me that I am having difficulty coming up with a good solution.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Running in the cloud - &lt;/b&gt;Our production environment will have any number of CF instances, not clustered, but rather running as isolated applications with a load balancer directing the requests using sticky sessions.&amp;nbsp; Our system will be bringing new instances on/off line as traffic traffic dictates.&amp;nbsp; I have yet to solve the issue of how to set up my JMS Event Gateway in this environment.&amp;nbsp; I definitely don&apos;t want 20 different listeners out there all doing the same work.&amp;nbsp; I have considered the idea of having some sort of a support database where a listener can insert a row with a specific JMS message ID and when any other server picks up a message with that ID it will see that it is already being acted upon and it can safely ignore it. There are a couple of negatives that I can see right off the bat.&amp;nbsp; First is that every single subscribed instance will have to pull in the same message and test to see whether or not it should be acted upon.&amp;nbsp; It just seems like a little bit of redundancy that shouldn&apos;t be there.&amp;nbsp; Secondly, there is a chance that two servers could pick up the same request within milliseconds of each other and both could end up doing the work.&amp;nbsp; Duplicate processing could not only be wasteful, but could also create some data integrity issues.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Different environments have different settings (dynamic config)&lt;/b&gt; - Right now in our development phase, we have a single config file with setting specific to our development JMS server (credentials, domain, URL, Initial Context Factory, etc).&amp;nbsp; However, soon I will need to have this process support a number of different environments: multiple dev environments, multiple integration environments, multiple QA environments, and eventually production.&amp;nbsp; Ideally it would be wonderful if I could find some way to load a specific config into the event gateway at server init time, but as of today I have _NO_ idea how to solve this one.&amp;nbsp; First, there is no real intrinsic indicator at the server level that lets it know what environment is currently running (yet anyway...) and secondly, ColdFusion event gateway architecture isn&apos;t conducive in any way to dynamically loading a specific config.&amp;nbsp; &lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;So now I am counting on you CFML community.&amp;nbsp; Help me brain storm on this!&amp;nbsp; Do you have any thoughts/ideas that might help me here?&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;zemanta-pixie&quot;&gt;&lt;img class=&quot;zemanta-pixie-img&quot; alt=&quot;&quot; src=&quot;http://img.zemanta.com/pixy.gif?x-id=acb39c0d-d2f4-8647-b4f4-44e30f8e673e&quot; /&gt;&lt;/div&gt;</description><pubDate>Mon, 09 Nov 2009 16:28:07 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2009/11/09/Talking-through-some-current-issues-with-ColdFusion-Event-Gateways</guid><category>ColdFusion,Technology,Java</category></item><item><title>A linux guy&apos;s experience with Windows 7</title><link>http://daveshuck.instantspot.com/blog/2009/10/19/A-linux-guys-experience-with-Windows-7</link><description>&lt;p&gt;Anyone who knows me well knows that I am typically somewhat of an anti-Windows guy. I absolutely love linux, and get very frustrated by Windows in general. The only thing that I really dislike about linux is the lack of application support by a number of companies (ahem&amp;hellip;. Adobe).&amp;nbsp; Before going to the Adobe MAX conference, I decided I should swap out OSes on my personal laptop so that I could run all the stuff I would need for labs without constantly cursing about being stuck in a VM, limited functionality, etc.&amp;nbsp; A friend had just bought a package of Windows 7 licenses and sold me one for 5 bucks, which I considered to be a pretty reasonable risk.&amp;nbsp; I opted for installing Windows 7 on my laptop.&lt;br /&gt; &lt;br /&gt; Given that background and my previous feelings about Windows, I have to say that it is a pretty dang nice operating system.&amp;nbsp; It is by far the best offering to date by MS in my opinion.&amp;nbsp; There are a few things that they still haven&apos;t managed to get right (native file copy still makes me want to stick forks in my eyes), but by and large they have done a great job with Windows 7.&amp;nbsp; Other than having to track down a few drivers for my laptop, the installation was painless &amp;ndash; if not fast.&amp;nbsp; This is still an area that linux, and especially Ubuntu, wins hands down though.&amp;nbsp; Apps run extremely stable, and with the addition of a new concept of &amp;quot;Libraries&amp;quot;, directories that I need access to regularly are right at hand instead of having to tree down through big hierarchies.&amp;nbsp; I am also not finding what I expected would be an immediate degradation of performance after installing all the servers and development tools that I use on a daily basis.&amp;nbsp; Over all, so far so good.&lt;br /&gt; &lt;br /&gt; &lt;strong&gt;A few things that I think are a *must* for the way that I use it. &lt;/strong&gt;&lt;/p&gt; &lt;ul&gt;     &lt;li&gt;I found a &amp;quot;sudo&amp;quot; program called &lt;a href=&quot;http://brandontools.com/content/StartPlusPlus.aspx&quot;&gt;Start++&lt;/a&gt; that allows me to open applications from the terminal or start menu as Administrator by typing &lt;strong&gt;sudo notepad&lt;/strong&gt; [or some other program].&amp;nbsp; It will prompt you for the UAC stuff and the program will open as administrator.&amp;nbsp; I use this regularly for editing system files like hosts, apache configs, and use it to open a terminal to fire off j2ee servers.&amp;nbsp;&lt;/li&gt;     &lt;li&gt;Install &lt;a href=&quot;http://www.codesector.com/teracopy.php&quot;&gt;Teracopy&lt;/a&gt; which is a replacement for the Windows copy program.&amp;nbsp; While certainly not as fast/efficient as a linux terminal, it greatly increases file copy speed over the native windows GUI file copy.&amp;nbsp; No more &amp;quot;preparing to copy&amp;quot; waits while your system bogs down.&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;&lt;strong&gt;Things that annoy me&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt;     &lt;li&gt;I still wish I could have a real terminal and be able to use VI in sudo, but that is just something I will have to get over I guess.&lt;/li&gt;     &lt;li&gt;I hate that I now have to be so careful with regard to viruses and spyware.&amp;nbsp; I love the protection that linux offers in that area, and having to go out of my to stay protected seems a bit cumbersome.&lt;/li&gt;     &lt;li&gt;I miss being able to easily try out software with the ease of the synaptic package manager.&amp;nbsp; It seems foreign now to have to download an exe run an installer and have settings being obscurely written all over a &amp;quot;black box&amp;quot; registry.&lt;/li&gt;     &lt;li&gt;I miss built-in networking tools.&amp;nbsp; Even simply things like being able to run &amp;quot;whois&amp;quot; from the teminal.&lt;/li&gt;     &lt;li&gt;My drive is getting fragmented far faster than with linux, and I find that I am running the defrag tool fairly often.&amp;nbsp; Linux just manages this under the covers and I never have to worry about it.&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;All said, after using it for about the past 4 weeks, I can honestly say that I am surprised (and perhaps even a bit disappointed) that I like it as much as I do.&amp;nbsp; I planned on just running it while I was at the Adobe MAX conference and going back to linux when I got home, but it looks like I will be keeping it for a while longer.&lt;/p&gt; &lt;div class=&quot;zemanta-pixie&quot;&gt;&lt;img src=&quot;http://img.zemanta.com/pixy.gif?x-id=8f740e60-f3eb-8f02-a041-715c13c72d2d&quot; alt=&quot;&quot; class=&quot;zemanta-pixie-img&quot; /&gt;&lt;/div&gt;</description><pubDate>Mon, 19 Oct 2009 13:58:00 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2009/10/19/A-linux-guys-experience-with-Windows-7</guid><category>Windows,Technology,Linux</category></item><item><title>Strange behavior with ColdFusion ExpandPath() when using Symbolic Links</title><link>http://daveshuck.instantspot.com/blog/2009/09/23/Strange-behavior-with-ColdFusion-ExpandPath-when-using-Symbolic-Links</link><description>&lt;p&gt;I was playing around with the Quicksilver framework last night, and for some reason it was unable to find and instantiate my CFCs properly.&amp;nbsp; After digging into the framework a bit and determining where it was breaking, I discovered something strange about the way that ColdFusion interprets ExpandPath() when it exists in a directory that is defined as a symbolic link.&amp;nbsp; I am not sure if the same behavior exists on Macs, but I would imagine it does.&amp;nbsp; If someone could confirm that to be the case, I would be interested.&lt;br /&gt; &lt;br /&gt; For starters, I usually have a &apos;www&apos; directory in my user home directory. This way when I pass my user profile around from distro to distro, my development work is included in my home directory.&amp;nbsp; For ease of configuration I typically have a symbolic link in my OS that points &lt;strong&gt;/www/&lt;/strong&gt; ---&amp;gt; &lt;strong&gt;/home/dshuck/www/&lt;/strong&gt;.&amp;nbsp; Then when I am creating a new web project called &apos;davescode&apos;, I would put it in &lt;strong&gt;/home/dshuck/www/davescode&lt;/strong&gt;, but my Apache config would usually point to &lt;strong&gt;/www/davescode&lt;/strong&gt;.&amp;nbsp; For the past several years, this approach has worked will for me.&amp;nbsp; That is until last night when experimenting with Quicksilver.&amp;nbsp; &lt;br /&gt; &lt;br /&gt; When Quicksilver loads, it creates a list of service CFCs in the the application in such a way that if I had Foo.cfc in a directory &lt;strong&gt;&apos;com&apos; &lt;/strong&gt;in the root of my davescode site, it would look like &lt;strong&gt;/home/dshuck/www/davescode/com/Foo.cfc&lt;/strong&gt;.&amp;nbsp; When I initted the application, I was getting an error that&amp;nbsp; it couldn&apos;t find the CFC &lt;strong&gt;home/dshuckcom/Foo.cfc&lt;/strong&gt;.&amp;nbsp; Essentially what was happening is that it was getting the full path of the CFC and replacing the path to the root of the site with &amp;quot;&amp;quot;.&amp;nbsp; In a perfect world the value of the path after the string replace would have looked like &lt;strong&gt;com/Foo.cfc.&amp;nbsp; &lt;/strong&gt;Unfortunately that was not so.&amp;nbsp; Here&apos;s why!&lt;br /&gt; &lt;br /&gt; I put a test file called path.cfm in the root of my davescode site that considted of the following:&lt;br /&gt; &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;cfoutput&amp;gt;#ExpandPath(&amp;quot;./&amp;quot;)#&amp;lt;/cfoutput&amp;gt; &amp;lt;br/&amp;gt; &amp;lt;cfoutput&amp;gt;#ExpandPath(&amp;quot;/&amp;quot;)#&amp;lt;/cfoutput&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt; &lt;br /&gt; The result was &lt;em&gt;very&lt;/em&gt; surprising!&lt;br /&gt; &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;/home/dshuck/www/davescode/ /www/davescode/&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt; &lt;br /&gt; For some reason when you do ExpandPath(&amp;quot;/&amp;quot;) it looks at the symbolic link path, but when you do ExpandPath(&amp;quot;./&amp;quot;), it looks at the true file path.&amp;nbsp; For the life of me, I can&apos;t think of why that would be.&amp;nbsp; If anyone has an explanation, I would be all ears!&lt;/p&gt; &lt;div class=&quot;zemanta-pixie&quot;&gt;&lt;img class=&quot;zemanta-pixie-img&quot; alt=&quot;&quot; src=&quot;http://img.zemanta.com/pixy.gif?x-id=49729c7f-e4fe-8ce3-a08f-2bd5d5e173f3&quot; /&gt;&lt;/div&gt;</description><pubDate>Wed, 23 Sep 2009 14:11:00 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2009/09/23/Strange-behavior-with-ColdFusion-ExpandPath-when-using-Symbolic-Links</guid><category>ColdFusion,Technology,Linux</category></item><item><title>Photos from the Dallas Adobe User Group Tour event</title><link>http://daveshuck.instantspot.com/blog/2009/06/29/Photos-from-the-Dallas-Adobe-User-Group-Tour-event</link><description>&lt;p&gt;We had a great time Friday night with around 170 in attendance!  Terry did a great job and everyone left hungry for the new releases that he teased.  Here are some pics from the night.&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;&lt;object width=&quot;400&quot; height=&quot;300&quot;&gt; &lt;param value=&quot;offsite=true&amp;lang=en-us&amp;page_show_url=%2Fphotos%2Fdaveshuck%2Fsets%2F72157620588183099%2Fshow%2F&amp;page_show_back_url=%2Fphotos%2Fdaveshuck%2Fsets%2F72157620588183099%2F&amp;set_id=72157620588183099&amp;jump_to=&quot; name=&quot;flashvars&quot; /&gt; &lt;param value=&quot;http://www.flickr.com/apps/slideshow/show.swf?v=71649&quot; name=&quot;movie&quot; /&gt; &lt;param value=&quot;true&quot; name=&quot;allowFullScreen&quot; /&gt;&lt;embed width=&quot;400&quot; height=&quot;300&quot; flashvars=&quot;offsite=true&amp;lang=en-us&amp;page_show_url=%2Fphotos%2Fdaveshuck%2Fsets%2F72157620588183099%2Fshow%2F&amp;page_show_back_url=%2Fphotos%2Fdaveshuck%2Fsets%2F72157620588183099%2F&amp;set_id=72157620588183099&amp;jump_to=&quot; allowfullscreen=&quot;true&quot; src=&quot;http://www.flickr.com/apps/slideshow/show.swf?v=71649&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;</description><pubDate>Mon, 29 Jun 2009 21:13:00 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2009/06/29/Photos-from-the-Dallas-Adobe-User-Group-Tour-event</guid><category>InstantSpot,Tips and Tricks</category></item><item><title>Solving java.lang.SecurityException: Seed must be between 20 and 64 bytes. Only 8 bytes supplied.</title><link>http://daveshuck.instantspot.com/blog/2009/05/08/Solving-javalangSecurityException-Seed-must-be-between-20-and-64-bytes-Only-8-bytes-supplied</link><description>&lt;p&gt;Recently I have began working with JMS and ColdFusion, in which we are building a system that subscribes to an enterprise JMS server and picks up messages relevant to its needs and acts on them. I had my proof of concept working with the open source Apache ActiveMQ server and was very pleased with the results.&amp;nbsp; However, in our production environment, the powers that be decided to use the very non-free SonicMQ server.&lt;/p&gt; &lt;p&gt;As I tried to convert the event gateway over to the SonicMQ server, it failed on initialization with the following exception:&amp;nbsp; &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;javax.naming.NamingException [Root exception is java.lang.SecurityException: Seed must be between 20 and 64 bytes. Only 8 bytes supplied.]  at com.sonicsw.jndi.mfcontext.MFConnectionManager.connect(Unknown Source)  at com.sonicsw.jndi.mfcontext.MFConnectionManager.&amp;lt;init&amp;gt;(Unknown Source)  at com.sonicsw.jndi.mfcontext.MFConnectionManager.getManager(Unknown Source)  at com.sonicsw.jndi.mfcontext.MFContext.&amp;lt;init&amp;gt;(Unknown Source)  at com.sonicsw.jndi.mfcontext.MFContextFactory.getInitialContext(Unknown Source)  at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)  at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)  at javax.naming.InitialContext.init(InitialContext.java:223)  at javax.naming.InitialContext.&amp;lt;init&amp;gt;(InitialContext.java:197)  at examples.JMS.JMSConsumer.start(Unknown Source)  at examples.JMS.JMSGateway.startGateway(Unknown Source)  at coldfusion.eventgateway.GenericGateway.start(GenericGateway.java:118)  at coldfusion.eventgateway.EventServiceImpl$GatewayStarter.run(EventServiceImpl.java:1428)&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt; &lt;p&gt;In my research on this problem, I found several people reporting similar errors, each on CF8, and each talking to 3rd party tools.&amp;nbsp; Eventually I found the solution through an email discussion between one of the developers in my company and an Adobe developer.&amp;nbsp; Apparently in CF8, they added FIPS security, which disables the Sun JCE (encryption libraries).&amp;nbsp; To solve this error, you need to add the following line to your java.args in your jvm.config file in JRun.&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;-Dcoldfusion.disablejsafe=true&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt; &lt;p&gt;Now restart your server and try again!&lt;/p&gt;</description><pubDate>Fri, 08 May 2009 14:24:00 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2009/05/08/Solving-javalangSecurityException-Seed-must-be-between-20-and-64-bytes-Only-8-bytes-supplied</guid><category>ColdFusion,Java</category></item><item><title>Making your application flow obvious in Mach-II with event-mappings</title><link>http://daveshuck.instantspot.com/blog/2009/04/11/Making-your-application-flow-obvious-in-MachII-with-eventmappings</link><description>&lt;p&gt;I recently joined a company that makes use of Mach-II in a few applications.&amp;nbsp; Some of them were created as the developers were learning the framework and employ some obvious un-best practices.&amp;nbsp;&amp;nbsp; The team is made up of people from various skill levels, but I have noticed that about half of the team just absolutely cringes when they hear &amp;quot;Mach-II&amp;quot;.&amp;nbsp; They talk about how difficult it is to troubleshoot and how it is next to impossible to follow application flow.&amp;nbsp;&amp;nbsp; I was very surprised to hear that response, because I think one of the big benefits of using Mach-II is that I can look at a config XML and read the story of my application.&amp;nbsp;&amp;nbsp; I will touch on this in more detail in a bit.&lt;br /&gt; &lt;br /&gt; So the other day I had my first experience digging in deeply into one of they apps to solve a problem... and it took me &lt;em&gt;&lt;strong&gt;forever&lt;/strong&gt;&lt;/em&gt; to figure out where the hell anything was.&amp;nbsp; I started on the default home event, which only had a filter that announced other events, that had listeners that announced other events and so on until I was *&lt;em&gt;&lt;strong&gt;EIGHT&lt;/strong&gt;&lt;/em&gt;* events deep.&amp;nbsp; In each one of these announcements, I had to go find the listener/filter, look into the methods, and search for where I might be going next.&amp;nbsp; It suddenly became overtly clear why the other developers hate Mach-II.&lt;br /&gt; &lt;br /&gt; Now, back to why my config files tell a story... first of all, I can&apos;t think of many cases where an app needs to announce 8 events before it gets to a destination.&amp;nbsp; However, troubleshooting this would have been so much simpler if only the developer had been clear in the XML using event-mappings.&amp;nbsp; As a rule, if I ever alter the flow of my application from within a filter/listener, I &lt;em&gt;&lt;strong&gt;always&lt;/strong&gt;&lt;/em&gt; have an event-mapping that shows this in my config.&amp;nbsp; That way I can quickly skim the XML and know what possible exits I have.&amp;nbsp; In most cases, it should be pretty obvious where you are going based on that alone,&amp;nbsp; and you don&apos;t even need to open the CFCs to figure it out.&amp;nbsp; Although I certainly do use event-mapping for aliases, more often than not they will look like this:&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;event-mapping event=&amp;quot;SomeEvent&amp;quot; mapping=&amp;quot;SomeEvent&amp;quot; /&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt; &lt;p&gt;It serves no actual functinal purpose other acting as a means to document the flow. Does anyone else use the practice?&amp;nbsp; How do you keep the application flow obvious in your configuration files?&amp;nbsp;&lt;/p&gt; &lt;p&gt;I was talking to &lt;a href=&quot;http://www.aaronjlynch.com&quot;&gt;Aaron Lynch&lt;/a&gt; about this (who uses the same practice) and from that conversation I decided I would open this up for conversation.&amp;nbsp; What I would love to see is some type of optional setting in Mach-II that would enforce this so that all developer on a team had to use this methodology.&amp;nbsp;&amp;nbsp; Maybe something along the lines where when an event is announced from within a CFC and it hasn&apos;t been mapped in the XML it would barf up an exception?&amp;nbsp;&lt;/p&gt; &lt;p&gt;I have no doubt that some people will hate this idea.&amp;nbsp; However, in the bigger picture I would like to see less people hating frameworks, and if we can make things more clear from a troubleshooting/maintanence perspective, I think that there would be less FUD!&lt;/p&gt; &lt;p&gt;Any thoughts on this?&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt;</description><pubDate>Sat, 11 Apr 2009 18:46:00 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2009/04/11/Making-your-application-flow-obvious-in-MachII-with-eventmappings</guid><category>ColdFusion</category></item><item><title>How to set JAVA_HOME environment variable in Ubuntu </title><link>http://daveshuck.instantspot.com/blog/2009/03/20/How-to-set-JAVAHOME-environment-variable-in-Ubuntu-</link><description>&lt;p&gt;I am actually creating this blog entry as a bookmark for myself, but since I know that I never remember how to do it, others might benefit as well!&lt;/p&gt; &lt;p&gt;One way that you can set your JAVA_HOME variable and add to your PATH, is be doing the folowing.&amp;nbsp; As &apos;sudo&apos; open up &lt;strong&gt;/etc/bash.bashrc&lt;/strong&gt; and add the following to the end of the file.&amp;nbsp; NOTE: Set the java path to whatever the actual path is on your environment if it does not match &lt;strong&gt;/usr/lib/jvm/java&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;JAVA_HOME=/usr/lib/jvm/java export JAVA_HOME PATH=$PATH:$JAVA_HOME/bin export PATH&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt; &lt;p&gt;When you reboot, try running the following:&lt;/p&gt; &lt;p&gt;&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;$ echo $JAVA_HOME /usr/lib/jvm/java  echo $PATH [probably lots of paths]:/usr/lib/jvm/java/bin  &lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;</description><pubDate>Sat, 21 Mar 2009 01:02:00 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2009/03/20/How-to-set-JAVAHOME-environment-variable-in-Ubuntu-</guid><category>Ubuntu,Tips and Tricks</category></item><item><title>Interfaces in ColdFusion - I think I have finally come around on CFINTERFACE</title><link>http://daveshuck.instantspot.com/blog/2009/03/06/Interfaces-in-ColdFusion--I-think-I-have-finally-come-around-on-CFINTERFACE</link><description>&lt;p&gt;I will admit it...&lt;br /&gt; &lt;br /&gt; When all the pre-ColdFusion 8 debate was swirling about whether or not to add interfaces into CFML, I didn&apos;t really get it.&amp;nbsp; It&apos;s true.&amp;nbsp; The only OOP I had ever really done was in CFML, ever having experienced how interfaces really come into play, and I think I fell into the the easy path of considering it worthless because I didn&apos;t take the time to understand it.&amp;nbsp; So very quietly, I was in the &amp;quot;we don&apos;t need it!&amp;quot; camp.&lt;br /&gt; &lt;br /&gt; Much has changed for me as a developer since that time.&amp;nbsp; I have gotten quite comfortable in Flex development, and working with Flex made me realize that Java is not really all that difficult to grasp for me now, and I am pretty comfortable getting around there too.&amp;nbsp; I have begun playing a bit with Groovy as well, so I have been exposed to much more since there actually *was* a debate about interfaces.&lt;br /&gt; &lt;br /&gt; So now that debate has long since died, and the pro-interface crowd won&amp;nbsp; - and then immediately decided that they didn&apos;t actually need interfaces after all - I realized yesterday that I finally get it!&lt;br /&gt; &lt;br /&gt; Before I go any further, I would like to give my definition of an interface, because I am sure there are still plenty of CF developers who are where I was just a short time ago with just a very loose grasp, if any, on the concept.&amp;nbsp; In fact, I am not sure that I am much beyond a loose grasp, but I will do my best to explain.&amp;nbsp; For those who already know all this, just bear with me here.&lt;br /&gt; &lt;br /&gt; In talking about interfaces with another developer on my team yesterday he asked how they are used.&amp;nbsp; Half joking, I replied &amp;quot;They aren&apos;t!&amp;nbsp; They don&apos;t *do* anything at all&amp;quot;.&amp;nbsp; What I meant by this is that you don&apos;t ever actually call an interface and your application never actually asks an interface to do anything.&amp;nbsp; The interface exists simply to enfore rules in your data model.&amp;nbsp; In essence it is a zero-tolerance &amp;quot;Object Gestapo&amp;quot; that makes sure that no one ever gets out of line.&amp;nbsp; An interface is truly little more than a contract that says &amp;quot;Any object that implements me must contain the things I define&amp;quot;.&amp;nbsp; In essence, I suppose you could think of it as a shell CFC that defines methods, arguments, and return types, that you can&apos;t actually call.&amp;nbsp; If I then define a CFC that implements that interface, it better damn well adhere to it strictly or the object gestapo comes down on you hard!&lt;br /&gt; &lt;br /&gt; So why this extra work right?&amp;nbsp; CF is a loosely typed language. Its status as an OOP language has been debated.&amp;nbsp; However, the fact of the matter is that most of the top slice of CFML developers are writing some really amazing object oriented applications.&amp;nbsp; Due to this, some of the more strict products from languages like Java might actually have some place in our work.&lt;br /&gt; &lt;br /&gt; Let me give a real world solution that might help solidify my swirling thoughts on the matter.&amp;nbsp; to give background on the environment I am working in, I recently began working for a relatively large insurance provider.&amp;nbsp;&amp;nbsp; Counting another 17 developers that are just being moved into ColdFusion from other languages, we have one of the larger ColdFusion development groups that I am aware of in my area.&amp;nbsp; Many of the developers work remotely, and we have several that are in other states.&amp;nbsp; Due to this, communication must be clear to keep everyone on the same page.&lt;br /&gt; &lt;br /&gt; A current project that is in the works is to move our entire policy system off of one third-party vendor to another. The APIs between the two are vastly different, however, we still need the same data available to us in our applications.&amp;nbsp; To make things more complicated, we will be moving one state at a time.&amp;nbsp; So effectively there will be two distinctly different policy systems in play until the last state is converted.&lt;br /&gt; &lt;br /&gt; My architectural approach to solving that problem is to use a PolicySystemFactory that returns the appropriate PolicySystem to me based on specific business rules.&amp;nbsp; Any PolicySystem will actually serve as an adapter to the specific API of its third-party system, but the methods that the PolicySystem object exposes to the application&amp;nbsp; *must* be consistent.&amp;nbsp; The application shouldn&apos;t really care which system it is talking to as long as the system is giving it the right data and doing taking the right action on data that is passed in.&lt;br /&gt; &lt;br /&gt; How do we ensure that we have the exact same API for not only the two current policy systems, but any future policy systems that we don&apos;t even know about yet?&amp;nbsp; &lt;br /&gt; &lt;br /&gt; Well, we could just make sure all developers know about it, and write it in some document hundreds of pages long that no one ever reads.&amp;nbsp; Then after both of those things fail, the developers will eventually figure it out as the application pukes in different areas as it is getting data in different shapes than it is expecting, or as it tries to use methods differently than the PolicySystem is expecting.&amp;nbsp; Eventually they will work this out.&lt;br /&gt; &lt;br /&gt; Or... You could do both of the above items (communicate &amp;amp; document) and save everyone a lot of trouble by establishing that any PolicySystem *must* adhere to rules established in an interface.&amp;nbsp; By taking this approach, there is no question whatsoever that the PolicySystem will not break your application by working differently than expected.&lt;br /&gt; &lt;br /&gt; How do you implement this approach? (really.. I didn&apos;t mean it as a pun)&lt;br /&gt; &lt;br /&gt; First, we would want to figure out exactly how a PolicySystem should be shaped.&amp;nbsp; In our ultra-simplified example, a PolicySystem must have three methods: &lt;strong&gt;getPolicy(id)&lt;/strong&gt; returning a Policy object, &lt;strong&gt;getPolicyAgent(Policy) &lt;/strong&gt;returning and Agent object, and &lt;strong&gt;getPoliciesByStatus(StatusId)&lt;/strong&gt; returning a structure of Policy objects&lt;br /&gt; &lt;br /&gt; This is what our Interface would look like:&lt;br /&gt; &lt;br /&gt; PolicySystemInterface.cfc&lt;br /&gt; &lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;cfinterface&amp;gt;   &amp;lt;cffunction name=&amp;quot;getPolicy&amp;quot; access=&amp;quot;public&amp;quot; output=&amp;quot;false&amp;quot; returntype=&amp;quot;Policy&amp;quot;&amp;gt;  &amp;lt;cfargument name=&amp;quot;id&amp;quot; type=&amp;quot;numeric&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt; &amp;lt;/cffunction&amp;gt;   &amp;lt;cffunction name=&amp;quot;getPolicyAgent&amp;quot; access=&amp;quot;public&amp;quot; output=&amp;quot;false&amp;quot; returntype=&amp;quot;Agent&amp;quot;&amp;gt;  &amp;lt;cfargument name=&amp;quot;Policy&amp;quot; type=&amp;quot;Policy&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt; &amp;lt;/cffunction&amp;gt;   &amp;lt;cffunction name=&amp;quot;getPoliciesByStatus&amp;quot; access=&amp;quot;public&amp;quot; output=&amp;quot;false&amp;quot; returntype=&amp;quot;Policy{}&amp;quot;&amp;gt;  &amp;lt;cfargument name=&amp;quot;StatusId&amp;quot; type=&amp;quot;numeric&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt; &amp;lt;/cffunction&amp;gt;   &amp;lt;/cfinterface&amp;gt; &lt;/pre&gt;&lt;/div&gt;&lt;br /&gt; &lt;br /&gt; As you can see above, we use the &amp;lt;cfinterface /&amp;gt; tag to define this CFC as an interface.&amp;nbsp; We then write our functions much like we would in a &amp;lt;cfcomponent /&amp;gt; keeping in mind that whatever we define must be used *exactly* the same way by any object that implements it.&amp;nbsp; So what would one of those objects look like?&amp;nbsp; Here is our old legacy policy system object.&amp;nbsp; Take a look at what is going on in line #1 in the &amp;lt;cfcomponent /&amp;gt; tag.&lt;br /&gt; &lt;br /&gt; &lt;/span&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;OldLegacyPolicySystem.cfc&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;cfcomponent name=&amp;quot;OldLegacyPolicySystem&amp;quot; output=&amp;quot;false&amp;quot; extends=&amp;quot;AbstractPolicySystem&amp;quot; implements=&amp;quot;PolicySystemInterface&amp;quot;&amp;gt;  &amp;lt;cffunction name=&amp;quot;init&amp;quot; access=&amp;quot;public&amp;quot; output=&amp;quot;false&amp;quot; returntype=&amp;quot;AbstractPolicySystem&amp;quot;&amp;gt;  &amp;lt;cfreturn super.init(&amp;quot;OldLegacyPolicySystem&amp;quot;) /&amp;gt; &amp;lt;/cffunction&amp;gt;  &amp;lt;cffunction name=&amp;quot;getPolicy&amp;quot; access=&amp;quot;public&amp;quot; output=&amp;quot;false&amp;quot; returntype=&amp;quot;Policy&amp;quot;&amp;gt;  &amp;lt;cfargument name=&amp;quot;id&amp;quot; type=&amp;quot;numeric&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;  &amp;lt;!--- NOTE - In real life, we would use a service to create this bean, not instantiate it here!!! ---&amp;gt;  &amp;lt;cfset var Policy = CreateObject(&amp;quot;component&amp;quot;,&amp;quot;Policy&amp;quot;).init() /&amp;gt;    &amp;lt;!---   ########################################  In this area we would access policy info using the OldLegacyPolicySystem (however it does it!) and populate the Policy bean   ########################################  ---&amp;gt;    &amp;lt;cfreturn Policy/&amp;gt; &amp;lt;/cffunction&amp;gt;  &amp;lt;cffunction name=&amp;quot;getPolicyAgent&amp;quot; access=&amp;quot;public&amp;quot; output=&amp;quot;false&amp;quot; returntype=&amp;quot;Agent&amp;quot;&amp;gt;  &amp;lt;cfargument name=&amp;quot;Policy&amp;quot; type=&amp;quot;Policy&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;  &amp;lt;!--- NOTE - In real life, we would use a service to create this bean, not instantiate it here!!! ---&amp;gt;  &amp;lt;cfset var Agent = CreateObject(&amp;quot;component&amp;quot;,&amp;quot;Agent&amp;quot;).init(arguments.Policy) /&amp;gt;    &amp;lt;!---   ########################################  In this area we would access Agent info using the OldLegacyPolicySystem and populate the Agent bean   ########################################  ---&amp;gt;    &amp;lt;cfreturn Policy/&amp;gt; &amp;lt;/cffunction&amp;gt;  &amp;lt;cffunction name=&amp;quot;getPoliciesByStatus&amp;quot; access=&amp;quot;public&amp;quot; output=&amp;quot;false&amp;quot; returntype=&amp;quot;Policy{}&amp;quot;&amp;gt;  &amp;lt;cfargument name=&amp;quot;StatusId&amp;quot; type=&amp;quot;numeric&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;  &amp;lt;cfset var PolicyStruct = {} /&amp;gt;  &amp;lt;!---   ########################################  In this area we would load Policies using the OldLegacyPolicySystem and build a structure of them   ########################################  ---&amp;gt;   &amp;lt;cfreturn PolicyStruct /&amp;gt; &amp;lt;/cffunction&amp;gt; &amp;lt;/cfcomponent&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt; &lt;br /&gt; You should notice that we have: &lt;strong&gt;&lt;br /&gt; &amp;nbsp;extends=&amp;quot;AbstractPolicySystem&amp;quot; implements=&amp;quot;PolicySystemInterface&amp;quot;&lt;br /&gt; &lt;br /&gt; &lt;/strong&gt;Two things are happening there.&amp;nbsp; First, we are extending an AbstractPolicySystem object that will hold common functionality among all PolicySystems.&amp;nbsp;&amp;nbsp; Ours looks like this: &lt;br /&gt; &lt;/span&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;cfcomponent output=&amp;quot;false&amp;quot;&amp;gt; &amp;lt;cffunction name=&amp;quot;init&amp;quot; access=&amp;quot;public&amp;quot; output=&amp;quot;false&amp;quot; returntype=&amp;quot;AbstractPolicySystem&amp;quot;&amp;gt;  &amp;lt;cfargument name=&amp;quot;SystemName&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;  &amp;lt;cfset this.SystemName = arguments.SystemName /&amp;gt;  &amp;lt;cfreturn this /&amp;gt; &amp;lt;/cffunction&amp;gt; &amp;lt;/cfcomponent&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt; &lt;br /&gt; For our test case, when we instantiate our PolicySystem we can quickly prove which one we are dealing with by looking at &lt;strong&gt;PolicySystem.SystemName&lt;/strong&gt;.&amp;nbsp; That said, your application shouldn&apos;t know or care.&lt;br /&gt; &lt;/span&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;br /&gt; &lt;strong&gt;&lt;br /&gt; &lt;/strong&gt;By adding the &lt;strong&gt;implements&lt;/strong&gt; attribute we are ensuring that this PolicySystem plays by the rules we defined in our PolicySystemInterface.&amp;nbsp; No &amp;quot;ifs&amp;quot; &amp;quot;ands&amp;quot; or &amp;quot;but&amp;quot;s!&lt;br /&gt; &lt;br /&gt; So, this is the exercise that brought me around on CFINTERFACE.&amp;nbsp; What are your thoughts?&amp;nbsp; &lt;br /&gt; &lt;/span&gt;&lt;/p&gt; &lt;div class=&quot;zemanta-pixie&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;zemanta-pixie-img&quot; src=&quot;http://img.zemanta.com/pixy.gif?x-id=04bb3470-2447-4c55-8b9b-205bd6c4cecd&quot; /&gt;&lt;/div&gt;</description><pubDate>Fri, 06 Mar 2009 17:03:00 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2009/03/06/Interfaces-in-ColdFusion--I-think-I-have-finally-come-around-on-CFINTERFACE</guid><category>ColdFusion</category></item><item><title>Setting up Apache, OpenBD, Railo and ColdFusion - Part 4 - Installing Railo under Tomcat with Apache webserver</title><link>http://daveshuck.instantspot.com/blog/2009/02/09/Setting-up-Apache-OpenBD-Railo-and-ColdFusion--Part-4--Installing-Railo-under-Tomcat-with-Apache-webserver</link><description>&lt;p&gt;This is Part 4 in an ongoing series demonstrating how to install OpenBlueDragon, ColdFusion, and Railo concurrently with all requests passing through the Apache webserver.&amp;nbsp; You will find links to all parts of this series at the bottom under &amp;quot;Related Content&amp;quot;&lt;br /&gt; &lt;br /&gt; In this post we will be building upon our existing environment in which we installed Apache webserver, Tomcat 6, OpenBlueDragon, and ColdFusion, by adding Railo to the mix.&amp;nbsp; If you have been following along thus far, we are well past the hard stuff at this point.&amp;nbsp; To install Railo, which is deployed as a java war file, we are going to repeat and slightly modify many of the steps that we took at the end of Part 2 when we installed OpenBD as a Tomcat web application.&lt;br /&gt; &lt;br /&gt; Let&apos;s start by setting up our hosts entry so that our new site resolves to localhost.railo, and set up the Apache webserver to listen for the request.&amp;nbsp; Open up /etc/hosts, and append &apos;localhost.railo&apos; (without quotes!) to the line that begins with 127.0.0.1.&amp;nbsp;&amp;nbsp; Next we want to create a new virtual host file for the site under Apache.&amp;nbsp; Do so like this:&lt;br /&gt; &lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;$ cd /etc/apache2/sites-available   sudo gedit localhost.railo&lt;/pre&gt;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; Paste the following into that new file and save it.&lt;br /&gt; &lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;VirtualHost *&amp;gt;  ServerName localhost.railo  JKMount /* worker1 &amp;lt;/VirtualHost&amp;gt; &lt;/pre&gt;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; As we learned in Part 2, the line &amp;quot;JKMount /* worker1&amp;quot; is instructing apache to pass everything to the worker we defined in /etc/apache2/workers.properties.&amp;nbsp; That worker will then pass the request on to Tomcat port 8009, under which our application actually resides.&lt;br /&gt; &lt;br /&gt; Now that we have defined this site, we want to make sure that it gets included on our next Apache restart.&amp;nbsp; We do this by running the following:&lt;br /&gt; &lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;$ sudo a2ensite localhost.railo  Site localhost.railo installed; run /etc/init.d/apache2 reload to enable. &lt;/pre&gt;&lt;/div&gt;&lt;br /&gt; &lt;br /&gt; At this point, we need to make sure there is a an application set up in Tomcat to receive our request.&amp;nbsp; First, let&apos;s start by downloading&lt;/span&gt;the free Railo Server from &lt;a href=&quot;http://railo.ch/en/index.cfm?treeID=224&quot; target=&quot;_blank&quot;&gt;their download page&lt;/a&gt;.&amp;nbsp; Look toward the bottom of the page and download&amp;nbsp; &amp;quot;Railo Custom&amp;quot; and download railo-3.0.2.001.war. (or newer version if it is there).&amp;nbsp; Once we have the file downloaded, we will create a new directory for our application under Tomcat.&amp;nbsp; We will then copy the Railo war file into it from our download directory.&amp;nbsp; When we have the war file under /opt/tomcat6/webappas/localhost.railo/ we will extract it, and then safely delete the war file itself.&amp;nbsp; These steps can be seen here:&lt;br /&gt; &lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;$ sudo /opt/tomcat6/webapps/localhost.railo  sudo cp railo-3.0.2.001.war /opt/tomcat6/webapps/localhost.railo/  cd /opt/tomcat6/webapps/localhost.railo  sudo jar xvf railo-3.0.2.001.war   sudo rm railo-3.0.2.001.war&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt; &lt;br /&gt; Since we now have the application in place, it is time to modify the Tomcat server config so that it knows to send the appropriate requests to it.&amp;nbsp; Do the following:&lt;br /&gt; &lt;/span&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;$ sudo gedit /opt/tomcat6/conf/server.xml&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt; &lt;br /&gt; Look for the section that we added previously for our OpenBlueDragon localhost site &amp;quot;localhost.bd&amp;quot;.&amp;nbsp; We are going to copy that section, modifying the &amp;quot;name&amp;quot; and &amp;quot;docBase&amp;quot; attributes to match our new application and paste it just below the localhost.bd site.&amp;nbsp; When you are done they should look like this:&lt;br /&gt; &lt;/span&gt;&lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;Host name=&amp;quot;localhost.bd&amp;quot;  appBase=&amp;quot;webapps&amp;quot; unpackWARs=&amp;quot;true&amp;quot;   autoDeploy=&amp;quot;true&amp;quot; xmlValidation=&amp;quot;true&amp;quot; xmlNamespaceAware=&amp;quot;false&amp;quot;&amp;gt;   &amp;lt;Context path=&amp;quot;&amp;quot; docBase=&amp;quot;localhost.bd/&amp;quot; reloadable=&amp;quot;true&amp;quot; privileged=&amp;quot;true&amp;quot; antiResourceLocking=&amp;quot;false&amp;quot; anitJARLocking=&amp;quot;false&amp;quot; /&amp;gt; &amp;lt;/Host&amp;gt;  &amp;lt;Host name=&amp;quot;localhost.railo&amp;quot;  appBase=&amp;quot;webapps&amp;quot;  unpackWARs=&amp;quot;true&amp;quot;   autoDeploy=&amp;quot;true&amp;quot; xmlValidation=&amp;quot;true&amp;quot; xmlNamespaceAware=&amp;quot;false&amp;quot;&amp;gt;   &amp;lt;Context path=&amp;quot;&amp;quot; docBase=&amp;quot;localhost.railo/&amp;quot; reloadable=&amp;quot;true&amp;quot; privileged=&amp;quot;true&amp;quot; antiResourceLocking=&amp;quot;false&amp;quot; anitJARLocking=&amp;quot;false&amp;quot; /&amp;gt; &amp;lt;/Host&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;br /&gt; With all that done, we are ready to restart (or start) Apache, Tomcat and our new Railo site will be available at http://localhost.railo&lt;br /&gt; &lt;br /&gt; So with our original goal of being able to run the three CFML engines, it&apos;s time to see how we did....&lt;br /&gt; &lt;/span&gt;&lt;/p&gt; &lt;div class=&quot;youtube-video&quot;&gt;&lt;object height=&quot;400&quot; width=&quot;550&quot;&gt; &lt;param name=&quot;movie&quot; value=&quot;http://dl.getdropbox.com/u/101948/blog/movies/3-cfml-engines.swf&quot;&gt; &lt;/param&gt; &lt;embed src=&quot;http://dl.getdropbox.com/u/101948/blog/movies/3-cfml-engines.swf&quot; height=&quot;400&quot; width=&quot;550&quot;&gt; &lt;/embed&gt;  &lt;/object&gt;&lt;/div&gt;</description><pubDate>Tue, 10 Feb 2009 04:31:00 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2009/02/09/Setting-up-Apache-OpenBD-Railo-and-ColdFusion--Part-4--Installing-Railo-under-Tomcat-with-Apache-webserver</guid><category>ColdFusion,Servers</category></item><item><title>Setting up Apache, OpenBD, Railo and ColdFusion - Part 3 - Installing ColdFusion and customizing the connector</title><link>http://daveshuck.instantspot.com/blog/2009/02/04/Setting-up-Apache-OpenBD-Railo-and-ColdFusion--Part-3--Installing-ColdFusion-and-customizing-the-connector</link><description>&lt;p&gt;This is the third part in a series of posts on setting up ColdFusion, OpenBlueDragon, and Railo all on the same machine using Apache webserver to listen for all requests and direct traffic.&amp;nbsp; &lt;a href=&quot;http://daveshuck.instantspot.com/blog/2009/02/01/Setting-up-Apache-OpenBD-Railo-and-ColdFusion--Part-2--Installing-TomcatApacheOpenBD&quot;&gt;Part 2 can be found here&lt;/a&gt;.&amp;nbsp; You will find links to all parts of this series at the bottom under &amp;quot;Related Content&amp;quot;&lt;/p&gt; &lt;p&gt;With that said, this part in the series focuses on installing ColdFusion and configuring the webserver adapter in such a way that only specific Virtual Hosts will be set up to pass requests to the ColdFusion server.  First we want to start by creating a localhost site that is specific to ColdFusion 8 in Apache.&amp;nbsp; I tend to keep all my sites under /www which is actually symlinked to a &apos;www&apos; in my home directory. I find a few benefits in this.&amp;nbsp; First, I usually keep my home partition in shape and carry it around with me from distro to distro, so I always have my sites in tact with me.&amp;nbsp; Secondly since it is a symlink to my home and not in a system folder I don&apos;t need special permissions to write in it.&amp;nbsp; I will be following along this path, but if you keep your sites elsewhere, then you can adjust as necessary.  &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;$ mkdir /www/localhost.cf8&lt;/pre&gt;&lt;/div&gt;  Now, we will want to create an Apache virtual host definition for this site.&amp;nbsp; To do so, create a new configuration file like this: &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;$ sudo gedit /etc/apache2/sites-available/localhost.cf8&lt;/pre&gt;&lt;/div&gt;  Paste the the following, then save and close. &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;VirtualHost *&amp;gt;  ServerName localhost.cf8   &amp;lt;Directory /www/localhost.cf8/&amp;gt;   Options Indexes FollowSymLinks MultiViews   AllowOverride None   Order allow,deny   allow from all  &amp;lt;/Directory&amp;gt;  DocumentRoot /www/localhost.cf8 &amp;lt;/VirtualHost&amp;gt; &lt;/pre&gt;&lt;/div&gt;  Now we need to make sure that file is included when Apache starts, so run the following command which will make a symlink to the sites-enabled directory. &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;$  sudo a2ensite localhost.cf8 Site localhost.cf8 installed; run /etc/init.d/apache2 reload to enable.&lt;/pre&gt;&lt;/div&gt;  As you can see from the localhost.cf8 configuration file, we are expecting our ServerName to be localhost.cf8, so we now need to add that entry to our hosts file. &amp;nbsp; &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;$ sudo gedit /etc/hosts&lt;/pre&gt;&lt;/div&gt;  Append &amp;quot;localhost.cf8&amp;quot; (with no quotes!) to the line that begins with 127.0.0.1.&amp;nbsp; Save the file and close.  At this point you should be able to restart Apache and hit that empty site in your browser like this: &lt;a href=&quot;http://dl.getdropbox.com/u/101948/blog/images/cf-install/cf-install-06.png&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://dl.getdropbox.com/u/101948/blog/images/cf-install/cf-install-0-500.png&quot; style=&quot;max-width: 800px;&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;    Now that we have a site ready, it is time for us to install ColdFusion.&amp;nbsp; Once you have downloaded the .bin installation file from Adobe, browse to that directory in a terminal window.&amp;nbsp; You may need to chmod the file to be executable, then launch it like this:&amp;nbsp;  &lt;span style=&quot;padding: 0pt 10px 10px 0pt;&quot;&gt;&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;$ chmod +x coldfusion-801-lin.bin  sudo ./coldfusion-801-lin.bin&lt;/pre&gt;&lt;/div&gt;&lt;/span&gt;  Choose 1 for English.&amp;nbsp;  &lt;a href=&quot;http://dl.getdropbox.com/u/101948/blog/images/cf-install/cf-install-06.png&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://dl.getdropbox.com/u/101948/blog/images/cf-install/cf8-install-01-500.png&quot; style=&quot;max-width: 800px;&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;  After the welcome screen, hit enter to continue.&amp;nbsp; Next type &amp;quot;Y&amp;quot; and hit enter to agree to the terms and conditions.  We are now faced with the installation type prompt. For this example of setting up a development environment, we will choose option 3 &amp;quot;Developer Edition&amp;quot;  For our purposes we are going to choose the &amp;quot;Server configuration&amp;quot; option.&amp;nbsp; However, it should be noted that you could quite easily choole the J2EE WAR file option and install into Tomcat as we did with OpenBlueDragon in Part 2 of thise series. &lt;a href=&quot;http://dl.getdropbox.com/u/101948/blog/images/cf-install/cf-install-06.png&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://dl.getdropbox.com/u/101948/blog/images/cf-install/cf8-install-02-500.png&quot; style=&quot;max-width: 800px;&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;  Since we are installing from scratch, we will choose &amp;quot;No&amp;quot; (2) on the next option which is asking if there is an existing version of ColdFusion 8 installed on this machine.  For this installation we do not want any of the extra options to install such as Documentation, LiveCycle, Search Services, nor do we want to start on system init since this is on my laptop and I may not always want ColdFusion to start at boot.&amp;nbsp; So we will uncheck all options like you see in this image and continue. &lt;a href=&quot;http://dl.getdropbox.com/u/101948/blog/images/cf-install/cf-install-06.png&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://dl.getdropbox.com/u/101948/blog/images/cf-install/cf-install-03-500.png&quot; style=&quot;max-width: 800px;&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;  We are going to accept the default installation path of /opt/coldfusion8  Again, since this is a fresh installation, we are going to say &amp;quot;No&amp;quot; (2) to the prompt asking if there are earlier versions of ColdFusion on this computer.  Now we start to work our way into the webserver configuration which will tie ColdFusion into Apache.&amp;nbsp; To start, choose &amp;quot;Add Web Server Configuration&amp;quot; (1) when prompted, then choose &amp;quot;Apache&amp;quot; (1).&amp;nbsp; In the following prompt asking for the Apache directory that contains your http.conf file, enter /etc/apache2 as you see in the picture below: &lt;a href=&quot;http://dl.getdropbox.com/u/101948/blog/images/cf-install/cf-install-06.png&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://dl.getdropbox.com/u/101948/blog/images/cf-install/cf-install-04-500.png&quot; style=&quot;max-width: 800px;&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;  For the location of the Apache program binary file, enter /usr/sbin/apache2.&amp;nbsp; For the Start/Stop script, enter /etc/init.d/apache2.&amp;nbsp; You will see both of these choices here: &lt;a href=&quot;http://dl.getdropbox.com/u/101948/blog/images/cf-install/cf-install-06.png&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://dl.getdropbox.com/u/101948/blog/images/cf-install/cf-install-05-500.png&quot; style=&quot;max-width: 800px;&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;  We now return to the first webserver configuration menu and this time choose &amp;quot;Continue with installation&amp;quot; (4).   Then we will need to enter the location of the webroot.&amp;nbsp; We are going to enter the directory of our new site /www/localhost.cf8 that we created above as you can see in the picture below.&amp;nbsp; We will also be asked which user we would like ColdFusion to run as.&amp;nbsp; I typically like to use my own user account for this so I don&apos;t end up with permissions issues where I have difficulty accessing files generated by ColdFusion &lt;a href=&quot;http://dl.getdropbox.com/u/101948/blog/images/cf-install/cf-install-06.png&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://dl.getdropbox.com/u/101948/blog/images/cf-install/cf-install-06-500.png&quot; style=&quot;max-width: 800px;&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;  Now enter your admin password, and if you choose to user RDS, enter the&amp;nbsp; password for it as well.  It will now show you the general options you have selected and you will hit enter to start the actual installation.&amp;nbsp; Once it completes and prompts you to &amp;quot;Press Enter to exit the installer&amp;quot;, do so and then start the server with this: &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;$ sudo /opt/coldfusion8/bin/coldfusion start&lt;/pre&gt;&lt;/div&gt;  During this stage you should see messages that it is configuring the webserver successfully, assuming we entered everything properly above.&amp;nbsp;  &lt;a href=&quot;http://dl.getdropbox.com/u/101948/blog/images/cf-install/cf-install-07.png&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://dl.getdropbox.com/u/101948/blog/images/cf-install/cf-install-07-500.png&quot; style=&quot;max-width: 800px;&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;  Once you are returned to a prompt, it is time to go customize the Apache connector stuff just a bit.&amp;nbsp; open the httpd.conf file like this: &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;$ sudo gedit /etc/apache2/httpd.conf&lt;/pre&gt;&lt;/div&gt;  In that you will find the connector stuff that ColdFusion added starting with a line: #JRun Settings.  Before we take the next steps, let me explain a bit what we are going to do.&amp;nbsp; We are going to seperate this into two pieces: the module loader, and the actual connector declaration.&amp;nbsp; As it stands right now, and request coming through the webserver would be handled by ColdFusion and we don&apos;t really want that.&amp;nbsp; To make it more granular, we are going to create an include file that can be added to any site that will add the connector only to that particular site.&amp;nbsp; With that said, let&apos;s walk through it. &amp;nbsp;  *Cut* (not copy!) these two lines of that connector info: &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;# JRun Settings LoadModule jrun_module /opt/coldfusion8/runtime/lib/wsconfig/1/mod_jrun22.so&lt;/pre&gt;&lt;/div&gt;   Now we are going to paste those into a new file that will go in our mods-available directory.&amp;nbsp; Click on the &amp;quot;New&amp;quot; button in gedit and paste that text in.&amp;nbsp; Now save that file as&amp;nbsp; /etc/apache2/mods-available/cf8.load.  Now *cut* (not copy!) the remainder of the connector out that looks like this: &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;IfModule mod_jrun22.c&amp;gt;     JRunConfig Verbose false     JRunConfig Apialloc false     JRunConfig Ignoresuffixmap false     JRunConfig Serverstore /opt/coldfusion8/runtime/lib/wsconfig/1/jrunserver.store     JRunConfig Bootstrap 127.0.0.1:51801     #JRunConfig Errorurl url &amp;lt;optionally redirect to this URL on errors&amp;gt;     #JRunConfig ProxyRetryInterval 600 &amp;lt;number of seconds to wait before trying to reconnect to unreachable clustered server&amp;gt;     #JRunConfig ConnectTimeout 15 &amp;lt;number of seconds to wait on a socket connect to a jrun server&amp;gt;     #JRunConfig RecvTimeout 300 &amp;lt;number of seconds to wait on a socket receive to a jrun server&amp;gt;     #JRunConfig SendTimeout 15 &amp;lt;number of seconds to wait on a socket send to a jrun server&amp;gt;     AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf &amp;lt;/IfModule&amp;gt;&lt;/pre&gt;&lt;/div&gt;  Create a new file named /etc/apache2/cf8connector. Pasted that text in and save the file.  Lastly, you may not have this issue, but I found that the DirectoryIndex attribute of Apache was not adding index.cfm to the list of default files. Due to this I actually added it to my httpd.conf. After all of the steps above, my httpd.conf file only has a single line: &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;DirectoryIndex index.cfm&lt;/pre&gt;&lt;/div&gt;  Now... it is time to do just a little more Apache config and we are ready to go!&amp;nbsp; Rember that cf8.load mod file we created earlier?&amp;nbsp; Let&apos;s turn that on: &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;$ sudo a2enmod cf8&lt;/pre&gt;&lt;/div&gt;   Now, let&apos;s to add an include call to our localhost.cf8 virtual host configuration.&amp;nbsp; Open up /etc/apache2/sites-available/localhost.cf8 and add the &amp;quot;Include c8connector&amp;quot; line that you see below: &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;VirtualHost *&amp;gt;         ServerName localhost.cf8          &amp;lt;Directory /www/localhost.cf8/&amp;gt;                 Options Indexes FollowSymLinks MultiViews                 AllowOverride None                 Order allow,deny                 allow from all         &amp;lt;/Directory&amp;gt;         DocumentRoot /www/localhost.cf8         Include cf8connector &amp;lt;/VirtualHost&amp;gt;&lt;/pre&gt;&lt;/div&gt;  Once you have saved that file, it is time to restart Apache and test out all of our hard work! &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;$ sudo /etc/init.d/apache2 restart&lt;/pre&gt;&lt;/div&gt;  Now, using your browser, go to http://localhost.cf8/CFIDE/administrator/ and you will see the following: &lt;a href=&quot;http://dl.getdropbox.com/u/101948/blog/images/cf-install/cf-install-admin1.png&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://dl.getdropbox.com/u/101948/blog/images/cf-install/cf-install-admin1-500.png&quot; style=&quot;max-width: 800px;&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;  Now... if you are following along from earlier in this series, you should now be able to successfully connect to OpenBD at http://localhost.bd and ColdFusion 8 at http://localhost.cf8  On the next part of this series, we will bring Railo into the mix and finally have all three running on our system.&lt;/p&gt; &lt;p&gt;Next - &lt;a href=&quot;http://daveshuck.instantspot.com/blog/2009/02/09/Setting-up-Apache-OpenBD-Railo-and-ColdFusion--Part-4--Installing-Railo-under-Tomcat-with-Apache-webserver&quot;&gt;Part 4 Installing Railo under Tomcat with Apache webserver&lt;/a&gt;&lt;/p&gt;</description><pubDate>Thu, 05 Feb 2009 04:35:00 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2009/02/04/Setting-up-Apache-OpenBD-Railo-and-ColdFusion--Part-3--Installing-ColdFusion-and-customizing-the-connector</guid><category>ColdFusion,Servers</category></item><item><title>Setting up Apache, OpenBD, Railo and ColdFusion - Part 2 - Installing Tomcat/Apache/OpenBD</title><link>http://daveshuck.instantspot.com/blog/2009/02/01/Setting-up-Apache-OpenBD-Railo-and-ColdFusion--Part-2--Installing-TomcatApacheOpenBD</link><description>&lt;p&gt;This is the second part in a series of posts on setting up ColdFusion, OpenBlueDragon, and Railo all on the same machine using Apache webserver to listen for all requests and direct traffic.&amp;nbsp; &lt;a href=&quot;http://daveshuck.instantspot.com/blog/2009/02/01/Setting-up-Apache-OpenBD-Railo-and-ColdFusion--Part-1&quot;&gt;Part 1 can be found here&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Remember, the steps below have some commands specific to Linux, and more specifically to Debian/Ubuntu, but the concepts in general should have at least some similarites across any supported platform, especially you Mac folks.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;To start out, we need to make sure that we have the Apache webserver installed with optional &amp;quot;dev&amp;quot; package.&amp;nbsp; Additionally, later on we will need to be compiling, so let&apos;s make sure that you have the build-essential package as well &lt;code&gt;$sudo apt-get install apache2 apache2-threaded-dev build-essential&lt;/code&gt;  Next I installed the Sun Java 6 JDK &lt;code&gt;$sudo apt-get install sun-java6-jdk&lt;/code&gt;&lt;/p&gt; &lt;p&gt;Next you want to go download Tomcat.&amp;nbsp; I chose to use Tomcat 6, specifically v. 6.0.18, which the current release as of this posting.&amp;nbsp; Now, using a terminal cd into the directory where you saved the dowloaded file and do the following: &lt;code&gt;$ sudo cp apache-tomcat-6.0.18.tar.gz /opt/  $ cd /opt  $ sudo tar xvzf apache-tomcat-6.0.18.tar.gz  $ sudo mv apache-tomcat-6.0.18 tomcat6  $ sudo rm apache-tomcat-6.0.18.tar.gz&lt;/code&gt;  &lt;br /&gt; &lt;br /&gt; Next we will need to edit the Tomcat startup script, but to do so, we need to go get a little information first.&amp;nbsp; We need to ensure that we know what the current Java home is on your machine.&amp;nbsp; There are surely easier ways of accomplishing this, but here is the series of steps I took. &lt;code&gt;~$ which java /usr/bin/java  $ ls -l /usr/bin/java lrwxrwxrwx 1 root root 22 2009-01-30 23:00 /usr/bin/java -&amp;gt; /etc/alternatives/java  $ ls -l /etc/alternatives/java[return] lrwxrwxrwx 1 root root 36 2009-01-30 23:00 /etc/alternatives/java -&amp;gt; /usr/lib/jvm/java-6-sun/jre/bin/java &lt;/code&gt;  &lt;br /&gt; &lt;br /&gt; From that last line I can see that the default Java lives at /usr/lib/jvm/java-6-sun/ (which too is a sym link, but that&apos;s ok!). Now that we have our Java home we can edit the Tomcat startup script &lt;code&gt;$sudo gedit /opt/tomcat6/bin/catalina.sh&lt;/code&gt;  &lt;br /&gt; &lt;br /&gt; Paste the following lines in just after the big comment block at the top. Make sure that if your Java path looked different than mine did, you will want to adjust accordingly. &lt;code&gt;JAVA_HOME=/usr/lib/jvm/java-6-sun  JRE_HOME=/usr/lib/jvm/java-6-sun/jre  JAVA_OPTS=&amp;quot;-server -Xms1024M -Xmx1024M -XX:PermSize=256m -XX:MaxPermSize=256m \ &amp;nbsp;&amp;nbsp;&amp;nbsp; -Duser.language=en -Duser.country=US -Dfile.encoding=UTF-8 \ &amp;nbsp;&amp;nbsp;&amp;nbsp; -Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl&amp;quot;  &lt;/code&gt;  &lt;br /&gt; &lt;br /&gt; Now we want to download the Apache Tomcat connector source so that we can pass requests from Apache webserver to Tomcat. This is the one I grabbed: &lt;a href=&quot;http://apache.org/dist/tomcat/tomcat-connectors/jk/source/&quot;&gt;http://apache.org/dist/tomcat/tomcat-connectors/jk/source/&lt;/a&gt;  Next you will want to browse to the directory that you downloaded that file into using in the terminal.  Next run: &lt;code&gt;$ tar xvzf tomcat-connectors-current-src.tar.gz  $ cd tomcat-connectors-1.2.27-src/native  $ ./configure --with-apxs=/usr/bin/apxs2  $ make  $ sudo make install&lt;/code&gt;  &lt;br /&gt; &lt;br /&gt; Now we will need to create a jk mod file to be included by Apache so that it loads the adapter when Apache starts. In your terminal cd to /etc/apache2/mods-available. In this directory we will create a file named jk.load. &lt;code&gt;$sudo gedit jk.load&lt;/code&gt;  &lt;br /&gt; &lt;br /&gt; In that file pasted the following, then save and exit: &lt;code&gt;LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so   # Where to find workers.properties  # Update this path to match your conf directory location (put workers.properties next to httpd.conf)  JkWorkersFile /etc/apache2/workers.properties  # Where to put jk shared memory  # Update this path to match your local state directory or logs directory  JkShmFile     /var/log/apache2/mod_jk.shm  # Where to put jk logs  # Update this path to match your logs directory location (put mod_jk.log next to access_log)  JkLogFile     /var/log/apache2/mod_jk.log  # Set the jk log level [debug/error/info]  JkLogLevel    info  # Select the timestamp log format JkLogStampFormat &amp;quot;[%a %b %d %H:%M:%S %Y] &amp;quot;&lt;/code&gt;  &lt;br /&gt; &lt;br /&gt; Now we want to create a symbolic link to this file in /etc/apache2/mods-enabled so that it is loaded when Apache starts. &lt;code&gt;$ cd /etc/apache2/mods-enabled  $ sudo ln -s ../mods-available/jk.load ./jk.load &lt;/code&gt;  &lt;br /&gt; &lt;br /&gt; Next we want to create a virtual host in Apache to catch the requests. We are going to create a new file in the sites-available directory. &lt;code&gt;$ cd /etc/apache2/sites-available  $ sudo gedit localhost.bd &lt;/code&gt;  In that file, paste the following, save, and exit: &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;VirtualHost *&amp;gt;  ServerName localhost.bd  JKMount /* worker1 &amp;lt;/VirtualHost&amp;gt; &lt;/pre&gt;&lt;/div&gt;  &lt;br /&gt; &lt;br /&gt; Now we need to create a symbolic link to that file from sites-enabled so that it is available when apache2 starts. &lt;code&gt;$ cd /etc/apache2/sites-enabled  $ sudo ln -s ../sites-available/localhost.bd ./001-localhost.bd&lt;/code&gt;  &lt;br /&gt; &lt;br /&gt; Next we want to make sure that we can get to that site in a browser, so we are going to add &apos;localhost.bd&apos; to our hosts file. Open up /etc/hosts, and append &apos;localhost.bd&apos; (without quotes!) to the line that begins with 127.0.0.1.  Now we need to define that &amp;quot;worker1&amp;quot; that we just referenced above in the VirtualHost definition. We will do that by creating a workers.properties file in our apache2 directory. &lt;code&gt;$ cd /etc/apache2  $ sudo gedit workers.properties&lt;/code&gt;  &lt;br /&gt; &lt;br /&gt; Insert the following. Then save and exit: &lt;code&gt;# Define 1 real worker using ajp13  worker.list=worker1  # Set properties for worker1 (ajp13)  worker.worker1.type=ajp13  worker.worker1.host=localhost.bd  worker.worker1.port=8009  &lt;/code&gt;  &lt;br /&gt; &lt;br /&gt; Next we want to create a webapp in Tomcat for Apache to send to.  &lt;code&gt;sudo gedit /opt/tomcat6/conf/server.xml&lt;/code&gt;   In that config, we need to define the localhost.bd site, or &apos;webapp&apos;.  Add the following: &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;Host name=&amp;quot;localhost.bd&amp;quot;  appBase=&amp;quot;webapps&amp;quot;       unpackWARs=&amp;quot;true&amp;quot; autoDeploy=&amp;quot;true&amp;quot;       xmlValidation=&amp;quot;true&amp;quot; xmlNamespaceAware=&amp;quot;false&amp;quot;&amp;gt;   &amp;lt;Context path=&amp;quot;&amp;quot; docBase=&amp;quot;localhost.bd/&amp;quot; reloadable=&amp;quot;true&amp;quot; privileged=&amp;quot;true&amp;quot; antiResourceLocking=&amp;quot;false&amp;quot; anitJARLocking=&amp;quot;false&amp;quot;&amp;gt;  &amp;lt;/Context&amp;gt; &amp;lt;/Host&amp;gt; &lt;/pre&gt;&lt;/div&gt;  &lt;br /&gt; &lt;br /&gt; Now we need to create the local.bd directory under Tomcat. Note: as you get more comfortable and adventurous, you may want this to be a symbolic link to another place on your machine where your source resides, but for now we are keeping it as simple as we can. Once the directory is created, we will download the OpenBlueDragon war file and extract it. &lt;code&gt;$ sudo mkdir /opt/tomcat6/webapps/localhost.bd $ cd /opt/tomcat6/webapps/localhost.bd  $ sudo wget http://openbd.viviotech.net/downloader.cfm/id/64/file/openbd.war  $ sudo jar xvf openbd.war &lt;/code&gt;  &lt;br /&gt; &lt;br /&gt; And with that step, and after restarting Apache, and starting Tomcat, OpenBlueDragon will now be available. &lt;code&gt;$ sudo /etc/init.d/apache2 restart  $ /opt/tomcat6/bin/catalina.sh start&lt;/code&gt; &lt;br /&gt; &lt;br /&gt; Open up your browser and go to: http://localhost.bd/bluedragon/administrator&lt;br /&gt; &lt;br /&gt; You should be created with your OpenBD admin page like this:&lt;br /&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://dl.getdropbox.com/u/101948/OpenBDAdmin.png&quot;&gt;&lt;img alt=&quot;&quot; style=&quot;max-width: 800px;&quot; src=&quot;http://dl.getdropbox.com/u/101948/OpenBDAdmin-500.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Next: &lt;a href=&quot;http://daveshuck.instantspot.com/blog/2009/02/04/Setting-up-Apache-OpenBD-Railo-and-ColdFusion--Part-3--Installing-ColdFusion-and-customizing-the-connector&quot;&gt;Part 3 - Installing ColdFusion 8 and customizing the JRun connector&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sun, 01 Feb 2009 07:34:00 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2009/02/01/Setting-up-Apache-OpenBD-Railo-and-ColdFusion--Part-2--Installing-TomcatApacheOpenBD</guid><category>ColdFusion,Linux</category></item><item><title>Setting up Apache, OpenBD, Railo, and ColdFusion - Part 1</title><link>http://daveshuck.instantspot.com/blog/2009/02/01/Setting-up-Apache-OpenBD-Railo-and-ColdFusion--Part-1</link><description>&lt;p&gt;This is Part 1 of a muilt-part blog post demonstrating how run OpenBlueDragon, Railo, and ColdFusion all on the same machine, and all using the Apache webserver with individual Virtual hosts using different CFML engines.&amp;nbsp; But, before we get into it, here is a little background.&lt;br /&gt; &lt;br /&gt; For the past several months now I have stepped over to Windows on my laptop after years of not using it regularly.&amp;nbsp; It was actually the first time I had actually used Vista, actually and was quite an interesting experience.&amp;nbsp; First, as much as I love the Linux environment, I really expected to loathe being in Windows daily.&amp;nbsp; I was surprised at how much Vista *didn&apos;t* suck.&amp;nbsp; With all the raging passion against it in general I suppose that I had low expectations, but nevertheless I really thought it was pretty decent in general.&amp;nbsp; However it has a more sluggish, constricting feel to it in comparison to Linux, so I have decided I have paid my dues and it is time to go back to using an OS that is truly fun to use, rather than one that just wasn&apos;t as crappy as I thought it would be.&amp;nbsp; &lt;br /&gt; &lt;br /&gt; After lots of experimentation with various flavors, hands-down Ubuntu is the most painless and most comfortable Linux distros for me personally.&amp;nbsp; My reasoning for that is vast and probably belongs in another blog entry, so I will attempt to keep from straying any further off the topic!&amp;nbsp; That said, last night I decided to try gOS which is a really neat distro built off of Ubuntu.&amp;nbsp; Although the UI is Gnome based, it has more of a Max 10.5.x feel to it.&amp;nbsp; I think Mac folks would feel right at home taking this environment for a spin.&lt;br /&gt; &lt;br /&gt; Immediately after the first boot of my shiny new OS I started trying to put my development environment back together.&amp;nbsp; I decided that I wanted to have ColdFusion, Railo, and OpenBD all on from the beginning, with all requests first passing through Apache httpd.&amp;nbsp; Quite some time ago, Aaron Lynch put together some steps to install Smith Project w/Tomcat/Apache, which we have used several times since, primarily setting up Railo. I am not sure I ever would have waded my way through it without his early experimentation and documentation.&amp;nbsp; On this iteration, I loosely followed those instructions, opting for several packages from the repos, and updated versions of software, and have documented my steps as the are somewhat different in areas. For my current environment, I first installed OpenBD.&amp;nbsp; I then followed this by installing ColdFusion and setting it up to user the default JRUN connector that is set up during the installation.&amp;nbsp; Lastly, I installed Railo as another webapp in Tomcat and tied that into Apache as well.&amp;nbsp; &lt;br /&gt; &lt;br /&gt; In the following posts, you will see these steps in detail.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; Next:&amp;nbsp; &lt;a href=&quot;http://daveshuck.instantspot.com/blog/2009/02/01/Setting-up-Apache-OpenBD-Railo-and-ColdFusion--Part-2--Installing-TomcatApacheOpenBD&quot;&gt;Part 2 - Installing Tomcat/Apache/OpenBD&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sun, 01 Feb 2009 07:33:00 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2009/02/01/Setting-up-Apache-OpenBD-Railo-and-ColdFusion--Part-1</guid><category>ColdFusion,Tips and Tricks,Servers</category></item><item><title>Customizing Illudium CFCGenerator XSL to fit your needs</title><link>http://daveshuck.instantspot.com/blog/2009/01/28/Customizing-Illudium-CFCGenerator-XSL-to-fit-your-needs</link><description>&lt;p&gt;&lt;a href=&quot;http://ajlcom.instantspot.com&quot;&gt;Aaron&lt;/a&gt; and I are about to start work on a super-top-secret project (oops! Man I suck at secrets) in which we will be making use of Amazon ec2 and SimpleDB platforms using an Apache/Tomcat/OpenBD setup.  Considering the fact that in spite of the coolness of amazon services in production, it seems to be somewhat of a problematic platform to develop on.  &lt;br /&gt; &lt;br /&gt; So, until we have a a somewhat functional alpha release, we probably will do all the development that we can on local setups.  One of the immediate questions was in regards to how we would set up our CFC data model.  We tend to be fans of the Service/Bean/DAO/Gateway approach, but things change a bit when it comes to using Amazon SimpleDB.  We came to a decision that our best bet would be to have abstract DAO/Gateway classes that would in turn call the appropriate specific DAO/Gateway classes, so if we are working in development the path would be: Service--&amp;gt; AbstractDAO--&amp;gt; MySQL-DAO and in production it would be Service--&amp;gt; AbstractDAO--&amp;gt; Amazon-DAO.  To make the change only need to alter a ColdSpring property &amp;quot;databasetype&amp;quot; from &amp;quot;mysql&amp;quot; to &amp;quot;amazonbd&amp;quot;.  Notice the &amp;quot;BD&amp;quot; at the end of Amazon?  That is because this is not only an Amazon data object, but one that is actually designed for use with OpenBD to make use of the &amp;lt;cfquery dbtype=&amp;quot;amazon&amp;quot; /&amp;gt; &lt;cfquery datatype=&quot;amazon&quot;&gt; functionality!  Down the line we may add other specific subclasses as well as we need.&lt;br /&gt; &lt;br /&gt; One other approach that Aaron and I live and die by in our objects is to steer clear of custom code into our generated CFCs.  If you ever make changes to your database or objects in general that require you to re-generate them, it can be a real pain in the ass to make sure that you don&apos;t overwrite custom code that you spent precious hours on.  Our solution to this is to have all of our Bean/DAO/Gateway/Objects extend base classes so that if you have a UserDAO.cfc there would also be a BaseUserDAO.cfc which would be generated as an empty object.  We can then safely stuff all sorts of custom functionality in that base object, such as hasMany relationships/methods, etc, and then later regenerate the DAO itself on a whim, typically without repercussions whatsoever.&lt;br /&gt; &lt;br /&gt; With all of this functionality, we now end up with a ton of CFCs in each package, but the flexibility gained is well worth it.  Just how many?  Well in the example of a User, we would have:&lt;br /&gt; &lt;/cfquery&gt;&lt;/p&gt; &lt;ul&gt;     &lt;li&gt;User&lt;/li&gt;     &lt;li&gt;BaseUser&lt;/li&gt;     &lt;li&gt;UserService&lt;/li&gt;     &lt;li&gt;BaseUserService&lt;/li&gt;     &lt;li&gt;UserDAOAbstract&lt;/li&gt;     &lt;li&gt;BaseUserDAO&lt;/li&gt;     &lt;li&gt;UserDAOMySQL&lt;/li&gt;     &lt;li&gt;UserDAOAmazonBD&lt;/li&gt;     &lt;li&gt;UserGatewayAbstract&lt;/li&gt;     &lt;li&gt;BaseUserGateway&lt;/li&gt;     &lt;li&gt;UserGatewayMySQL&lt;/li&gt;     &lt;li&gt;UserGatewayAmazonBD&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;For those that have used and know Illudium, you know that the templates it comes with don&apos;t fit these patterns!&amp;nbsp; I decided that I would set out to *make* it fit.&amp;nbsp; &lt;br /&gt; &lt;br /&gt; Of course I took the first tool I could grab in my toolbox - my sledgehammer - and started hacking into the Flex code trying to figure out what exactly I could change to make this work.&amp;nbsp; After more investigative work than I would like to admit, I realized I didn&apos;t need my sledgehammer at all!&lt;br /&gt; &lt;br /&gt; Brian Rinaldi has written such a flexible tool that I needed to do no more than create a new set of XSL templates to fit my needs and the rest would all fall in place.&amp;nbsp; If you look in the illudium code under cfcgenerator/xsl, you will find a folder named &amp;quot;projects&amp;quot;.&amp;nbsp; For some reason it never hit me previously what populated the &amp;quot;Template:&amp;quot; dropdown in the UI, but this list is generated from directories that lie under &amp;quot;projects&amp;quot;.&amp;nbsp; I then took a copy of the default XSL templates and put them in a new directory named &amp;quot;subclassed_data&amp;quot; since that is kind of the general goal of this.&amp;nbsp; By adding new XSL docs,&amp;nbsp; modifying the existing ones, and then making sure all the files I wanted to generate were listed in yac.xml, I easily acheived what I was after.&amp;nbsp; Here is the end product of XSL...&lt;br /&gt; &lt;a href=&quot;http://dl.getdropbox.com/u/101948/blog/images/illudiumxsl-full.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://dl.getdropbox.com/u/101948/blog/images/illudiumxsl-small.jpg&quot; style=&quot;max-width: 800px;&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; Really the only limitation I came across is that I was never happy with the casing that I ended up with.&amp;nbsp; We typically use camel casing in our objects like UserDaoMysql.&amp;nbsp; Given the way that Illudium works it would come out as UserDaomysql.&amp;nbsp; Considering that fact, I opted for making the end products of my CFCs all lower case.&amp;nbsp; Thankfully with ColdSpring I never actually see the casing of my filenames, so I think I can live with that.&amp;nbsp; To make this happen, I ended up changing the only line of the Illudium codebase so that it would force lowercase to the filenames that it saved.&lt;br /&gt; &lt;br /&gt; At this point, the only remaining thing that I may do is alter the Illudium UI.&amp;nbsp; Why?&amp;nbsp; Take a look at this!&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;a href=&quot;http://dl.getdropbox.com/u/101948/blog/images/illudiumtabs-full.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://dl.getdropbox.com/u/101948/blog/images/illudiumtabs-small.jpg&quot; style=&quot;max-width: 800px;&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Wed, 28 Jan 2009 19:18:00 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2009/01/28/Customizing-Illudium-CFCGenerator-XSL-to-fit-your-needs</guid><category>ColdFusion</category></item><item><title>Some videos from Adobe Max 2008 in San Francisco</title><link>http://daveshuck.instantspot.com/blog/2008/11/20/Some-videos-from-Adobe-Max-2008-in-San-Francisco</link><description>&lt;ul&gt;     &lt;li&gt;Adobe kicks off Day 1 in San Francisco&amp;nbsp; (keynote highlights and commentary from attendees) &lt;embed src=&quot;http://services.brightcove.com/services/viewer/federated_f8/1596744118&quot; bgcolor=&quot;#FFFFFF&quot; flashvars=&quot;videoId=2479288001&amp;amp;playerId=1596744118&amp;amp;viewerSecureGatewayURL=https://console.brightcove.com/services/amfgateway&amp;amp;servicesURL=http://services.brightcove.com/services&amp;amp;cdnURL=http://admin.brightcove.com&amp;amp;domain=embed&amp;amp;autoStart=false&amp;amp;&quot; base=&quot;http://admin.brightcove.com&quot; name=&quot;flashObj&quot; seamlesstabbing=&quot;false&quot; type=&quot;application/x-shockwave-flash&quot; swliveconnect=&quot;true&quot; pluginspage=&quot;http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash&quot; width=&quot;486&quot; height=&quot;412&quot;&gt;&lt;/embed&gt; &lt;/li&gt;     &lt;li&gt;From Adobe Flash Catalyst to Adobe CS4, see highlights from Day 2&amp;nbsp; (keynote highlights and commentary from attendees) &lt;embed src=&quot;http://services.brightcove.com/services/viewer/federated_f8/1596744118&quot; bgcolor=&quot;#FFFFFF&quot; flashvars=&quot;videoId=2573940001&amp;amp;playerId=1596744118&amp;amp;viewerSecureGatewayURL=https://console.brightcove.com/services/amfgateway&amp;amp;servicesURL=http://services.brightcove.com/services&amp;amp;cdnURL=http://admin.brightcove.com&amp;amp;domain=embed&amp;amp;autoStart=false&amp;amp;&quot; base=&quot;http://admin.brightcove.com&quot; name=&quot;flashObj&quot; seamlesstabbing=&quot;false&quot; type=&quot;application/x-shockwave-flash&quot; swliveconnect=&quot;true&quot; pluginspage=&quot;http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash&quot; width=&quot;486&quot; height=&quot;412&quot;&gt;&lt;/embed&gt; &lt;/li&gt;     &lt;li&gt;What was your geek-out moment of the day? (Day 1) &lt;embed src=&quot;http://services.brightcove.com/services/viewer/federated_f8/1596744118&quot; bgcolor=&quot;#FFFFFF&quot; flashvars=&quot;videoId=2479302001&amp;amp;playerId=1596744118&amp;amp;viewerSecureGatewayURL=https://console.brightcove.com/services/amfgateway&amp;amp;servicesURL=http://services.brightcove.com/services&amp;amp;cdnURL=http://admin.brightcove.com&amp;amp;domain=embed&amp;amp;autoStart=false&amp;amp;&quot; base=&quot;http://admin.brightcove.com&quot; name=&quot;flashObj&quot; seamlesstabbing=&quot;false&quot; type=&quot;application/x-shockwave-flash&quot; swliveconnect=&quot;true&quot; pluginspage=&quot;http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash&quot; width=&quot;486&quot; height=&quot;412&quot;&gt;&lt;/embed&gt; &lt;/li&gt;     &lt;li&gt;What was your geek-out moment of the day (Day 2) &lt;embed src=&quot;http://services.brightcove.com/services/viewer/federated_f8/1596744118&quot; bgcolor=&quot;#FFFFFF&quot; flashvars=&quot;videoId=2572134001&amp;amp;playerId=1596744118&amp;amp;viewerSecureGatewayURL=https://console.brightcove.com/services/amfgateway&amp;amp;servicesURL=http://services.brightcove.com/services&amp;amp;cdnURL=http://admin.brightcove.com&amp;amp;domain=embed&amp;amp;autoStart=false&amp;amp;&quot; base=&quot;http://admin.brightcove.com&quot; name=&quot;flashObj&quot; seamlesstabbing=&quot;false&quot; type=&quot;application/x-shockwave-flash&quot; swliveconnect=&quot;true&quot; pluginspage=&quot;http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash&quot; width=&quot;486&quot; height=&quot;412&quot;&gt;&lt;/embed&gt;&lt;/li&gt; &lt;/ul&gt; </description><pubDate>Thu, 20 Nov 2008 21:29:00 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2008/11/20/Some-videos-from-Adobe-Max-2008-in-San-Francisco</guid><category>Conferences</category></item><item><title>How to install KDE 4.1 on Ubuntu Hardy 8.01 and my impressions of it</title><link>http://daveshuck.instantspot.com/blog/2008/07/30/How-to-install-KDE-41-on-Ubuntu-Hardy-801-and-my-impressions-of-it</link><description>&lt;p&gt;With yesterday&apos;s announcement of the 4.1.0 release of KDE, my willpower did not allow me to go another day without giving KDE4 another shot.  For a bit of history, I have been using Gnome for several years.  In the past 3 months or so I began using KDE 3.5.9 long enough that I began to enjoy it and realize that it is a nice desktop environment as well.  At this point I really have no favorite between the two and like different things about both of them.&lt;/p&gt; &lt;p&gt;When the first releases of KDE 4 started showing up several months ago, I gave it a shot but was extremely underwhelmed.  While it came with all the warnings from the community that the 4.0 release was nothing more than the introduction of a new platform which developers would expand, some of the basic pieces of it just felt wrong.  I can clearly say that after spending most of an afternoon using it, running my development environment, and doing basic daily functions, 4.1 is light years beyond the first peak I had of it.  I am *really* enjoying it so far and I have a feeling it will be my desktop of choice for the immediate future.&lt;/p&gt; &lt;p&gt;One thing that seems to not be common knowledge to some people is that you can just install it and try it out without affecting your existing desktop environments, be it KDE 3.5.x or Gnome.  For example, my current installation started out as Kubuntu 8.04 Hardy Heron.  Shortly after installing I added Gnome by running:&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;sudo apt-get install ubuntu-desktop&lt;/pre&gt;&lt;/div&gt;  Then in the GDM or KDM login window, I had options for either logging in using Gnome or the default KDE.  Thankfully the two coexist without bothering each other, and I can switch back and forth at will.  I took the same approach today when installing KDE 4.1, planning to keep both Gnome and KDE 3.5 as fallback positions or simply to use when I am in the mood.&lt;/p&gt; &lt;p&gt;If this type of setup sounds like something you want to try out, do the following.  First, add the following repo into your /etc/apt/sources.list file:&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;deb http://ppa.launchpad.net/kubuntu-members-kde4/ubuntu hardy main&lt;/pre&gt;&lt;/div&gt;  After adding that you will want to update your repos by running:&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;sudo apt-get update&lt;/pre&gt;&lt;/div&gt;  Then to install KDE 4.1 you will run the following: &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;sudo apt-get install kubuntu-kde4-desktop kdeplasma-addons amarok-kde4 and kontact-kde4 kate-kde4 kmail-kde4 &lt;/pre&gt;&lt;/div&gt;  Notice that I am also updating several applications, such as kate, amaroK, kmail, and kontact.  Kdeplasma-addons also brings you some extra goodies beyond the base install.  During that installation you will be prompted to choose your login manager.  KDE4 brings you yet another option beyond GDM and KDM.  I chose it and it is a really nice clean look.  I recommend giving it a look.  Once the installation completes, restart X or reboot and have fun!&lt;/p&gt;</description><pubDate>Thu, 31 Jul 2008 03:02:00 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2008/07/30/How-to-install-KDE-41-on-Ubuntu-Hardy-801-and-my-impressions-of-it</guid><category>Ubuntu,Linux</category></item><item><title>Dependent objects made even easier in Mach-II 1.6</title><link>http://daveshuck.instantspot.com/blog/2008/07/23/Dependent-objects-made-even-easier-in-MachII-16</link><description>&lt;p&gt;In case you were wondering if Mach-II could get any cooler, the answer is *yes*!&lt;br /&gt;&lt;br /&gt;For a few versions now, Mach-II has added the ability to inject ColdSpring beans in to your framework components (listeners, plugins, and filters) by use the parameter resolveMachIIDependencies when instantiating the ColdSpring plugin or property. &lt;br /&gt;&lt;br /&gt;Take this example... Say that I have a LoginListener.cfc that is dependent on a ColdSpring bean LoginService that lives in our /com directory.  I would first define that bean in our ColdSpring config like this: [codeblock 178]&lt;br /&gt;&lt;br /&gt;Then, in our LoginListener we would need to create a setter that matched the Bean that we have defined in ColdSpring like so: [codeblock 179]&lt;br /&gt;&lt;br /&gt;By taking these two actions, and insuring that your LoginService as an init() method as a constructor, when you initialize your application, &lt;strong&gt;variables.LoginService&lt;/strong&gt; will automatically be available to you as an instance of your LoginService bean.  That alone was pretty dang cool.  &lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;But wait there&apos;s more!&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;With Mach-II 1.6, this process has become even less cumbersome.  In some CFML tags, you can add unexpected attributes without throwing exceptions and are in essence ignored to offer a better solution for managing dependent objects.  By default, Mach-II will look for a &quot;depends&quot; attribute in your &lt;cfcomponent&gt; tags, which can contain a comma separated list of your dependencies.  For our simple LoginListener, our tag would look like this:&lt;/cfcomponent&gt; [codeblock 180]&lt;br /&gt;&lt;br /&gt;Now, instead of repetitive getters/setters, just by merely having that attribute, our LoginListener will now contain the method &lt;strong&gt;getLoginService()&lt;/strong&gt; which will return an instance of the LoginService.  That is just ridiculously easy!&lt;br /&gt;&lt;br /&gt;As I said, the attribute actually accepts a comma separated list, so as we add dependencies, our &lt;cfcomponent&gt; tag might look more like this:&lt;/cfcomponent&gt; [codeblock 181]&lt;br /&gt;&lt;br /&gt;If you have made it this far, you have probably deducted that we will now have access to &lt;strong&gt;getLoginService()&lt;/strong&gt;, &lt;strong&gt;getUserService()&lt;/strong&gt;, and &lt;strong&gt;getLoggingService()&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;As I mentioned earlier, Mach-II will look for the attribute &quot;depends&quot; by default, but you can customize it to use other attribute names if you wish. You can find that information and &lt;a href=&quot;http://greatbiztoolsllc-trac.cvsdude.com/mach-ii/wiki/FAQUsingNewColdspringProperty&quot;&gt;more on the Mach-II wiki&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;</description><pubDate>Wed, 23 Jul 2008 14:39:00 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2008/07/23/Dependent-objects-made-even-easier-in-MachII-16</guid><category>ColdFusion</category></item><item><title>Related checkbox validation with JQuery</title><link>http://daveshuck.instantspot.com/blog/2008/07/16/Related-checkbox-validation-with-JQuery</link><description>&lt;p&gt;I was given a problem yesterday where I needed to do the following client-side validation.  If a user selects a checkbox that they wish to enable credit card transactions, I need to display a panel of specific credit card companies and they need to select at least one before submitting.&lt;/p&gt; &lt;p&gt;If you think about writing the JS to do this without a library it is a somewhat lengthy task.  In essence, you would need to do some type of an onsubmit function on your form, check the value of the key checkbox.  If it was checked, check the value of each credit card checkbox to see if the user had selected one of the children.  After writing this in JQuery, I thought it might be worth demonstrating what an easy task this is.&lt;/p&gt; &lt;p&gt;Let&apos;s start with the specific part of my form that has my checkboxes:&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;label for=&amp;quot;RequireCCInfo&amp;quot;&amp;gt;Require Credit Card Information?&amp;lt;/label&amp;gt; &amp;lt;input name=&amp;quot;RequireCCInfo&amp;quot; id=&amp;quot;RequireCCInfo&amp;quot; value=&amp;quot;1&amp;quot; type=&amp;quot;checkbox&amp;quot;&amp;gt; &amp;lt;div id=&amp;quot;CreditCardCompanyPanel&amp;quot;&amp;gt;  &amp;lt;div&amp;gt;   &amp;lt;input id=&amp;quot;ccAmex&amp;quot; class=&amp;quot;ccCheckBox&amp;quot; value=&amp;quot;1&amp;quot; type=&amp;quot;checkbox&amp;quot;&amp;gt;   &amp;lt;label for=&amp;quot;ccAmex&amp;quot;&amp;gt;American Express&amp;lt;/label&amp;gt;  &amp;lt;/div&amp;gt;  &amp;lt;div&amp;gt;   &amp;lt;input id=&amp;quot;ccVisa&amp;quot; class=&amp;quot;ccCheckBox&amp;quot; value=&amp;quot;1&amp;quot; type=&amp;quot;checkbox&amp;quot;&amp;gt;   &amp;lt;label for=&amp;quot;ccVisa&amp;quot;&amp;gt;Visa&amp;lt;/label&amp;gt;  &amp;lt;/div&amp;gt;  &amp;lt;div&amp;gt;   &amp;lt;input id=&amp;quot;ccDiscover&amp;quot; class=&amp;quot;ccCheckBox&amp;quot; value=&amp;quot;1&amp;quot; type=&amp;quot;checkbox&amp;quot;&amp;gt;   &amp;lt;label for=&amp;quot;ccDiscover&amp;quot;&amp;gt;Discover&amp;lt;/label&amp;gt;  &amp;lt;/div&amp;gt;  &amp;lt;div&amp;gt;   &amp;lt;input id=&amp;quot;ccMc&amp;quot; class=&amp;quot;ccCheckBox&amp;quot; value=&amp;quot;1&amp;quot; type=&amp;quot;checkbox&amp;quot;&amp;gt;   &amp;lt;label for=&amp;quot;ccMc&amp;quot;&amp;gt;Master Card&amp;lt;/label&amp;gt;        &amp;lt;/div&amp;gt; &amp;lt;/div&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;There is nothing too notable in all of that other than the fact that you should notice that I have added a class &amp;quot;ccCheckBox&amp;quot; to all of my dependent checkboxes.  I will explain more on that in a bit, but I wanted to point out that it is there.  You will also notice that I am not doing anything in the way of hiding the &amp;quot;CreditCardCompanyPanel&amp;quot; div.  We need to determine at request time whether that will be hidden or not based on whether the &amp;quot;RequireCCInfo&amp;quot; checkbox is checked.&lt;/p&gt; &lt;p&gt;Now, here is the fun part...  I am including the JS that I use for this task below:&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;script language=&amp;quot;javascript&amp;quot;&amp;gt;  (document).ready(function(){  $(&amp;quot;#RequireCCInfo&amp;quot;).change(function(){   toggleCreditCardCompanyPanel();  });    function toggleCreditCardCompanyPanel() {   if ($(&amp;quot;#RequireCCInfo&amp;quot;).attr(&amp;quot;checked&amp;quot;) == true)  $(&amp;quot;#CreditCardCompanyPanel&amp;quot;).show();    else $(&amp;quot;#CreditCardCompanyPanel&amp;quot;).hide();  }  $(&amp;quot;#SaveButton&amp;quot;).click(function(){   var pass = false;   if ($(&amp;quot;#RequireCCInfo&amp;quot;).attr(&amp;quot;checked&amp;quot;) == true){    $(&amp;quot;.ccCheckBox&amp;quot;).each(function() {                   if ($(this).attr(&amp;quot;checked&amp;quot;) == true) pass = true;               });   }   else pass = true;   if (pass) $(&amp;quot;#frmMyForm&amp;quot;).submit();   else alert(&apos;You must select at least on credit card company if &amp;quot;Require Credit Card Information&amp;quot; is checked.&apos;);  });   toggleCreditCardCompanyPanel(); }); &amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt; &lt;p&gt;First, by using the $(document).ready() function we are telling JQuery to run this JS once the DOM has been completely loaded.  Let&apos;s look at each section within that ready() block...&lt;/p&gt; &lt;p&gt;The first thing you will see is the $(&amp;quot;#RequireCCInfo&amp;quot;).change() method.  JQuery gives us the concept of binding a listener to an element.  For our example, this listener says that anytime that an element with an ID of &amp;quot;RequireCCInfo&amp;quot; is changed, that we will run the code in its function().  You will see that anytime our &amp;quot;RequireCCInfo&amp;quot; checkbox is changed we are going to run a function called toggleCreditCardCompanyPanel().   As you can see we have that method defined immediately after our &amp;quot;RequireCCInfo&amp;quot; checkbox.&lt;/p&gt; &lt;p&gt;In our toggleCreditCardCompanyPanel() method, we are making the decision as to whether or not our &amp;quot;CreditCardCompanyPanel&amp;quot; will be displayed based on whether our user has decided to check the box labeled &amp;quot;Require Credit Card Information?&amp;quot;.   By using the JQuery selectors we are in essence saying:  If a checkbox with an ID of &amp;quot;RequireCCInfo&amp;quot; is checked, display an element with the ID &amp;quot;CreditCardCompanyPanel&amp;quot;.  Otherwise we will hide this element.&lt;/p&gt; &lt;p&gt;Next comes our validation on form submit... and pretty cool stuff!&lt;/p&gt; &lt;p&gt;Basically I have added a listener which is bound to our submit button with the ID of &amp;quot;SaveButton&amp;quot; which will submit our form &amp;quot;frmMyForm&amp;quot;.   Anytime that this button is clicked, we will run the code in the function() block.   We start this function by setting a value pass=false.  We will use this variable to determine whether our form has passed validation.  Next we get just a small taste of the magic of JQuery selectors.    First, as we did in the toggleCreditCardCompanyPanel() function, we are determining if the element with the ID of &amp;quot;RequireCCInfo&amp;quot; is checked.  If so, by using the each() function, we are going to loop through all elements on the page with the class &amp;quot;ccCheckBox&amp;quot; (remember that from above?).  In each iteration of the loop we are going to determine if the element has been checked.  If so, we are going to set pass=true since we know that our validation has passed.&lt;/p&gt; &lt;p&gt;Lastly, now that we have determined that our form is either going to pass/fail, we take the appropriate action.  If pass==fail, we are simply going to alert a message telling the user that if they are going to enable credit cards that they have to choose at least one credit card company.  Otherwise, we are going to call the submit() method on our form.&lt;/p&gt; &lt;p&gt;I almost took the time to write out the equivalent of this in POJS (plain old JavaScript) to show how much easier life is with JQuery, but I realized I didn&apos;t have the time, patience, or will.  JQuery has spoiled me!&lt;/p&gt;</description><pubDate>Wed, 16 Jul 2008 14:41:00 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2008/07/16/Related-checkbox-validation-with-JQuery</guid><category>ColdFusion,Javascript,Tips and Tricks</category></item><item><title>Sorry for the RSS Feed mishap!</title><link>http://daveshuck.instantspot.com/blog/2008/07/03/Sorry-for-the-RSS-Feed-mishap</link><description>OK, so the sleep-deprived minds behind InstantSpot hit the wrong switch this morning, and suddenly on AXNA, coldfusionbloggers.com, and God knows what else, I was being credited with a lot of blog entries that I never wrote.  The issue was resolved almost immediately, however, the posts are probably going to continue to show up on the aggregators until they age off.  Sorry for the feed spam everyone!&lt;br /&gt; &lt;br /&gt; EDIT:&lt;br /&gt; Here is a little more detail for those that were asking -&lt;br /&gt; &lt;br /&gt; Bottom line... Aaron and I just completely goofed in a pre-coffee misstep this morning.  In our logs we saw this continual 404 on a feed url that doesn&apos;t exist in our system.  We thought &quot;Hey, let&apos;s just point it to the main RSS and have it at least do *something*!  Turns out this was a feed url from 3+ years ago when my blog used BlogFusion.  So suddenly it started resolving for both AXNA and cfbloggers. As soon as we saw what happened we killed it, but it was too late unfortunately. &lt;br /&gt;</description><pubDate>Thu, 03 Jul 2008 16:06:52 GMT</pubDate><guid>http://daveshuck.instantspot.com/blog/2008/07/03/Sorry-for-the-RSS-Feed-mishap</guid><category>ColdFusion,Blog</category></item></channel></rss>