< 前へ | 次へ >

レッスン 2.5: OSGi バンドルの開始

WebSphere® eXtreme Scale サーバーは、OSGi サーバー・バンドルとしてパッケージされます。このレッスンを完了して、eXtreme Scale サーバー・バンドル、およびインストールした他の OSGi バンドルをインストールします。

  1. ss コマンドを実行して、各バンドルの ID を表示します。
    osgi> ss
    
    Framework is launched.
    
    id State Bundle
    0 ACTIVE org.eclipse.osgi_3.6.1.R36x_v20100806
    1 ACTIVE org.eclipse.osgi.services_3.2.100.v20100503
    2 ACTIVE org.eclipse.osgi.util_3.2.100.v20100503
    3 ACTIVE org.eclipse.equinox.cm_1.0.200.v20100520
    4 ACTIVE com.springsource.org.apache.commons.logging_1.1.1
    5 ACTIVE com.springsource.org.aopalliance_1.0.0
    6 ACTIVE org.springframework.aop_3.0.5.RELEASE
    7 ACTIVE org.springframework.asm_3.0.5.RELEASE
    8 ACTIVE org.springframework.beans_3.0.5.RELEASE
    9 ACTIVE org.springframework.context_3.0.5.RELEASE
    10 ACTIVE org.springframework.core_3.0.5.RELEASE
    11 ACTIVE org.springframework.expression_3.0.5.RELEASE
    12 ACTIVE org.apache.felix.fileinstall_3.0.2
    13 ACTIVE net.luminis.cmc_0.2.5
    15 ACTIVE org.eclipse.gemini.blueprint.core_1.0.0.RELEASE
    16 ACTIVE org.eclipse.gemini.blueprint.extender_1.0.0.RELEASE
    17 ACTIVE org.eclipse.gemini.blueprint.io_1.0.0.RELEASE
    19 RESOLVED com.ibm.websphere.xs.server_7.1.1
    21 RESOLVED Google_ProtoBuf_2.4.0
    22 RESOLVED ProtoBufPlugins_1.0.0
  2. インストールした各バンドルを開始します。 特定の順序でバンドルを開始する必要があります。 前の例でバンドル ID の順序を確認してください。
    1. サンプル・プラグイン・バンドル ProtoBufPlugins_1.0.0 を開始します。 Equinox OSGi コンソールで次のコマンドを実行して、バンドルを開始します。この例では、サンプル・プラグインのバンドル ID は 22 です。
      osgi> start 22
    2. Google Protocol Buffers バンドル Google_ProtoBuf_2.4.0 を開始します。 Equinox OSGi コンソールで次のコマンドを実行して、バンドルを開始します。この例では、Google Protocol Buffers プラグインのバンドル ID は 21 です。
      osgi> start 21
    3. サーバー・バンドル com.ibm.websphere.xs.server_7.1.1 を開始します。 OSGi コンソールで次のコマンドを実行して、サーバーを始動します。この例では、eXtreme Scale サーバー・バンドルのバンドル ID は 19 です。
      osgi> start 19
サーバーを始動した後、MyShardListener イベント・リスナーが開始され、レコードの挿入または更新が可能になります。OSGi コンソールに次の出力が表示されると、プラグイン・バンドルが正常に開始されたことが確認できます。
SystemOut O MyShardListener@1253853884(version=1.0.0) order
com.ibm.websphere.samples.xs.serializer.proto.DataObjects1$Order$Builder
@1aba1aba(22) inserted

レッスンのチェックポイント

このレッスンでは、OSGi フレームワーク用に構成した eXtreme Scale コンテナーの中で、2 つのプラグイン・バンドルとサーバー・バンドルを開始しました。

< 前へ | 次へ >