You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@servicemix.apache.org by "Krzysztof Sobkowiak (JIRA)" <ji...@apache.org> on 2015/03/22 22:47:10 UTC

[jira] [Commented] (SM-2481) activemq-service blueprint uses dash in persistent id: config file is never loaded nor read

    [ https://issues.apache.org/jira/browse/SM-2481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14375184#comment-14375184 ] 

Krzysztof Sobkowiak commented on SM-2481:
-----------------------------------------

The configuration file {{org.apache.activemq.server-default.cfg}} comes from ActiveMQ distribution and is used to produce the {{amq-broker}} usin Managed Service Factory. So,  {{org.apache.activemq.server}} is a factory service pid and the file mentioned above provides for configuration for one broker instance produced by this factory.

You can theoretically create a new broker using

{code}
karaf@root> config:edit org.apache.activemq.server-local
karaf@root> propset broker-name  local-broker
karaf@root> propset data ${karaf.data}/${broker-name}
karaf@root> propset config ${karaf.base}/etc/activemq-local.xml
karaf@root> config:update
{code}

Next you have 2 brokers started in ServiceMix

{code}
karaf@root> activemq:list 
brokerName = amq-broker

brokerName = local-broker
{code} 

This isi something we cannot change because it works as it should work. The file must contain the dash in the name.

The {{org.apache.activemq.server-defaul}} should not be used as a {{persistent-id}} in the blueprint file in {{org.apache.servicemix.activemq.service}} bundle, because we have not (and will never have) a service pid named {{org.apache.activemq.server-defaul}}

One of the solution would be to create a new service pid {{org.apache.servicemix.activemq.service}} where we can define which broker name should be used to create the connection factories.

But more resonable would be probably to use Managed Service Factory connected to  {{org.apache.activemq.server}}  factory service pid to produce the connection factory for each broker generated for {{org.apache.activemq.server}}  factory service pid. 

> activemq-service blueprint uses dash in persistent id: config file is never loaded nor read
> -------------------------------------------------------------------------------------------
>
>                 Key: SM-2481
>                 URL: https://issues.apache.org/jira/browse/SM-2481
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: activemq
>    Affects Versions: 6.0.0.M1
>         Environment: Windows XP
> Java 8
> ServiceMix 6.0.0.M1
>            Reporter: Concombre Masqué
>            Assignee: Krzysztof Sobkowiak
>             Fix For: 5.4.1, 5.5.0, 6.0.0.M2, 6.0.0
>
>
> Bundle 'org.apache.servicemix.activemq/org.apache.servicemix.activemq.service' defines a blueprint with following declaration:
> <cm:property-placeholder persistent-id="org.apache.activemq.server-default" update-strategy="reload">
> <cm:default-properties>
> <cm:property name="broker-name" value="amq-broker"/>
> </cm:default-properties>
> </cm:property-placeholder>
> Problem is: because of the dash in the persistent id the configuration will never be read from file etc/org.apache.activemq.server-default.cfg (such file is handled by a service factory and not registered in config admin with the '-default' suffix).
> As a result, if we modify broker-name property value in this file, activemq-service is not aware of the change and the broker name published in the OSGi Registry is still 'amq-broker' (check with command 'ls ConnectionFactory' and 'jndi:names').
> This issue has already been reported here:
> https://issues.jboss.org/browse/ESB-844
> http://mail-archives.apache.org/mod_mbox/activemq-users/201501.mbox/%3C1422012255271-4690323.post@n4.nabble.com%3E
> Don't know how to quickly fix this though as we need a dash in the config file name to make use of the managed service factory.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)