blueprint:cm multiple bundle but same config file

classic Classic list List threaded Threaded
45 messages Options
123
Reply | Threaded
Open this post in threaded view
|

blueprint:cm multiple bundle but same config file

Pablo Gómez Pérez
Hello All,

           Is it possible to use same config file from multiple bundles
while using Config Admin with blueprint Blueprint? Because, I can't
manage to do that, I get the following error:

MESSAGE Cannot use configuration test.mybundle for
[org.osgi.service.cm.ManagedService, id=214,
bundle=86/initial@reference:file:../plugin-1/]: No visibility to
configuration bound to initial@reference:file:../plugin-2/


I saw in this jira a bug opened: https://issues.jboss.org/browse/ENTESB-3959


However, I fear that this is a problem in the aries blueprint
implementation as I'm not using KARAF nor FUSE, just a plain osgi
container. Either that or I'm missing some blueprint configuration. I'm
basically using blueprint:cm


As a workaround I can make a config file per bundle that needs it....

As follows the versions and bundles that I'm using related to the
container (Running on top of Equinox 3.11):

  ID|State      |Level|Name
     5|Active     |    2|Apache Aries Whiteboard support for JMX
DynamicMBean services (1.1.5)|1.1.5
     6|Active     |    2|Apache Aries JNDI Core (1.0.2)|1.0.2
    13|Active     |    3|Aries Remote Service Admin Topology Manager
(1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
    15|Active     |    2|Aries JPA Container (1.0.2)|1.0.2
    21|Active     |    2|Apache Aries JNDI API (1.1.0)|1.1.0
    25|Active     |    3|Aries Remote Service Admin Discovery Gogo
Commands (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
    27|Active     |    2|Apache Aries Blueprint CM (1.0.7)|1.0.7
    29|Active     |    2|Apache Aries JMX Blueprint Core (1.1.5)|1.1.5
    37|Active     |    2|Apache Aries JNDI URL Handler (1.1.0)|1.1.0
    42|Active     |    2|Apache Aries JMX Core (1.1.5)|1.1.5
    46|Active     |    2|Apache Aries Blueprint Core (1.5.0)|1.5.0
    47|Resolved   |    4|Apache Aries Blueprint Core Compatiblity
Fragment Bundle (1.0.0)|1.0.0
    55|Active     |    2|Apache Aries Util (1.1.1)|1.1.1
    56|Active     |    2|Aries JPA Container Managed Contexts (1.0.4)|1.0.4
    59|Active     |    2|Apache Aries Proxy API (1.0.1)|1.0.1
    67|Active     |    3|Aries Remote Service Admin Service Provider
Interface (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
    71|Active     |    2|Apache Aries Transaction Blueprint (1.1.1)|1.1.1
    73|Active     |    2|Aries JPA Container API (1.0.2)|1.0.2
    77|Active     |    2|Apache Aries JNDI Support for Legacy Runtimes
(1.0.0)|1.0.0
    88|Active     |    2|Apache Aries JMX Blueprint API (1.1.5)|1.1.5
    89|Active     |    2|Apache Aries Transaction Manager (1.3.0)|1.3.0
    94|Active     |    3|Aries Remote Service Admin Discovery Config
(1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
    97|Active     |    3|Aries Remote Service Admin provider TCP
(1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   110|Active     |    2|Apache Aries Blueprint Annotation API (1.0.1)|1.0.1
   120|Active     |    2|Apache Aries Transaction Blueprint (2.1.0)|2.1.0
   123|Active     |    2|Apache Aries JMX API (1.1.5)|1.1.5
   130|Active     |    2|Apache Aries Blueprint Annotation Impl
(1.0.1)|1.0.1
   132|Active     |    3|Aries Remote Service Admin Discovery Zookeeper
(1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   134|Active     |    3|Aries Remote Service Admin Discovery Local
(1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   138|Active     |    3|Aries Remote Service Admin Core
(1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   139|Active     |    2|Apache Aries JNDI RMI Handler (1.0.0)|1.0.0
   143|Active     |    2|Apache Aries Proxy Service (1.0.4)|1.0.4
   146|Active     |    2|Apache Aries SPI Fly Dynamic Weaving Bundle
(1.0.8)|1.0.8
   147|Active     |    2|Aries JPA Container blueprint integration for
Aries blueprint (1.0.4)|1.0.4

    11|Active     |    4|Apache Felix File Install (3.5.4)|3.5.4
    19|Active     |    4|Apache Felix Gogo Shell (0.12.0)|0.12.0
    57|Active     |    4|Apache Felix Gogo Command (0.16.0)|0.16.0
   104|Active     |    4|Apache Felix Coordinator Service (1.0.2)|1.0.2
   109|Active     |    4|Apache Felix Gogo Runtime (0.16.2)|0.16.2
   114|Active     |    4|Apache Felix Web Management Console (1.2.8)|1.2.8
   148|Active     |    4|Apache Felix Configuration Admin Service
(1.8.8)|1.8.8

    0|Active     |    0|OSGi System Bundle
(3.11.0.v20160603-1336)|3.11.0.v20160603-1336


--
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.
Reply | Threaded
Open this post in threaded view
|

Re: blueprint:cm multiple bundle but same config file

Brad Johnson
I don't think that's possible. 

On Thu, Jul 7, 2016 at 8:51 AM, Pablo Gómez Pérez <[hidden email]> wrote:
Hello All,

          Is it possible to use same config file from multiple bundles while using Config Admin with blueprint Blueprint? Because, I can't manage to do that, I get the following error:

MESSAGE Cannot use configuration test.mybundle for [org.osgi.service.cm.ManagedService, id=214, bundle=86/initial@reference:file:../plugin-1/]: No visibility to configuration bound to initial@reference:file:../plugin-2/


I saw in this jira a bug opened: https://issues.jboss.org/browse/ENTESB-3959


However, I fear that this is a problem in the aries blueprint implementation as I'm not using KARAF nor FUSE, just a plain osgi container. Either that or I'm missing some blueprint configuration. I'm basically using blueprint:cm


As a workaround I can make a config file per bundle that needs it....

As follows the versions and bundles that I'm using related to the container (Running on top of Equinox 3.11):

 ID|State      |Level|Name
    5|Active     |    2|Apache Aries Whiteboard support for JMX DynamicMBean services (1.1.5)|1.1.5
    6|Active     |    2|Apache Aries JNDI Core (1.0.2)|1.0.2
   13|Active     |    3|Aries Remote Service Admin Topology Manager (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   15|Active     |    2|Aries JPA Container (1.0.2)|1.0.2
   21|Active     |    2|Apache Aries JNDI API (1.1.0)|1.1.0
   25|Active     |    3|Aries Remote Service Admin Discovery Gogo Commands (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   27|Active     |    2|Apache Aries Blueprint CM (1.0.7)|1.0.7
   29|Active     |    2|Apache Aries JMX Blueprint Core (1.1.5)|1.1.5
   37|Active     |    2|Apache Aries JNDI URL Handler (1.1.0)|1.1.0
   42|Active     |    2|Apache Aries JMX Core (1.1.5)|1.1.5
   46|Active     |    2|Apache Aries Blueprint Core (1.5.0)|1.5.0
   47|Resolved   |    4|Apache Aries Blueprint Core Compatiblity Fragment Bundle (1.0.0)|1.0.0
   55|Active     |    2|Apache Aries Util (1.1.1)|1.1.1
   56|Active     |    2|Aries JPA Container Managed Contexts (1.0.4)|1.0.4
   59|Active     |    2|Apache Aries Proxy API (1.0.1)|1.0.1
   67|Active     |    3|Aries Remote Service Admin Service Provider Interface (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   71|Active     |    2|Apache Aries Transaction Blueprint (1.1.1)|1.1.1
   73|Active     |    2|Aries JPA Container API (1.0.2)|1.0.2
   77|Active     |    2|Apache Aries JNDI Support for Legacy Runtimes (1.0.0)|1.0.0
   88|Active     |    2|Apache Aries JMX Blueprint API (1.1.5)|1.1.5
   89|Active     |    2|Apache Aries Transaction Manager (1.3.0)|1.3.0
   94|Active     |    3|Aries Remote Service Admin Discovery Config (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   97|Active     |    3|Aries Remote Service Admin provider TCP (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  110|Active     |    2|Apache Aries Blueprint Annotation API (1.0.1)|1.0.1
  120|Active     |    2|Apache Aries Transaction Blueprint (2.1.0)|2.1.0
  123|Active     |    2|Apache Aries JMX API (1.1.5)|1.1.5
  130|Active     |    2|Apache Aries Blueprint Annotation Impl (1.0.1)|1.0.1
  132|Active     |    3|Aries Remote Service Admin Discovery Zookeeper (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  134|Active     |    3|Aries Remote Service Admin Discovery Local (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  138|Active     |    3|Aries Remote Service Admin Core (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  139|Active     |    2|Apache Aries JNDI RMI Handler (1.0.0)|1.0.0
  143|Active     |    2|Apache Aries Proxy Service (1.0.4)|1.0.4
  146|Active     |    2|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.8)|1.0.8
  147|Active     |    2|Aries JPA Container blueprint integration for Aries blueprint (1.0.4)|1.0.4

   11|Active     |    4|Apache Felix File Install (3.5.4)|3.5.4
   19|Active     |    4|Apache Felix Gogo Shell (0.12.0)|0.12.0
   57|Active     |    4|Apache Felix Gogo Command (0.16.0)|0.16.0
  104|Active     |    4|Apache Felix Coordinator Service (1.0.2)|1.0.2
  109|Active     |    4|Apache Felix Gogo Runtime (0.16.2)|0.16.2
  114|Active     |    4|Apache Felix Web Management Console (1.2.8)|1.2.8
  148|Active     |    4|Apache Felix Configuration Admin Service (1.8.8)|1.8.8

   0|Active     |    0|OSGi System Bundle (3.11.0.v20160603-1336)|3.11.0.v20160603-1336


--
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.

Reply | Threaded
Open this post in threaded view
|

Re: blueprint:cm multiple bundle but same config file

Raymond Auge
As long as configurations are not bound to a bundle they can be used by any bundle.

The exception clearly shows that the configuration is bound to a bundle.

Creating an unbound configuration requires passing a "?" as the second arguments to getConfiguration/createFactoryConfiguration methods of CM.


HTH,
- Ray

On Thu, Jul 7, 2016 at 10:24 AM, Brad Johnson <[hidden email]> wrote:
I don't think that's possible. 

On Thu, Jul 7, 2016 at 8:51 AM, Pablo Gómez Pérez <[hidden email]> wrote:
Hello All,

          Is it possible to use same config file from multiple bundles while using Config Admin with blueprint Blueprint? Because, I can't manage to do that, I get the following error:

MESSAGE Cannot use configuration test.mybundle for [org.osgi.service.cm.ManagedService, id=214, bundle=86/initial@reference:file:../plugin-1/]: No visibility to configuration bound to initial@reference:file:../plugin-2/


I saw in this jira a bug opened: https://issues.jboss.org/browse/ENTESB-3959


However, I fear that this is a problem in the aries blueprint implementation as I'm not using KARAF nor FUSE, just a plain osgi container. Either that or I'm missing some blueprint configuration. I'm basically using blueprint:cm


As a workaround I can make a config file per bundle that needs it....

As follows the versions and bundles that I'm using related to the container (Running on top of Equinox 3.11):

 ID|State      |Level|Name
    5|Active     |    2|Apache Aries Whiteboard support for JMX DynamicMBean services (1.1.5)|1.1.5
    6|Active     |    2|Apache Aries JNDI Core (1.0.2)|1.0.2
   13|Active     |    3|Aries Remote Service Admin Topology Manager (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   15|Active     |    2|Aries JPA Container (1.0.2)|1.0.2
   21|Active     |    2|Apache Aries JNDI API (1.1.0)|1.1.0
   25|Active     |    3|Aries Remote Service Admin Discovery Gogo Commands (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   27|Active     |    2|Apache Aries Blueprint CM (1.0.7)|1.0.7
   29|Active     |    2|Apache Aries JMX Blueprint Core (1.1.5)|1.1.5
   37|Active     |    2|Apache Aries JNDI URL Handler (1.1.0)|1.1.0
   42|Active     |    2|Apache Aries JMX Core (1.1.5)|1.1.5
   46|Active     |    2|Apache Aries Blueprint Core (1.5.0)|1.5.0
   47|Resolved   |    4|Apache Aries Blueprint Core Compatiblity Fragment Bundle (1.0.0)|1.0.0
   55|Active     |    2|Apache Aries Util (1.1.1)|1.1.1
   56|Active     |    2|Aries JPA Container Managed Contexts (1.0.4)|1.0.4
   59|Active     |    2|Apache Aries Proxy API (1.0.1)|1.0.1
   67|Active     |    3|Aries Remote Service Admin Service Provider Interface (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   71|Active     |    2|Apache Aries Transaction Blueprint (1.1.1)|1.1.1
   73|Active     |    2|Aries JPA Container API (1.0.2)|1.0.2
   77|Active     |    2|Apache Aries JNDI Support for Legacy Runtimes (1.0.0)|1.0.0
   88|Active     |    2|Apache Aries JMX Blueprint API (1.1.5)|1.1.5
   89|Active     |    2|Apache Aries Transaction Manager (1.3.0)|1.3.0
   94|Active     |    3|Aries Remote Service Admin Discovery Config (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   97|Active     |    3|Aries Remote Service Admin provider TCP (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  110|Active     |    2|Apache Aries Blueprint Annotation API (1.0.1)|1.0.1
  120|Active     |    2|Apache Aries Transaction Blueprint (2.1.0)|2.1.0
  123|Active     |    2|Apache Aries JMX API (1.1.5)|1.1.5
  130|Active     |    2|Apache Aries Blueprint Annotation Impl (1.0.1)|1.0.1
  132|Active     |    3|Aries Remote Service Admin Discovery Zookeeper (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  134|Active     |    3|Aries Remote Service Admin Discovery Local (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  138|Active     |    3|Aries Remote Service Admin Core (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  139|Active     |    2|Apache Aries JNDI RMI Handler (1.0.0)|1.0.0
  143|Active     |    2|Apache Aries Proxy Service (1.0.4)|1.0.4
  146|Active     |    2|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.8)|1.0.8
  147|Active     |    2|Aries JPA Container blueprint integration for Aries blueprint (1.0.4)|1.0.4

   11|Active     |    4|Apache Felix File Install (3.5.4)|3.5.4
   19|Active     |    4|Apache Felix Gogo Shell (0.12.0)|0.12.0
   57|Active     |    4|Apache Felix Gogo Command (0.16.0)|0.16.0
  104|Active     |    4|Apache Felix Coordinator Service (1.0.2)|1.0.2
  109|Active     |    4|Apache Felix Gogo Runtime (0.16.2)|0.16.2
  114|Active     |    4|Apache Felix Web Management Console (1.2.8)|1.2.8
  148|Active     |    4|Apache Felix Configuration Admin Service (1.8.8)|1.8.8

   0|Active     |    0|OSGi System Bundle (3.11.0.v20160603-1336)|3.11.0.v20160603-1336


--
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)
Reply | Threaded
Open this post in threaded view
|

Re: blueprint:cm multiple bundle but same config file

Brad Johnson
Ray,

When you say bound to the bundle do you mean that it physically resides in the jar/bundle or do you mean bound via the blueprint properties persistent-id?

Brad

On Thu, Jul 7, 2016 at 9:41 AM, Raymond Auge <[hidden email]> wrote:
As long as configurations are not bound to a bundle they can be used by any bundle.

The exception clearly shows that the configuration is bound to a bundle.

Creating an unbound configuration requires passing a "?" as the second arguments to getConfiguration/createFactoryConfiguration methods of CM.


HTH,
- Ray

On Thu, Jul 7, 2016 at 10:24 AM, Brad Johnson <[hidden email]> wrote:
I don't think that's possible. 

On Thu, Jul 7, 2016 at 8:51 AM, Pablo Gómez Pérez <[hidden email]> wrote:
Hello All,

          Is it possible to use same config file from multiple bundles while using Config Admin with blueprint Blueprint? Because, I can't manage to do that, I get the following error:

MESSAGE Cannot use configuration test.mybundle for [org.osgi.service.cm.ManagedService, id=214, bundle=86/initial@reference:file:../plugin-1/]: No visibility to configuration bound to initial@reference:file:../plugin-2/


I saw in this jira a bug opened: https://issues.jboss.org/browse/ENTESB-3959


However, I fear that this is a problem in the aries blueprint implementation as I'm not using KARAF nor FUSE, just a plain osgi container. Either that or I'm missing some blueprint configuration. I'm basically using blueprint:cm


As a workaround I can make a config file per bundle that needs it....

As follows the versions and bundles that I'm using related to the container (Running on top of Equinox 3.11):

 ID|State      |Level|Name
    5|Active     |    2|Apache Aries Whiteboard support for JMX DynamicMBean services (1.1.5)|1.1.5
    6|Active     |    2|Apache Aries JNDI Core (1.0.2)|1.0.2
   13|Active     |    3|Aries Remote Service Admin Topology Manager (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   15|Active     |    2|Aries JPA Container (1.0.2)|1.0.2
   21|Active     |    2|Apache Aries JNDI API (1.1.0)|1.1.0
   25|Active     |    3|Aries Remote Service Admin Discovery Gogo Commands (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   27|Active     |    2|Apache Aries Blueprint CM (1.0.7)|1.0.7
   29|Active     |    2|Apache Aries JMX Blueprint Core (1.1.5)|1.1.5
   37|Active     |    2|Apache Aries JNDI URL Handler (1.1.0)|1.1.0
   42|Active     |    2|Apache Aries JMX Core (1.1.5)|1.1.5
   46|Active     |    2|Apache Aries Blueprint Core (1.5.0)|1.5.0
   47|Resolved   |    4|Apache Aries Blueprint Core Compatiblity Fragment Bundle (1.0.0)|1.0.0
   55|Active     |    2|Apache Aries Util (1.1.1)|1.1.1
   56|Active     |    2|Aries JPA Container Managed Contexts (1.0.4)|1.0.4
   59|Active     |    2|Apache Aries Proxy API (1.0.1)|1.0.1
   67|Active     |    3|Aries Remote Service Admin Service Provider Interface (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   71|Active     |    2|Apache Aries Transaction Blueprint (1.1.1)|1.1.1
   73|Active     |    2|Aries JPA Container API (1.0.2)|1.0.2
   77|Active     |    2|Apache Aries JNDI Support for Legacy Runtimes (1.0.0)|1.0.0
   88|Active     |    2|Apache Aries JMX Blueprint API (1.1.5)|1.1.5
   89|Active     |    2|Apache Aries Transaction Manager (1.3.0)|1.3.0
   94|Active     |    3|Aries Remote Service Admin Discovery Config (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   97|Active     |    3|Aries Remote Service Admin provider TCP (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  110|Active     |    2|Apache Aries Blueprint Annotation API (1.0.1)|1.0.1
  120|Active     |    2|Apache Aries Transaction Blueprint (2.1.0)|2.1.0
  123|Active     |    2|Apache Aries JMX API (1.1.5)|1.1.5
  130|Active     |    2|Apache Aries Blueprint Annotation Impl (1.0.1)|1.0.1
  132|Active     |    3|Aries Remote Service Admin Discovery Zookeeper (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  134|Active     |    3|Aries Remote Service Admin Discovery Local (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  138|Active     |    3|Aries Remote Service Admin Core (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  139|Active     |    2|Apache Aries JNDI RMI Handler (1.0.0)|1.0.0
  143|Active     |    2|Apache Aries Proxy Service (1.0.4)|1.0.4
  146|Active     |    2|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.8)|1.0.8
  147|Active     |    2|Aries JPA Container blueprint integration for Aries blueprint (1.0.4)|1.0.4

   11|Active     |    4|Apache Felix File Install (3.5.4)|3.5.4
   19|Active     |    4|Apache Felix Gogo Shell (0.12.0)|0.12.0
   57|Active     |    4|Apache Felix Gogo Command (0.16.0)|0.16.0
  104|Active     |    4|Apache Felix Coordinator Service (1.0.2)|1.0.2
  109|Active     |    4|Apache Felix Gogo Runtime (0.16.2)|0.16.2
  114|Active     |    4|Apache Felix Web Management Console (1.2.8)|1.2.8
  148|Active     |    4|Apache Felix Configuration Admin Service (1.8.8)|1.8.8

   0|Active     |    0|OSGi System Bundle (3.11.0.v20160603-1336)|3.11.0.v20160603-1336


--
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)

Reply | Threaded
Open this post in threaded view
|

Re: blueprint:cm multiple bundle but same config file

Pablo Gómez Pérez
In reply to this post by Raymond Auge
I see and would it possible to configure which method is invoked from Blueprint?

This is how I do it:

<cm:property-placeholder persistent-id="my.id" update-strategy="reload">
        ...
</cm:property-placeholder>

is there perhaps some blueprint property where I can tune the second argument in the createFactoryConfiguration?

Because it looks like the fact of using config admin through blueprint binds the PID to the first bundle using it


best
Pablo


On 07/07/2016 4:41 PM, Raymond Auge wrote:
As long as configurations are not bound to a bundle they can be used by any bundle.

The exception clearly shows that the configuration is bound to a bundle.

Creating an unbound configuration requires passing a "?" as the second arguments to getConfiguration/createFactoryConfiguration methods of CM.


HTH,
- Ray

On Thu, Jul 7, 2016 at 10:24 AM, Brad Johnson <[hidden email]> wrote:
I don't think that's possible. 

On Thu, Jul 7, 2016 at 8:51 AM, Pablo Gómez Pérez <[hidden email]> wrote:
Hello All,

          Is it possible to use same config file from multiple bundles while using Config Admin with blueprint Blueprint? Because, I can't manage to do that, I get the following error:

MESSAGE Cannot use configuration test.mybundle for [org.osgi.service.cm.ManagedService, id=214, [hidden email]]: No visibility to configuration bound to [hidden email]


I saw in this jira a bug opened: https://issues.jboss.org/browse/ENTESB-3959


However, I fear that this is a problem in the aries blueprint implementation as I'm not using KARAF nor FUSE, just a plain osgi container. Either that or I'm missing some blueprint configuration. I'm basically using blueprint:cm


As a workaround I can make a config file per bundle that needs it....

As follows the versions and bundles that I'm using related to the container (Running on top of Equinox 3.11):

 ID|State      |Level|Name
    5|Active     |    2|Apache Aries Whiteboard support for JMX DynamicMBean services (1.1.5)|1.1.5
    6|Active     |    2|Apache Aries JNDI Core (1.0.2)|1.0.2
   13|Active     |    3|Aries Remote Service Admin Topology Manager (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   15|Active     |    2|Aries JPA Container (1.0.2)|1.0.2
   21|Active     |    2|Apache Aries JNDI API (1.1.0)|1.1.0
   25|Active     |    3|Aries Remote Service Admin Discovery Gogo Commands (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   27|Active     |    2|Apache Aries Blueprint CM (1.0.7)|1.0.7
   29|Active     |    2|Apache Aries JMX Blueprint Core (1.1.5)|1.1.5
   37|Active     |    2|Apache Aries JNDI URL Handler (1.1.0)|1.1.0
   42|Active     |    2|Apache Aries JMX Core (1.1.5)|1.1.5
   46|Active     |    2|Apache Aries Blueprint Core (1.5.0)|1.5.0
   47|Resolved   |    4|Apache Aries Blueprint Core Compatiblity Fragment Bundle (1.0.0)|1.0.0
   55|Active     |    2|Apache Aries Util (1.1.1)|1.1.1
   56|Active     |    2|Aries JPA Container Managed Contexts (1.0.4)|1.0.4
   59|Active     |    2|Apache Aries Proxy API (1.0.1)|1.0.1
   67|Active     |    3|Aries Remote Service Admin Service Provider Interface (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   71|Active     |    2|Apache Aries Transaction Blueprint (1.1.1)|1.1.1
   73|Active     |    2|Aries JPA Container API (1.0.2)|1.0.2
   77|Active     |    2|Apache Aries JNDI Support for Legacy Runtimes (1.0.0)|1.0.0
   88|Active     |    2|Apache Aries JMX Blueprint API (1.1.5)|1.1.5
   89|Active     |    2|Apache Aries Transaction Manager (1.3.0)|1.3.0
   94|Active     |    3|Aries Remote Service Admin Discovery Config (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   97|Active     |    3|Aries Remote Service Admin provider TCP (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  110|Active     |    2|Apache Aries Blueprint Annotation API (1.0.1)|1.0.1
  120|Active     |    2|Apache Aries Transaction Blueprint (2.1.0)|2.1.0
  123|Active     |    2|Apache Aries JMX API (1.1.5)|1.1.5
  130|Active     |    2|Apache Aries Blueprint Annotation Impl (1.0.1)|1.0.1
  132|Active     |    3|Aries Remote Service Admin Discovery Zookeeper (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  134|Active     |    3|Aries Remote Service Admin Discovery Local (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  138|Active     |    3|Aries Remote Service Admin Core (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  139|Active     |    2|Apache Aries JNDI RMI Handler (1.0.0)|1.0.0
  143|Active     |    2|Apache Aries Proxy Service (1.0.4)|1.0.4
  146|Active     |    2|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.8)|1.0.8
  147|Active     |    2|Aries JPA Container blueprint integration for Aries blueprint (1.0.4)|1.0.4

   11|Active     |    4|Apache Felix File Install (3.5.4)|3.5.4
   19|Active     |    4|Apache Felix Gogo Shell (0.12.0)|0.12.0
   57|Active     |    4|Apache Felix Gogo Command (0.16.0)|0.16.0
  104|Active     |    4|Apache Felix Coordinator Service (1.0.2)|1.0.2
  109|Active     |    4|Apache Felix Gogo Runtime (0.16.2)|0.16.2
  114|Active     |    4|Apache Felix Web Management Console (1.2.8)|1.2.8
  148|Active     |    4|Apache Felix Configuration Admin Service (1.8.8)|1.8.8

   0|Active     |    0|OSGi System Bundle (3.11.0.v20160603-1336)|3.11.0.v20160603-1336


--
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)

Reply | Threaded
Open this post in threaded view
|

Re: blueprint:cm multiple bundle but same config file

David Jencks
In reply to this post by Raymond Auge
Well, that is a bit imprecise.  Also you need at least an R5 compliant config admin implementation.

To get a truly unbound configuration, you pass null as the second argument (and hope no one has persistently bound the configuration).  It’s better to pass “?” or other multi-location as that won’t be accidentally bound by someone calling getConfiguration(pid).

Multi-locations all start with “?” and may also have a symbolic name appended, which is only relevant if you have security on.  Read the details in the cmpn 104.4.1.

Even with an R5 config admin, it’s possible that the (unspecced) blueprint:cm code won’t work with multi locations..  I’d consider this a bug.

david jencks

On Jul 7, 2016, at 7:41 AM, Raymond Auge <[hidden email]> wrote:

As long as configurations are not bound to a bundle they can be used by any bundle.

The exception clearly shows that the configuration is bound to a bundle.

Creating an unbound configuration requires passing a "?" as the second arguments to getConfiguration/createFactoryConfiguration methods of CM.


HTH,
- Ray

On Thu, Jul 7, 2016 at 10:24 AM, Brad Johnson <[hidden email]> wrote:
I don't think that's possible. 

On Thu, Jul 7, 2016 at 8:51 AM, Pablo Gómez Pérez <[hidden email]> wrote:
Hello All,

          Is it possible to use same config file from multiple bundles while using Config Admin with blueprint Blueprint? Because, I can't manage to do that, I get the following error:

MESSAGE Cannot use configuration test.mybundle for [org.osgi.service.cm.ManagedService, id=214, bundle=86/initial@reference:file:../plugin-1/]: No visibility to configuration bound to initial@reference:file:../plugin-2/


I saw in this jira a bug opened: https://issues.jboss.org/browse/ENTESB-3959


However, I fear that this is a problem in the aries blueprint implementation as I'm not using KARAF nor FUSE, just a plain osgi container. Either that or I'm missing some blueprint configuration. I'm basically using blueprint:cm


As a workaround I can make a config file per bundle that needs it....

As follows the versions and bundles that I'm using related to the container (Running on top of Equinox 3.11):

 ID|State      |Level|Name
    5|Active     |    2|Apache Aries Whiteboard support for JMX DynamicMBean services (1.1.5)|1.1.5
    6|Active     |    2|Apache Aries JNDI Core (1.0.2)|1.0.2
   13|Active     |    3|Aries Remote Service Admin Topology Manager (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   15|Active     |    2|Aries JPA Container (1.0.2)|1.0.2
   21|Active     |    2|Apache Aries JNDI API (1.1.0)|1.1.0
   25|Active     |    3|Aries Remote Service Admin Discovery Gogo Commands (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   27|Active     |    2|Apache Aries Blueprint CM (1.0.7)|1.0.7
   29|Active     |    2|Apache Aries JMX Blueprint Core (1.1.5)|1.1.5
   37|Active     |    2|Apache Aries JNDI URL Handler (1.1.0)|1.1.0
   42|Active     |    2|Apache Aries JMX Core (1.1.5)|1.1.5
   46|Active     |    2|Apache Aries Blueprint Core (1.5.0)|1.5.0
   47|Resolved   |    4|Apache Aries Blueprint Core Compatiblity Fragment Bundle (1.0.0)|1.0.0
   55|Active     |    2|Apache Aries Util (1.1.1)|1.1.1
   56|Active     |    2|Aries JPA Container Managed Contexts (1.0.4)|1.0.4
   59|Active     |    2|Apache Aries Proxy API (1.0.1)|1.0.1
   67|Active     |    3|Aries Remote Service Admin Service Provider Interface (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   71|Active     |    2|Apache Aries Transaction Blueprint (1.1.1)|1.1.1
   73|Active     |    2|Aries JPA Container API (1.0.2)|1.0.2
   77|Active     |    2|Apache Aries JNDI Support for Legacy Runtimes (1.0.0)|1.0.0
   88|Active     |    2|Apache Aries JMX Blueprint API (1.1.5)|1.1.5
   89|Active     |    2|Apache Aries Transaction Manager (1.3.0)|1.3.0
   94|Active     |    3|Aries Remote Service Admin Discovery Config (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   97|Active     |    3|Aries Remote Service Admin provider TCP (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  110|Active     |    2|Apache Aries Blueprint Annotation API (1.0.1)|1.0.1
  120|Active     |    2|Apache Aries Transaction Blueprint (2.1.0)|2.1.0
  123|Active     |    2|Apache Aries JMX API (1.1.5)|1.1.5
  130|Active     |    2|Apache Aries Blueprint Annotation Impl (1.0.1)|1.0.1
  132|Active     |    3|Aries Remote Service Admin Discovery Zookeeper (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  134|Active     |    3|Aries Remote Service Admin Discovery Local (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  138|Active     |    3|Aries Remote Service Admin Core (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  139|Active     |    2|Apache Aries JNDI RMI Handler (1.0.0)|1.0.0
  143|Active     |    2|Apache Aries Proxy Service (1.0.4)|1.0.4
  146|Active     |    2|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.8)|1.0.8
  147|Active     |    2|Aries JPA Container blueprint integration for Aries blueprint (1.0.4)|1.0.4

   11|Active     |    4|Apache Felix File Install (3.5.4)|3.5.4
   19|Active     |    4|Apache Felix Gogo Shell (0.12.0)|0.12.0
   57|Active     |    4|Apache Felix Gogo Command (0.16.0)|0.16.0
  104|Active     |    4|Apache Felix Coordinator Service (1.0.2)|1.0.2
  109|Active     |    4|Apache Felix Gogo Runtime (0.16.2)|0.16.2
  114|Active     |    4|Apache Felix Web Management Console (1.2.8)|1.2.8
  148|Active     |    4|Apache Felix Configuration Admin Service (1.8.8)|1.8.8

   0|Active     |    0|OSGi System Bundle (3.11.0.v20160603-1336)|3.11.0.v20160603-1336


--
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)

Reply | Threaded
Open this post in threaded view
|

Re: blueprint:cm multiple bundle but same config file

David Jencks
In reply to this post by Brad Johnson
Neither one, the bundleLocation on the configuration is set.  This is something config admin deals with.  The management agent that creates the configuration should set the multi-location”?” when it creates the configuration.

david jencks

On Jul 7, 2016, at 8:09 AM, Brad Johnson <[hidden email]> wrote:

Ray,

When you say bound to the bundle do you mean that it physically resides in the jar/bundle or do you mean bound via the blueprint properties persistent-id?

Brad

On Thu, Jul 7, 2016 at 9:41 AM, Raymond Auge <[hidden email]> wrote:
As long as configurations are not bound to a bundle they can be used by any bundle.

The exception clearly shows that the configuration is bound to a bundle.

Creating an unbound configuration requires passing a "?" as the second arguments to getConfiguration/createFactoryConfiguration methods of CM.


HTH,
- Ray

On Thu, Jul 7, 2016 at 10:24 AM, Brad Johnson <[hidden email]> wrote:
I don't think that's possible. 

On Thu, Jul 7, 2016 at 8:51 AM, Pablo Gómez Pérez <[hidden email]> wrote:
Hello All,

          Is it possible to use same config file from multiple bundles while using Config Admin with blueprint Blueprint? Because, I can't manage to do that, I get the following error:

MESSAGE Cannot use configuration test.mybundle for [org.osgi.service.cm.ManagedService, id=214, bundle=86/initial@reference:file:../plugin-1/]: No visibility to configuration bound to initial@reference:file:../plugin-2/


I saw in this jira a bug opened: https://issues.jboss.org/browse/ENTESB-3959


However, I fear that this is a problem in the aries blueprint implementation as I'm not using KARAF nor FUSE, just a plain osgi container. Either that or I'm missing some blueprint configuration. I'm basically using blueprint:cm


As a workaround I can make a config file per bundle that needs it....

As follows the versions and bundles that I'm using related to the container (Running on top of Equinox 3.11):

 ID|State      |Level|Name
    5|Active     |    2|Apache Aries Whiteboard support for JMX DynamicMBean services (1.1.5)|1.1.5
    6|Active     |    2|Apache Aries JNDI Core (1.0.2)|1.0.2
   13|Active     |    3|Aries Remote Service Admin Topology Manager (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   15|Active     |    2|Aries JPA Container (1.0.2)|1.0.2
   21|Active     |    2|Apache Aries JNDI API (1.1.0)|1.1.0
   25|Active     |    3|Aries Remote Service Admin Discovery Gogo Commands (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   27|Active     |    2|Apache Aries Blueprint CM (1.0.7)|1.0.7
   29|Active     |    2|Apache Aries JMX Blueprint Core (1.1.5)|1.1.5
   37|Active     |    2|Apache Aries JNDI URL Handler (1.1.0)|1.1.0
   42|Active     |    2|Apache Aries JMX Core (1.1.5)|1.1.5
   46|Active     |    2|Apache Aries Blueprint Core (1.5.0)|1.5.0
   47|Resolved   |    4|Apache Aries Blueprint Core Compatiblity Fragment Bundle (1.0.0)|1.0.0
   55|Active     |    2|Apache Aries Util (1.1.1)|1.1.1
   56|Active     |    2|Aries JPA Container Managed Contexts (1.0.4)|1.0.4
   59|Active     |    2|Apache Aries Proxy API (1.0.1)|1.0.1
   67|Active     |    3|Aries Remote Service Admin Service Provider Interface (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   71|Active     |    2|Apache Aries Transaction Blueprint (1.1.1)|1.1.1
   73|Active     |    2|Aries JPA Container API (1.0.2)|1.0.2
   77|Active     |    2|Apache Aries JNDI Support for Legacy Runtimes (1.0.0)|1.0.0
   88|Active     |    2|Apache Aries JMX Blueprint API (1.1.5)|1.1.5
   89|Active     |    2|Apache Aries Transaction Manager (1.3.0)|1.3.0
   94|Active     |    3|Aries Remote Service Admin Discovery Config (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   97|Active     |    3|Aries Remote Service Admin provider TCP (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  110|Active     |    2|Apache Aries Blueprint Annotation API (1.0.1)|1.0.1
  120|Active     |    2|Apache Aries Transaction Blueprint (2.1.0)|2.1.0
  123|Active     |    2|Apache Aries JMX API (1.1.5)|1.1.5
  130|Active     |    2|Apache Aries Blueprint Annotation Impl (1.0.1)|1.0.1
  132|Active     |    3|Aries Remote Service Admin Discovery Zookeeper (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  134|Active     |    3|Aries Remote Service Admin Discovery Local (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  138|Active     |    3|Aries Remote Service Admin Core (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  139|Active     |    2|Apache Aries JNDI RMI Handler (1.0.0)|1.0.0
  143|Active     |    2|Apache Aries Proxy Service (1.0.4)|1.0.4
  146|Active     |    2|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.8)|1.0.8
  147|Active     |    2|Aries JPA Container blueprint integration for Aries blueprint (1.0.4)|1.0.4

   11|Active     |    4|Apache Felix File Install (3.5.4)|3.5.4
   19|Active     |    4|Apache Felix Gogo Shell (0.12.0)|0.12.0
   57|Active     |    4|Apache Felix Gogo Command (0.16.0)|0.16.0
  104|Active     |    4|Apache Felix Coordinator Service (1.0.2)|1.0.2
  109|Active     |    4|Apache Felix Gogo Runtime (0.16.2)|0.16.2
  114|Active     |    4|Apache Felix Web Management Console (1.2.8)|1.2.8
  148|Active     |    4|Apache Felix Configuration Admin Service (1.8.8)|1.8.8

   0|Active     |    0|OSGi System Bundle (3.11.0.v20160603-1336)|3.11.0.v20160603-1336


--
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)


Reply | Threaded
Open this post in threaded view
|

Re: blueprint:cm multiple bundle but same config file

David Jencks
In reply to this post by Pablo Gómez Pérez
No, blueprint cm shouldn’t really know about the multi-location.  The management agent that is creating the configuration should be setting the bundle location to the multi-location ”?”.

david jencks

On Jul 7, 2016, at 8:12 AM, Pablo Gómez Pérez <[hidden email]> wrote:

I see and would it possible to configure which method is invoked from Blueprint?

This is how I do it:

<cm:property-placeholder persistent-id="my.id" update-strategy="reload">
        ...
</cm:property-placeholder>

is there perhaps some blueprint property where I can tune the second argument in the createFactoryConfiguration?

Because it looks like the fact of using config admin through blueprint binds the PID to the first bundle using it


best
Pablo


On 07/07/2016 4:41 PM, Raymond Auge wrote:
As long as configurations are not bound to a bundle they can be used by any bundle.

The exception clearly shows that the configuration is bound to a bundle.

Creating an unbound configuration requires passing a "?" as the second arguments to getConfiguration/createFactoryConfiguration methods of CM.


HTH,
- Ray

On Thu, Jul 7, 2016 at 10:24 AM, Brad Johnson <[hidden email]> wrote:
I don't think that's possible. 

On Thu, Jul 7, 2016 at 8:51 AM, Pablo Gómez Pérez <[hidden email]> wrote:
Hello All,

          Is it possible to use same config file from multiple bundles while using Config Admin with blueprint Blueprint? Because, I can't manage to do that, I get the following error:

MESSAGE Cannot use configuration test.mybundle for [org.osgi.service.cm.ManagedService, id=214, [hidden email]]: No visibility to configuration bound to [hidden email]


I saw in this jira a bug opened: https://issues.jboss.org/browse/ENTESB-3959


However, I fear that this is a problem in the aries blueprint implementation as I'm not using KARAF nor FUSE, just a plain osgi container. Either that or I'm missing some blueprint configuration. I'm basically using blueprint:cm


As a workaround I can make a config file per bundle that needs it....

As follows the versions and bundles that I'm using related to the container (Running on top of Equinox 3.11):

 ID|State      |Level|Name
    5|Active     |    2|Apache Aries Whiteboard support for JMX DynamicMBean services (1.1.5)|1.1.5
    6|Active     |    2|Apache Aries JNDI Core (1.0.2)|1.0.2
   13|Active     |    3|Aries Remote Service Admin Topology Manager (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   15|Active     |    2|Aries JPA Container (1.0.2)|1.0.2
   21|Active     |    2|Apache Aries JNDI API (1.1.0)|1.1.0
   25|Active     |    3|Aries Remote Service Admin Discovery Gogo Commands (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   27|Active     |    2|Apache Aries Blueprint CM (1.0.7)|1.0.7
   29|Active     |    2|Apache Aries JMX Blueprint Core (1.1.5)|1.1.5
   37|Active     |    2|Apache Aries JNDI URL Handler (1.1.0)|1.1.0
   42|Active     |    2|Apache Aries JMX Core (1.1.5)|1.1.5
   46|Active     |    2|Apache Aries Blueprint Core (1.5.0)|1.5.0
   47|Resolved   |    4|Apache Aries Blueprint Core Compatiblity Fragment Bundle (1.0.0)|1.0.0
   55|Active     |    2|Apache Aries Util (1.1.1)|1.1.1
   56|Active     |    2|Aries JPA Container Managed Contexts (1.0.4)|1.0.4
   59|Active     |    2|Apache Aries Proxy API (1.0.1)|1.0.1
   67|Active     |    3|Aries Remote Service Admin Service Provider Interface (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   71|Active     |    2|Apache Aries Transaction Blueprint (1.1.1)|1.1.1
   73|Active     |    2|Aries JPA Container API (1.0.2)|1.0.2
   77|Active     |    2|Apache Aries JNDI Support for Legacy Runtimes (1.0.0)|1.0.0
   88|Active     |    2|Apache Aries JMX Blueprint API (1.1.5)|1.1.5
   89|Active     |    2|Apache Aries Transaction Manager (1.3.0)|1.3.0
   94|Active     |    3|Aries Remote Service Admin Discovery Config (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   97|Active     |    3|Aries Remote Service Admin provider TCP (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  110|Active     |    2|Apache Aries Blueprint Annotation API (1.0.1)|1.0.1
  120|Active     |    2|Apache Aries Transaction Blueprint (2.1.0)|2.1.0
  123|Active     |    2|Apache Aries JMX API (1.1.5)|1.1.5
  130|Active     |    2|Apache Aries Blueprint Annotation Impl (1.0.1)|1.0.1
  132|Active     |    3|Aries Remote Service Admin Discovery Zookeeper (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  134|Active     |    3|Aries Remote Service Admin Discovery Local (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  138|Active     |    3|Aries Remote Service Admin Core (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  139|Active     |    2|Apache Aries JNDI RMI Handler (1.0.0)|1.0.0
  143|Active     |    2|Apache Aries Proxy Service (1.0.4)|1.0.4
  146|Active     |    2|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.8)|1.0.8
  147|Active     |    2|Aries JPA Container blueprint integration for Aries blueprint (1.0.4)|1.0.4

   11|Active     |    4|Apache Felix File Install (3.5.4)|3.5.4
   19|Active     |    4|Apache Felix Gogo Shell (0.12.0)|0.12.0
   57|Active     |    4|Apache Felix Gogo Command (0.16.0)|0.16.0
  104|Active     |    4|Apache Felix Coordinator Service (1.0.2)|1.0.2
  109|Active     |    4|Apache Felix Gogo Runtime (0.16.2)|0.16.2
  114|Active     |    4|Apache Felix Web Management Console (1.2.8)|1.2.8
  148|Active     |    4|Apache Felix Configuration Admin Service (1.8.8)|1.8.8

   0|Active     |    0|OSGi System Bundle (3.11.0.v20160603-1336)|3.11.0.v20160603-1336


--
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)


Reply | Threaded
Open this post in threaded view
|

Re: blueprint:cm multiple bundle but same config file

Raymond Auge
In reply to this post by David Jencks
So I guess the question comes down to how configurable is blueprint in this regard!

that's the part I don't know.

- Ray

On Thu, Jul 7, 2016 at 11:17 AM, David Jencks <[hidden email]> wrote:
Neither one, the bundleLocation on the configuration is set.  This is something config admin deals with.  The management agent that creates the configuration should set the multi-location”?” when it creates the configuration.

david jencks

On Jul 7, 2016, at 8:09 AM, Brad Johnson <[hidden email]> wrote:

Ray,

When you say bound to the bundle do you mean that it physically resides in the jar/bundle or do you mean bound via the blueprint properties persistent-id?

Brad

On Thu, Jul 7, 2016 at 9:41 AM, Raymond Auge <[hidden email]> wrote:
As long as configurations are not bound to a bundle they can be used by any bundle.

The exception clearly shows that the configuration is bound to a bundle.

Creating an unbound configuration requires passing a "?" as the second arguments to getConfiguration/createFactoryConfiguration methods of CM.


HTH,
- Ray

On Thu, Jul 7, 2016 at 10:24 AM, Brad Johnson <[hidden email]> wrote:
I don't think that's possible. 

On Thu, Jul 7, 2016 at 8:51 AM, Pablo Gómez Pérez <[hidden email]> wrote:
Hello All,

          Is it possible to use same config file from multiple bundles while using Config Admin with blueprint Blueprint? Because, I can't manage to do that, I get the following error:

MESSAGE Cannot use configuration test.mybundle for [org.osgi.service.cm.ManagedService, id=214, bundle=86/initial@reference:file:../plugin-1/]: No visibility to configuration bound to initial@reference:file:../plugin-2/


I saw in this jira a bug opened: https://issues.jboss.org/browse/ENTESB-3959


However, I fear that this is a problem in the aries blueprint implementation as I'm not using KARAF nor FUSE, just a plain osgi container. Either that or I'm missing some blueprint configuration. I'm basically using blueprint:cm


As a workaround I can make a config file per bundle that needs it....

As follows the versions and bundles that I'm using related to the container (Running on top of Equinox 3.11):

 ID|State      |Level|Name
    5|Active     |    2|Apache Aries Whiteboard support for JMX DynamicMBean services (1.1.5)|1.1.5
    6|Active     |    2|Apache Aries JNDI Core (1.0.2)|1.0.2
   13|Active     |    3|Aries Remote Service Admin Topology Manager (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   15|Active     |    2|Aries JPA Container (1.0.2)|1.0.2
   21|Active     |    2|Apache Aries JNDI API (1.1.0)|1.1.0
   25|Active     |    3|Aries Remote Service Admin Discovery Gogo Commands (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   27|Active     |    2|Apache Aries Blueprint CM (1.0.7)|1.0.7
   29|Active     |    2|Apache Aries JMX Blueprint Core (1.1.5)|1.1.5
   37|Active     |    2|Apache Aries JNDI URL Handler (1.1.0)|1.1.0
   42|Active     |    2|Apache Aries JMX Core (1.1.5)|1.1.5
   46|Active     |    2|Apache Aries Blueprint Core (1.5.0)|1.5.0
   47|Resolved   |    4|Apache Aries Blueprint Core Compatiblity Fragment Bundle (1.0.0)|1.0.0
   55|Active     |    2|Apache Aries Util (1.1.1)|1.1.1
   56|Active     |    2|Aries JPA Container Managed Contexts (1.0.4)|1.0.4
   59|Active     |    2|Apache Aries Proxy API (1.0.1)|1.0.1
   67|Active     |    3|Aries Remote Service Admin Service Provider Interface (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   71|Active     |    2|Apache Aries Transaction Blueprint (1.1.1)|1.1.1
   73|Active     |    2|Aries JPA Container API (1.0.2)|1.0.2
   77|Active     |    2|Apache Aries JNDI Support for Legacy Runtimes (1.0.0)|1.0.0
   88|Active     |    2|Apache Aries JMX Blueprint API (1.1.5)|1.1.5
   89|Active     |    2|Apache Aries Transaction Manager (1.3.0)|1.3.0
   94|Active     |    3|Aries Remote Service Admin Discovery Config (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   97|Active     |    3|Aries Remote Service Admin provider TCP (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  110|Active     |    2|Apache Aries Blueprint Annotation API (1.0.1)|1.0.1
  120|Active     |    2|Apache Aries Transaction Blueprint (2.1.0)|2.1.0
  123|Active     |    2|Apache Aries JMX API (1.1.5)|1.1.5
  130|Active     |    2|Apache Aries Blueprint Annotation Impl (1.0.1)|1.0.1
  132|Active     |    3|Aries Remote Service Admin Discovery Zookeeper (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  134|Active     |    3|Aries Remote Service Admin Discovery Local (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  138|Active     |    3|Aries Remote Service Admin Core (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  139|Active     |    2|Apache Aries JNDI RMI Handler (1.0.0)|1.0.0
  143|Active     |    2|Apache Aries Proxy Service (1.0.4)|1.0.4
  146|Active     |    2|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.8)|1.0.8
  147|Active     |    2|Aries JPA Container blueprint integration for Aries blueprint (1.0.4)|1.0.4

   11|Active     |    4|Apache Felix File Install (3.5.4)|3.5.4
   19|Active     |    4|Apache Felix Gogo Shell (0.12.0)|0.12.0
   57|Active     |    4|Apache Felix Gogo Command (0.16.0)|0.16.0
  104|Active     |    4|Apache Felix Coordinator Service (1.0.2)|1.0.2
  109|Active     |    4|Apache Felix Gogo Runtime (0.16.2)|0.16.2
  114|Active     |    4|Apache Felix Web Management Console (1.2.8)|1.2.8
  148|Active     |    4|Apache Felix Configuration Admin Service (1.8.8)|1.8.8

   0|Active     |    0|OSGi System Bundle (3.11.0.v20160603-1336)|3.11.0.v20160603-1336


--
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)





--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)
Reply | Threaded
Open this post in threaded view
|

Re: blueprint:cm multiple bundle but same config file

Raymond Auge
In reply to this post by David Jencks
David, I agree with everything you've said, however this looks like blueprint being the agent here:

<cm:property-placeholder persistent-id="my.id" update-strategy="reload">
        ...
</cm:property-placeholder>

- Ray

On Thu, Jul 7, 2016 at 11:18 AM, David Jencks <[hidden email]> wrote:
No, blueprint cm shouldn’t really know about the multi-location.  The management agent that is creating the configuration should be setting the bundle location to the multi-location ”?”.

david jencks

On Jul 7, 2016, at 8:12 AM, Pablo Gómez Pérez <[hidden email]> wrote:

I see and would it possible to configure which method is invoked from Blueprint?

This is how I do it:

<cm:property-placeholder persistent-id="my.id" update-strategy="reload">
        ...
</cm:property-placeholder>

is there perhaps some blueprint property where I can tune the second argument in the createFactoryConfiguration?

Because it looks like the fact of using config admin through blueprint binds the PID to the first bundle using it


best
Pablo


On 07/07/2016 4:41 PM, Raymond Auge wrote:
As long as configurations are not bound to a bundle they can be used by any bundle.

The exception clearly shows that the configuration is bound to a bundle.

Creating an unbound configuration requires passing a "?" as the second arguments to getConfiguration/createFactoryConfiguration methods of CM.


HTH,
- Ray

On Thu, Jul 7, 2016 at 10:24 AM, Brad Johnson <[hidden email]> wrote:
I don't think that's possible. 

On Thu, Jul 7, 2016 at 8:51 AM, Pablo Gómez Pérez <[hidden email]> wrote:
Hello All,

          Is it possible to use same config file from multiple bundles while using Config Admin with blueprint Blueprint? Because, I can't manage to do that, I get the following error:

MESSAGE Cannot use configuration test.mybundle for [org.osgi.service.cm.ManagedService, id=214, [hidden email]]: No visibility to configuration bound to [hidden email]


I saw in this jira a bug opened: https://issues.jboss.org/browse/ENTESB-3959


However, I fear that this is a problem in the aries blueprint implementation as I'm not using KARAF nor FUSE, just a plain osgi container. Either that or I'm missing some blueprint configuration. I'm basically using blueprint:cm


As a workaround I can make a config file per bundle that needs it....

As follows the versions and bundles that I'm using related to the container (Running on top of Equinox 3.11):

 ID|State      |Level|Name
    5|Active     |    2|Apache Aries Whiteboard support for JMX DynamicMBean services (1.1.5)|1.1.5
    6|Active     |    2|Apache Aries JNDI Core (1.0.2)|1.0.2
   13|Active     |    3|Aries Remote Service Admin Topology Manager (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   15|Active     |    2|Aries JPA Container (1.0.2)|1.0.2
   21|Active     |    2|Apache Aries JNDI API (1.1.0)|1.1.0
   25|Active     |    3|Aries Remote Service Admin Discovery Gogo Commands (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   27|Active     |    2|Apache Aries Blueprint CM (1.0.7)|1.0.7
   29|Active     |    2|Apache Aries JMX Blueprint Core (1.1.5)|1.1.5
   37|Active     |    2|Apache Aries JNDI URL Handler (1.1.0)|1.1.0
   42|Active     |    2|Apache Aries JMX Core (1.1.5)|1.1.5
   46|Active     |    2|Apache Aries Blueprint Core (1.5.0)|1.5.0
   47|Resolved   |    4|Apache Aries Blueprint Core Compatiblity Fragment Bundle (1.0.0)|1.0.0
   55|Active     |    2|Apache Aries Util (1.1.1)|1.1.1
   56|Active     |    2|Aries JPA Container Managed Contexts (1.0.4)|1.0.4
   59|Active     |    2|Apache Aries Proxy API (1.0.1)|1.0.1
   67|Active     |    3|Aries Remote Service Admin Service Provider Interface (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   71|Active     |    2|Apache Aries Transaction Blueprint (1.1.1)|1.1.1
   73|Active     |    2|Aries JPA Container API (1.0.2)|1.0.2
   77|Active     |    2|Apache Aries JNDI Support for Legacy Runtimes (1.0.0)|1.0.0
   88|Active     |    2|Apache Aries JMX Blueprint API (1.1.5)|1.1.5
   89|Active     |    2|Apache Aries Transaction Manager (1.3.0)|1.3.0
   94|Active     |    3|Aries Remote Service Admin Discovery Config (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   97|Active     |    3|Aries Remote Service Admin provider TCP (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  110|Active     |    2|Apache Aries Blueprint Annotation API (1.0.1)|1.0.1
  120|Active     |    2|Apache Aries Transaction Blueprint (2.1.0)|2.1.0
  123|Active     |    2|Apache Aries JMX API (1.1.5)|1.1.5
  130|Active     |    2|Apache Aries Blueprint Annotation Impl (1.0.1)|1.0.1
  132|Active     |    3|Aries Remote Service Admin Discovery Zookeeper (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  134|Active     |    3|Aries Remote Service Admin Discovery Local (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  138|Active     |    3|Aries Remote Service Admin Core (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  139|Active     |    2|Apache Aries JNDI RMI Handler (1.0.0)|1.0.0
  143|Active     |    2|Apache Aries Proxy Service (1.0.4)|1.0.4
  146|Active     |    2|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.8)|1.0.8
  147|Active     |    2|Aries JPA Container blueprint integration for Aries blueprint (1.0.4)|1.0.4

   11|Active     |    4|Apache Felix File Install (3.5.4)|3.5.4
   19|Active     |    4|Apache Felix Gogo Shell (0.12.0)|0.12.0
   57|Active     |    4|Apache Felix Gogo Command (0.16.0)|0.16.0
  104|Active     |    4|Apache Felix Coordinator Service (1.0.2)|1.0.2
  109|Active     |    4|Apache Felix Gogo Runtime (0.16.2)|0.16.2
  114|Active     |    4|Apache Felix Web Management Console (1.2.8)|1.2.8
  148|Active     |    4|Apache Felix Configuration Admin Service (1.8.8)|1.8.8

   0|Active     |    0|OSGi System Bundle (3.11.0.v20160603-1336)|3.11.0.v20160603-1336


--
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)





--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)
Reply | Threaded
Open this post in threaded view
|

Re: blueprint:cm multiple bundle but same config file

Brad Johnson
In reply to this post by Raymond Auge
Aye, there's the rub.  And obviously many of us aren't on the bleeding edge of blueprint or OSGi either so some of these features may be new and in place now.  I've had to use work arounds for this in the past like creating my own OSGi service to share configuration data.



On Thu, Jul 7, 2016 at 10:18 AM, Raymond Auge <[hidden email]> wrote:
So I guess the question comes down to how configurable is blueprint in this regard!

that's the part I don't know.

- Ray

On Thu, Jul 7, 2016 at 11:17 AM, David Jencks <[hidden email]> wrote:
Neither one, the bundleLocation on the configuration is set.  This is something config admin deals with.  The management agent that creates the configuration should set the multi-location”?” when it creates the configuration.

david jencks

On Jul 7, 2016, at 8:09 AM, Brad Johnson <[hidden email]> wrote:

Ray,

When you say bound to the bundle do you mean that it physically resides in the jar/bundle or do you mean bound via the blueprint properties persistent-id?

Brad

On Thu, Jul 7, 2016 at 9:41 AM, Raymond Auge <[hidden email]> wrote:
As long as configurations are not bound to a bundle they can be used by any bundle.

The exception clearly shows that the configuration is bound to a bundle.

Creating an unbound configuration requires passing a "?" as the second arguments to getConfiguration/createFactoryConfiguration methods of CM.


HTH,
- Ray

On Thu, Jul 7, 2016 at 10:24 AM, Brad Johnson <[hidden email]> wrote:
I don't think that's possible. 

On Thu, Jul 7, 2016 at 8:51 AM, Pablo Gómez Pérez <[hidden email]> wrote:
Hello All,

          Is it possible to use same config file from multiple bundles while using Config Admin with blueprint Blueprint? Because, I can't manage to do that, I get the following error:

MESSAGE Cannot use configuration test.mybundle for [org.osgi.service.cm.ManagedService, id=214, bundle=86/initial@reference:file:../plugin-1/]: No visibility to configuration bound to initial@reference:file:../plugin-2/


I saw in this jira a bug opened: https://issues.jboss.org/browse/ENTESB-3959


However, I fear that this is a problem in the aries blueprint implementation as I'm not using KARAF nor FUSE, just a plain osgi container. Either that or I'm missing some blueprint configuration. I'm basically using blueprint:cm


As a workaround I can make a config file per bundle that needs it....

As follows the versions and bundles that I'm using related to the container (Running on top of Equinox 3.11):

 ID|State      |Level|Name
    5|Active     |    2|Apache Aries Whiteboard support for JMX DynamicMBean services (1.1.5)|1.1.5
    6|Active     |    2|Apache Aries JNDI Core (1.0.2)|1.0.2
   13|Active     |    3|Aries Remote Service Admin Topology Manager (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   15|Active     |    2|Aries JPA Container (1.0.2)|1.0.2
   21|Active     |    2|Apache Aries JNDI API (1.1.0)|1.1.0
   25|Active     |    3|Aries Remote Service Admin Discovery Gogo Commands (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   27|Active     |    2|Apache Aries Blueprint CM (1.0.7)|1.0.7
   29|Active     |    2|Apache Aries JMX Blueprint Core (1.1.5)|1.1.5
   37|Active     |    2|Apache Aries JNDI URL Handler (1.1.0)|1.1.0
   42|Active     |    2|Apache Aries JMX Core (1.1.5)|1.1.5
   46|Active     |    2|Apache Aries Blueprint Core (1.5.0)|1.5.0
   47|Resolved   |    4|Apache Aries Blueprint Core Compatiblity Fragment Bundle (1.0.0)|1.0.0
   55|Active     |    2|Apache Aries Util (1.1.1)|1.1.1
   56|Active     |    2|Aries JPA Container Managed Contexts (1.0.4)|1.0.4
   59|Active     |    2|Apache Aries Proxy API (1.0.1)|1.0.1
   67|Active     |    3|Aries Remote Service Admin Service Provider Interface (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   71|Active     |    2|Apache Aries Transaction Blueprint (1.1.1)|1.1.1
   73|Active     |    2|Aries JPA Container API (1.0.2)|1.0.2
   77|Active     |    2|Apache Aries JNDI Support for Legacy Runtimes (1.0.0)|1.0.0
   88|Active     |    2|Apache Aries JMX Blueprint API (1.1.5)|1.1.5
   89|Active     |    2|Apache Aries Transaction Manager (1.3.0)|1.3.0
   94|Active     |    3|Aries Remote Service Admin Discovery Config (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   97|Active     |    3|Aries Remote Service Admin provider TCP (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  110|Active     |    2|Apache Aries Blueprint Annotation API (1.0.1)|1.0.1
  120|Active     |    2|Apache Aries Transaction Blueprint (2.1.0)|2.1.0
  123|Active     |    2|Apache Aries JMX API (1.1.5)|1.1.5
  130|Active     |    2|Apache Aries Blueprint Annotation Impl (1.0.1)|1.0.1
  132|Active     |    3|Aries Remote Service Admin Discovery Zookeeper (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  134|Active     |    3|Aries Remote Service Admin Discovery Local (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  138|Active     |    3|Aries Remote Service Admin Core (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  139|Active     |    2|Apache Aries JNDI RMI Handler (1.0.0)|1.0.0
  143|Active     |    2|Apache Aries Proxy Service (1.0.4)|1.0.4
  146|Active     |    2|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.8)|1.0.8
  147|Active     |    2|Aries JPA Container blueprint integration for Aries blueprint (1.0.4)|1.0.4

   11|Active     |    4|Apache Felix File Install (3.5.4)|3.5.4
   19|Active     |    4|Apache Felix Gogo Shell (0.12.0)|0.12.0
   57|Active     |    4|Apache Felix Gogo Command (0.16.0)|0.16.0
  104|Active     |    4|Apache Felix Coordinator Service (1.0.2)|1.0.2
  109|Active     |    4|Apache Felix Gogo Runtime (0.16.2)|0.16.2
  114|Active     |    4|Apache Felix Web Management Console (1.2.8)|1.2.8
  148|Active     |    4|Apache Felix Configuration Admin Service (1.8.8)|1.8.8

   0|Active     |    0|OSGi System Bundle (3.11.0.v20160603-1336)|3.11.0.v20160603-1336


--
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)





--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)

Reply | Threaded
Open this post in threaded view
|

Re: blueprint:cm multiple bundle but same config file

David Jencks
In reply to this post by Raymond Auge
I’d say the first question is whether common management agents (felix fileinstall???) let you specify the bundle location.  The second is whether  blueprint cm accepts the “?” multi-location.

david jencks

On Jul 7, 2016, at 8:18 AM, Raymond Auge <[hidden email]> wrote:

So I guess the question comes down to how configurable is blueprint in this regard!

that's the part I don't know.

- Ray

On Thu, Jul 7, 2016 at 11:17 AM, David Jencks <[hidden email]> wrote:
Neither one, the bundleLocation on the configuration is set.  This is something config admin deals with.  The management agent that creates the configuration should set the multi-location”?” when it creates the configuration.

david jencks

On Jul 7, 2016, at 8:09 AM, Brad Johnson <[hidden email]> wrote:

Ray,

When you say bound to the bundle do you mean that it physically resides in the jar/bundle or do you mean bound via the blueprint properties persistent-id?

Brad

On Thu, Jul 7, 2016 at 9:41 AM, Raymond Auge <[hidden email]> wrote:
As long as configurations are not bound to a bundle they can be used by any bundle.

The exception clearly shows that the configuration is bound to a bundle.

Creating an unbound configuration requires passing a "?" as the second arguments to getConfiguration/createFactoryConfiguration methods of CM.


HTH,
- Ray

On Thu, Jul 7, 2016 at 10:24 AM, Brad Johnson <[hidden email]> wrote:
I don't think that's possible. 

On Thu, Jul 7, 2016 at 8:51 AM, Pablo Gómez Pérez <[hidden email]> wrote:
Hello All,

          Is it possible to use same config file from multiple bundles while using Config Admin with blueprint Blueprint? Because, I can't manage to do that, I get the following error:

MESSAGE Cannot use configuration test.mybundle for [org.osgi.service.cm.ManagedService, id=214, bundle=86/initial@reference:file:../plugin-1/]: No visibility to configuration bound to initial@reference:file:../plugin-2/


I saw in this jira a bug opened: https://issues.jboss.org/browse/ENTESB-3959


However, I fear that this is a problem in the aries blueprint implementation as I'm not using KARAF nor FUSE, just a plain osgi container. Either that or I'm missing some blueprint configuration. I'm basically using blueprint:cm


As a workaround I can make a config file per bundle that needs it....

As follows the versions and bundles that I'm using related to the container (Running on top of Equinox 3.11):

 ID|State      |Level|Name
    5|Active     |    2|Apache Aries Whiteboard support for JMX DynamicMBean services (1.1.5)|1.1.5
    6|Active     |    2|Apache Aries JNDI Core (1.0.2)|1.0.2
   13|Active     |    3|Aries Remote Service Admin Topology Manager (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   15|Active     |    2|Aries JPA Container (1.0.2)|1.0.2
   21|Active     |    2|Apache Aries JNDI API (1.1.0)|1.1.0
   25|Active     |    3|Aries Remote Service Admin Discovery Gogo Commands (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   27|Active     |    2|Apache Aries Blueprint CM (1.0.7)|1.0.7
   29|Active     |    2|Apache Aries JMX Blueprint Core (1.1.5)|1.1.5
   37|Active     |    2|Apache Aries JNDI URL Handler (1.1.0)|1.1.0
   42|Active     |    2|Apache Aries JMX Core (1.1.5)|1.1.5
   46|Active     |    2|Apache Aries Blueprint Core (1.5.0)|1.5.0
   47|Resolved   |    4|Apache Aries Blueprint Core Compatiblity Fragment Bundle (1.0.0)|1.0.0
   55|Active     |    2|Apache Aries Util (1.1.1)|1.1.1
   56|Active     |    2|Aries JPA Container Managed Contexts (1.0.4)|1.0.4
   59|Active     |    2|Apache Aries Proxy API (1.0.1)|1.0.1
   67|Active     |    3|Aries Remote Service Admin Service Provider Interface (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   71|Active     |    2|Apache Aries Transaction Blueprint (1.1.1)|1.1.1
   73|Active     |    2|Aries JPA Container API (1.0.2)|1.0.2
   77|Active     |    2|Apache Aries JNDI Support for Legacy Runtimes (1.0.0)|1.0.0
   88|Active     |    2|Apache Aries JMX Blueprint API (1.1.5)|1.1.5
   89|Active     |    2|Apache Aries Transaction Manager (1.3.0)|1.3.0
   94|Active     |    3|Aries Remote Service Admin Discovery Config (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   97|Active     |    3|Aries Remote Service Admin provider TCP (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  110|Active     |    2|Apache Aries Blueprint Annotation API (1.0.1)|1.0.1
  120|Active     |    2|Apache Aries Transaction Blueprint (2.1.0)|2.1.0
  123|Active     |    2|Apache Aries JMX API (1.1.5)|1.1.5
  130|Active     |    2|Apache Aries Blueprint Annotation Impl (1.0.1)|1.0.1
  132|Active     |    3|Aries Remote Service Admin Discovery Zookeeper (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  134|Active     |    3|Aries Remote Service Admin Discovery Local (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  138|Active     |    3|Aries Remote Service Admin Core (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  139|Active     |    2|Apache Aries JNDI RMI Handler (1.0.0)|1.0.0
  143|Active     |    2|Apache Aries Proxy Service (1.0.4)|1.0.4
  146|Active     |    2|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.8)|1.0.8
  147|Active     |    2|Aries JPA Container blueprint integration for Aries blueprint (1.0.4)|1.0.4

   11|Active     |    4|Apache Felix File Install (3.5.4)|3.5.4
   19|Active     |    4|Apache Felix Gogo Shell (0.12.0)|0.12.0
   57|Active     |    4|Apache Felix Gogo Command (0.16.0)|0.16.0
  104|Active     |    4|Apache Felix Coordinator Service (1.0.2)|1.0.2
  109|Active     |    4|Apache Felix Gogo Runtime (0.16.2)|0.16.2
  114|Active     |    4|Apache Felix Web Management Console (1.2.8)|1.2.8
  148|Active     |    4|Apache Felix Configuration Admin Service (1.8.8)|1.8.8

   0|Active     |    0|OSGi System Bundle (3.11.0.v20160603-1336)|3.11.0.v20160603-1336


--
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)





--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)

Reply | Threaded
Open this post in threaded view
|

Re: blueprint:cm multiple bundle but same config file

David Jencks
In reply to this post by Raymond Auge
I’m not really familiar with blueprint cm but I’d expect that to indicate which pid to use to fetch the config from config admin and in the ... how to map configuration propertiething blueprint substitution knows about.  Is that really instructions to create a new configuration and populate it with data (what a management agent does)?

david jencks

On Jul 7, 2016, at 8:19 AM, Raymond Auge <[hidden email]> wrote:

David, I agree with everything you've said, however this looks like blueprint being the agent here:

<cm:property-placeholder persistent-id="my.id" update-strategy="reload">
        ...
</cm:property-placeholder>

- Ray

On Thu, Jul 7, 2016 at 11:18 AM, David Jencks <[hidden email]> wrote:
No, blueprint cm shouldn’t really know about the multi-location.  The management agent that is creating the configuration should be setting the bundle location to the multi-location ”?”.

david jencks

On Jul 7, 2016, at 8:12 AM, Pablo Gómez Pérez <[hidden email]> wrote:

I see and would it possible to configure which method is invoked from Blueprint?

This is how I do it:

<cm:property-placeholder persistent-id="my.id" update-strategy="reload">
        ...
</cm:property-placeholder>

is there perhaps some blueprint property where I can tune the second argument in the createFactoryConfiguration?

Because it looks like the fact of using config admin through blueprint binds the PID to the first bundle using it


best
Pablo


On 07/07/2016 4:41 PM, Raymond Auge wrote:
As long as configurations are not bound to a bundle they can be used by any bundle.

The exception clearly shows that the configuration is bound to a bundle.

Creating an unbound configuration requires passing a "?" as the second arguments to getConfiguration/createFactoryConfiguration methods of CM.


HTH,
- Ray

On Thu, Jul 7, 2016 at 10:24 AM, Brad Johnson <[hidden email]> wrote:
I don't think that's possible. 

On Thu, Jul 7, 2016 at 8:51 AM, Pablo Gómez Pérez <[hidden email]> wrote:
Hello All,

          Is it possible to use same config file from multiple bundles while using Config Admin with blueprint Blueprint? Because, I can't manage to do that, I get the following error:

MESSAGE Cannot use configuration test.mybundle for [org.osgi.service.cm.ManagedService, id=214, [hidden email]]: No visibility to configuration bound to [hidden email]


I saw in this jira a bug opened: https://issues.jboss.org/browse/ENTESB-3959


However, I fear that this is a problem in the aries blueprint implementation as I'm not using KARAF nor FUSE, just a plain osgi container. Either that or I'm missing some blueprint configuration. I'm basically using blueprint:cm


As a workaround I can make a config file per bundle that needs it....

As follows the versions and bundles that I'm using related to the container (Running on top of Equinox 3.11):

 ID|State      |Level|Name
    5|Active     |    2|Apache Aries Whiteboard support for JMX DynamicMBean services (1.1.5)|1.1.5
    6|Active     |    2|Apache Aries JNDI Core (1.0.2)|1.0.2
   13|Active     |    3|Aries Remote Service Admin Topology Manager (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   15|Active     |    2|Aries JPA Container (1.0.2)|1.0.2
   21|Active     |    2|Apache Aries JNDI API (1.1.0)|1.1.0
   25|Active     |    3|Aries Remote Service Admin Discovery Gogo Commands (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   27|Active     |    2|Apache Aries Blueprint CM (1.0.7)|1.0.7
   29|Active     |    2|Apache Aries JMX Blueprint Core (1.1.5)|1.1.5
   37|Active     |    2|Apache Aries JNDI URL Handler (1.1.0)|1.1.0
   42|Active     |    2|Apache Aries JMX Core (1.1.5)|1.1.5
   46|Active     |    2|Apache Aries Blueprint Core (1.5.0)|1.5.0
   47|Resolved   |    4|Apache Aries Blueprint Core Compatiblity Fragment Bundle (1.0.0)|1.0.0
   55|Active     |    2|Apache Aries Util (1.1.1)|1.1.1
   56|Active     |    2|Aries JPA Container Managed Contexts (1.0.4)|1.0.4
   59|Active     |    2|Apache Aries Proxy API (1.0.1)|1.0.1
   67|Active     |    3|Aries Remote Service Admin Service Provider Interface (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   71|Active     |    2|Apache Aries Transaction Blueprint (1.1.1)|1.1.1
   73|Active     |    2|Aries JPA Container API (1.0.2)|1.0.2
   77|Active     |    2|Apache Aries JNDI Support for Legacy Runtimes (1.0.0)|1.0.0
   88|Active     |    2|Apache Aries JMX Blueprint API (1.1.5)|1.1.5
   89|Active     |    2|Apache Aries Transaction Manager (1.3.0)|1.3.0
   94|Active     |    3|Aries Remote Service Admin Discovery Config (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   97|Active     |    3|Aries Remote Service Admin provider TCP (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  110|Active     |    2|Apache Aries Blueprint Annotation API (1.0.1)|1.0.1
  120|Active     |    2|Apache Aries Transaction Blueprint (2.1.0)|2.1.0
  123|Active     |    2|Apache Aries JMX API (1.1.5)|1.1.5
  130|Active     |    2|Apache Aries Blueprint Annotation Impl (1.0.1)|1.0.1
  132|Active     |    3|Aries Remote Service Admin Discovery Zookeeper (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  134|Active     |    3|Aries Remote Service Admin Discovery Local (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  138|Active     |    3|Aries Remote Service Admin Core (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  139|Active     |    2|Apache Aries JNDI RMI Handler (1.0.0)|1.0.0
  143|Active     |    2|Apache Aries Proxy Service (1.0.4)|1.0.4
  146|Active     |    2|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.8)|1.0.8
  147|Active     |    2|Aries JPA Container blueprint integration for Aries blueprint (1.0.4)|1.0.4

   11|Active     |    4|Apache Felix File Install (3.5.4)|3.5.4
   19|Active     |    4|Apache Felix Gogo Shell (0.12.0)|0.12.0
   57|Active     |    4|Apache Felix Gogo Command (0.16.0)|0.16.0
  104|Active     |    4|Apache Felix Coordinator Service (1.0.2)|1.0.2
  109|Active     |    4|Apache Felix Gogo Runtime (0.16.2)|0.16.2
  114|Active     |    4|Apache Felix Web Management Console (1.2.8)|1.2.8
  148|Active     |    4|Apache Felix Configuration Admin Service (1.8.8)|1.8.8

   0|Active     |    0|OSGi System Bundle (3.11.0.v20160603-1336)|3.11.0.v20160603-1336


--
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)





--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)

Reply | Threaded
Open this post in threaded view
|

Re: blueprint:cm multiple bundle but same config file

Raymond Auge
Ok, so after a brief review the cm schema is an Aries extension and it doesn't appear to support the location binding.

However, it's unclear to me whether this extension is creating the configuration or merely referencing one from outside.

Any Aries gurus can answer that?

- Ray

On Thu, Jul 7, 2016 at 11:29 AM, David Jencks <[hidden email]> wrote:
I’m not really familiar with blueprint cm but I’d expect that to indicate which pid to use to fetch the config from config admin and in the ... how to map configuration propertiething blueprint substitution knows about.  Is that really instructions to create a new configuration and populate it with data (what a management agent does)?

david jencks

On Jul 7, 2016, at 8:19 AM, Raymond Auge <[hidden email]> wrote:

David, I agree with everything you've said, however this looks like blueprint being the agent here:

<cm:property-placeholder persistent-id="my.id" update-strategy="reload">
        ...
</cm:property-placeholder>

- Ray

On Thu, Jul 7, 2016 at 11:18 AM, David Jencks <[hidden email]> wrote:
No, blueprint cm shouldn’t really know about the multi-location.  The management agent that is creating the configuration should be setting the bundle location to the multi-location ”?”.

david jencks

On Jul 7, 2016, at 8:12 AM, Pablo Gómez Pérez <[hidden email]> wrote:

I see and would it possible to configure which method is invoked from Blueprint?

This is how I do it:

<cm:property-placeholder persistent-id="my.id" update-strategy="reload">
        ...
</cm:property-placeholder>

is there perhaps some blueprint property where I can tune the second argument in the createFactoryConfiguration?

Because it looks like the fact of using config admin through blueprint binds the PID to the first bundle using it


best
Pablo


On 07/07/2016 4:41 PM, Raymond Auge wrote:
As long as configurations are not bound to a bundle they can be used by any bundle.

The exception clearly shows that the configuration is bound to a bundle.

Creating an unbound configuration requires passing a "?" as the second arguments to getConfiguration/createFactoryConfiguration methods of CM.


HTH,
- Ray

On Thu, Jul 7, 2016 at 10:24 AM, Brad Johnson <[hidden email]> wrote:
I don't think that's possible. 

On Thu, Jul 7, 2016 at 8:51 AM, Pablo Gómez Pérez <[hidden email]> wrote:
Hello All,

          Is it possible to use same config file from multiple bundles while using Config Admin with blueprint Blueprint? Because, I can't manage to do that, I get the following error:

MESSAGE Cannot use configuration test.mybundle for [org.osgi.service.cm.ManagedService, id=214, [hidden email]]: No visibility to configuration bound to [hidden email]


I saw in this jira a bug opened: https://issues.jboss.org/browse/ENTESB-3959


However, I fear that this is a problem in the aries blueprint implementation as I'm not using KARAF nor FUSE, just a plain osgi container. Either that or I'm missing some blueprint configuration. I'm basically using blueprint:cm


As a workaround I can make a config file per bundle that needs it....

As follows the versions and bundles that I'm using related to the container (Running on top of Equinox 3.11):

 ID|State      |Level|Name
    5|Active     |    2|Apache Aries Whiteboard support for JMX DynamicMBean services (1.1.5)|1.1.5
    6|Active     |    2|Apache Aries JNDI Core (1.0.2)|1.0.2
   13|Active     |    3|Aries Remote Service Admin Topology Manager (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   15|Active     |    2|Aries JPA Container (1.0.2)|1.0.2
   21|Active     |    2|Apache Aries JNDI API (1.1.0)|1.1.0
   25|Active     |    3|Aries Remote Service Admin Discovery Gogo Commands (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   27|Active     |    2|Apache Aries Blueprint CM (1.0.7)|1.0.7
   29|Active     |    2|Apache Aries JMX Blueprint Core (1.1.5)|1.1.5
   37|Active     |    2|Apache Aries JNDI URL Handler (1.1.0)|1.1.0
   42|Active     |    2|Apache Aries JMX Core (1.1.5)|1.1.5
   46|Active     |    2|Apache Aries Blueprint Core (1.5.0)|1.5.0
   47|Resolved   |    4|Apache Aries Blueprint Core Compatiblity Fragment Bundle (1.0.0)|1.0.0
   55|Active     |    2|Apache Aries Util (1.1.1)|1.1.1
   56|Active     |    2|Aries JPA Container Managed Contexts (1.0.4)|1.0.4
   59|Active     |    2|Apache Aries Proxy API (1.0.1)|1.0.1
   67|Active     |    3|Aries Remote Service Admin Service Provider Interface (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   71|Active     |    2|Apache Aries Transaction Blueprint (1.1.1)|1.1.1
   73|Active     |    2|Aries JPA Container API (1.0.2)|1.0.2
   77|Active     |    2|Apache Aries JNDI Support for Legacy Runtimes (1.0.0)|1.0.0
   88|Active     |    2|Apache Aries JMX Blueprint API (1.1.5)|1.1.5
   89|Active     |    2|Apache Aries Transaction Manager (1.3.0)|1.3.0
   94|Active     |    3|Aries Remote Service Admin Discovery Config (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   97|Active     |    3|Aries Remote Service Admin provider TCP (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  110|Active     |    2|Apache Aries Blueprint Annotation API (1.0.1)|1.0.1
  120|Active     |    2|Apache Aries Transaction Blueprint (2.1.0)|2.1.0
  123|Active     |    2|Apache Aries JMX API (1.1.5)|1.1.5
  130|Active     |    2|Apache Aries Blueprint Annotation Impl (1.0.1)|1.0.1
  132|Active     |    3|Aries Remote Service Admin Discovery Zookeeper (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  134|Active     |    3|Aries Remote Service Admin Discovery Local (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  138|Active     |    3|Aries Remote Service Admin Core (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  139|Active     |    2|Apache Aries JNDI RMI Handler (1.0.0)|1.0.0
  143|Active     |    2|Apache Aries Proxy Service (1.0.4)|1.0.4
  146|Active     |    2|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.8)|1.0.8
  147|Active     |    2|Aries JPA Container blueprint integration for Aries blueprint (1.0.4)|1.0.4

   11|Active     |    4|Apache Felix File Install (3.5.4)|3.5.4
   19|Active     |    4|Apache Felix Gogo Shell (0.12.0)|0.12.0
   57|Active     |    4|Apache Felix Gogo Command (0.16.0)|0.16.0
  104|Active     |    4|Apache Felix Coordinator Service (1.0.2)|1.0.2
  109|Active     |    4|Apache Felix Gogo Runtime (0.16.2)|0.16.2
  114|Active     |    4|Apache Felix Web Management Console (1.2.8)|1.2.8
  148|Active     |    4|Apache Felix Configuration Admin Service (1.8.8)|1.8.8

   0|Active     |    0|OSGi System Bundle (3.11.0.v20160603-1336)|3.11.0.v20160603-1336


--
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)





--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)
Reply | Threaded
Open this post in threaded view
|

Re: blueprint:cm multiple bundle but same config file

Brad Johnson
Ray,

If I understand your question right the answer is the Aries extension is referencing configuration.  In karaf/fuse for example the following:

<cm:property-placeholder persistent-id="com.my.foo" update-strategy="reload">

will load properties from etc/com.my.foo.cfg

Installing that file is done either manually or by use of a features file.

Whenever I've attempted to use the PID in more than one bundle it has failed and I don't think it is permitted.  That's a problem I think and something that should be fixed through some other configuration management mechanism.  Making microservices that might share common properties, for example, becomes problematic in that regard and I've resorted to using my own OSGi services to overcome that problem.

Brad

On Thu, Jul 7, 2016 at 10:46 AM, Raymond Auge <[hidden email]> wrote:
Ok, so after a brief review the cm schema is an Aries extension and it doesn't appear to support the location binding.

However, it's unclear to me whether this extension is creating the configuration or merely referencing one from outside.

Any Aries gurus can answer that?

- Ray

On Thu, Jul 7, 2016 at 11:29 AM, David Jencks <[hidden email]> wrote:
I’m not really familiar with blueprint cm but I’d expect that to indicate which pid to use to fetch the config from config admin and in the ... how to map configuration propertiething blueprint substitution knows about.  Is that really instructions to create a new configuration and populate it with data (what a management agent does)?

david jencks

On Jul 7, 2016, at 8:19 AM, Raymond Auge <[hidden email]> wrote:

David, I agree with everything you've said, however this looks like blueprint being the agent here:

<cm:property-placeholder persistent-id="my.id" update-strategy="reload">
        ...
</cm:property-placeholder>

- Ray

On Thu, Jul 7, 2016 at 11:18 AM, David Jencks <[hidden email]> wrote:
No, blueprint cm shouldn’t really know about the multi-location.  The management agent that is creating the configuration should be setting the bundle location to the multi-location ”?”.

david jencks

On Jul 7, 2016, at 8:12 AM, Pablo Gómez Pérez <[hidden email]> wrote:

I see and would it possible to configure which method is invoked from Blueprint?

This is how I do it:

<cm:property-placeholder persistent-id="my.id" update-strategy="reload">
        ...
</cm:property-placeholder>

is there perhaps some blueprint property where I can tune the second argument in the createFactoryConfiguration?

Because it looks like the fact of using config admin through blueprint binds the PID to the first bundle using it


best
Pablo


On 07/07/2016 4:41 PM, Raymond Auge wrote:
As long as configurations are not bound to a bundle they can be used by any bundle.

The exception clearly shows that the configuration is bound to a bundle.

Creating an unbound configuration requires passing a "?" as the second arguments to getConfiguration/createFactoryConfiguration methods of CM.


HTH,
- Ray

On Thu, Jul 7, 2016 at 10:24 AM, Brad Johnson <[hidden email]> wrote:
I don't think that's possible. 

On Thu, Jul 7, 2016 at 8:51 AM, Pablo Gómez Pérez <[hidden email]> wrote:
Hello All,

          Is it possible to use same config file from multiple bundles while using Config Admin with blueprint Blueprint? Because, I can't manage to do that, I get the following error:

MESSAGE Cannot use configuration test.mybundle for [org.osgi.service.cm.ManagedService, id=214, [hidden email]]: No visibility to configuration bound to [hidden email]


I saw in this jira a bug opened: https://issues.jboss.org/browse/ENTESB-3959


However, I fear that this is a problem in the aries blueprint implementation as I'm not using KARAF nor FUSE, just a plain osgi container. Either that or I'm missing some blueprint configuration. I'm basically using blueprint:cm


As a workaround I can make a config file per bundle that needs it....

As follows the versions and bundles that I'm using related to the container (Running on top of Equinox 3.11):

 ID|State      |Level|Name
    5|Active     |    2|Apache Aries Whiteboard support for JMX DynamicMBean services (1.1.5)|1.1.5
    6|Active     |    2|Apache Aries JNDI Core (1.0.2)|1.0.2
   13|Active     |    3|Aries Remote Service Admin Topology Manager (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   15|Active     |    2|Aries JPA Container (1.0.2)|1.0.2
   21|Active     |    2|Apache Aries JNDI API (1.1.0)|1.1.0
   25|Active     |    3|Aries Remote Service Admin Discovery Gogo Commands (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   27|Active     |    2|Apache Aries Blueprint CM (1.0.7)|1.0.7
   29|Active     |    2|Apache Aries JMX Blueprint Core (1.1.5)|1.1.5
   37|Active     |    2|Apache Aries JNDI URL Handler (1.1.0)|1.1.0
   42|Active     |    2|Apache Aries JMX Core (1.1.5)|1.1.5
   46|Active     |    2|Apache Aries Blueprint Core (1.5.0)|1.5.0
   47|Resolved   |    4|Apache Aries Blueprint Core Compatiblity Fragment Bundle (1.0.0)|1.0.0
   55|Active     |    2|Apache Aries Util (1.1.1)|1.1.1
   56|Active     |    2|Aries JPA Container Managed Contexts (1.0.4)|1.0.4
   59|Active     |    2|Apache Aries Proxy API (1.0.1)|1.0.1
   67|Active     |    3|Aries Remote Service Admin Service Provider Interface (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   71|Active     |    2|Apache Aries Transaction Blueprint (1.1.1)|1.1.1
   73|Active     |    2|Aries JPA Container API (1.0.2)|1.0.2
   77|Active     |    2|Apache Aries JNDI Support for Legacy Runtimes (1.0.0)|1.0.0
   88|Active     |    2|Apache Aries JMX Blueprint API (1.1.5)|1.1.5
   89|Active     |    2|Apache Aries Transaction Manager (1.3.0)|1.3.0
   94|Active     |    3|Aries Remote Service Admin Discovery Config (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   97|Active     |    3|Aries Remote Service Admin provider TCP (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  110|Active     |    2|Apache Aries Blueprint Annotation API (1.0.1)|1.0.1
  120|Active     |    2|Apache Aries Transaction Blueprint (2.1.0)|2.1.0
  123|Active     |    2|Apache Aries JMX API (1.1.5)|1.1.5
  130|Active     |    2|Apache Aries Blueprint Annotation Impl (1.0.1)|1.0.1
  132|Active     |    3|Aries Remote Service Admin Discovery Zookeeper (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  134|Active     |    3|Aries Remote Service Admin Discovery Local (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  138|Active     |    3|Aries Remote Service Admin Core (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  139|Active     |    2|Apache Aries JNDI RMI Handler (1.0.0)|1.0.0
  143|Active     |    2|Apache Aries Proxy Service (1.0.4)|1.0.4
  146|Active     |    2|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.8)|1.0.8
  147|Active     |    2|Aries JPA Container blueprint integration for Aries blueprint (1.0.4)|1.0.4

   11|Active     |    4|Apache Felix File Install (3.5.4)|3.5.4
   19|Active     |    4|Apache Felix Gogo Shell (0.12.0)|0.12.0
   57|Active     |    4|Apache Felix Gogo Command (0.16.0)|0.16.0
  104|Active     |    4|Apache Felix Coordinator Service (1.0.2)|1.0.2
  109|Active     |    4|Apache Felix Gogo Runtime (0.16.2)|0.16.2
  114|Active     |    4|Apache Felix Web Management Console (1.2.8)|1.2.8
  148|Active     |    4|Apache Felix Configuration Admin Service (1.8.8)|1.8.8

   0|Active     |    0|OSGi System Bundle (3.11.0.v20160603-1336)|3.11.0.v20160603-1336


--
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)





--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)

Reply | Threaded
Open this post in threaded view
|

Re: blueprint:cm multiple bundle but same config file

Brad Johnson
If I were to sit down with the blueprint folks today to create a wish list one thing I'd like to see is for an ability to have a configuration hierarchy specified with parent/child relationships much like one has in Maven.  Have a base configuration file and be able to have another cfg file specify that one as its parent. Override properties or add them to the child.  When the configuration admin fires up it would read up the chain and construct the properties.  

On Thu, Jul 7, 2016 at 12:37 PM, Brad Johnson <[hidden email]> wrote:
Ray,

If I understand your question right the answer is the Aries extension is referencing configuration.  In karaf/fuse for example the following:

<cm:property-placeholder persistent-id="com.my.foo" update-strategy="reload">

will load properties from etc/com.my.foo.cfg

Installing that file is done either manually or by use of a features file.

Whenever I've attempted to use the PID in more than one bundle it has failed and I don't think it is permitted.  That's a problem I think and something that should be fixed through some other configuration management mechanism.  Making microservices that might share common properties, for example, becomes problematic in that regard and I've resorted to using my own OSGi services to overcome that problem.

Brad

On Thu, Jul 7, 2016 at 10:46 AM, Raymond Auge <[hidden email]> wrote:
Ok, so after a brief review the cm schema is an Aries extension and it doesn't appear to support the location binding.

However, it's unclear to me whether this extension is creating the configuration or merely referencing one from outside.

Any Aries gurus can answer that?

- Ray

On Thu, Jul 7, 2016 at 11:29 AM, David Jencks <[hidden email]> wrote:
I’m not really familiar with blueprint cm but I’d expect that to indicate which pid to use to fetch the config from config admin and in the ... how to map configuration propertiething blueprint substitution knows about.  Is that really instructions to create a new configuration and populate it with data (what a management agent does)?

david jencks

On Jul 7, 2016, at 8:19 AM, Raymond Auge <[hidden email]> wrote:

David, I agree with everything you've said, however this looks like blueprint being the agent here:

<cm:property-placeholder persistent-id="my.id" update-strategy="reload">
        ...
</cm:property-placeholder>

- Ray

On Thu, Jul 7, 2016 at 11:18 AM, David Jencks <[hidden email]> wrote:
No, blueprint cm shouldn’t really know about the multi-location.  The management agent that is creating the configuration should be setting the bundle location to the multi-location ”?”.

david jencks

On Jul 7, 2016, at 8:12 AM, Pablo Gómez Pérez <[hidden email]> wrote:

I see and would it possible to configure which method is invoked from Blueprint?

This is how I do it:

<cm:property-placeholder persistent-id="my.id" update-strategy="reload">
        ...
</cm:property-placeholder>

is there perhaps some blueprint property where I can tune the second argument in the createFactoryConfiguration?

Because it looks like the fact of using config admin through blueprint binds the PID to the first bundle using it


best
Pablo


On 07/07/2016 4:41 PM, Raymond Auge wrote:
As long as configurations are not bound to a bundle they can be used by any bundle.

The exception clearly shows that the configuration is bound to a bundle.

Creating an unbound configuration requires passing a "?" as the second arguments to getConfiguration/createFactoryConfiguration methods of CM.


HTH,
- Ray

On Thu, Jul 7, 2016 at 10:24 AM, Brad Johnson <[hidden email]> wrote:
I don't think that's possible. 

On Thu, Jul 7, 2016 at 8:51 AM, Pablo Gómez Pérez <[hidden email]> wrote:
Hello All,

          Is it possible to use same config file from multiple bundles while using Config Admin with blueprint Blueprint? Because, I can't manage to do that, I get the following error:

MESSAGE Cannot use configuration test.mybundle for [org.osgi.service.cm.ManagedService, id=214, [hidden email]]: No visibility to configuration bound to [hidden email]


I saw in this jira a bug opened: https://issues.jboss.org/browse/ENTESB-3959


However, I fear that this is a problem in the aries blueprint implementation as I'm not using KARAF nor FUSE, just a plain osgi container. Either that or I'm missing some blueprint configuration. I'm basically using blueprint:cm


As a workaround I can make a config file per bundle that needs it....

As follows the versions and bundles that I'm using related to the container (Running on top of Equinox 3.11):

 ID|State      |Level|Name
    5|Active     |    2|Apache Aries Whiteboard support for JMX DynamicMBean services (1.1.5)|1.1.5
    6|Active     |    2|Apache Aries JNDI Core (1.0.2)|1.0.2
   13|Active     |    3|Aries Remote Service Admin Topology Manager (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   15|Active     |    2|Aries JPA Container (1.0.2)|1.0.2
   21|Active     |    2|Apache Aries JNDI API (1.1.0)|1.1.0
   25|Active     |    3|Aries Remote Service Admin Discovery Gogo Commands (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   27|Active     |    2|Apache Aries Blueprint CM (1.0.7)|1.0.7
   29|Active     |    2|Apache Aries JMX Blueprint Core (1.1.5)|1.1.5
   37|Active     |    2|Apache Aries JNDI URL Handler (1.1.0)|1.1.0
   42|Active     |    2|Apache Aries JMX Core (1.1.5)|1.1.5
   46|Active     |    2|Apache Aries Blueprint Core (1.5.0)|1.5.0
   47|Resolved   |    4|Apache Aries Blueprint Core Compatiblity Fragment Bundle (1.0.0)|1.0.0
   55|Active     |    2|Apache Aries Util (1.1.1)|1.1.1
   56|Active     |    2|Aries JPA Container Managed Contexts (1.0.4)|1.0.4
   59|Active     |    2|Apache Aries Proxy API (1.0.1)|1.0.1
   67|Active     |    3|Aries Remote Service Admin Service Provider Interface (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   71|Active     |    2|Apache Aries Transaction Blueprint (1.1.1)|1.1.1
   73|Active     |    2|Aries JPA Container API (1.0.2)|1.0.2
   77|Active     |    2|Apache Aries JNDI Support for Legacy Runtimes (1.0.0)|1.0.0
   88|Active     |    2|Apache Aries JMX Blueprint API (1.1.5)|1.1.5
   89|Active     |    2|Apache Aries Transaction Manager (1.3.0)|1.3.0
   94|Active     |    3|Aries Remote Service Admin Discovery Config (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   97|Active     |    3|Aries Remote Service Admin provider TCP (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  110|Active     |    2|Apache Aries Blueprint Annotation API (1.0.1)|1.0.1
  120|Active     |    2|Apache Aries Transaction Blueprint (2.1.0)|2.1.0
  123|Active     |    2|Apache Aries JMX API (1.1.5)|1.1.5
  130|Active     |    2|Apache Aries Blueprint Annotation Impl (1.0.1)|1.0.1
  132|Active     |    3|Aries Remote Service Admin Discovery Zookeeper (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  134|Active     |    3|Aries Remote Service Admin Discovery Local (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  138|Active     |    3|Aries Remote Service Admin Core (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  139|Active     |    2|Apache Aries JNDI RMI Handler (1.0.0)|1.0.0
  143|Active     |    2|Apache Aries Proxy Service (1.0.4)|1.0.4
  146|Active     |    2|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.8)|1.0.8
  147|Active     |    2|Aries JPA Container blueprint integration for Aries blueprint (1.0.4)|1.0.4

   11|Active     |    4|Apache Felix File Install (3.5.4)|3.5.4
   19|Active     |    4|Apache Felix Gogo Shell (0.12.0)|0.12.0
   57|Active     |    4|Apache Felix Gogo Command (0.16.0)|0.16.0
  104|Active     |    4|Apache Felix Coordinator Service (1.0.2)|1.0.2
  109|Active     |    4|Apache Felix Gogo Runtime (0.16.2)|0.16.2
  114|Active     |    4|Apache Felix Web Management Console (1.2.8)|1.2.8
  148|Active     |    4|Apache Felix Configuration Admin Service (1.8.8)|1.8.8

   0|Active     |    0|OSGi System Bundle (3.11.0.v20160603-1336)|3.11.0.v20160603-1336


--
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)





--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)


Reply | Threaded
Open this post in threaded view
|

Re: blueprint:cm multiple bundle but same config file

David Jencks
In reply to this post by Brad Johnson
My point is that should you wish to investigate this the place to start is finding the code that takes the .cfg file and uses it to create or modify a configuration in config admin, and find out whether it can set the bundle location to “?”.  After you get that working then you can see if the config admin implementation you are using or  blueprint cm is doing anything else to thwart you.

thanks
david jencks

On Jul 7, 2016, at 10:37 AM, Brad Johnson <[hidden email]> wrote:

Ray,

If I understand your question right the answer is the Aries extension is referencing configuration.  In karaf/fuse for example the following:

<cm:property-placeholder persistent-id="com.my.foo" update-strategy="reload">

will load properties from etc/com.my.foo.cfg

Installing that file is done either manually or by use of a features file.

Whenever I've attempted to use the PID in more than one bundle it has failed and I don't think it is permitted.  That's a problem I think and something that should be fixed through some other configuration management mechanism.  Making microservices that might share common properties, for example, becomes problematic in that regard and I've resorted to using my own OSGi services to overcome that problem.

Brad

On Thu, Jul 7, 2016 at 10:46 AM, Raymond Auge <[hidden email]> wrote:
Ok, so after a brief review the cm schema is an Aries extension and it doesn't appear to support the location binding.

However, it's unclear to me whether this extension is creating the configuration or merely referencing one from outside.

Any Aries gurus can answer that?

- Ray

On Thu, Jul 7, 2016 at 11:29 AM, David Jencks <[hidden email]> wrote:
I’m not really familiar with blueprint cm but I’d expect that to indicate which pid to use to fetch the config from config admin and in the ... how to map configuration propertiething blueprint substitution knows about.  Is that really instructions to create a new configuration and populate it with data (what a management agent does)?

david jencks

On Jul 7, 2016, at 8:19 AM, Raymond Auge <[hidden email]> wrote:

David, I agree with everything you've said, however this looks like blueprint being the agent here:

<cm:property-placeholder persistent-id="my.id" update-strategy="reload">
        ...
</cm:property-placeholder>

- Ray

On Thu, Jul 7, 2016 at 11:18 AM, David Jencks <[hidden email]> wrote:
No, blueprint cm shouldn’t really know about the multi-location.  The management agent that is creating the configuration should be setting the bundle location to the multi-location ”?”.

david jencks

On Jul 7, 2016, at 8:12 AM, Pablo Gómez Pérez <[hidden email]> wrote:

I see and would it possible to configure which method is invoked from Blueprint?

This is how I do it:

<cm:property-placeholder persistent-id="my.id" update-strategy="reload">
        ...
</cm:property-placeholder>

is there perhaps some blueprint property where I can tune the second argument in the createFactoryConfiguration?

Because it looks like the fact of using config admin through blueprint binds the PID to the first bundle using it


best
Pablo


On 07/07/2016 4:41 PM, Raymond Auge wrote:
As long as configurations are not bound to a bundle they can be used by any bundle.

The exception clearly shows that the configuration is bound to a bundle.

Creating an unbound configuration requires passing a "?" as the second arguments to getConfiguration/createFactoryConfiguration methods of CM.


HTH,
- Ray

On Thu, Jul 7, 2016 at 10:24 AM, Brad Johnson <[hidden email]> wrote:
I don't think that's possible. 

On Thu, Jul 7, 2016 at 8:51 AM, Pablo Gómez Pérez <[hidden email]> wrote:
Hello All,

          Is it possible to use same config file from multiple bundles while using Config Admin with blueprint Blueprint? Because, I can't manage to do that, I get the following error:

MESSAGE Cannot use configuration test.mybundle for [org.osgi.service.cm.ManagedService, id=214, [hidden email]]: No visibility to configuration bound to [hidden email]


I saw in this jira a bug opened: https://issues.jboss.org/browse/ENTESB-3959


However, I fear that this is a problem in the aries blueprint implementation as I'm not using KARAF nor FUSE, just a plain osgi container. Either that or I'm missing some blueprint configuration. I'm basically using blueprint:cm


As a workaround I can make a config file per bundle that needs it....

As follows the versions and bundles that I'm using related to the container (Running on top of Equinox 3.11):

 ID|State      |Level|Name
    5|Active     |    2|Apache Aries Whiteboard support for JMX DynamicMBean services (1.1.5)|1.1.5
    6|Active     |    2|Apache Aries JNDI Core (1.0.2)|1.0.2
   13|Active     |    3|Aries Remote Service Admin Topology Manager (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   15|Active     |    2|Aries JPA Container (1.0.2)|1.0.2
   21|Active     |    2|Apache Aries JNDI API (1.1.0)|1.1.0
   25|Active     |    3|Aries Remote Service Admin Discovery Gogo Commands (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   27|Active     |    2|Apache Aries Blueprint CM (1.0.7)|1.0.7
   29|Active     |    2|Apache Aries JMX Blueprint Core (1.1.5)|1.1.5
   37|Active     |    2|Apache Aries JNDI URL Handler (1.1.0)|1.1.0
   42|Active     |    2|Apache Aries JMX Core (1.1.5)|1.1.5
   46|Active     |    2|Apache Aries Blueprint Core (1.5.0)|1.5.0
   47|Resolved   |    4|Apache Aries Blueprint Core Compatiblity Fragment Bundle (1.0.0)|1.0.0
   55|Active     |    2|Apache Aries Util (1.1.1)|1.1.1
   56|Active     |    2|Aries JPA Container Managed Contexts (1.0.4)|1.0.4
   59|Active     |    2|Apache Aries Proxy API (1.0.1)|1.0.1
   67|Active     |    3|Aries Remote Service Admin Service Provider Interface (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   71|Active     |    2|Apache Aries Transaction Blueprint (1.1.1)|1.1.1
   73|Active     |    2|Aries JPA Container API (1.0.2)|1.0.2
   77|Active     |    2|Apache Aries JNDI Support for Legacy Runtimes (1.0.0)|1.0.0
   88|Active     |    2|Apache Aries JMX Blueprint API (1.1.5)|1.1.5
   89|Active     |    2|Apache Aries Transaction Manager (1.3.0)|1.3.0
   94|Active     |    3|Aries Remote Service Admin Discovery Config (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   97|Active     |    3|Aries Remote Service Admin provider TCP (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  110|Active     |    2|Apache Aries Blueprint Annotation API (1.0.1)|1.0.1
  120|Active     |    2|Apache Aries Transaction Blueprint (2.1.0)|2.1.0
  123|Active     |    2|Apache Aries JMX API (1.1.5)|1.1.5
  130|Active     |    2|Apache Aries Blueprint Annotation Impl (1.0.1)|1.0.1
  132|Active     |    3|Aries Remote Service Admin Discovery Zookeeper (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  134|Active     |    3|Aries Remote Service Admin Discovery Local (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  138|Active     |    3|Aries Remote Service Admin Core (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  139|Active     |    2|Apache Aries JNDI RMI Handler (1.0.0)|1.0.0
  143|Active     |    2|Apache Aries Proxy Service (1.0.4)|1.0.4
  146|Active     |    2|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.8)|1.0.8
  147|Active     |    2|Aries JPA Container blueprint integration for Aries blueprint (1.0.4)|1.0.4

   11|Active     |    4|Apache Felix File Install (3.5.4)|3.5.4
   19|Active     |    4|Apache Felix Gogo Shell (0.12.0)|0.12.0
   57|Active     |    4|Apache Felix Gogo Command (0.16.0)|0.16.0
  104|Active     |    4|Apache Felix Coordinator Service (1.0.2)|1.0.2
  109|Active     |    4|Apache Felix Gogo Runtime (0.16.2)|0.16.2
  114|Active     |    4|Apache Felix Web Management Console (1.2.8)|1.2.8
  148|Active     |    4|Apache Felix Configuration Admin Service (1.8.8)|1.8.8

   0|Active     |    0|OSGi System Bundle (3.11.0.v20160603-1336)|3.11.0.v20160603-1336


--
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)





--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)


Reply | Threaded
Open this post in threaded view
|

Re: blueprint:cm multiple bundle but same config file

David Jencks
In reply to this post by Brad Johnson
IMNSHO blueprint is only really plausible if you have a large amount of Spring based code and you need to convert it to be sort of osgi-compatible really quickly without understanding osgi or the code.  Otherwise taking the time to understand DS and use it is much more satisfactory.  DS provides this configuration override ability with support for multiple pids, although only one of the pids can turn out to be  a  factory configuration.  There’s no obvious way of correlating factory configurations, so this restriction makes some sense.

I don’t think there really are any blueprint folks.  The cm stuff, while obviously required to make the spec remotely plausible, hasn’t made it into the spec in the many many years it’s been sitting around.

david jencks

On Jul 7, 2016, at 10:41 AM, Brad Johnson <[hidden email]> wrote:

If I were to sit down with the blueprint folks today to create a wish list one thing I'd like to see is for an ability to have a configuration hierarchy specified with parent/child relationships much like one has in Maven.  Have a base configuration file and be able to have another cfg file specify that one as its parent. Override properties or add them to the child.  When the configuration admin fires up it would read up the chain and construct the properties.  

On Thu, Jul 7, 2016 at 12:37 PM, Brad Johnson <[hidden email]> wrote:
Ray,

If I understand your question right the answer is the Aries extension is referencing configuration.  In karaf/fuse for example the following:

<cm:property-placeholder persistent-id="com.my.foo" update-strategy="reload">

will load properties from etc/com.my.foo.cfg

Installing that file is done either manually or by use of a features file.

Whenever I've attempted to use the PID in more than one bundle it has failed and I don't think it is permitted.  That's a problem I think and something that should be fixed through some other configuration management mechanism.  Making microservices that might share common properties, for example, becomes problematic in that regard and I've resorted to using my own OSGi services to overcome that problem.

Brad

On Thu, Jul 7, 2016 at 10:46 AM, Raymond Auge <[hidden email]> wrote:
Ok, so after a brief review the cm schema is an Aries extension and it doesn't appear to support the location binding.

However, it's unclear to me whether this extension is creating the configuration or merely referencing one from outside.

Any Aries gurus can answer that?

- Ray

On Thu, Jul 7, 2016 at 11:29 AM, David Jencks <[hidden email]> wrote:
I’m not really familiar with blueprint cm but I’d expect that to indicate which pid to use to fetch the config from config admin and in the ... how to map configuration propertiething blueprint substitution knows about.  Is that really instructions to create a new configuration and populate it with data (what a management agent does)?

david jencks

On Jul 7, 2016, at 8:19 AM, Raymond Auge <[hidden email]> wrote:

David, I agree with everything you've said, however this looks like blueprint being the agent here:

<cm:property-placeholder persistent-id="my.id" update-strategy="reload">
        ...
</cm:property-placeholder>

- Ray

On Thu, Jul 7, 2016 at 11:18 AM, David Jencks <[hidden email]> wrote:
No, blueprint cm shouldn’t really know about the multi-location.  The management agent that is creating the configuration should be setting the bundle location to the multi-location ”?”.

david jencks

On Jul 7, 2016, at 8:12 AM, Pablo Gómez Pérez <[hidden email]> wrote:

I see and would it possible to configure which method is invoked from Blueprint?

This is how I do it:

<cm:property-placeholder persistent-id="my.id" update-strategy="reload">
        ...
</cm:property-placeholder>

is there perhaps some blueprint property where I can tune the second argument in the createFactoryConfiguration?

Because it looks like the fact of using config admin through blueprint binds the PID to the first bundle using it


best
Pablo


On 07/07/2016 4:41 PM, Raymond Auge wrote:
As long as configurations are not bound to a bundle they can be used by any bundle.

The exception clearly shows that the configuration is bound to a bundle.

Creating an unbound configuration requires passing a "?" as the second arguments to getConfiguration/createFactoryConfiguration methods of CM.


HTH,
- Ray

On Thu, Jul 7, 2016 at 10:24 AM, Brad Johnson <[hidden email]> wrote:
I don't think that's possible. 

On Thu, Jul 7, 2016 at 8:51 AM, Pablo Gómez Pérez <[hidden email]> wrote:
Hello All,

          Is it possible to use same config file from multiple bundles while using Config Admin with blueprint Blueprint? Because, I can't manage to do that, I get the following error:

MESSAGE Cannot use configuration test.mybundle for [org.osgi.service.cm.ManagedService, id=214, [hidden email]]: No visibility to configuration bound to [hidden email]


I saw in this jira a bug opened: https://issues.jboss.org/browse/ENTESB-3959


However, I fear that this is a problem in the aries blueprint implementation as I'm not using KARAF nor FUSE, just a plain osgi container. Either that or I'm missing some blueprint configuration. I'm basically using blueprint:cm


As a workaround I can make a config file per bundle that needs it....

As follows the versions and bundles that I'm using related to the container (Running on top of Equinox 3.11):

 ID|State      |Level|Name
    5|Active     |    2|Apache Aries Whiteboard support for JMX DynamicMBean services (1.1.5)|1.1.5
    6|Active     |    2|Apache Aries JNDI Core (1.0.2)|1.0.2
   13|Active     |    3|Aries Remote Service Admin Topology Manager (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   15|Active     |    2|Aries JPA Container (1.0.2)|1.0.2
   21|Active     |    2|Apache Aries JNDI API (1.1.0)|1.1.0
   25|Active     |    3|Aries Remote Service Admin Discovery Gogo Commands (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   27|Active     |    2|Apache Aries Blueprint CM (1.0.7)|1.0.7
   29|Active     |    2|Apache Aries JMX Blueprint Core (1.1.5)|1.1.5
   37|Active     |    2|Apache Aries JNDI URL Handler (1.1.0)|1.1.0
   42|Active     |    2|Apache Aries JMX Core (1.1.5)|1.1.5
   46|Active     |    2|Apache Aries Blueprint Core (1.5.0)|1.5.0
   47|Resolved   |    4|Apache Aries Blueprint Core Compatiblity Fragment Bundle (1.0.0)|1.0.0
   55|Active     |    2|Apache Aries Util (1.1.1)|1.1.1
   56|Active     |    2|Aries JPA Container Managed Contexts (1.0.4)|1.0.4
   59|Active     |    2|Apache Aries Proxy API (1.0.1)|1.0.1
   67|Active     |    3|Aries Remote Service Admin Service Provider Interface (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   71|Active     |    2|Apache Aries Transaction Blueprint (1.1.1)|1.1.1
   73|Active     |    2|Aries JPA Container API (1.0.2)|1.0.2
   77|Active     |    2|Apache Aries JNDI Support for Legacy Runtimes (1.0.0)|1.0.0
   88|Active     |    2|Apache Aries JMX Blueprint API (1.1.5)|1.1.5
   89|Active     |    2|Apache Aries Transaction Manager (1.3.0)|1.3.0
   94|Active     |    3|Aries Remote Service Admin Discovery Config (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   97|Active     |    3|Aries Remote Service Admin provider TCP (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  110|Active     |    2|Apache Aries Blueprint Annotation API (1.0.1)|1.0.1
  120|Active     |    2|Apache Aries Transaction Blueprint (2.1.0)|2.1.0
  123|Active     |    2|Apache Aries JMX API (1.1.5)|1.1.5
  130|Active     |    2|Apache Aries Blueprint Annotation Impl (1.0.1)|1.0.1
  132|Active     |    3|Aries Remote Service Admin Discovery Zookeeper (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  134|Active     |    3|Aries Remote Service Admin Discovery Local (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  138|Active     |    3|Aries Remote Service Admin Core (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  139|Active     |    2|Apache Aries JNDI RMI Handler (1.0.0)|1.0.0
  143|Active     |    2|Apache Aries Proxy Service (1.0.4)|1.0.4
  146|Active     |    2|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.8)|1.0.8
  147|Active     |    2|Aries JPA Container blueprint integration for Aries blueprint (1.0.4)|1.0.4

   11|Active     |    4|Apache Felix File Install (3.5.4)|3.5.4
   19|Active     |    4|Apache Felix Gogo Shell (0.12.0)|0.12.0
   57|Active     |    4|Apache Felix Gogo Command (0.16.0)|0.16.0
  104|Active     |    4|Apache Felix Coordinator Service (1.0.2)|1.0.2
  109|Active     |    4|Apache Felix Gogo Runtime (0.16.2)|0.16.2
  114|Active     |    4|Apache Felix Web Management Console (1.2.8)|1.2.8
  148|Active     |    4|Apache Felix Configuration Admin Service (1.8.8)|1.8.8

   0|Active     |    0|OSGi System Bundle (3.11.0.v20160603-1336)|3.11.0.v20160603-1336


--
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)





--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)



Reply | Threaded
Open this post in threaded view
|

Re: blueprint:cm multiple bundle but same config file

Brad Johnson
David,

You live in a very different world than I do.  In all the consulting I do with Fuse/karaf blueprint is used almost exclusively.  I understand DS and its uses but also its limits and overhead.  It's like telling me one should only use Camel Java DSL.  That may be one's perspective but that isn't everyone's.

Brad

On Thu, Jul 7, 2016 at 12:53 PM, David Jencks <[hidden email]> wrote:
IMNSHO blueprint is only really plausible if you have a large amount of Spring based code and you need to convert it to be sort of osgi-compatible really quickly without understanding osgi or the code.  Otherwise taking the time to understand DS and use it is much more satisfactory.  DS provides this configuration override ability with support for multiple pids, although only one of the pids can turn out to be  a  factory configuration.  There’s no obvious way of correlating factory configurations, so this restriction makes some sense.

I don’t think there really are any blueprint folks.  The cm stuff, while obviously required to make the spec remotely plausible, hasn’t made it into the spec in the many many years it’s been sitting around.

david jencks

On Jul 7, 2016, at 10:41 AM, Brad Johnson <[hidden email]> wrote:

If I were to sit down with the blueprint folks today to create a wish list one thing I'd like to see is for an ability to have a configuration hierarchy specified with parent/child relationships much like one has in Maven.  Have a base configuration file and be able to have another cfg file specify that one as its parent. Override properties or add them to the child.  When the configuration admin fires up it would read up the chain and construct the properties.  

On Thu, Jul 7, 2016 at 12:37 PM, Brad Johnson <[hidden email]> wrote:
Ray,

If I understand your question right the answer is the Aries extension is referencing configuration.  In karaf/fuse for example the following:

<cm:property-placeholder persistent-id="com.my.foo" update-strategy="reload">

will load properties from etc/com.my.foo.cfg

Installing that file is done either manually or by use of a features file.

Whenever I've attempted to use the PID in more than one bundle it has failed and I don't think it is permitted.  That's a problem I think and something that should be fixed through some other configuration management mechanism.  Making microservices that might share common properties, for example, becomes problematic in that regard and I've resorted to using my own OSGi services to overcome that problem.

Brad

On Thu, Jul 7, 2016 at 10:46 AM, Raymond Auge <[hidden email]> wrote:
Ok, so after a brief review the cm schema is an Aries extension and it doesn't appear to support the location binding.

However, it's unclear to me whether this extension is creating the configuration or merely referencing one from outside.

Any Aries gurus can answer that?

- Ray

On Thu, Jul 7, 2016 at 11:29 AM, David Jencks <[hidden email]> wrote:
I’m not really familiar with blueprint cm but I’d expect that to indicate which pid to use to fetch the config from config admin and in the ... how to map configuration propertiething blueprint substitution knows about.  Is that really instructions to create a new configuration and populate it with data (what a management agent does)?

david jencks

On Jul 7, 2016, at 8:19 AM, Raymond Auge <[hidden email]> wrote:

David, I agree with everything you've said, however this looks like blueprint being the agent here:

<cm:property-placeholder persistent-id="my.id" update-strategy="reload">
        ...
</cm:property-placeholder>

- Ray

On Thu, Jul 7, 2016 at 11:18 AM, David Jencks <[hidden email]> wrote:
No, blueprint cm shouldn’t really know about the multi-location.  The management agent that is creating the configuration should be setting the bundle location to the multi-location ”?”.

david jencks

On Jul 7, 2016, at 8:12 AM, Pablo Gómez Pérez <[hidden email]> wrote:

I see and would it possible to configure which method is invoked from Blueprint?

This is how I do it:

<cm:property-placeholder persistent-id="my.id" update-strategy="reload">
        ...
</cm:property-placeholder>

is there perhaps some blueprint property where I can tune the second argument in the createFactoryConfiguration?

Because it looks like the fact of using config admin through blueprint binds the PID to the first bundle using it


best
Pablo


On 07/07/2016 4:41 PM, Raymond Auge wrote:
As long as configurations are not bound to a bundle they can be used by any bundle.

The exception clearly shows that the configuration is bound to a bundle.

Creating an unbound configuration requires passing a "?" as the second arguments to getConfiguration/createFactoryConfiguration methods of CM.


HTH,
- Ray

On Thu, Jul 7, 2016 at 10:24 AM, Brad Johnson <[hidden email]> wrote:
I don't think that's possible. 

On Thu, Jul 7, 2016 at 8:51 AM, Pablo Gómez Pérez <[hidden email]> wrote:
Hello All,

          Is it possible to use same config file from multiple bundles while using Config Admin with blueprint Blueprint? Because, I can't manage to do that, I get the following error:

MESSAGE Cannot use configuration test.mybundle for [org.osgi.service.cm.ManagedService, id=214, [hidden email]]: No visibility to configuration bound to [hidden email]


I saw in this jira a bug opened: https://issues.jboss.org/browse/ENTESB-3959


However, I fear that this is a problem in the aries blueprint implementation as I'm not using KARAF nor FUSE, just a plain osgi container. Either that or I'm missing some blueprint configuration. I'm basically using blueprint:cm


As a workaround I can make a config file per bundle that needs it....

As follows the versions and bundles that I'm using related to the container (Running on top of Equinox 3.11):

 ID|State      |Level|Name
    5|Active     |    2|Apache Aries Whiteboard support for JMX DynamicMBean services (1.1.5)|1.1.5
    6|Active     |    2|Apache Aries JNDI Core (1.0.2)|1.0.2
   13|Active     |    3|Aries Remote Service Admin Topology Manager (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   15|Active     |    2|Aries JPA Container (1.0.2)|1.0.2
   21|Active     |    2|Apache Aries JNDI API (1.1.0)|1.1.0
   25|Active     |    3|Aries Remote Service Admin Discovery Gogo Commands (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   27|Active     |    2|Apache Aries Blueprint CM (1.0.7)|1.0.7
   29|Active     |    2|Apache Aries JMX Blueprint Core (1.1.5)|1.1.5
   37|Active     |    2|Apache Aries JNDI URL Handler (1.1.0)|1.1.0
   42|Active     |    2|Apache Aries JMX Core (1.1.5)|1.1.5
   46|Active     |    2|Apache Aries Blueprint Core (1.5.0)|1.5.0
   47|Resolved   |    4|Apache Aries Blueprint Core Compatiblity Fragment Bundle (1.0.0)|1.0.0
   55|Active     |    2|Apache Aries Util (1.1.1)|1.1.1
   56|Active     |    2|Aries JPA Container Managed Contexts (1.0.4)|1.0.4
   59|Active     |    2|Apache Aries Proxy API (1.0.1)|1.0.1
   67|Active     |    3|Aries Remote Service Admin Service Provider Interface (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   71|Active     |    2|Apache Aries Transaction Blueprint (1.1.1)|1.1.1
   73|Active     |    2|Aries JPA Container API (1.0.2)|1.0.2
   77|Active     |    2|Apache Aries JNDI Support for Legacy Runtimes (1.0.0)|1.0.0
   88|Active     |    2|Apache Aries JMX Blueprint API (1.1.5)|1.1.5
   89|Active     |    2|Apache Aries Transaction Manager (1.3.0)|1.3.0
   94|Active     |    3|Aries Remote Service Admin Discovery Config (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   97|Active     |    3|Aries Remote Service Admin provider TCP (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  110|Active     |    2|Apache Aries Blueprint Annotation API (1.0.1)|1.0.1
  120|Active     |    2|Apache Aries Transaction Blueprint (2.1.0)|2.1.0
  123|Active     |    2|Apache Aries JMX API (1.1.5)|1.1.5
  130|Active     |    2|Apache Aries Blueprint Annotation Impl (1.0.1)|1.0.1
  132|Active     |    3|Aries Remote Service Admin Discovery Zookeeper (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  134|Active     |    3|Aries Remote Service Admin Discovery Local (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  138|Active     |    3|Aries Remote Service Admin Core (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  139|Active     |    2|Apache Aries JNDI RMI Handler (1.0.0)|1.0.0
  143|Active     |    2|Apache Aries Proxy Service (1.0.4)|1.0.4
  146|Active     |    2|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.8)|1.0.8
  147|Active     |    2|Aries JPA Container blueprint integration for Aries blueprint (1.0.4)|1.0.4

   11|Active     |    4|Apache Felix File Install (3.5.4)|3.5.4
   19|Active     |    4|Apache Felix Gogo Shell (0.12.0)|0.12.0
   57|Active     |    4|Apache Felix Gogo Command (0.16.0)|0.16.0
  104|Active     |    4|Apache Felix Coordinator Service (1.0.2)|1.0.2
  109|Active     |    4|Apache Felix Gogo Runtime (0.16.2)|0.16.2
  114|Active     |    4|Apache Felix Web Management Console (1.2.8)|1.2.8
  148|Active     |    4|Apache Felix Configuration Admin Service (1.8.8)|1.8.8

   0|Active     |    0|OSGi System Bundle (3.11.0.v20160603-1336)|3.11.0.v20160603-1336


--
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)





--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)




Reply | Threaded
Open this post in threaded view
|

Re: blueprint:cm multiple bundle but same config file

Johan Edstrom-2
It is in here; https://osgi.org/javadoc/r4v42/org/osgi/service/cm/ConfigurationAdmin.html

A bundle is in aries bound to the pid. So it is actually working as expected, bit of
a hassle since spring-dm allowed it.

And yes selling DS into “regular" organizations is about as easy as selling snow in Alaska.

/je

On Jul 7, 2016, at 12:00 PM, Brad Johnson <[hidden email]> wrote:

David,

You live in a very different world than I do.  In all the consulting I do with Fuse/karaf blueprint is used almost exclusively.  I understand DS and its uses but also its limits and overhead.  It's like telling me one should only use Camel Java DSL.  That may be one's perspective but that isn't everyone's.

Brad

On Thu, Jul 7, 2016 at 12:53 PM, David Jencks <[hidden email]> wrote:
IMNSHO blueprint is only really plausible if you have a large amount of Spring based code and you need to convert it to be sort of osgi-compatible really quickly without understanding osgi or the code.  Otherwise taking the time to understand DS and use it is much more satisfactory.  DS provides this configuration override ability with support for multiple pids, although only one of the pids can turn out to be  a  factory configuration.  There’s no obvious way of correlating factory configurations, so this restriction makes some sense.

I don’t think there really are any blueprint folks.  The cm stuff, while obviously required to make the spec remotely plausible, hasn’t made it into the spec in the many many years it’s been sitting around.

david jencks

On Jul 7, 2016, at 10:41 AM, Brad Johnson <[hidden email]> wrote:

If I were to sit down with the blueprint folks today to create a wish list one thing I'd like to see is for an ability to have a configuration hierarchy specified with parent/child relationships much like one has in Maven.  Have a base configuration file and be able to have another cfg file specify that one as its parent. Override properties or add them to the child.  When the configuration admin fires up it would read up the chain and construct the properties.  

On Thu, Jul 7, 2016 at 12:37 PM, Brad Johnson <[hidden email]> wrote:
Ray,

If I understand your question right the answer is the Aries extension is referencing configuration.  In karaf/fuse for example the following:

<cm:property-placeholder persistent-id="com.my.foo" update-strategy="reload">

will load properties from etc/com.my.foo.cfg

Installing that file is done either manually or by use of a features file.

Whenever I've attempted to use the PID in more than one bundle it has failed and I don't think it is permitted.  That's a problem I think and something that should be fixed through some other configuration management mechanism.  Making microservices that might share common properties, for example, becomes problematic in that regard and I've resorted to using my own OSGi services to overcome that problem.

Brad

On Thu, Jul 7, 2016 at 10:46 AM, Raymond Auge <[hidden email]> wrote:
Ok, so after a brief review the cm schema is an Aries extension and it doesn't appear to support the location binding.

However, it's unclear to me whether this extension is creating the configuration or merely referencing one from outside.

Any Aries gurus can answer that?

- Ray

On Thu, Jul 7, 2016 at 11:29 AM, David Jencks <[hidden email]> wrote:
I’m not really familiar with blueprint cm but I’d expect that to indicate which pid to use to fetch the config from config admin and in the ... how to map configuration propertiething blueprint substitution knows about.  Is that really instructions to create a new configuration and populate it with data (what a management agent does)?

david jencks

On Jul 7, 2016, at 8:19 AM, Raymond Auge <[hidden email]> wrote:

David, I agree with everything you've said, however this looks like blueprint being the agent here:

<cm:property-placeholder persistent-id="my.id" update-strategy="reload">
        ...
</cm:property-placeholder>

- Ray

On Thu, Jul 7, 2016 at 11:18 AM, David Jencks <[hidden email]> wrote:
No, blueprint cm shouldn’t really know about the multi-location.  The management agent that is creating the configuration should be setting the bundle location to the multi-location ”?”.

david jencks

On Jul 7, 2016, at 8:12 AM, Pablo Gómez Pérez <[hidden email]> wrote:

I see and would it possible to configure which method is invoked from Blueprint?

This is how I do it:

<cm:property-placeholder persistent-id="my.id" update-strategy="reload">
        ...
</cm:property-placeholder>

is there perhaps some blueprint property where I can tune the second argument in the createFactoryConfiguration?

Because it looks like the fact of using config admin through blueprint binds the PID to the first bundle using it


best
Pablo


On 07/07/2016 4:41 PM, Raymond Auge wrote:
As long as configurations are not bound to a bundle they can be used by any bundle.

The exception clearly shows that the configuration is bound to a bundle.

Creating an unbound configuration requires passing a "?" as the second arguments to getConfiguration/createFactoryConfiguration methods of CM.


HTH,
- Ray

On Thu, Jul 7, 2016 at 10:24 AM, Brad Johnson <[hidden email]> wrote:
I don't think that's possible. 

On Thu, Jul 7, 2016 at 8:51 AM, Pablo Gómez Pérez <[hidden email]> wrote:
Hello All,

          Is it possible to use same config file from multiple bundles while using Config Admin with blueprint Blueprint? Because, I can't manage to do that, I get the following error:

MESSAGE Cannot use configuration test.mybundle for [org.osgi.service.cm.ManagedService, id=214, [hidden email]]: No visibility to configuration bound to [hidden email]


I saw in this jira a bug opened: https://issues.jboss.org/browse/ENTESB-3959


However, I fear that this is a problem in the aries blueprint implementation as I'm not using KARAF nor FUSE, just a plain osgi container. Either that or I'm missing some blueprint configuration. I'm basically using blueprint:cm


As a workaround I can make a config file per bundle that needs it....

As follows the versions and bundles that I'm using related to the container (Running on top of Equinox 3.11):

 ID|State      |Level|Name
    5|Active     |    2|Apache Aries Whiteboard support for JMX DynamicMBean services (1.1.5)|1.1.5
    6|Active     |    2|Apache Aries JNDI Core (1.0.2)|1.0.2
   13|Active     |    3|Aries Remote Service Admin Topology Manager (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   15|Active     |    2|Aries JPA Container (1.0.2)|1.0.2
   21|Active     |    2|Apache Aries JNDI API (1.1.0)|1.1.0
   25|Active     |    3|Aries Remote Service Admin Discovery Gogo Commands (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   27|Active     |    2|Apache Aries Blueprint CM (1.0.7)|1.0.7
   29|Active     |    2|Apache Aries JMX Blueprint Core (1.1.5)|1.1.5
   37|Active     |    2|Apache Aries JNDI URL Handler (1.1.0)|1.1.0
   42|Active     |    2|Apache Aries JMX Core (1.1.5)|1.1.5
   46|Active     |    2|Apache Aries Blueprint Core (1.5.0)|1.5.0
   47|Resolved   |    4|Apache Aries Blueprint Core Compatiblity Fragment Bundle (1.0.0)|1.0.0
   55|Active     |    2|Apache Aries Util (1.1.1)|1.1.1
   56|Active     |    2|Aries JPA Container Managed Contexts (1.0.4)|1.0.4
   59|Active     |    2|Apache Aries Proxy API (1.0.1)|1.0.1
   67|Active     |    3|Aries Remote Service Admin Service Provider Interface (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   71|Active     |    2|Apache Aries Transaction Blueprint (1.1.1)|1.1.1
   73|Active     |    2|Aries JPA Container API (1.0.2)|1.0.2
   77|Active     |    2|Apache Aries JNDI Support for Legacy Runtimes (1.0.0)|1.0.0
   88|Active     |    2|Apache Aries JMX Blueprint API (1.1.5)|1.1.5
   89|Active     |    2|Apache Aries Transaction Manager (1.3.0)|1.3.0
   94|Active     |    3|Aries Remote Service Admin Discovery Config (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
   97|Active     |    3|Aries Remote Service Admin provider TCP (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  110|Active     |    2|Apache Aries Blueprint Annotation API (1.0.1)|1.0.1
  120|Active     |    2|Apache Aries Transaction Blueprint (2.1.0)|2.1.0
  123|Active     |    2|Apache Aries JMX API (1.1.5)|1.1.5
  130|Active     |    2|Apache Aries Blueprint Annotation Impl (1.0.1)|1.0.1
  132|Active     |    3|Aries Remote Service Admin Discovery Zookeeper (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  134|Active     |    3|Aries Remote Service Admin Discovery Local (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  138|Active     |    3|Aries Remote Service Admin Core (1.9.0.SNAPSHOT)|1.9.0.SNAPSHOT
  139|Active     |    2|Apache Aries JNDI RMI Handler (1.0.0)|1.0.0
  143|Active     |    2|Apache Aries Proxy Service (1.0.4)|1.0.4
  146|Active     |    2|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.8)|1.0.8
  147|Active     |    2|Aries JPA Container blueprint integration for Aries blueprint (1.0.4)|1.0.4

   11|Active     |    4|Apache Felix File Install (3.5.4)|3.5.4
   19|Active     |    4|Apache Felix Gogo Shell (0.12.0)|0.12.0
   57|Active     |    4|Apache Felix Gogo Command (0.16.0)|0.16.0
  104|Active     |    4|Apache Felix Coordinator Service (1.0.2)|1.0.2
  109|Active     |    4|Apache Felix Gogo Runtime (0.16.2)|0.16.2
  114|Active     |    4|Apache Felix Web Management Console (1.2.8)|1.2.8
  148|Active     |    4|Apache Felix Configuration Admin Service (1.8.8)|1.8.8

   0|Active     |    0|OSGi System Bundle (3.11.0.v20160603-1336)|3.11.0.v20160603-1336


--
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)





--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)




--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)





123