2016-11-21 175 views
0

我有一個關於OSGI Bundle中的藍圖的問題。我將activiti整合到一個版本中,但是在藍圖中必須有一些配置才能使其發揮作用。我不想每次更改這些設置時編譯新的捆綁包。是否有可能將它們存儲在藍圖中以更改它只需重新啓動捆綁包?在osgi中存儲變量的變量

<bean id="configuration" class="org.activiti.engine.impl.cfg.JtaProcessEngineConfiguration" 
     ext:field-injection="true"> 
    <property name="databaseType" value="h2"/> 
    <property name="dataSource" ref="dataSource"/> 
    <property name="transactionManager" ref="transactionManager"/> 
    <property name="databaseSchemaUpdate" value="true"/> 
    <property name="transactionsExternallyManaged" value="true"/> 
    <property name="defaultCamelContext" value="defaultContext"/> 
    <property name="mailServerHost" value="smtp.googlemail.com"/> 
    <property name="mailServerUsername" value="xxxx"/> 
    <property name="mailServerPassword" value="xxxx"/> 
    <property name="mailServerPort" value="465"/> 
    <property name="useSSL" value="true" /> 
    <property name="useTLS" value="true" /> 
    <property name="mailServerDefaultFrom" value="senderadress"/> 
</bean> 

非常感謝你!

回答

0

在OSGi中,您使用配置管理規範來配置您的配置。在Apache Karaf中,它允許將配置存儲在etc目錄中的文件中。

要將它們注入到藍圖中,請使用blueprint-cm名稱空間。 See this tutorial如何使用它。