16.10.2015 Views

Getting Startedwith pureQuery

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

302<br />

<strong>Getting</strong> Started with <strong>pureQuery</strong><br />

16.5.1 Running the application in static mode<br />

Since we created and bound the packages using the WAS administration console, our<br />

application has been configured to use <strong>pureQuery</strong> instead of JDBC as the data access<br />

mechanism.<br />

We can run the application the same way we would do before converting the data access<br />

to <strong>pureQuery</strong>, either from the WAS administration console or by simply typing the<br />

application URL in a browser.<br />

The URL for our sample application is http://localhost:9080/JPA_W_EJB_WEB/. Enter<br />

this address in your browser and the JPA sample application will launch, as seen in Figure<br />

16.4.<br />

Figure 16.4 - JPA application running in static SQL mode<br />

16.6 Summary<br />

This chapter discussed the integration of JPA and the <strong>pureQuery</strong> runtime, which allows for<br />

JPA applications that run on WAS V7 to take advantage of static SQL execution in DB2.<br />

We described the process of using the Static Generator utility to generate SQL statements<br />

in bind files that were later used by the <strong>pureQuery</strong> Static Binder in order to create and bind<br />

the DB2 packages into the database. We also described the process of authorizing users<br />

to run the application in static SQL mode.<br />

Using the Static Generator is a quick way to get started with <strong>pureQuery</strong> execution for JPA<br />

applications. If you have an application that generates dynamic SQL statements, then you<br />

can leverage the purequery Client Optimizer to capture those statements and improve the<br />

performance, security and maintainability of your application.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!