0

servicefactory アノテーション プロパティと ConfigurationPolicy.REQUIRE を持つ DS ベースのコンポーネントがあります。私は ConfigAdmin を使用して、そのようなサービスのインスタンスを作成しています。

@Component(enabled = true, servicefactory = true,
    service = ServiceFactoryTest.class,
    configurationPid = "servicefactory1",
    configurationPolicy = ConfigurationPolicy.REQUIRE)
public class AnComponentServiceFactoryForTest extends
    AbstractComponentWithCompendium implements ServiceFactoryTest {

サービスのインスタンスを作成するために、エクステンダー バンドルで CM サービスの次のメソッドを使用しています。

configuration = getConfigurationAdminService()
                    .createFactoryConfiguration(
                            "servicefactory1", null);
configuration.update(new Hashtable<>(getPropertiesMap()));

そのコンポーネントを含む複数のバージョンのバンドルが同時にインストールされているとします。特定のバージョンの構成を作成するにはどうすればよいですか?

ロケーター パラメーターの存在は知っていますが、使用する値がわからないという理由だけで null に設定していました。これらの DS コンポーネントのそれぞれが期待する値を知るにはどうすればよいでしょうか?

4

0 に答える 0