Deploying a CMP EJB that uses stored procedure

Why and when to perform this task

After a CMP bean and an application have been developed into an .ear file, you are ready to deploy this application in the WebSphere environment. We recommend that you provide the stored procedure invocation and input/output record management logic in a separate document so the deployer knows how to inject the code into the UserDefinedPushDownMethodsImpl class. Or, you can put the information in the method description under the Deployment Descriptor.

There are two ways to deploy the beans:

  1. Use the (ASTk) to assemble the application.
    1. From the EJB Deployment Descriptor panel, choose the Entity bean under the EJB Modules. Click the Pushdown tag at the bottom of the right panel.
    2. Enter the backend type; the default is JDBC.
    3. Configure the backend methods.
    4. Click Generate to generate the UserDefinedPushDownMethods interface. A beanUserDefinedPushDownMethodsImpl class is also created. Do not modify this interface. Use the beanUserDefinedPushDownMethodsImpl class template to inject the stored procedure call.
    5. Refer to the APIs and programming examples for coding details (see links under Related information below). Your edited implementation class is automatically compiled and repackaged back to the EJB jar file.
    6. Run the ejbDeploy command to deploy this CMP EJB jar file. After deployment, the application and CMP EJBs are ready for installation.
  2. Use CMPDeploy on the command line to invoke the stored procedure calls. You might want to match the same pattern of ejbDeploy to create batch mode processing.
    1. Use ASTk to indicate which CMP EJB methods use stored procedure, and to provide any required pushdown method information.
    2. Run the CMPDeploy command to generate the beanUserDefinedPushDownMethodsImpl class.
      CMPDeploy ejb.jar|application.ear -dir directory -overwrite -verbose

      Where:

      -dir is an optional parameter; when specified, the files are output to this package-based directory structure, rooted at the specified directory

      -overwrite is an optional parameter. When specified, any existing file is overwritten; otherwise, CMPDeploy ends with a message if the beanUserDefinedPushDownMethodsImpl class already exists

      -verbose is an optional parameter. When specified, full trace messages display; otherwise, one information message displays at the end of the trace. For example: CMPDeploy BankAccountBean.jar

    3. Edit the UserDefinedPushDownMethodsImpl class with the logic to set the stored procedure parameters, to invoke a stored procedure call, and to process the return value.
    4. Compile a UserDefinedPushDownMethodsImpl class and rejar it back to the EJB jar file.
    5. Run the ejbDeploy command to deploy this EJB jar file.
    6. Install the application and define the resource binding. It is not necessary to redeploy the CMP beans.


Related concepts
Stored procedure support for CMP EJB
Related tasks
Developing a CMP EJB that uses stored procedure
Related reference
Example: Coding beanUserDefinedPushDownMethodsImpl and a stored procedure CMP EJB
Related topics
WSPushDownHelper
WSRelationalPushDownHelper
WSProceduralPushDownHelper
WSPushDownHelperFactory



Searchable topic ID:   cmpdeploy
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/ae/tdat_cmpdeploy.html

Library | Support | Terms of Use | Feedback