WAS v8.5 > Deploy applications > Deploy data access resources > Deploy SQLJ applicationsDeploy SQLJ applications that use container-managed persistence
Embed SQLJ statements in the applications to maximize the efficiency of transactions with the databases. Before the applications can take advantage of SQLJ, you must deploy the application and customize the SQLJ profiles 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.
You need an application that uses SQLJ and container-managed persistence. Develop this application in Rational Application Developer or another development tool.
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:
- Deploying CMP beans during the application installation in the application server.
- Customizing and binding SQLJ profiles with the dmgr console or scripting.
- Customizing and binding SQLJ applications again without needing to reinstall the application.
We can also deploy the SQLJ application using the ejbdeploytool. Read the topic on deploying SQLJ applications that use container-managed persistence with the ejbdeploy tool for more information.
- Create a top-down mapping to a DB2 database.
- From your DB2 installation, copy the sqlj.zip file to a directory on your workstation.
- Deploy the EAR file in the dmgr console.
- Click Applications > Install New application.
- Select Local file system or Remote file system, and browse to the EAR file.
- Select Detailed - Show all installation options and parameters. Click Next.
- In Step 1: Select installation options, select Deploy enterprise beans. Configure any other options, and click Next.
- In Step 3: Provide options to perform the EJB deploy, select SQLJ for Deploy EJB option - Database access type.
- Enter the location of the sqlj.zip file in the SQLj class path field.
- Complete the installation process for the application.
After the enterprise application is deployed, customize the SQLJ profiles using the dmgr console, scripting, or the db2sqljcustomize tool:
- For dmgr console support, read the topic on customizing and binding profiles for SQLJ applications.
- For scripting support, read the topic on the application management command group for AdminTask.
- For use of the db2sqljcustomize tool, read the topic on customizing and binding SQLJ profiles with the db2sqljcustomize tool.
Subtopics
- Deploy SQLJ applications that use container-managed persistence with the ejbdeploy tool
Embed SQLJ statements in the applications to maximize the efficiency of transactions with the databases. Before the applications can take advantage of SQLJ, you must deploy the application and customize the SQLJ profiles created. The application server provides functionality to use SQLJ as the persistence mechanism for enterprise beans that use container-managed persistence. Use the ejbdeploy tool to deploy the application.- Deploy SQLJ applications that use container-managed persistence with the ejbdeploy tool
Embed SQLJ statements in the applications to maximize the efficiency of transactions with the databases. Before the applications can take advantage of SQLJ, you must deploy the application and customize the SQLJ profiles created. The application server provides functionality to use SQLJ as the persistence mechanism for enterprise beans that use container-managed persistence. Use the ejbdeploy tool to deploy the application.
Related concepts:
Data access beans
Related
Customize and binding profiles for SQLJ applications
Customize and binding SQLJ profiles with the db2sqljcustomize tool
Deploy SQLJ applications that use bean-managed persistence, servlets, or sessions beans
Rational Application Developer: Developing SQLJ applications
Reference:
Application management command group for AdminTask