IBM Business Monitor, V8.0.1 > Reference > Developing for Monitor dashboard spaces > Create widgets

Packaging and deploying custom widgets

You can package your custom widgets to prepare them for use in a runtime environment. You can also deploy the widgets to add them to the server.

Check that the following things are ready:

Packaging and deploying widgets is usually an iterative process. The steps in the procedure describe how to package and deploy a widget for the first time. If you are updating an existing widget, the steps are similar with the following exceptions:

Complete the following steps for each Business Space environment.


Procedure

  1. Create an ear directory. Copy the EAR files containing the widget definition file and implementation files for your custom widgets. Copy the EAR files into the ear directory.

  2. Create a catalog directory and copy the catalog XML (widget registration) file into it.

  3. If there are any documentation plug-ins, create a help directory and copy the help plug-ins into it.
  4. Compress the ear, catalog, endpoints, and help directories. Ensure that the structure of the .zip file contains the following items:

    • ear\ widgets_name.ear (one or more EAR files)
    • catalog\ catalog_name.xml
    • help\eclipse\plugins\*
    • endpoints\ endpoints_name.xml

  5. At a command prompt, change directories to the profile_root/bin or cluster_root/bin directory.

  6. Enter wsadmin.bat -conntype NONE and then enter the appropriate command:

    • For a non-clustered environment:

      • Jython command:
        AdminTask.installBusinessSpaceWidgets('{-nodeName  node -serverName  server -widgets  fullpath}')
      • Jacl command:
        $AdminTask installBusinessSpaceWidgets {-nodeName  node -serverName  server -widgets  fullpath}

    • For a clustered environment:

      • Jython command:
        AdminTask.installBusinessSpaceWidgets('{-clusterName  cluster -widgets  fullpath}')
      • Jacl command:
        $AdminTask installBusinessSpaceWidgets {-clusterName  cluster -widgets  fullpath}

    Fullpath is the name and location of the .zip file created.

    For more information about installBusinessSpaceWidgets, see installBusinessSpaceWidgets.command: .

    If you are updating existing widgets, use updateBusinessSpaceWidgets instead. For information about updateBusinessSpaceWidgets, see updateBusinessSpaceWidgets command: .

    Tip: Keep a backup copy of the .zip file. The backup copy will make it easier to update or delete the widget because you will not have to recreate the .zip file. That is, instead of creating the directories and files in steps 1 to 4, you can just edit the backup copy to make your changes.

    • Jython command:
      AdminConfig.save
    • Jacl command:
      $AdminConfig save

  7. Enter Exit.

  8. If your environment has an HTTP server or proxy server set up, check the module mapping to ensure that your custom widget modules are mapped to the HTTP server or proxy server:

    1. Log in to the administrative console as an administrative user.

    2. Click Applications > Application Types > WebSphere enterprise applications.

    3. From the Enterprise Applications panel, click the name of the widget application.

    4. On the Configuration tab, under Modules, click Manage Modules.

    5. On the Manage Modules page for your application, make sure that the web server is one of the selected targets for each of your modules.

      • In the table, check the Server column for each module to make sure that the web server is one of the selected targets for each of your modules.

      • If you need to add the web server, select the check box next to the name of the module. Then, in the Clusters and servers list, use the Ctrl key to select multiple targets.

        For example, to have a web server serve your application, press the Ctrl key and then select the application server cluster and the web server together. Click Apply, OK and Save to save any changes.

  9. If you redeployed an existing widget that you changed, to see the changes in the browser, log out of Monitor dashboards, clear the cache in the browser, and then log into Monitor dashboards.

Create widgets


Related concepts:
Anatomy of a widget


Related tasks:
Create widgets using basic tools
Create widgets using Rational Application Developer
Create a documentation plug-in
Uninstalling custom widgets individually
Uninstalling custom widgets and catalogs