Ali-Tomcat and Pandora are containers that EDAS relies on to run services. They integrate service publishing, subscription, service call tracing, and other core functions. Applications must be published on such containers in both development and runtime environments.
Note: Use JDK 1.7 or later.
Download Ali-Tomcat and decompress the downloaded archive to the appropriate directory (for example, d:\work\tomcat).
Download Pandora Container and decompress the downloaded archive to the Deploy directory where Ali-Tomcat is saved (which is d:\work\tomcat\deploy\ in this example).
View the Pandora Container directory structure.
In Linux systems, run the tree -L 2 deploy/ command in the relevant path to view the directory structure.
d:\work\tomcat > tree -L 2 deploy/
In a Windows system, directly navigate to the appropriate path to view the directory structure.
To develop an application locally, use either Eclipse or IntelliJ IDEA.This topic describes how to configure Eclipse and IntelliJ IDEA development environments.
To configure Eclipse, you must download the Tomcat4E plug-in and save it to the directory where Pandora Container is stored, which was created when you installed Ali-Tomcat. After configuring Eclipse, you can directly publish and debug local code in this environment.The operations are as follows:
Download the Tomcat4E plug-in and decompress it to a local directory (such as d:\work\tomcat4e).
The package contains the following items:
Open Eclipse and choose Help > Install New Software from the menu bar.
In the Install dialog box, click Add to the right of the “Work with” area. In the Add Repository dialog box that appears, click Local.In the dialog box that appears, select the directory where the decompressed Tomcat4E plug-in resides (d:\work\tomcat4e\ in this example) and click OK.
Return to the Install dialog box, and click Select All and then Next.
Follow the prompts on the interface to perform the subsequent steps.After installing the Tomcat4E plug-in, you must restart Eclipse to make the plug-in take effect.
After the restart, choose Run As > Run Configurations from the Eclipse menu.
Select AliTomcat Webapp in the left-side navigation pane, and click the New launch configuration icon at the top.
On the page that appears, click the AliTomcat tab. Then, in the taobao-hsf.sar Location area, click Browse and select the local path for Pandora, such as d:\work\tomcat\deploy\taobao-hsf.sar.
Click Apply or Run to complete the configuration.
Next time, you can start this project directly, without the need to configure it again.
View the output information concerning project operation. If the following Pandora Container information is displayed, you have configured the Eclipse development environment successfully.
Note: At present, the IntelliJ IDEA commercial edition, but not the community edition, is supported.For this reason, ensure that the IntelliJ IDEA commercial edition is installed locally.
Run IntelliJ IDEA.
In the menu bar, choose Run > Edit Configuration.
On the Run/Debug Configuration page, choose Defaults > Tomcat Server > Local in the left-side navigation pane.
On the right of the page, click the Server tab. In the Application Server area, click Configure.
On the Application Server page, click + in the upper-right corner. In the Tomcat Server dialog box, set Tomcat Home and Tomcat base directory, then click OK.
Set Tomcat Home to the local directory where Ali-Tomcat was decompressed. Then, Tomcat base directory is automatically set to the same path.
From the drop-down list in the Application Server area, select the configured Ali-Tomcat instance.
In the VM Options area, set the JVM startup parameter to the Pandora path, such as -Dpandora.location=d:\work\tomcat\deploy\taobao-hsf.sar.
Note: Replace d:\work\tomcat\deploy\taobao-hsf.sar with the actual local path where Pandora was installed.
Click Apply or OK to complete the configuration.