Setting up the JavaCompute Node sample
You can complete the following steps before or after you import the samples.
Step 1 - GoogleAPINode sample - Download the Google Web APIs file googleapi.jar
- On a Web browser, go to: http://www.google.com/apis/download.html.
- Read the Google Web APIs license terms. Click the check box to agree to them.
- Click Download Now.
- Save the googleapi.zip file to a directory of your choice.
- Unzip the file, and note the location of googleapi.jar for later.
Step 2 - GoogleAPINode sample - Create a Google account and obtain a license key
- On a Web browser, go to: https://www.google.com/accounts/NewAccount?continue=http://api.google.com/createkey&followup=http://api.google.com/createkey.
- Enter your details, read the Terms of Service, then click I have read and agree to the Terms of Use. Create my account.
The key is now sent to the e-mail address you specified. This license key entitles you to 1000 queries per day, using the GoogleAPINode sample.
For your reference, the home page for the Google Web APIs is: http://www.google.com/apis/index.html.
Step 3 - NewsGroupGetNode sample - Download the NNTP Provider for Javamail file nntp.jar
- On a Web browser, go to: http://www.vroyer.org/lgpl/index.html.
- Click on the file nntp-1.0.zip (or a later version if this file is not present) and save it to a directory of your choice.
- Unzip the file, change the directory to nntp-1.0\lib, and take note of the location of nntp.jar for later.
The following steps can only be completed after you have imported the samples.
Step 4 - Copy the googleapi.jar file to IBM WebSphere Message Broker shared-classes directory
- Copy the file googleapi.jar that you downloaded in Step 1 above to the appropriate directory, so it can be read by the broker at run time:
- On Windows: C:\Documents and Settings\All Users\Application Data\IBM\MQSI\shared-classes
- On Linux: /var/mqsi/shared-classes
Step 5 - Import the downloaded nntp.jar file into IBM WebSphere Message Broker
- Switch to the Broker Application Development perspective.
- Click JavaComputeNodeSampleProject, then click File > Import.
- Click File System, then click Next.
- Click Browse to navigate to the directory containing the downloaded file nntp.jar.
- Select the check box on the right for nntp.jar, then click Finish.
You should now see the jar appear under the project JavaComputeNodeSampleProject.
Step 6 - Fix the classpath build errors in IBM WebSphere Message Broker Toolkit
- Right-click the JavaCompute Node Project called JavaComputeNodeSampleProject and click
Properties.
- Click Java Build Path, then click the Libraries tab.
- Click Add JARs.
- Expand JavaComputeNodeSampleProject, then click nntp.jar. Click OK.
- Click Add External JARs.
- Navigate to where you downloaded the googleapi.jar file, then select it and click Open.
- Click OK to close the Properties dialog.
- Clean the project, by clicking Project > Clean > Clean all projects, then OK.
This should result in all the build errors on the IBM WebSphere Message Broker Toolkit being resolved.
- Ensure that only warnings, indicated by a yellow hazard triangle icon, remain in the Problems panel of IBM WebSphere Message Broker.
If errors still remain then try the following procedure.
- Check that you have followed all the instructions correctly.
- Clean the projects individually, first JavaComputeNodeSampleProject, then JavaComputeNodeSampleFlowProject.
- If errors still remain:
- Right-click JavaComputeNodeSampleFlowProject, then click Properties > Project References.
- Clear the check box for JavaComputeNodeSampleProject, then select it again.
- Repeat step b).
Step 7 - Deploy the JavaCompute Node samples to IBM WebSphere Message Broker
- Switch to the Broker Administration perspective.
- Open the supplied empty bar file JavaComputeNodeSampleArchive.bar.
- Click Add.
- Select the check box next to JavaComputeNodeSampleFlowProject so that all six corresponding message flows are selected.
- Click OK.
- Save the bar file by pressing Ctrl + S.
- Deploy the bar file to the broker WBRK6_DEFAULT_BROKER, by dragging and dropping the bar file onto the execution group called JavaComputeNodeExecutionGroup.
You should shortly see the six message flows, and four jar files now deployed to that execution group under the broker.
You are now ready to run the samples by following the Run the sample instructions.
Back to sample home