Preparing the development environment on JBoss

About this task

This section explains how to test the modifications made to Sterling Selling and Fulfillment Foundation when using JBoss.

Note: IBM® recommends that you directly copy all the jar files from the extracted EAR to the WEB-INF/lib directory. Doing this will make these jar files accessible to JBoss and you do not have to include these jar files in the JBoss CLASSPATH.

To configure JBoss to run the application in exploded mode:

Procedure

  1. Edit the <JBOSS_DOMAIN>/bin/run.cmd script for Windows (run.sh for UNIX), and set the following argument in Options as Java™ parameters:
    -Dsci.opsproxy.disable=Y -Dvendor=shell
    -DvendorFile=/servers.properties
  2. Rebuild the EAR file as you did during the installation process.
    Note: The application does not support documentation extensions for context-sensitive Help in exploded mode. But you can build documentation EAR along with the application EAR. The doc ear does not contain end-user documentation, such as the context-sensitive help files. It contains only development-related documentation, including API Javadocs, ERDs, and XSDs that should not be deployed to a production server.
    To build the documentation EAR, smcfsdocs.ear along with the application EAR, before running the buildear command, add the BUILD_DOC_EAR property and set the value to "true" in the <INSTALL_DIR>/properties/sandbox.cfg file and run the setupfiles script.
    Note: By default, the documentation EAR is not built and deployed with the application EAR.
    Note: The -Dnodocear parameter takes precedence over the BUILD_DOC_EAR property. For example, if the BUILD_DOC_EAR property is set to "true" but the -Dnodocear parameter is used with the create-ear script, the documentation EAR does not build.
  3. Stop the application server and execute the following steps.

    For example, if you have some customizations in the Catalog module, add the files in the <JBOSS_HOME>/server/<SERVER_NAME>/deploy/smcfs.ear/smcfs.war/ycm directory.

    Create a new directory and name it smcfs.ear.

  4. Extract the EAR into the smcfs.ear directory you created.
  5. Within the smcfs.ear directory, a smcfs.war file exists. Rename this .war file or copy it into another directory.
  6. Within the smcfs.ear directory, create a new subdirectory, and name it smcfs.war.
  7. Extract and extract all the files from the smcfs.war file into the smcfs.ear/smcfs.war subdirectory.
  8. Delete the smcfs.war file that you renamed or copied in step 5.
  9. Copy the jars created as part of building and deploying extensions and overwrite the jars in <JBOSS_HOME>/server/<SERVER_NAME>/deploy/smcfs.ear directory.

    For example:

    • If you are extending your database, build and deploy the entities.jar and copy the jar to the <JBOSS_HOME>/server/<SERVER_NAME>/deploy/smcfs.ear directory.
    • If you are extending UI resources, build and deploy the resources.jar, and copy the jar to the <JBOSS_HOME>/server/<SERVER_NAME>/deploy/smcfs.ear directory.
  10. Copy your customized files (for example, localization literal files, JSPs), to the appropriate <JBOSS_HOME>/server/<SERVER_NAME>/deploy/smcfs.ear/smcfs.war directory.
  11. Restart the application server.
  12. After deploying, you can modify the files copied to the <JBOSS_HOME>/server/<SERVER_NAME>/deploy directory. For example, if you extend a custom code written as part of database extensibility, you can directly move the extended custom code to the appropriate directory under the <JBOSS_HOME>/server/<SERVER_NAME>/deploy directory for testing. JBoss identifies the changes and redeploys the application (Hot Deployment).
  13. Test your customizations using the JBoss Hot Deployment Test Mode standards described in the following table.
    If you modify... In these files... Then...
    Startup parameters properties Restart JBoss.
    UI extensibility JSP, JavaScript, CSS, theme XML Load dynamically.
    Localization literals alertmessages and localization bundle files Restart JBoss.
    Database extensions entity XMLs Rebuild the entities.jar file and include the jar in the JBOSS_HOME/server/SERVER_NAME/deploysmcfs.ear directory, then restart JBoss.
    APIs and other template files template XMLs Rebuild the resources.jar file and include the jar in the JBOSS_HOME/server/SERVER_NAME/deploy/smcfs.ear directory, then restart JBoss.
    Application configuration files web.xml, application.xml, and property files Restart JBoss.