Deploying Railo 3 to JBoss

Deploying Railo 3 to JBoss couldn't be much easier really. You should already have JBoss installed, if not you can download the latest release from jboss.org. I installed JBoss 4.2.3.GA to C:\jboss\jboss-4.2.3.GA\ I then downloaded railo-3.0.0.005.war

from the Railo website.

Deploying

Before deploying Railo I tested the JBoss install once sure that it was working correctly I shut JBoss down and prepared to deploy Railo. The first thing I did was create a railo.war directory in C:\jboss\jboss-4.2.3.GA\server\default\deploy\. I then renamed my downloaded railo-3.0.0.005.war file to railo-3.0.0.005.zip and unzipped the contents of the war to the railo.war directory.

I then started up jboss, waited until it was finished and went to http://localhost:8080/railo/ and was greeted by the default index.cfm file.

Voila finished deploying.

Is This The Correct Procedure?

Thats a good question. I've deployed applications to other J2EE servers simply by dropping the .WAR file into the deploy folder. The war was immediately unpacked into a folder. I first tried that with JBoss and simply dropped the railo.war file into the Deploy directory and as I expected JBoss started deploying it. What I didn't expect was that it deployed it to the tmp/deploy directory. This may well be expected behavior but I wanted a more permanent deployment and thats when I decided to "manually" deploy it using the method above.

If anyone knows a better way I'm all ears.

Happy Coding...

Related Blog Entries

9 Comments to "Deploying Railo 3 to JBoss"- Add Yours
Luc Texier's Gravatar Gary,

JBoss AS supports several types of enterprise applications, some both in packaged and expanded/exploded format.

Please check out the official doco for more details.
http://www.redhat.com/docs/manuals/jboss/jboss-eap...

Back to your question, first off one should not be using "deploy", "tmp" or "work". They are folders created by the application server at startup and developers/applications should not rely on their existence or content. Instead (as you did), simply create a folder with the ".war" extension and drop the content of your web archive in it. Changes made to CFML pages will be reloaded on the fly thus allowing for rapid prototyping and testing that all CFML developers enjoy :)

Cheers,

Luc Texier
Lead JBoss Support
# Posted By Luc Texier | 9/16/08 1:13 PM
Gary Gilbert's Gravatar @ Luc,

Thanks for the response. Just to clarify then. The way I deployed Railo 3 to JBoss was correct, that is by expanding the .war file into the /server/default/deploy directory?

The first part of your response leads me to believe that I shouldn't be creating anything in the default/deploy directory because I can't be sure that the directory or content exists? I would understand that for the tmp or the work directory, but I would expect that the deploy directory itself is always present.
# Posted By Gary Gilbert | 9/16/08 1:39 PM
Luc Texier's Gravatar duh!

I mean of course "data", "tmp" and "work". Sorry about that.

Deploying into /deploy (or any other folder watched by a deployment scanner) is the correct way. You may fix my initial comment if you wish to do so.
# Posted By Luc Texier | 9/16/08 2:16 PM
Manuel's Gravatar Gary, Luc,

I just did the same thing today but I noticed a few things. Maybe you can help me out:
1. Where would I put my own application that I want to run inside Railo? With ColdFusion I would make a directory in the wwwroot dir and put the files in there.
With Railo, do I just create a virtual mapping and put the directory with my files anywhere I want or is there some best practice?
2. My own jars should go to railo.war/WEB-INF/lib right?
3. I can't find any documentation on Railo, the one the Railo homepage is not very extensive... Is there anything else out there? JBoss docs are very good, I hope you will get Railo to that standard in November.
# Posted By Manuel | 9/16/08 8:48 PM
Gary's Gravatar @ Manuel,

take a look at my blog entry http://www.garyrgilbert.com/blog/index.cfm/2008/9/....

you can also create it at the same level as ROOT but you can also have it located somewhere completely else just like with IIS virtual directories.
# Posted By Gary | 9/16/08 9:14 PM
Jason Dean's Gravatar Gary. Thanks for this. Worked perfectly. I was able to deploy Railo 3.0.1 to JBoss 4.2.3 with ease. Worked exactly like you said it would.

On a side note, I first tried to deploy to the new JBoss 5.0, but it did not work. I kept receiving an error about zip archives not being openable. Just wanted to point that out to anyone trying to do the same. I did not get it working with JBoss 5. I am sure it is possible, though.
# Posted By Jason Dean | 12/9/08 12:25 AM
Thomas Messier's Gravatar Thanks for this entry. I just tried this to see if it worked out and I'm really blown away by how easy it is. I didn't run into a single problem. Hell, this may be quicker than using an installer!
# Posted By Thomas Messier | 2/5/09 1:32 PM
Jamie Krug's Gravatar I tried this with JBoss 5.0.1.GA and Railo 3.0.2.001 WAR (on Ubuntu 8.04), but could not get Railo to work. At JBoss start up I saw many "Failed to create a new SAX parser" errors. JBoss 5 started up fine and tested fine, but the Railo deployment failed every time. I then tried the very same process with JBoss 4.2.3.GA and it worked like a charm.

I will now try your instructions for deploying Railo as an EAR and see if that works with JBoss 5. I will comment again with my results...

@Gary: Thanks a ton for sharing your many helpful Railo posts!

Best,
Jamie
# Posted By Jamie Krug | 2/25/09 1:56 AM
Jamie Krug's Gravatar As a follow-up to my last comment: I'm seeing the same "Failed to create a new SAX parser" errors with JBoss 5.0.1.GA when deploying Railo as an EAR as I did when deploying Railo as a WAR. This appears to be a known bug in JBoss 5.0.1.GA. Both the EAR and WAR Railo deployment methods Gary has outlined works great for me with JBoss 4.2.3.GA.

Also, FWIW to others, I've done this all on Ubuntu 8.04 with Sun Java JDK 1.6.0_12 for the JRE.

Now on to getting Apache and mod_jk connecting it all... Thanks again!
# Posted By Jamie Krug | 2/25/09 2:45 AM

Powered By Railo

Subscribe

Subscribe via RSS
Follow garyrgilbert on Twitter Follow me on Twitter
Or, Receive daily updates via email.

Tags

adobe air ajax apple cf community cfml coldfusion examples ext flash flex google javascript jquery max2007 max2008 misc open source programming railo software technology ui

Recent Entries

No recent entries.

Blogroll

An Architect's View
CFSilence
Rey Bango
TalkingTree

Wish List

My Amazon.com Wish List