You can install, run, and monitor a batch application that
reads and writes files using the XDCGIVT sample.
Before you begin
- Augment existing WebSphere® Application
Server profiles to support the Compute Grid applications or create
profiles that include support for the Compute Grid applications.
- Start the appropriate application servers and any supporting management
processes.
- Configure the location of the job scheduler.
The following steps
assume that you are setting up a non-clustered application server
test environment to explore the capabilities of the Compute Grid applications.
If
you are setting up a clustered environment, you must perform additional
steps. You must create a network database to support the job scheduler.
You must configure related job scheduler database connectivity settings.
Read the topic about configuring the job scheduler.
- On the administrative console, click System administration
> Job scheduler.
- Set Scheduler hosted by to the identity of the appropriate
application server.
- Save the changes.
About this task
Use the following general procedure to set up a database
for the XDCGIVT sample, and install and run the sample. Read the topics
about the job scheduler, the job management console, and developing
applications for detailed information.
Procedure
- Set up the IVTDB database for the XDCGIVT sample.
This
database is for the sample itself. The job scheduler has its own database.
- Run the java –version command.
By running the command, you can verify that Java Version 1.6 or later is installed and included
in the PATH variable of your operating system.
- Create the IVTDB database.
Use the appropriate
CreateIVTTables DDL file that is located in the following directory.
Examples of DDL files are CreateIVTTablesDB2.ddl and CreateIVTTablesDerby.ddl.
![[For Linux operating system]](../images/linux.gif)
![[For HP-UX operating system]](../images/hpux.gif)
![[For Solaris operating system]](../images/solaris.gif)
![[For AIX operating system]](../images/aixlogo.gif)
<app_server_root>/longRunning
<app_server_root>\longRunning
- Create the Java Database
Connectivity (JDBC) resources.
- On the administrative console, click Resources > JDBC > JDBC
providers.
- Create a JDBC XA provider at the server scope with the following
properties.
- Database type
- Derby.
- Provider type
- Derby JDBC Provider.
- Implementation type
- XA data source.
- Name
- XDCGIVT Derby JDBC Provider (XA).
- Description
- Accept the default value.
- Click through the remaining panels. On the last panel, click Finish.
- On the administrative console, click Resources > JDBC > Data
source.
- Create a data source with the following properties.
- Data source name
- XDCGIVT data source (XA).
- Java Naming and Directory
Interface (JNDI) name
- jdbc/IVTdbxa.
- JDBC provider
- Select the existing JDBC provider XDCGIVT Derby JDBC Provider
(XA).
- Database name
- Enter the path to the IVTDB database.
<app_server_root>\derby\databases\IVTDB
For
example,
C:\WebSphere\AppServer\derby\databases\IVTDB
- Use this data source in container managed persistence (CMP)
- Selected.
- Security aliases
- Accept the default values.
- Click through the remaining panels. On the last panel, click Finish.
- Select the new data source and click Test Connection to
test the connection to the database.
- Install the XDCGIVT sample.
- In the administrative console, click Applications
> New application > New Enterprise Application.
- Specify the full path to the sample.
![[For Linux operating system]](../images/linux.gif)
![[For HP-UX operating system]](../images/hpux.gif)
![[For Solaris operating system]](../images/solaris.gif)
![[For AIX operating system]](../images/aixlogo.gif)
<app_server_root>/installableApps/XDCGIVT.ear
<app_server_root>\installableApps\XDCGIVT.ear
- In the wizard, select Fast Path - Prompt only when
additional information is required, accept default settings, continue
through the steps, clicking Finish when you are done.
- If you plan to install additional sample applications,
do so now.
- Restart the application server or start the application.
If this time is the first time that you are installing an
application, restart the server. Otherwise, you can start the application
under the Applications > Application Types > WebSphere enterprise applications panel.
- Run the XDCGIVT sample.
- Edit the appropriate xJCL file.
The XDCGIVT
sample includes the following xJCL files. Each has a different purpose.
- XDCGIVTtxt2txtxJCL.xml
- Copies one text file to another text file and compares the two
files.
- XDCGIVTbyte2bytexJCL.xml
- Copies a byte file to another byte file and compares the two files.
- XDCGIVTtxt2db2txtxJCL.xml
- Copies a text file to a database, copies the entries in the database
to another text file, and compares the two files.
You use the xJCL files to submit different types
of jobs to the XDCGIVT sample.
The files are located in the
following directory.
![[For Linux operating system]](../images/linux.gif)
![[For HP-UX operating system]](../images/hpux.gif)
![[For Solaris operating system]](../images/solaris.gif)
![[For AIX operating system]](../images/aixlogo.gif)
<app_server_root>/longRunning- Modify the inputDatastream and outputDataStream properties to
include valid directories.
<prop name="inputDataStream" value="/tmp/input-text.txt" />
<prop name="outputDataStream" value="/tmp/output-text.txt" />
<app_server_root>\longRunning- Modify the inputDatastream and outputDataStream properties to
include valid directories, including double backslashes. For example:
<prop name="inputDataStream" value="C:\\temp\\input-text.txt" />
<prop name="outputDataStream" value=" C:\\temp\\output-text.txt" />
- Start the job management console.
In a
web browser, type the following web address.
http://<job
scheduler server host>:<port>/jmc
<job
scheduler server host> is the host address and <port> is
the WC_defaulthost port of the application server on which the running
job scheduler is installed.
To view on the administrative console
the port numbers assigned to a given application server, click Servers
> Server Types > WebSphere application
servers > server_name > Communications > Ports.
- Submit an xJCL file, such as XDCGIVTtxt2txtxJCL.xml.
On the job management console, click Job Management >
Submit a job and specify the path to the xJCL file.
- Monitor the submitted job.
On the job management
console, click Job Management > View jobs and view jobs based
on characteristics such as the job ID and the job submitter.
You
can determine whether the job completed successfully by going to the
second page of the job viewer and scrolling to the bottom. If the
job did complete successfully, you see a Job completed successfully message.