IBM Optim pureQuery Runtime provides Java Persistence API (JPA) with an alternative way to access a database. IBM Optim pureQuery Runtime supports static Structured Query Language (SQL).
JPA in the Java EE and Java SE environments provides optional support for the IBM Optim pureQuery Runtime environment. IBM Optim pureQuery Runtime is a high performance Java data access platform that helps manage applications that access data. IBM Optim pureQuery Runtime provides an alternate set of APIs that can be used instead of Java Database Connectivity (JDBC) to access the DB2® database.
To use this feature on the application server, IBM Optim pureQuery Runtime version 1.2 must be installed. If you plan to perform the DB2 bind command from the administrative console, or with the wsadmin tool, you must have IBM Optim pureQuery Runtime v1.2 or later. Refer to the Data Studio information center topic on installing IBM Optim pureQuery Runtime for more information.
The application server offers support for static SQL for Enterprise JavaBeans (EJB) 2.x entity beans with the ejbdeploy SQLj option. With JPA, this feature is offered through IBM Optim pureQuery Runtime.
There are several benefits to using IBM Optim pureQuery Runtime instead of JDBC and SQLJ. Static SQL offers greater security and control over access to data because applications are only granted authority to execute known SQL. Static SQL offers better resource utilization on the DB2 server because it avoids runtime parsing and optimizing of the SQL statements.
IBM Optim pureQuery Runtime makes use of DB2 packages. These packages consist of information for one or more SQL statements and are stored in the DB2 catalog. To create the packages, the user must first run the wsdb2gen command on a JPA application. The wsdb2gen command creates a persistence_unit_name.pdqxml file. This file contains pre-generated SQL statements for Create, Update, Delete, and Retrieve, NamedQueries and NamedNativeQueries of JPA entities. The persistence_unit_name.pdqxml file must be bound against database. Associated DB2 packages are generated and the SQL statement is executed statically at runtime. This persistence_unit_name.pdqxml file can be included into the application Java archive (JAR) file.
WebSphere® Application Server support for IBM Optim pureQuery Runtime
In this information ...Subtopics
Related reference
Related information
| IBM Redbooks, demos, education, and more(Index) |