Administer > Deploy > Deploying customized assets > Customized WebSphere Commerce Enterprise Application (EAR) assets > Package custom Java EE assets > Packaging Java EE assets for an entire module


Package the module without EJB backend conversion

This task is applicable if you created an EJB JAR file that is being deployed to a target WebSphere Commerce Server that uses the same type of database as the development environment.


Procedure

  1. Open WebSphere Commerce Developer and switch to the Java EE perspective.

  2. Depending on what the EJB JAR file contains, do one of the following steps:

    • If the EJB JAR file contains only session beans, then skip this step. You do not need to update the data source information, and you can simply export the changes.

    • If the EJB JAR file contains more than just session beans:

      1. Expand the EJB project that contains the bean or beans that you are deploying:

        • If you created new enterprise beans, expand the WebSphereCommerceServerExtensionsData EJB project (or the name of a new custom EJB project that contains the changes).

        • If you modified WebSphere Commerce entity beans, expand the project that contains the modified bean. For example, if you have modified the User bean, expand the Member-MemberManagementData EJB project.

      2. Double-click the Deployment Descriptor icon to editing the deployment descriptor.

      3. With the Overview tab selected, scroll to the bottom of the pane, to locate the JNDI - CMP Connection Factory Binding section.

      4. Record the value in the JNDI name field. You will restore this value after exporting the EJB JAR file.

      5. In the JNDI name field, enter the data source JNDI name of the target WebSphere Commerce Server. For example:

        • jdbc/WebSphere Commerce DB2 DataSource demo where the target WebSphere Commerce Server is using a DB2 database, and the WCS instance name is "demo"

        • jdbc/WebSphere Commerce Oracle DataSource demo where the target WebSphere Commerce Server is using an Oracle database, and the WCS instance name is "demo".

        • jdbc/WebSphere Commerce iSeries DataSource demo where the target WebSphere Commerce Server is using a DB2 UDB for iSeries database, and the WCS instance name is "demo"

        Tip: The value for the DataSource JNDI name field is created by adding "jdbc/" to the data source name of the target WebSphere Commerce Server. You can verify the data source name by opening the WebSphere Commerce configuration file on the target WebSphere Commerce Server and searching for DatasourceName= in the file. If you specify a different data source for the custom enterprise beans than that used by the WebSphere Commerce enterprise beans, a two-phase commit will be required. Therefore, if the custom enterprise beans use the same database as the WebSphere Commerce enterprise beans, use the same data source name, so as to avoid a two-phase commit. In general, the use of two-phase commit JDBC drivers with WebSphere Commerce is not recommended.

      6. Save the deployment descriptor changes and close the file.

  3. Deploy the EJB project before exporting the EJB JAR file. In the Enterprise Explorer view, right-click the EJB project (either WebSphereCommerceServerExtensionsData or the project that contains the modified WebSphere Commerce entity bean) and click Java EE > Prepare for deployment.

  4. In the Enterprise Explorer view, right-click the EJB project (either WebSphereCommerceServerExtensionsData or the project that contains the modified WebSphere Commerce entity bean) and click Export > EJB JAR File.

  5. In the Export wizard:


    1. The EJB project name is pre-populated. Leave this value as is.

    2. For the destination, enter the fully-qualified JAR file name to use. For example, enter C:\ExportTemp\JarFileName.jar where JarFileName is the name of the JAR file. If you created new enterprise beans, you should enter yourDir\WebSphereCommerceServerExtensionsData.jar. If you modified an existing WebSphere Commerce public entity bean, use the predefined JAR file name for this EJB group. For example, if the modification was in the Member-MemberManagementData EJB module, enter yourDir\Member-MemberManagementData.jar.

    3. Select Optimized for a specific server runtime and select was.base.v7.

    4. Ensure that Export source files is not selected.

    5. Click Finish.

  6. After the export completes, open the EJB deployment descriptor and restore the modifications that were made previously back to the setting that is required for the local test server. Save the changes.


Related tasks

Deploy customized assets

Package the module with EJB backend conversion


+

Search Tips   |   Advanced Search