geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell E Glaue <rgl...@cait.org>
Subject Re: ActiveMQ config-substitution change G2.2 vs G3.0
Date Fri, 03 Jun 2011 18:41:20 GMT
Hi David,

Does Geornimo support OSGi Declarative Services (DS) now?
I understand the DS requires a lot of underlying supporting code to implement it
in a greater application.

If the DS part of OSGi is not ready yet in Geronimo, I would prefer a short-cut
be implemented in the interim. Not being able to run multiple instances on a
single server is a show-stopper for me.

And there is no viable work-around (other than recompiling the code) since
ActiveMQ's listen-port and working-directory are not configurable in a run-time
deployment.


So, when ActiveMQ was reimplemented with Blueprint in G3.0, the
GeronimoPropertyPlaceholderConfigurer class was removed, which was the G2.2
work-around to make the config-substitution work.
The primary item in that class is its extension of the
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer class to
make that work.

Was there a reason to remove this class before an alternative solution for
supporting config-substitution was ready?

-RG


On 06/03/2011 01:11 PM, David Jencks wrote:
> Hi Russell,
> 
> thanks for looking into this in such detail :-)
> 
> When I worked on the blueprint and xbean-blueprint conversion I couldn't figure out how
to do this.  Since then I've started thinking that it would make more sense to configure activemq
with Declarative Services rather than blueprint and configure the variable bits such as transports
with the feature that produces a service for every Config Admin configuration (I get lost
in the terminology, I think this is a managed service factory).  However I haven't had any
time to look into this.
> 
> not much help but that's where my thinking is at the moment.
> 
> david jencks
> 
> On Jun 3, 2011, at 10:34 AM, Russell E Glaue wrote:
> 
>> ActiveMQ is not utilizing the config-substitutions in G3.0
>> A patch was put in G2.2 do handle this, but the related code is removed in G3.0.
>> ActiveMQ is changed in the process of integrating blueprint. See GERONIMO-4475
>> for the G2.2 patches from Ivan.
>>
>> Since the GeronimoPropertyPlaceholderConfigurer in G2.2 was to make ActiveMQ use
>> the config-substitution, and now is removed in G3.0, I do not see in the code
>> where the config-substitution is accounted for.
>>
>>
>> In G2.2.2-SNAPSHOT
>> The GBean Class:
>> ~/branches/2.2/plugins/activemq/geronimo-activemq/src/main/java/org/apache/geronimo/activemq/GeronimoPropertyPlaceholderConfigurer.java
>> The GBean Configuration:
>> ~/branches/2.2/plugins/activemq/activemq-broker/src/main/resources/activemq.xml
>> -
>>    <!-- Allows us to use system properties as variables in this configuration
>> file-->
>>    <bean
>> class="org.apache.geronimo.activemq.GeronimoPropertyPlaceholderConfigurer">
>>         <property name="locations">
>>
>> <!--<value>file://${activemq.home}/conf/credentials.properties</value>-->
>>
>> <value>${activemq.geronimo.home.url}/var/config/config-substitutions.properties</value>
>>         </property>
>>         <property name="systemPropertiesMode">
>>            <value>2</value>
>>         </property>
>>    </bean>
>> -
>>
>> In G3.0-SNAPSHOT
>> ~/trunk/plugins/activemq/activemq-broker-blueprint/src/main/resources/OSGI-INF/blueprint/activemq.xml
>> -
>>    <cm:property-placeholder id="property-placeholder"
>> persistent-id="blueprint-activemq-placeholder" placeholder-prefix="${"
>> placeholder-suffix="}" ignore-missing-locations="true">
>>        <cm:default-properties>
>>            <cm:property name="activemq.brokerName" value="DefaultActiveMQBroker"/>
>>            <cm:property name="activemq.data" value="var/activemq"/>
>>            <cm:property name="serverHostname" value="localhost"/>
>>            <cm:property name="activemq.port" value="61616"/>
>>            <cm:property name="portOffset" value="0"/>
>>        </cm:default-properties>
>>
>> <cm:location>file:$(karaf.base)/etc/blueprint-activemq-placeholder.cfg</cm:location>
>>    </cm:property-placeholder>
>> -
>> As I mentioned in a previous thread on the user list, the
>> file:$(karaf.base)/etc/blueprint-activemq-placeholder.cfg is ignored. I tried to
>> change the ActiveMQ values there in
>> GERONIMO_HOME/etc/blueprint-activemq-placeholder.cfg, but ActiveMQ did not use
>> the new configuration I set.
>> (I am testing with G3.0-20110603-snapshot)
>>
>> So the question is, what has to be done in G3.0-SNAPSHOT to make ActiveMQ apply
>> settings from the config-substitutions file?
>>
>> -RG
> 

Mime
View raw message