
Configuring Oracle TimesTen 7.0 for Application Servers and Object-Relational Mapping Frameworks An Oracle White Paper April 2008 Configuring Oracle TimesTen 7.0 for Application Servers and Object-Relational Mapping Frameworks Introduction .......................................................................................................3 TimesTen for Oracle Application Server 10g...............................................3 Configuring the TimesTen JDBC driver...................................................3 Configuring connection pools and data sources......................................4 TimesTen for JBoss 4 .....................................................................................12 Configuring the TimesTen JDBC driver.................................................12 Configuring CMP type mappings for TimesTen ...................................13 Configuring TimesTen data sources ........................................................15 TimesTen for WebLogic Server 9.................................................................18 Configuring the TimesTen JDBC driver.................................................18 Configuring TimesTen data sources ........................................................19 TimesTen for Sun Java System Application Server 9 ................................24 Configuring the TimesTen JDBC driver.................................................25 Configuring TimesTen connections ........................................................25 Configuring a TimesTen JDBC connection pool ..................................26 Configuring a TimesTen JDBC resource................................................28 TimesTen for WebSphere Application Server 6.........................................29 Configuring TimesTen connections ........................................................29 Configuring a TimesTen JDBC provider................................................30 Configuring TimesTen data sources ........................................................33 TimesTen for Oracle TopLink 10g ..............................................................35 Configuring the TimesTen JDBC driver for TopLink Workbench....36 Configuring a TimesTen database login from TopLink Workbench .36 JDBC settings for the database login.......................................................37 TimesTen for Hibernate 3.2 ..........................................................................38 Configuring the TimesTen JDBC driver for Hibernate........................38 Hibernate configuration properties for TimesTen ................................39 Configuring Oracle TimesTen 7.0 for Application Servers and Object-Relational Mapping Frameworks Page 2 Configuring Oracle TimesTen 7.0 for Application Servers and Object-Relational Mapping Frameworks INTRODUCTION This whitepaper is for application developers who use and administer Oracle TimesTen JDBC and for system administrators who configure and manage the TimesTen database. It provides information about configuring your application server and object–relational mapping framework for use with Oracle TimesTen 7.0. TIMESTEN FOR ORACLE APPLICATION SERVER 10G This section provides descriptions and examples of configuring the TimesTen Configuring Oracle Application Server JDBC driver for use with Oracle Application Server 10g Release 3. This document and TimesTen assumes that Oracle TimesTen and Oracle Application Server have been successfully installed on the same host machine and that both instances are running. Configuring the TimesTen JDBC driver Before you can use Oracle Application Server (AS) to access TimesTen databases, the Oracle AS environment must have access to the TimesTen JDBC driver jar file and the native TimesTen libraries. 1. Copy one of the TimesTen JDBC driver jar files from install_dir /lib to Oracle_install_dir /j2ee/home/applib . If Oracle AS is using JDK 1.4, copy the install_dir /lib/ttjdbc14.jar file. If Oracle AS is using JDK 5, copy the install_dir /lib/ttjdbc5.jar file. Where install_dir is the directory in which you installed Oracle TimesTen, and Oracle_install_dir is the directory in which you installed Oracle Application Server. 2. Set the LD_LIBRARY_PATH environment variable (or the equivalent variable for your OS) to include the install_dir /lib directory. On Windows, the PATH environment variable should be set to the install_dir /bin directory where TimesTen DLLs are located. This variable must be set for the environment where Oracle AS runs. Configuring Oracle TimesTen 7.0 for Application Servers and Object-Relational Mapping Frameworks Page 3 3. If you use OPMN (Oracle Process Manager and Notification Service) to start the application server, the OPMN configuration file requires modification to include the location of the TimesTen shared libraries. The OPMN configuration file is located at Oracle_install_dir /opmn/conf/opmn.conf . Open this file and add an entry for the LD_LIBRARY_PATH environment variable (or the equivalent variable for your OS) under the ias-component element associated with the application server. For example, an Oracle Application Server called 'OC4J' uses the TimesTen JDBC driver on the Windows platform. The opmn.conf configuration would look similar to this: <ias-component id="OC4J"> <environment> <variable id="PATH" value="C:\TimesTen\tt70\bin" append="true" /> </environment> 4. Restart the Oracle AS instance for the changes to take effect. Configuring connection pools and data sources The TimesTen JDBC driver supports four different types of connections to TimesTen databases. • Direct access with local transactions only – This configuration provides the fastest database performance. The TimesTen database must reside on the same machine as TimesTen and Oracle AS. • Direct access with XA distributed transaction support - The driver supports both local and distributed transactions. The TimesTen database must reside on the same machine as TimesTen and Oracle AS. • Client/server access with local transactions only - The TimesTen database may reside on a remote machine that is running the TimesTen server. • Client/server access with XA distributed transaction support - The driver supports both local and distributed transactions. The TimesTen database may reside on a remote machine that is running the TimesTen server. Each type of TimesTen JDBC driver connection requires a unique connection pool configuration in the Oracle Application Server. One or more data source objects may be associated with each connection pool. Example connection pool and data source configurations are described below for each of the four types of TimesTen connections. The examples below reference a TimesTen direct access DSN named RunData_tt70 and a client/server access DSN named RunDataCS_tt70 . These TimesTen DSNs must be configured in the .odbc.ini or sys.odbc.ini file or Windows Data Source Administrator before the examples can work. Configuring Oracle TimesTen 7.0 for Application Servers and Object-Relational Mapping Frameworks Page 4 Direct access connection pool (local transactions only) TimesTen Class: com.timesten.jdbc.TimesTenDriver Example URL: jdbc:timesten:direct:RunData_tt70 Figure 1.1 Example of the OM configuration page for Direct Access Connection Pool – local transactions only Example Oracle_install_dir/j2ee/home/config/data- sources.xml entry: <connection-pool name="TimesTenDirectPool"> <connection-factory factory-class="com.timesten.jdbc.TimesTenDriver" url="jdbc:timesten:direct:RunData_tt70"/> </connection-pool> Configuring Oracle TimesTen 7.0 for Application Servers and Object-Relational Mapping Frameworks Page 5 Direct access data source (local transactions only) Figure 1.2 Example of the OM configuration page for direct access data source – local transactions only Example Oracle_install_dir /j2ee/home/config/data- sources.xml entry: <managed-data-source connection-pool-name="TimesTenDirectPool" jndi-name="jdbc/TimesTenDirectDS" name="TimesTenDirectDS" tx-level="local"/> Direct access connection pool (local & distributed XA transactions) TimesTen Class: com.timesten.jdbc.xa.TimesTenXADataSource Configuring Oracle TimesTen 7.0 for Application Servers and Object-Relational Mapping Frameworks Page 6 Example URL: jdbc:timesten:direct:RunData_tt70 Figure 1.3 Example of the OM configuration page for direct access connection pool – local and distributed XA transactions Example Oracle_install_dir /j2ee/home/config/data- sources.xml entry: <connection-pool name="TimesTenDirectXAPool"> <connection-factory factory- class="com.timesten.jdbc.xa.TimesTenXADataSource" url="jdbc:timesten:direct:RunData_tt70"/> </connection-pool> Configuring Oracle TimesTen 7.0 for Application Servers and Object-Relational Mapping Frameworks Page 7 Direct access data source (local & distributed XA transactions) Figure 1.4 Example of the OM configuration page for direct access data source – local and distributed XA transactions Example Oracle_install_dir /j2ee/home/config/data- sources.xml entry: <managed-data-source connection-pool-name="TimesTenDirectXAPool" jndi- name="jdbc/TimesTenDirectXADS" name="TimesTenDirectXADS"/> Client/server access connection pool (local transactions only) TimesTen Class: com.timesten.jdbc.TimesTenDriver Configuring Oracle TimesTen 7.0 for Application Servers and Object-Relational Mapping Frameworks Page 8 Example URL: jdbc:timesten:client:RunDataCS_tt70 Figure 1.5 Example of the OM configuration page for Client/Server access connection pool – local transactions only Example Oracle_install_dir/j2ee/home/config/data-
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages41 Page
-
File Size-