geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell E Glaue <>
Subject Re: ActiveMQ config-substitution change G2.2 vs G3.0
Date Fri, 03 Jun 2011 19:56:05 GMT
Yes, I like the Karaf support and the new OSGi implementation in G3.0.
I have not worked with the OSGi DS, so I have little more than textbook
knowledge about it. But, when you get to the point of integrating the DS support
I would like to be engaged. Maybe I can help get the ActiveMQ plugin
straightened out - if my limited knowledge of DS does not get in the way.

I need to get past this ActiveMQ issue to move on in my agenda.


On 06/03/2011 02:45 PM, David Jencks wrote:
> Hi Russell,
> I think DS is considerably more lightweight and easier to use and more suitable for server
components than blueprint.  I'm working through some jcdi problems right now but expect to
be adding DS support into geronimo trunk in the next few days.
> Blueprint has completely replaced our use of spring -- which was entirely for amq IIRC.
 There are now quite a few aries services configured through blueprint as well.
> I think there are some other felix/karaf services that should make it easier to  set
up something with config admin and the amq xbean-blueprint, I'm hoping to be looking into
adding these in the next few days.  At that point it will probably be possible to at least
configure the port even if the portOffset doesn't work right.
> thanks
> david jencks
> On Jun 3, 2011, at 11:58 AM, Russell E Glaue wrote:
>> David,
>> In GERONIMO-4499 Ivan origianly had ActiveMQ reading configuration from a file,
>> which you rejected at the time because Geronimo could not inject properties.
>> That is why he added the gbean implementation of the
>> GeronimoPropertyPlaceholderConfigurer class.
>> Though I agree with your reasoning, right now ActiveMQ is completely
>> unconfigurable from an admin point. I would accept that option right now until
>> we can figure out how to support config-substitution on blueprint or DS.
>> Either that or trying to reimplement the resulting accepted solution currently
>> in G2.2 if that can be support whil running on blueprint.
>> (Is blueprint now completely replacing any prior use of spring in all G2.2
>> plugins - since it is essentially Spring-DM? That would remove our ability to
>> try the G2.2 solution directly.)
>> -RG
>> On 06/03/2011 01:41 PM, Russell E Glaue wrote:
>>> Hi David,
>>> Does Geornimo support OSGi Declarative Services (DS) now?
>>> I understand the DS requires a lot of underlying supporting code to implement
>>> 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
>>> 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
>>>>> 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/
>>>>> 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/</value>-->
>>>>> <value>${activemq.geronimo.home.url}/var/config/</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="" 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
>>>>> settings from the config-substitutions file?
>>>>> -RG

View raw message