The Frontier Dashboard minimizes the effort required to publish a Frontier grid enabled web application, significantly reducing development costs as well as time to market. This JumpStart generates an application that uses Java J2EE and Eclipse, but please note that the Frontier Dashboard does not specifically require that your web application be Java or J2EE, or that you use the Eclipse development environment.
Prerequisites for the Frontier Dashboard Application JumpStart
- Sun Java JDK 1.5 or higher. Note the JAVA_HOME (installation directory), as it will be a required setting below.
- Apache Ant 1.7.1 - if you don't already have Ant installed on your system please download it from http://ant.apache.org and install it.
- Frontier SDK - If you don't have the Frontier SDK installed, you can download it from https://frontier.parabon.com/MyFrontier/download/products/index.jsp?product=sdk and install it. Note the FRONTIER_HOME (installation directory), as it will be a required setting below.
- Eclipse - If you don't already have the Eclipse IDE for Java, download it from http://www.eclipse.org/downloads/ and install it.
Section 1: Building, Deploying, and Running the Application
After installing and/or verifying the prerequisites, begin by extracting the contents of the Frontier Dashboard .zip file beneath your Eclipse workspace directory. For example:
/home/tom/workspace . |-EclipseProject1 |-EclipseProject2 |-<Your Frontier Dashboard JumpStart Project here>
Open a command shell in the project JumpStart Project directory referenced above. All commands referenced in this document should be run from this directory.
Perform the following steps to verify your environment.
- At the command prompt, execute the following command to verify your java installation:
java -versionAn acceptable result would be:
java version "1.6.0_11"
- At the command prompt, execute the following command to verify that ant is properly configured:
ant -versionAn acceptable result would be:
Apache Ant version 1.7.1 compiled on June 27 2008
A configuration GUI is provided to assist in setting the following required property values in the build.properties file. Alternatively, you can edit the build.properties file directly using your favorite text editor.
- frontier.sdk.home - The base directory of the Frontier SDK installation.
- jumpstart.java.home - The base directory of the Java SDK installation.
- tomcat.manager.username - Username of the Tomcat administrative user.
- tomcat.manager.password - Password of the Tomcat administrative user.
ant configureYou will be presented with a small GUI that will assist in setting the required values. Example values are shown below:
frontier.sdk.home=/home/tom/frontier-sdk jumpstart.java.home=/home/tom/Java/jdk1.5.0_11 tomcat.manager.username=tomcat tomcat.manager.password=s3cret
You can also modify any of the property values in the build.properties file as required (ex. - debug.port, shutdown.port, etc.), just remember that if you change any settings related to network access you will have to adjust those in the Service configuration screen of the Frontier Dashboard.
Now would be an appropriate time for a drumroll. Run the following command from the console in the project directory, which will completely configure and startup your JumpStart project.
Your service is now available from within the Frontier Dashboard!
You should now be able to go to the "My Apps" node in the Frontier Dashboard and add your new service. This gives you the opportunity to go through the same steps a user would when subscribing to your service. You can also add the application through the "My Grid Services" node.
After you have added the service to "My Apps", launch a Frontier Job that uses your service by either selecting the "Launch" menu item from the "My Apps" listing, or by clicking on the service node under the "My Apps" tree node.
After launching your job, you will be presented with a job status page which will update until the job completes.
Editing the Project in Eclipse
The setup command above generated a number of resources for you, one of which is an Eclipse project workspace. Open the Eclipse IDE and from the "File" menu, choose "Import...", expand the "General" node in the bottom pane, and select "Existing Projects into Workspace" and click the "Next" button. The "Import" dialog should have the "Select root directory" radio button checked by default, and choose the adjacent "Browse..." button and navigate to the project directory you created in the first step above and click the "OK" button. The "MyApp" project should be checked by default in the "Projects:" pane below. Click the "Finish" button.
The project should display in the "Package Explorer" view (one of the Java views) within Eclipse, or if you prefer the "Navigator" view (one of the General views).
Open the com.parabon.frontier.dashboard.jumpstart.CreateJobServlet and set a breakpoint by double-clicking the gray margin to the left of the editor within the launchJob method. Open the "Debug" perspective and then from the "Run" menu choose "Open Debug Dialog..." and choose "Remote Java Application->My App and then click the "Debug" dialog.
Repeat the steps in "Section 1" above and the debugger should interrupt the program at your breakpoint and allow you to step through the code.
Open the com.parabon.frontier.dashboard.jumpstart.task.RemoteTask class and change the body of the run method as shown below, which will calculates the cubed value of the input instead of the squared value.
Open the "MyApp-<web-<protected-<jobView.jsp" file and table heading in the middle of the page from "Square" to "Cube", as shown below and save the file.
Choose Window-<Show View-<Other-<Ant-<Ant and click the "OK" button to display the Ant view. Right-click on the Ant view and choose "Add Buildfiles..." and choose MyApp-<build.xml and click the "OK" button. In the Ant view expand the MyApp node and choose the "deploy" target, then click on the green arrow in the upper right of the Ant view to deploy your changes to Tomcat.
Remove the breakpoint you set previously by double-clicking it, and follow the steps to run the job and you should see the source changes you made reflected in the runtime.
Shutting Down and Ongoing Development
To shutdown the application server as well as the database, issue the following command:
On an ongoing basis, use "ant startup" and "ant shutdown" commands to start and stop both the Tomcat server as well as the database. As you make changes to your code, use the "ant deploy" command to deploy the changes to Tomcat.
If you need help remembering the names of the ant tasks, you can use the following command: