cf.Objective() 2010: Intro to JEE Servlet Containers for ColdFusion Developers

Note: this has also been translated to Spanish, here.

I am thrilled and honored to have the opportunity to speak at this year's cf.Objective() 2010 conference! My session title is "Intro to JEE Servlet Containers for ColdFusion Developers" and here is the preliminary description I used when submitting my session topic:

An alternate title for this session might be, "What the heck is a servlet container and what does it have to do with CFML?" We'll discuss the relationship between CFML "engines" (i.e., servlets), JEE application servers and servlet containers, and Web servers. Understanding the basics of this relationship can provide CFML developers with a greater confidence to leverage underlying Java tools, improve development environments and deployments and write more flexible and powerful applications.

Why Bother?

I submitted this topic because I believe there are many CF developers, of all skill levels, with very little knowledge in this area. I was most certainly one of these developers for the better part of my CF career thus far! Over the past year or two I've developed a much deeper understanding of Java Enterprise Edition (JEE/J2EE), Servlets, Servlet Containers, Java Application Servers and Web servers. Most importantly I've learned a lot more about how Adobe ColdFusion, Open BlueDragon and Railo leverage the power of these Java platform specifications.

Much of my learning has been out of necessity -- and I feel like I had to do it the hard way (on my own)! But looking back, had I possessed some base knowledge in the right areas, I really think I may have put all the puzzle pieces together much more quickly. So I'm hoping to provide these building blocks in my cf.Objective() session this year.

You don't need to become a Java guru to grok these concepts, but they can greatly increase your toolset as a ColdFusion developer, allowing you to design and develop more robust applications and gain greater marketability in the job market. Here are some points that I hope to provide attendees:

  • 10,000-foot view of how CFML Engines, Servlet Containers, Java Applications Servers and Web Servers interact to make the magic we've all come to know and love
  • Understanding the many options the Adobe ColdFusion installer provides and what you can (and might want to) do on your own
  • Confidence and flexibility in CF development environments (application isolation, starting app servers from your IDE, super-simple portability, etc.)
  • Configuration options to keep both development and production environments running smoothly
  • Understanding and leveraging EAR/WAR deployments
  • Awareness of the many options and not being afraid to check them out!

Lots to talk about, feedback needed!

As you can imagine, there is a lot that can be covered here. My goal for this session is to provide an understanding of the important pieces of the big picture, tools you can put to immediate use, and a confidence to safely explore more deeply. If any of the concepts or buzz words I've mentioned in this post are scary, please know that they're not -- not if you start in the right place.

If you feel any one area or concept that I've mentioned would be of greatest value to you... If you have a more specific question that keeps coming up, or something that you continue to avoid... If you know this stuff cold, but see common problem points out in the CFML community... I would highly value your feedback as I continue to refine my session preparation. Please comment on this blog post or use my contact form to contact me directly.

Whether you're already grokking some or none of what I've discussed here, I hope you can make it to my cf.Objective() session and take away some useful bits!

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Ben Nadel's Gravatar Great talk my man. Inspired by this and Kurt's talk, I now have Apache running on my local Windows XP machine. I installed ColdFusion 8 in multi-server mode and it seems to be running nicely. Even got mod_rewrite to work for a virtual host.

The next thing I want to try and do is install CF9 along side it. That should definitely be more interesting :)
# Posted By Ben Nadel | 4/29/10 7:32 PM
Jamie Krug's Gravatar @Ben: My pleasure my man. Thank you for attending! Great to hear your local dev environment is rocking too. Adding CF9 into the mix with another multi-server install is pretty simple. Easiest means is to find the lines in Apache config that JRun connector configured for you; cut them out of main conf file; paste them into a new file (e.g., cf8.conf); and include that file only in vhosts you want to use CF8 (Include cf8.conf--may need relative path info in front of file name, depending on location). Then let the CF9 installer connect to Apache. Do the same thing with a cf9.conf file for including. This allows you to just include one conf for each vhost, depending upon which CF version you want that host to use. You could also leave one of them in the global config file and include the other only in hosts that you want to override (e.g., CF9 for all hosts, unless you include the cf8.conf in a vhost). Hit me up if you need help. Cheers.
# Posted By Jamie Krug | 4/29/10 8:56 PM
Ben Nadel's Gravatar Very interesting! I was playing around with it yesterday - trying to install CF9 as a EAR file, but that ended up being a #fail adventure. Are you saying that if I move the all that JRUN bootstrapping / connector stuff into the VirtualHost of the main "localhost" and then run the CF9 installer, it will act like no CF8 was installed?

I assume I would select multi-server install again with CF9 and let it wire up the Apache config?
# Posted By Ben Nadel | 4/30/10 7:55 AM
Jamie Krug's Gravatar @Ben: Precisely, though I might suggest removing the JRun bootstrap/connector stuff completely while doing the CF9 install, to be safe. You'll then have JRun bootstrap/connector stuff for both CF8 and CF9, to place in any VirtualHost you'd like. They'll probably be nearly identical, just different ports for the two JRun instances.
# Posted By Jamie Krug | 4/30/10 11:07 AM
Ben Nadel's Gravatar Sounds pretty straightforward. I'll be trying that later today.
# Posted By Ben Nadel | 4/30/10 11:09 AM
Ben Nadel's Gravatar Hmm. CF9 installer is telling me that I already have JRun installed, so it only gives me the EAR/WAR option.

I guess I'll try to go the EAR route, but I don't think I can give it the context "cfusion" because that is the context my cf8 install seems to have gotten (under jrun/servers).
# Posted By Ben Nadel | 4/30/10 4:15 PM
Jamie Krug's Gravatar Hmm... maybe I'm remembering incorrectly--been a while since I did the multi-version-with-JRun-on-Windows thang. I'd imagine the EAR should do just fine, with a different context. You may be able to leverage the JRun Admin and then the wsconfig (.exe?) to connect Apache (again, "hide" the CF8 config stuff first). Sorry I can't be more help on that particular setup. Good luck!
# Posted By Jamie Krug | 5/2/10 9:26 PM
Ben Nadel's Gravatar @Jamie,

No worries my man. I am getting closer! I got the cf8 and cf9 installs to work for CFIDE. But, my cf9 won't seem to work in my VirtualHost.

Perhaps later this week you'd be available for some after-hours consulting.
# Posted By Ben Nadel | 5/3/10 8:50 AM
Jamie Krug's Gravatar @Ben,

You bet. If I can find some time, I'll give this a test run in my Win XP VM, but it's looking like a busy week! I can better help if I know precisely what your goals are--drop me an e-mail at jamiekrug at that "G" mail domain ;-) Let me know what you want running and how (CF8/9, multiple virtual hosts each? test same code on both? etc.).

There are just so many options, so if we get some finer details ironed out via e-mail thread, I can probably better recommend a solution (or two or three:).
# Posted By Jamie Krug | 5/3/10 9:11 AM
Ben Nadel's Gravatar I'm looking to get something like what you had in your demo, where I can be showing a site in different engines. This is not a must-have, but I just think it would be awesome. For example, if I can get:

... to hit my "local" sites using different engines. I am not going to need this right now; but, it sounds like one of those things that is easier to PLAN for now and then need later.

I'll shoot you an email with more details to get some plans going.
# Posted By Ben Nadel | 5/4/10 10:07 PM
BlogCFC was created by Raymond Camden.