Deploying SQLJ applications that use container-managed persistence (CMP)

Embed Structured Query Language in Java™ (SQLJ) statements in your applications to maximize the efficiency of transactions with your databases. Before your applications can take advantage of SQLJ, you must deploy the application and customize the SQLJ profiles that are created. The application server provides functionality to use SQLJ as the persistence mechanism for enterprise beans that use container-managed persistence. Deploy the CMP beans in the application server to enable SQLJ support.

Before you begin

You need an application that uses SQLJ and container-managed persistence. Develop this application in Rational® Application Developer or another development tool.

About this task

Deploy SQLJ applications in the application server to simplify the process of SQLJ translation and bean deployment. The application server includes these new features for SQLJ support:

You can also deploy the SQLJ application using the ejbdeploytool. Read the topic on deploying SQLJ applications that use container-managed persistence (CMP) with the ejbdeploy tool for more information.

Procedure

  1. Create a top-down mapping to a DB2® database.
  2. From your DB2 installation, copy the sqlj.zip file to a directory on your workstation.
  3. Deploy the EAR file in the administrative console.
    1. Click Applications > Install New application.
    2. Select Local file system or Remote file system, and browse to the EAR file.
    3. Select Detailed - Show all installation options and parameters. Click Next.
    4. In Step 1: Select installation options, select Deploy enterprise beans. Configure any other options, and click Next.
    5. In Step 3: Provide options to perform the EJB deploy, select SQLJ for Deploy EJB option - Database access type.
    6. Enter the location of the sqlj.zip file in the SQLj class path field.
    7. Complete the installation process for the application.

What to do next

After the enterprise application is deployed, customize the SQLJ profiles using the administrative console, scripting, or the db2sqljcustomize tool:



In this information ...


Related concepts

IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic    

Terms of Use | Feedback

Last updated: Oct 20, 2010 9:57:58 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=compass&product=was-base-dist&topic=tdat_sqljdeploycmp
File name: tdat_sqljdeploycmp.html