Compile and Run application with WebLogic applicaton server


1. Set up environment to compile and run the sample application

The following script must be run for each of the terminal session:

Windows:   > quickstart/ttquickstartenv.bat
Unix/Linux:   $ . quickstart/ OR
$ source quickstart/ttquickstartenv.csh

2. Set up sample database, user accounts and the TPTBM table

The following command should be run once to set up the sample database, user accounts and the TPTBM table.

Windows or Unix/Linux:   > cd quickstart/sample_code/j2ee_orm
> ttIsql -connStr "DSN=sampledb_1122" -f tptbm.sql

3. If necessary, install the Apache Ant build tool.

For each application server, an Ant build script is provided to configure, build and execute the application based on the properties of the applicaton server installation. The Apache Ant build tool has to be installed if not present.

After installation, make sure the Operating System environment variable PATH includes the path to the 'ant' executable.

The Ant build scripts have been tested with Apache Ant version 1.6.5.



1. install WebLogic application server and configure

Install Oracle WebLogic Server 10.3 and then set the following properties in file quickstart/sample_code/j2ee_orm/

    weblogic.home.dir   -- set this to the root installation directory
                           of the local WebLogic server installation

    weblogic.domain.dir -- the location of the domain directory for the 
                           server hosting the TptbmAS application

    weblogic.deploy.dir -- the directory where application archives can be
                           copied and auto deployed to the server
                                -- the host name of the machine where the server is

    weblogic.port       -- the RMI port number used by external clients to 
                           communicate with the server, the default port
                           number is 7001
Each Ant build script reads values from file quickstart/sample_code/j2ee_orm/ This file specifies the locations of build dependencies including the location of the application server installation. This file also specifies the common benchmark execution parameters.


The server will require access to the TimesTen JDBC driver jar file. This can be done by appending the location of the TimesTen JDBC driver jar file to the WEBLOGIC_CLASSPATH variable defined in the ${weblogic.home.dir}/common/bin/ (or commEnv.cmd on Windows) file.


The server will also need access to the TimesTen shared libraries. This can be done by setting the LD_LIBRARY_PATH environment variable (or the equivalent variable for your OS) to the location of the TimesTen installation's lib directory. On Windows platforms the PATH environment variable should be set to the location of the installation's bin directory where TimesTen DLLs are located. These variables are defined in the ${weblogic.home.dir}/common/bin/ (or commEnv.cmd on Windows) file.

4. TimesTen Data Source

Before the demo can be deployed or executed, a TimesTen data source with the JNDI name of jdbc/TbtbmDS must be configured on the server. A sample data source configuration file is provided by the sample application at quickstart/sample_code/j2ee_orm/config/weblogic10/TptbmDirectDS-jdbc.xml. This file can be copied to the ${weblogic.domain.dir}/config/jdbc directory. In order for the data source configuration to be read by the server the following section must be copied into the section of the ${weblogic.domain.dir}/config/config.xml file:


Note that 'examplesServer' should be replaced with the name of the target server.

The server should be restarted after these changes. The server will read the new configuration when it starts up and then add the data source to its JNDI tree.

5. build, deploy and run the sample application

After the server has been configured to use the jdbc/TbtbmDS data source and restarted, the application can be built, deployed, and executed, through Ant script build-weblogic10.xml, with this sequence of Ant tasks under directory quickstart/sample_code/j2ee_orm:

   ant -f build-weblogic10.xml clean
   ant -f build-weblogic10.xml package
   ant -f build-weblogic10.xml deploy
   ant -f build-weblogic10.xml run

Note that this application has been tested with WebLogic 10.3.3.




For more information on Java programming with Oracle TimesTen, refer to the Oracle TimesTen In-Memory Database Java Developer's Guide.