Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Another XperienCentral specific tool for plugin management is the Plugin Management console. This is a plugin available from the Configuration > Plugins option menu item in XperienCentral. While the Felix shell TUI provides access to the OSGi bundles only (and is unaware of plugin specific functionality), the Plugins Management Console provides access to plugin-specific lifecycle methods, like purge. For more information on the Plugin Management Console, refer to the XperienCentral online help. The Plugins Management Console appears as follows:

...

When the Felix shell TUI is running, you can enter commands in the Tomcat console. The most commonly used command is ps which shows an overview of all installed OSGi bundles and their state. An example of this console is displayed below.

 

 Other commands that can be used can be found on http://felix.apache.org/site/apache-felix-shell-tui.html.

Managing Plugins from the Felix Shell TUI

In addition to the functionality available for managing plugins from the XperienCentral Plugins Management Console, there are equivalent commands available in the Apache Felix Shell TUI Gogo shell that you can invoke directly from the command line. You must first install the XperienCentral-felix-shellcommands-10.x.x.jar using the Plugins Management Console or by copying it to the <XperienCentral-root>\work\deploy directory. You can find XperienCentral-felix-shellcommands-10.x.x.jar in the <XperienCentral-root>\backend\WEB-INF\bundles directory.

To use the commands on a plugin in the Apache Felix Shell TUIGogo shell, you must determine the ID of a plugin by issuing the ps command. After you issue the ps command, you will see a list of the plugins as shown in the figure above.

...

CommandPurpose
wmstart [id]

Registers services that each component within the bundle exposes if all required service dependencies are available. For each component, at the very least a component service is registered

wmstop [id]

Stops all services registered by the component.

wmupdate [id]

Updates the plugin to a newer version. If a problem is encountered during the update, the plugin is automatically rolled back to the existing version. The following describes a typical plugin update scenario:

  1. The plugin developer creates a 1.1 version of a plugin and gives it to a system administrator.
  2. The system administrator copies the updated plugin to the machine running XperienCentral. If XperienCentral is running in a clustered environment, the updated plugin is copied to the machine running the master XperienCentral instance.
  3. The system administrator determines the ID of the plugin in the Apache Felix Shell TUIGogo shell.
  4. The system administrator executes the wmupdate method, specifying the ID of the plugin to update and the absolute path of the JAR file containing the updated plugin. For example:

    wmupdate 59 file:/home/deploy/helloworld_1_1.jar

  5. The plugin is updated to the new version and is set to the active state. In a clustered environment, the plugin is also automatically updated on all slave instances.
wmpurge [id]

Removes all content that was created during and after the installation of the component.

wmuninstall [id]

Removes all content that was created during the installation of the component.

Note
  • A plugin must be in the active state before you can uninstall it.
  • If a plugin has dependencies with another plugin, you must first uninstall the dependent plugin.
  • A plugin must be in the active state before you can purge it.

...

Note

This is only allowed for static methods or any other use case the service cannot be acquired using a service dependency. In all other use cases this is a bad practice and guideline violation (see /wiki/spaces/PD/pages/24721296 G023 of the development guidelines).

...