JTransit Quickstart
This document will get you up and running quickly with JTransit. For more details refer to the document, Running Uncompiled ColdFusion and Tango Code in JTransit.
CONTENTS
INSTRUCTIONS
1. Download JTransit FrontLine installer and install the JDK.
The FrontLine installer consists of a ZIP file (at time of this writing called jtransit-frontline.zip) containing the JTransit FrontLine application. FrontLine runs as a separate process from the actual runtime application server, and will keep all your files up-to-date (as long as your update period in your license key is still current) and can perform other tasks as well, but that is beyond the scope of this quickstart document.
In order to run FrontLine or the JTransit Runtime you will need the Java Development Kit (JDK), at least version 1.3.1. For "bleeding edge" users we recommend using JDK 1.4 or higher since it is much faster than 1.3.1, although at time of this writing it is still in beta and has some outstanding bugs which may affect your application. The JDK's can be downloaded and installed from java.sun.com. Be sure to install the JDK, not the JRE (Java Runtime Environment), because JTransit requires compiling abilities not available in the JRE.
2. Unpack the JTransit FrontLine installer ZIP file.
Unless you are running on Windows, you should first create a new, empty directory for the JTransit system and support files. All files used by JTransit will be placed under this directory, unless you configure it differently (for example, if you want to place your log files on another drive or temporary directory). If you are running on Windows, it is recommended that you unpack the ZIP file at the root of your C: drive (but you don't have to).
NOTE: If you already have a pre-2.0 JTransit installation, please rename or move your old directories before installing FrontLine for the first time.
To unpack the jtransit-frontline.zip file on Unix (Solaris, Linux, MacOS X, etc.), move the ZIP to the new directory you just created and type "unzip jtransit-runtime.zip". If you don't have the unzip command you can type "jar xf jtransit-runtime.zip" instead (the jar command comes with the JDK you installed earlier, so be sure the JDK's bin directory is in your PATH).
MacOS X and Windows users can unpack the ZIP file using the free Stuffit Expander from Aladdin Systems but will have to move the contents of the expanded folder into the new folder where you want the JTransit software to be installed (or the root of C: on Windows).
The ZIP file contains a directory called "jtransit" with all the initial software in it needed to install the basic JTransit programs. On Windows, therefore, you should end up with a new C:\jtransit folder after unpacking the ZIP file (if you follow the recommendation of unpacking at the root of C:).
3. Make sure you have root or Administrator access.
Unix-style users can use the "su" command and type the root password, if known, or "sudo su" and type your own password, to gain root access. On Windows you should choose the logout or restart option from the Start menu and log in as Administrator.
4. Start and configure JTransit FrontLine.
The FrontLine configuration is stored in a frontline.xml file created when you first start FrontLine. To start FrontLine, change to the jtransit folder which contains the frontline.jar file, and type, "java -jar frontline.jar" (without the quotes). Alternately, on Windows, you can use the start-frontline.bat file provided to start FrontLine (Unix users can use start-frontline.sh). You will be asked which port number you want to connect to with your browser to complete the installation process. After answering that question, FrontLine will tell you what URL to hit with your web browser to access the configuration forms, which are well-commented and should be self-explanatory.
After you complete the web-based forms, FrontLine will start up. If you like, you can edit the frontline.xml file and configure more options (for example, to add additional license keys). There are instructions in the generated file to help you accomplish this. If you make a mistake and want to start over and have FrontLine ask you the configuration questions again, delete the frontline.xml file and restart FrontLine.
If all goes well you should see status messages about files being downloaded from the JTransit file servers. When complete, FrontLine will send an email to the address configured letting you know you should restart the Runtime, and a message is output to the console as well. At that point, you can continue to the next step.
5. Start JTransit Runtime.
Before doing this step, make sure FrontLine has completed downloading all the requred files for successful operation (see previous step). Since the JTransit Runtime runs inside the provided Orion Application Server, starting it is easy. You should open a new shell window for this step since FrontLine is now running in your first window. You can use the provided start-orion.bat (on Windows) or start-orion.sh (on all other platforms; for example, type "sudo sh start-orion.sh"). When it has started you will see a message like "Orion/1.5.3 initialized".
At this point, if you are on Unix, you will want to open a new shell window and insure you are root again (see above), so you can complete the following steps. On Windows and Mac OS X you will probably not need to use a terminal/DOS prompt for the remaining steps.
6. Copy source, template, and static files to the various webroots.
For example, if your old application has a directory structure like the following:
webroot/
admin.cfml
index.html
include-me.tmpl
app/
Application.cfml
login.cfml
view.cfml
index.taf
media/
product.png
border.png
splash.jpeg
You would copy your files into the following locations:
orion/default-web-app/
index.html
media/
product.png
border.png
splash.jpeg
jtransit/src/
admin.cfml
include-me.tmpl
app/
Application.cfml
login.cfml
view.cfml
index.taf
Note how all the "static" files go under orion/default-web-app, and all the "code" files (with CFML and Tango code in them) go in jtransit/src, where they will be compiled by the next step into Java source and byte code.
7. Run the JTransit Compiler.
To compile all your code, just change to the jtransit directory and type "jtransit" (in Windows) or "sh jtransit.sh" (in Unix/OS X). The Java source code (which you can safely ignore) is placed in jtransit/gen/src, and the bytecode is placed in jtransit/gen/classes.
Finally, a mypackage.jar file is created in the jtransit/gen folder. This file is also copied to the orion/default-web-app/WEB-INF/lib folder (and the relevant folder in any other app servers you selected to be automatically installed by FrontLine). It contains your application code compiled into Java bytecode! You can deploy this file to any JTransit installation on any J2EE application server, if you wish.
8. Test your installation.
Unless you changed the default port number, you should now be able to access your web site by hitting http://127.0.0.1/some-page.cfml on the current machine. If you changed the port number, include it after a colon (:) after the IP address, like http://127.0.0.1:8080/some-page.cfml. (Change some-page.cfml to an actual page from your application.)
If you get JTransit errors, be sure you copied the files into the correct directories under the JTransit source code folder as listed earlier. If pages seem to be rendering but you see broken images or other missing static content, check the Orion webroot.
If you get stuck please send an email to support@jtransit.com before you get completely frustrated. We'll help you get up and running quickly and want your experience with JTransit to be painless.
|