2016-11-21 134 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如何使用它。