Data Studio pureQuery provides Java™ Persistence API (JPA) with an alternative way to access a database. PureQuery supports static Structured Query Language (SQL).
JPA in the Java EE and Java SE environments provides optional support for the pureQuery runtime environment. PureQuery is a high performance Java data access platform that helps manage applications that access data. PureQuery provides an alternate set of APIs that can be used instead of Java Database Connectivity (JDBC) to access the DB2® and Informix® database.
To use this feature on the application server, you must install Data Studio pureQuery runtime version 1.2 or later. If you plan to perform the DB2 bind command from the administrative console, or with the wsadmin tool, you must have pureQuery v1.2 or later. Refer to the Data Studio information center topic on installing pureQuery Runtime for more information.
Using pureQuery
dynamically is a new feature available with the Feature Pack for OSGi
applications and JPA 2.0. The pdqxml file location is specified by
the pdqProperties property on the data source or connection URL. For
more information, see the topic, Using pureQuery in dynamic mode.
PureQuery 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 wsdbgen command on a JPA application. The wsdbgen 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 must be included into the application Java archive (JAR) file.
The application server offers support for static SQL for Enterprise JavaBeans™ (EJB) 2.x and later entity beans with the ejbdeploy SQLj option. With JPA, this feature is offered through pureQuery.
WebSphere® Application Server support for pureQuery
In this information ...Subtopics
Related tasks
| IBM Redbooks, demos, education, and more(Index) |