Re: [osgi-dev] SCR: ServiceInjection into Fields that are Optional

2020-09-28 Thread Neil Bartlett via osgi-dev
386 848 1781 > OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788 > hargr...@us.ibm.com > > > > - Original message - > From: Mark Hoffmann via osgi-dev > Sent by: osgi-dev-boun...@mail.osgi.org > To: Neil Bartlett > Cc: OSGi D

Re: [osgi-dev] SCR: ServiceInjection into Fields that are Optional

2020-09-23 Thread Neil Bartlett via osgi-dev
I like Stefan's suggestion and I disagree with some specific points made by Mark... responses line below. On Wed, 23 Sep 2020 at 05:35, Mark Hoffmann via osgi-dev < osgi-dev@mail.osgi.org> wrote: > Hi Stefan, > > I believe Optionals are not optimal for that. > > If a service is removed, you

Re: [osgi-dev] Library development

2020-05-21 Thread Neil Bartlett via osgi-dev
Along the lines of Bernd's answer, here is what I do: 1. Use declarative services. 2. For injection of service references, prefer constructor injection. 3. The component implementation should be in a private package. However, non-OSGi consumers don't know anything about exported versus private

Re: [osgi-dev] Parent Class Loader Bootdelegation

2020-03-19 Thread Neil Bartlett via osgi-dev
It looks like you have answered this yourself: "framework" delegates to the classloader that loaded the system bundle, i.e. the OSGi Framework. Bear in mind that that classloader would normally perform parent delegation up the chain, unless you have implemented alternative custom behaviour in any

Re: [osgi-dev] Maven (Tycho) cannot resolve OSGi Core bundle

2020-01-03 Thread Neil Bartlett via osgi-dev
>>>> 3. Jan. 2020, 14:20: >>>> >>>>> Dear Neil, >>>>> >>>>> thanks, but now we start again at the beginning at my first message >>>>> (endless loop): I cannot set a dependency to "org.osgi:osgi.core" in Maven

Re: [osgi-dev] Maven (Tycho) cannot resolve OSGi Core bundle

2020-01-03 Thread Neil Bartlett via osgi-dev
On Fri, 3 Jan 2020 at 13:08, Martin Petzold via osgi-dev < osgi-dev@mail.osgi.org> wrote: > Okay, thanks. This is clear now. > > However, Ray told me to set the dependency for "org.eclipse.osgi" to > "runtime" scope. But how can my implementation then depend on > "org.osgi.framework" package

Re: [osgi-dev] Micro version ignored when resolving, rationale?

2019-06-18 Thread Neil Bartlett via osgi-dev
> So having default settings in the tool that cause a behavior that does not comply with the specification should not be considered a bug? Which specification?? There is NO specification in OSGi for how a packaging tool such as bnd should generate bundles from Java classes and descriptors. The

Re: [osgi-dev] Micro version ignored when resolving, rationale?

2019-06-17 Thread Neil Bartlett via osgi-dev
"the specification, which states that the micro part of the version should be ignored when resolving bundles" The OSGi specification absolutely does NOT state this. Mainly for the reasons you have laid out yourself. Regards, Neil. On Mon, 17 Jun 2019 at 23:14, Michael Lipp via osgi-dev <

Re: [osgi-dev] Migrating from OSGI to Microservices

2019-05-02 Thread Neil Bartlett via osgi-dev
Well the good news is that OSGi is already a microservice architecture, so you have already finished. Congratulations! If that answer doesn't quite satisfy you, maybe you'd like to describe in more detail what you are attempting to achieve and why? Regards, Neil On Thu, 2 May 2019 at 11:06,

Re: [osgi-dev] Obtain a bundle's "state change" lock

2019-03-01 Thread Neil Bartlett via osgi-dev
On Fri, 1 Mar 2019 at 14:28, Michael Lipp wrote: > > Have you tried using a BundleTracker? > > It doesn't give you internal access to the Framework's locks... nothing > does I believe (and hope!). > > In a way, it does. BundleTracker.Tracked implements > SynchronousBundleListener. An instance of

Re: [osgi-dev] Obtain a bundle's "state change" lock

2019-03-01 Thread Neil Bartlett via osgi-dev
Have you tried using a BundleTracker? It doesn't give you internal access to the Framework's locks... nothing does I believe (and hope!). It does however handle the complexity of getting current state and listening at the same time. When you open the tracker, the addingBundle() method (which you

Re: [osgi-dev] Clarification on reference behavior regarding field injection

2019-02-18 Thread Neil Bartlett via osgi-dev
On Mon, Feb 18, 2019 at 9:39 AM Thomas Driessen via osgi-dev < osgi-dev@mail.osgi.org> wrote: > Hi Tim, > > as always thanks for your super detailed answer! > > Just two more questions on this topic: > > 1) Out of curiosity: do you know why the decision was made to make the > default for

Re: [osgi-dev] bundle symbolic name

2018-11-07 Thread Neil Bartlett via osgi-dev
Remember that "groupId" and "artifactId" are Maven concepts. Not all software is built with Maven and therefore not every OSGi bundle has a groupId and artifactId. Nevertheless, OSGi requires all bundles to have some kind of identity. This is what Bundle-SymbolicName give us. Neil On Wed, Nov

Re: [osgi-dev] Service component resolution time

2018-10-23 Thread Neil Bartlett via osgi-dev
Two quick points: 1. The Felix ResolverImpl is responsible for resolving bundle constaints (imports and requires). It has absolutely nothing to do with SCR, so it doesn't matter how many components you have. 2. Are you building an Eclipse RCP application? If so, check whether the

Re: [osgi-dev] Double config

2018-08-26 Thread Neil Bartlett via osgi-dev
On Sun, Aug 26, 2018 at 1:35 AM David Leangen via osgi-dev < osgi-dev@mail.osgi.org> wrote: > > Hi, > > Thank you again for all the great tips in this thread. I have taken the > time to review concurrency, reread all the blogs, articles, and email > messages in detail, and I have done a fairly

Re: [osgi-dev] Double config

2018-08-26 Thread Neil Bartlett via osgi-dev
With regard to "testing bouncing", there are two sides to this question: the component being bounced, and the other components that may be exposed to it bouncing. The component itself should never actually know that it is being, or has been, bounced. SCR always creates a new instance for each

Re: [osgi-dev] Extending Services

2018-08-03 Thread Neil Bartlett via osgi-dev
Are these DS components? I'm not entirely sure what would happen if a component both provides a service and binds to the same service type. In theory it might be able to bind to itself, especially if it is a lazy (delayed) service component, because then the service registration exists before the

Re: [osgi-dev] Service Composition

2018-07-11 Thread Neil Bartlett via osgi-dev
There is nothing actually wrong with your code, but let me make a couple of comments: 1) Using service.ranking to give preference to a particular service implementation is very weak. As you have found (in another thread), there is no "pressure" on a consumer to make it consume the highest ranked

Re: [osgi-dev] Service ranking usage

2018-07-10 Thread Neil Bartlett via osgi-dev
I failed to realize is that > this doesn't trigger a new call to the @Activate method. I changed the > reference to use a bind/unbind method pair and a sysout in there shows > exactly the pattern that you described. > > Thanks > Alain > > > On Tue, Jul 10, 2018 at 5:13

Re: [osgi-dev] Service ranking usage

2018-07-10 Thread Neil Bartlett via osgi-dev
Your reference to service ICoreUtils in Example is mandatory, static and reluctant. This means that whichever service it first binds to, it will hold for as long as possible. Since the lower ranked service is published by a bundle with a lower ID, it is probably published first. So that’s the one

Re: [osgi-dev] OSGi Specification Question

2018-06-28 Thread Neil Bartlett via osgi-dev
The spec is correct, and either Tim misspoke or you misheard him. The service should look like a big arrow pointing from the consumer to the provider. Neil On Thu, Jun 28, 2018 at 2:57 PM, Fauth Dirk (AA-AS/EIS2-EU) via osgi-dev < osgi-dev@mail.osgi.org> wrote: > Hi, > > > > maybe a stupid

Re: [osgi-dev] How best to refer to New enRoute and Classic enRoute

2018-06-20 Thread Neil Bartlett via osgi-dev
On Wed, Jun 20, 2018 at 7:44 AM, Paul F Fraser via osgi-dev < osgi-dev@mail.osgi.org> wrote: > Any opinions on how we should refer to the two versions? > > Perhaps "enRoute" for the new and "Classic enRoute" for the original. > This is my preference. A lot of "Classic" enRoute informed the OSGi

Re: [osgi-dev] Regarding service injection

2018-04-27 Thread Neil Bartlett via osgi-dev
On Thu, Apr 26, 2018 at 5:08 PM, Tim Ward via osgi-dev < osgi-dev@mail.osgi.org> wrote: > Hi Scott, > > The answer is really that it depends. The OSGi service registry supports > the registration of service instances and service factories. This means > that when you see a service registered in

Re: [osgi-dev] String[] in ds component config

2018-04-18 Thread Neil Bartlett via osgi-dev
There is some conversion happening inside DS, i.e. DS will be able to translate a single String object into a String[], but it will do so simply by creating a single-element array. It will not do any parsing of the content of that string. The client of ConfigAdmin (Karaf) really needs to set the

Re: [osgi-dev] Competing module systems

2018-04-13 Thread Neil Bartlett via osgi-dev
On Fri, Apr 13, 2018 at 2:24 PM, Mark Raynsford <list+org.o...@io7m.com> wrote: > On 2018-04-13T12:11:41 +0100 > Neil Bartlett <njbartl...@gmail.com> wrote: > > > > To be clear, I'm not convinced OSGi would ever want to do this. If we > did, > > we would

Re: [osgi-dev] Competing module systems

2018-04-13 Thread Neil Bartlett via osgi-dev
On Fri, Apr 13, 2018 at 11:45 AM, Mark Raynsford <list+org.o...@io7m.com> wrote: > On 2018-04-13T09:32:30 +0100 > Neil Bartlett <njbartl...@gmail.com> wrote: > > > > Interop already works just fine in one direction: OSGi bundles depending > on > > JPMS mo

Re: [osgi-dev] Competing module systems

2018-04-13 Thread Neil Bartlett via osgi-dev
On Thu, Apr 12, 2018 at 10:12 PM, Mark Raynsford via osgi-dev < osgi-dev@mail.osgi.org> wrote: > On 2018-04-12T20:32:13 +0200 > Peter Kriens wrote: > > > Caught between a rock and a hard place with only one way forward … > > I should make the point that I don't hate the

Re: [osgi-dev] How to use LoggerFactory with DS?

2018-04-09 Thread Neil Bartlett via osgi-dev
der: Franz Fehrenbach; Geschäftsführung: Dr. Volkmar > Denner, > Prof. Dr. Stefan Asenkerschbaumer, Dr. Rolf Bulander, Dr. Stefan Hartung, > Dr. Markus Heyn, Dr. Dirk Hoheisel, > Christoph Kübel, Uwe Raschke, Peter Tyroller > > > *Von:* Neil Bartlett [mailto:njbartl...@gmail.co

Re: [osgi-dev] How to use LoggerFactory with DS?

2018-04-09 Thread Neil Bartlett via osgi-dev
Hi Dirk, have you read the section on Logger support in R7 Declarative Services? See https://osgi.org/specification/osgi.cmpn/7.0.0/service.component.html#service.component-logger.support (or section 112.3.12 in the PDF). This section shows the recommended approach to obtaining a Logger instance

Re: [osgi-dev] JPMS modularization for various OSGi artifacts

2018-03-22 Thread Neil Bartlett via osgi-dev
> > On 22 Mar 2018, at 15:18, Mark Raynsford via osgi-dev > wrote: > > On 2018-03-22T13:18:18 + > "BJ Hargrave" wrote: > >> The R7 final API jars are already built and ready for release to Maven >> Central once the OSGi members approve the

Re: [osgi-dev] Bundle starts although no OSGi headers in its Manifest

2018-02-12 Thread Neil Bartlett via osgi-dev
Your manifest does not contain the declaration "Bundle-ManifestVersion: 2". That means it is interpreted as "Bundle-ManifestVersion: 1"... in other words an OSGi Release 3 (or older) compatible bundle. Before Release 4, OSGi had no mandatory manifest headers, even Bundle-SymbolicName. Therefore

Re: [osgi-dev] Question re. confguration-policy optional

2018-01-23 Thread Neil Bartlett via osgi-dev
If your activate method does not take the properties parameter, how do you read your initial configuration? Calling modified with null properties does not sound to me like the correct way for SCR to signal that the configuration record has been deleted. On Tue, Jan 23, 2018 at 12:50 PM, Erwin

Re: [osgi-dev] Question re. confguration-policy optional

2018-01-23 Thread Neil Bartlett via osgi-dev
The the component is *using* a configuration record (i.e. is has been activated with that record) and if it does not have a Modified method, then it must be deactivated when the configuration record is deleted. This part is, so far, the same for both optional and required configuration. After the

Re: [osgi-dev] Stumped - Unexpected duplicate component instantiation.

2018-01-18 Thread Neil Bartlett via osgi-dev
The scr:list output shows they are published by two separate bundle IDs, 112 and 137. Check whether you have accidentally built the component class into both bundles. Neil On 18 Jan 2018 11:45 pm, "Erwin Hogeweg via osgi-dev" < osgi-dev@mail.osgi.org> wrote: Hi, I have a very simple component,

Re: [osgi-dev] Apache Felix Web Console Components view

2017-11-16 Thread Neil Bartlett via osgi-dev
Since version 4 of WebConsole, the Declarative Services support has been moved to a separate bundle, “org.apache.felix.webconsole.plugins.ds”. Make you you have that bundle installed and active, in addition to the base Web Console bundle (“org.apache.felix.webconsole”). Neil > On 16 Nov

Re: [osgi-dev] Some questions

2017-09-27 Thread Neil Bartlett
> On 27 Sep 2017, at 14:14, Thomas Driessen > wrote: > > Hi, > > after working for some time with OSGi now I have a bunch of questions that I > couldn't find a satisfying answer for yet. Maybe some of you can help me to > clarify those: > > 1) Why is OSGi

Re: [osgi-dev] How to hint the resolver to pick a certain service provider

2017-08-17 Thread Neil Bartlett
Hi Milen, It’s pretty simple… if ‘effective' is unspecified OR has the value “resolve”, then the OSGi Framework uses that requirement in its own resolution of the bundle. If you specify ANY value other than “resolve”, then OSGi Framework completely ignores the requirement. That is, you can

Re: [osgi-dev] Names in the presence of multiple bundle versions

2017-07-22 Thread Neil Bartlett
tin Edelson <jus...@justinedelson.com> wrote: > > Obviously you should pick the plumber with the highest service.ranking. > > Sorry, couldn't resist. > > On Sat, Jul 22, 2017 at 7:39 AM Neil Bartlett <njbartl...@gmail.com > <mailto:njbartl...@gmail.com>> wrot

Re: [osgi-dev] Names in the presence of multiple bundle versions

2017-07-22 Thread Neil Bartlett
Hi Mark, > On 22 Jul 2017, at 14:23, Mark Raynsford <list+org.o...@io7m.com> wrote: > > 'Ello. > > I suspect we're in agreement, but I think there may've been a slight > miscommunication somewhere... > > On 2017-07-22T12:39:41 +0100 > Neil Bartlett <njb

Re: [osgi-dev] Names in the presence of multiple bundle versions

2017-07-22 Thread Neil Bartlett
, "Mark Raynsford" <list+org.o...@io7m.com> wrote: > On 2017-07-22T00:22:31 +0100 > Neil Bartlett <njbartl...@gmail.com> wrote: > > > Hello Mark, > > 'Ello. > > > > > Tell me, why is this problem any harder under OSGi than with > Service

Re: [osgi-dev] Names in the presence of multiple bundle versions

2017-07-21 Thread Neil Bartlett
Hello Mark, Tell me, why is this problem any harder under OSGi than with ServiceLoader?? In both cases, anybody can install a bundle or a JAR that provides a service with a name, and those names can collide. In both ServiceLoader and OSGi there is a simple rule for selecting a single instance

Re: [osgi-dev] Different conceptual version numbers for different forms of backwards compatibility?

2017-05-04 Thread Neil Bartlett
BJ, is that still the case if we change the return type to a subtype of the original return type? Ever since Java 5 it has been legal to implement an interface method and return a more specialised type than the interface demands… this would suggest a Minor API change (as long as we’re talking

Re: [osgi-dev] Allow registering a (Prototype)ServiceFactory via DS?

2017-04-21 Thread Neil Bartlett
And which bundle would be passed as the requesting bundle parameter of getService? SCR itself? On 21 Apr 2017 08:24, "Peter Kriens" wrote: > Well, the ServiceFactory is just a way to indirect the creation of the > actual instance. I do not see why such a pattern

Re: [osgi-dev] Log Service Specification Version 1.4 doubt

2017-04-07 Thread Neil Bartlett
The draft specification repeatedly mentions SLF4J and supports it explicitly. Log4j is an implementation that can be used behind SLF4J. So… what’s missing? > On 6 Apr 2017, at 22:25, Matt Sicker wrote: > > I'm honestly surprised that there was no collaboration between SLF4J

Re: [osgi-dev] Writing Gogo Commands

2017-03-25 Thread Neil Bartlett
Speaking of which, I’ve always wanted to use annotations to define my Gogo commands instead of manually specifying the service properties. So instead of: @Component(property = { “osgi.command.scope=blah”, “osgi.command.function=dosomething” }) public class Blah { public void

Re: [osgi-dev] Bundle declared commands can't run from felix/concierge container

2017-02-14 Thread Neil Bartlett
The inspect command has the wrong parameters. It should be: inspect capability|requirement Note that capability and requirement can be abbreviated to just “c” and “r”. I think what you’re trying to do is view the exports of bundle 13, like this: inspect c osgi.wiring.package

Re: [osgi-dev] How to determine when a new service instance has been activated?

2017-01-24 Thread Neil Bartlett
s the exceptional case. > > Tim > > > > From: "Neil Bartlett" <njbartl...@gmail.com> > To: "OSGi Developer Mail List" <osgi-dev@mail.osgi.org> > Sent: Monday, 23 January, 2017 11:18:54 PM > Subject: Re: [osgi-dev] How to determine when

Re: [osgi-dev] Shell

2016-12-09 Thread Neil Bartlett
This is tricky. You can’t have a requirement that is conditional upon the platform. You can have multiple resources that provide a capability, where each resource depends on a specific platform. We may need to follow a strategy similar to SWT, i.e. Gogo depends on some kind of “JLine native”

Re: [osgi-dev] Why is 'start' an error for fragments?

2016-11-10 Thread Neil Bartlett
> On 10 Nov 2016, at 16:51, Benson Margulies wrote: > > On Thu, Nov 10, 2016 at 11:16 AM, BJ Hargrave > wrote: >> Not really. Fragments are not bundle in that they do not have a class loader >> or a separate activation

Re: [osgi-dev] osgi-dev Digest, Vol 121, Issue 20

2016-11-10 Thread Neil Bartlett
X-RS impl in Aries > as quite a few people are asking for this. > > Christian > > On 10.11.2016 16:40, Neil Bartlett wrote: >> Christian, have you read the RFC for the JAX-RS whiteboard? It already does >> exactly this. >> >> When the whiteboard picks up a

Re: [osgi-dev] osgi-dev Digest, Vol 121, Issue 20

2016-11-10 Thread Neil Bartlett
> On 10 Nov 2016, at 15:31, Christian Schneider wrote: > > On 10.11.2016 15:16, Timothy Ward wrote: >> >> This is where your argument has problems, RSA simply does not equal REST. >> RESTful services follow API design principles which are heavily connected to >>

Re: [osgi-dev] Enroute Rest

2016-11-09 Thread Neil Bartlett
You can read about CORS here: https://en.wikipedia.org/wiki/Cross-origin_resource_sharing Regards, Neil > On 9 Nov 2016, at 11:51, > wrote: > > Hi All, > > I am trying to

Re: [osgi-dev] Making sure some bundles are started first

2016-10-28 Thread Neil Bartlett
Start Levels can solve these problems but it’s best to use only as an optimisation rather than to enable functionality. I.e., make sure your bundles still work even if they are started in the “wrong” order, though perhaps with slightly poorer performance. 1st scenario seems to be fine… if you

Re: [osgi-dev] Understanding activate

2016-10-26 Thread Neil Bartlett
You don’t invoke the activate/deactivate methods yourself. They are invoked by the SCR at the appropriate time, assuming they have been correctly declared. > On 26 Oct 2016, at 09:20, > wrote: > > Please find reply inline… > > From:

Re: [osgi-dev] Need some help

2016-10-25 Thread Neil Bartlett
Exactly. “” simply means that the package is not included in any bundle. And again, this is a question about Bndtools usage on the osgi-dev mailing list… Neil > On 25 Oct 2016, at 07:50, Bram Pouwelse wrote: > > Most likely because the package is not listed in the bnd

Re: [osgi-dev] DS component life cycle.

2016-10-13 Thread Neil Bartlett
> On 13 Oct 2016, at 22:04, Ferry Huberts wrote: > > Mandatory references are always injected before activate. > Optional references can be injected either before or after activate. Well no that’s not exactly true. Static references — whether mandatory or optional — are

Re: [osgi-dev] Help

2016-10-12 Thread Neil Bartlett
wnload and it is available in the Downloads directory. Should >> it (and similar bundles) be placed in some special directory? >> Further, How do I add it into my build path ? >> >> From: osgi-dev-boun...@mail.osgi.org <mailto:osgi-dev-boun...@mail.osgi.org&g

Re: [osgi-dev] Help

2016-10-12 Thread Neil Bartlett
dd to the Build Path of any project. Regards, Neil > > From: osgi-dev-boun...@mail.osgi.org <mailto:osgi-dev-boun...@mail.osgi.org> > [mailto:osgi-dev-boun...@mail.osgi.org > <mailto:osgi-dev-boun...@mail.osgi.org>] On Behalf Of Neil Bartlett > Sent: 12 October 20

Re: [osgi-dev] Help

2016-10-12 Thread Neil Bartlett
[mailto:osgi-dev-boun...@mail.osgi.org > <mailto:osgi-dev-boun...@mail.osgi.org>] On Behalf Of Neil Bartlett > Sent: 12 October 2016 14:54 > To: OSGi Developer Mail List <osgi-dev@mail.osgi.org > <mailto:osgi-dev@mail.osgi.org>> > Subject: Re: [osgi-dev] Help > > **

Re: [osgi-dev] Help

2016-10-12 Thread Neil Bartlett
Do you have the JAX-RS API on your build path? > On 12 Oct 2016, at 08:26, manoj.vrajam...@wipro.com wrote: > > Hi All, > > Please see attachment.. When I import javax.ws.* , I get unresolved errors.. > How do I correct this ? Any pre-requisites for this? > > Thanks, > Manoj > > The

Re: [osgi-dev] A middle ground between hard dependencies and purely dynamic dependencies (DS)

2016-10-07 Thread Neil Bartlett
> On 7 Oct 2016, at 22:33, Benson Margulies <bimargul...@gmail.com> wrote: > > On Fri, Oct 7, 2016 at 4:21 PM, Neil Bartlett <njbartl...@gmail.com > <mailto:njbartl...@gmail.com>> wrote: >> >> On 7 Oct 2016, at 20:56, Benson Margulies <bimargul...

Re: [osgi-dev] Service being destroyed

2016-10-06 Thread Neil Bartlett
I assume you mean that the component is destroyed. You should make the component ‘immediate’. This decouples the lifecycle of the component from its provided service, i.e. the component is always around even when nobody is consuming its service. For example: @Component(immediate=true …)

Re: [osgi-dev] Eclipse vs Felix?

2016-09-06 Thread Neil Bartlett
Which specific Eclipse-based development environment are you talking about? Eclipse is an ecosystem of plugins and alternative development environments. The two main ones for doing OSGi development are Bndtools and PDE. Bndtools has full support for launching Felix, and any other OSGi R4.2+

Re: [osgi-dev] Please Help

2016-09-05 Thread Neil Bartlett
Does the bundle exist in a repository? Run Bundles is just a list of bundles. It doesn't say anything about whether any of the listed bundles exist. On 5 Sep 2016 12:15, wrote: > Hi All, > > > Please see attachement.. The Run Bundles shows/lists the org.dyamand.osgi

Re: [osgi-dev] Please Help

2016-09-02 Thread Neil Bartlett
-buildpath: path/to/some/file.jar; version=file > On 2 Sep 2016, at 10:24, manoj.vrajam...@wipro.com wrote: > > I did not quite understand this.. Can you please be a little elaborate….That > would really help…Thanks.. J > > From: osgi-dev-boun...@mail.osgi.org

Re: [osgi-dev] Help

2016-08-16 Thread Neil Bartlett
il. Looking at >>> your workspace you’re clearly NOT using an enRoute workspace since the ext >>> and other directories is missing. So I assume you’ve created a workspace >>> out of nothing? >>> >>> The QS defines quite explicitly how to start

Re: [osgi-dev] Help

2016-08-12 Thread Neil Bartlett
i.org <mailto:osgi-dev-boun...@mail.osgi.org> > <osgi-dev-boun...@mail.osgi.org <mailto:osgi-dev-boun...@mail.osgi.org>> on > behalf of Neil Bartlett <njbartl...@gmail.com <mailto:njbartl...@gmail.com>> > Sent: 12 August 2016 19:23:55 > To: OSGi Developer

Re: [osgi-dev] OSGi for a plugin system?

2016-07-31 Thread Neil Bartlett
> On 31 Jul 2016, at 19:34, list+org.o...@io7m.com wrote: > > Hello. > > I'm the author of a work-in-progress open-source-but-commercial > computer game. One of the main design decisions has always been to > support third party modifications out of the box. Current commercial > computer games

Re: [osgi-dev] Bundle usage counting

2016-06-15 Thread Neil Bartlett
> On 15 Jun 2016, at 11:28, Neil Bartlett <njbartl...@gmail.com> wrote: > > >> On 15 Jun 2016, at 11:19, Paul F Fraser <pa...@a2zliving.com> wrote: >> >> Hi, >> >> The bundle usage counting is required for a simple feature start and stop &

Re: [osgi-dev] Bundle usage counting

2016-06-15 Thread Neil Bartlett
Neil > > Paul > > On 15/06/2016 8:00 PM, Neil Bartlett wrote: >> Depends what you mean by "bundle usage". >> >> If you’re talking about services, then you can get the ServiceReferences >> registered by a bundle and count the using bundles with getUs

Re: [osgi-dev] Bundle usage counting

2016-06-15 Thread Neil Bartlett
Depends what you mean by "bundle usage". If you’re talking about services, then you can get the ServiceReferences registered by a bundle and count the using bundles with getUsingBundles. If you’re talking about package wiring and Require-Bundle then you can adapt the bundle to a BundleWiring

Re: [osgi-dev] Use of Debug instead of Run in EnRoute Docs

2016-06-03 Thread Neil Bartlett
Yes, exactly. Whereas “Run” will not hit any breakpoints and will not allow hot-swap using JPDA (though of course Bndtools can still hot-swap bundles because OSGi). Run mode will also be faster, but probably not enough to be noticeable in most applications. Neil > On 4 Jun 2016, at 00:14,

Re: [osgi-dev] Eclipse Format settings for EnRoute

2016-06-03 Thread Neil Bartlett
Another satisfied customer... On 3 Jun 2016 11:39 a.m., "Paul F Fraser" wrote: > Peter and Neil, > > You have both ruined my day ;-) (night actually here) > > Paul > > On 3/06/2016 8:17 PM, Peter Kriens wrote: > > I usually switch formatting off for that part :-( I

Re: [osgi-dev] Eclipse Format settings for EnRoute

2016-06-03 Thread Neil Bartlett
I also format this manually. Neil On 3 Jun 2016 11:17 a.m., "Peter Kriens" wrote: > I usually switch formatting off for that part :-( I understand your pain, > let me know when found a nice formatting file. > > Kind regards, > > Peter Kriens > > > > On 3 jun.

Re: [osgi-dev] Event Dictionary Data Types

2016-05-31 Thread Neil Bartlett
Strings are also permitted in addition to primitives, therefore technically you could encode a serialised object into a string using base64 or similar. The problem with a serialised object is of course that a receiving bundle may not have visibility of the class required to deserialise… or it

Re: [osgi-dev] How do you use OSGi?

2016-05-24 Thread Neil Bartlett
> On 24 May 2016, at 21:57, Christian Schneider wrote: > > On 24.05.2016 21:02, Scott Lewis wrote: >> >> Yeah you can do this, but my observation is that very few are. >> >> I would also suggest that the classes/API in the launch package (e.g. >> BundleFinder)

Re: [osgi-dev] How do you use OSGi?

2016-05-24 Thread Neil Bartlett
on the provider side (i.e., register/unregister service) rather than the consume side, because sometimes you need your service to reflect the state of entities in the real world. Regards, Neil. > On 24 May 2016, at 18:48, Scott Lewis <sle...@composent.com> wrote: > > On 5/24/2016 10:33 AM

Re: [osgi-dev] Clarify usage of ServiceTracker

2016-04-15 Thread Neil Bartlett
Michael, I share your aversion to opaque magic, but I'm not entirely in agreement. You seem to be arguing that programmers should have full knowledge of all levels of the stack they are building on. If so, can you explain in detail how, say, the Java garbage collector works? In fact I suspect

Re: [osgi-dev] Java 9 / JSR 276 and OSGi plans

2016-03-11 Thread Neil Bartlett
The following does not answer your question with respect to the OSGi Alliance’s official plans… however I have already built a proof-of-concept demonstrating that OSGi can run within the Java 9 “unnamed module” and resolve dependencies against the platform modules. I wrote a blog post about it

Re: [osgi-dev] Monitor method calls for a bundle?

2016-02-22 Thread Neil Bartlett
> On 22 Feb 2016, at 21:28, Steve Marotta wrote: > > That’s an interesting idea. I didn’t realize that OSGi had built-in weaving > capabilities. I looked at the spec and saw that there’s a partial example of > how to use WeavingHook, but it didn’t talk about how to actually

Re: [osgi-dev] Bndtools OSGi Project not running on ARM7 - But OK on DEV machine

2015-06-19 Thread Neil Bartlett
It’s a bit odd to see the “Package uses conflict” message but without the diagnostics of the conflicting chains. Are you running on an older OSGi Framework implementation? How are you launching your framework? Regards Neil On 19 Jun 2015, at 19:36, chris.g...@kiffer.be wrote: Fortunately

Re: [osgi-dev] whiteboard pattern extenders

2015-06-17 Thread Neil Bartlett
I think that B (the extender) must register the Servlet service using its own BundleContext, since it is the bundle that actually creates the Servlet objects. Since the extended C bundle neither imports nor exports the Servlet API, *nobody* would be able to use its published Servlet services

Re: [osgi-dev] whiteboard pattern extenders

2015-06-17 Thread Neil Bartlett
Felix, On 17 Jun 2015, at 21:35, Felix Meschberger fmesc...@adobe.com wrote: Hi Am 17.06.2015 um 21:56 schrieb Neil Bartlett njbartl...@gmail.com mailto:njbartl...@gmail.com: I think that B (the extender) must register the Servlet service using its own BundleContext, since

Re: [osgi-dev] Why are there restrictions to access the specs and the tcks?

2015-05-04 Thread Neil Bartlett
It’s a convention. The OSGI-OPT folder is intended for information that can be safely removed from the bundle with no loss of function, perhaps using a command similar to the UNIX “strip” program (https://en.wikipedia.org/wiki/Strip_%28Unix%29 https://en.wikipedia.org/wiki/Strip_(Unix)).

Re: [osgi-dev] service tracker precedence

2015-04-15 Thread Neil Bartlett
In addition to the caveats from Chris and Marcel, I would add that service hooks can only filter at the consuming bundle level. They cannot distinguish between multiple trackers coming from the same bundle. Regards Neil On 15 Apr 2015, at 13:10, Marcel Offermans marcel.offerm...@luminis.nl

Re: [osgi-dev] Proposal named pids for ManagedServiceFactory

2015-04-05 Thread Neil Bartlett
Hi Christian, Unfortunately if you do this then you run into the same problem we have with non-factory configurations: what if somebody has already created a record for the PID you requested? Notice that for non-factory configs there is no “createConfiguration” method in ConfigAdmin, only

Re: [osgi-dev] DS bind with ServiceReference

2015-03-30 Thread Neil Bartlett
When you use the ServiceReference style of bind, bnd can’t rely on the signature of the bind method to ascertain the service type you want. Hence you have to add an extra hint by using the ‘service’ attribute. It’s probably a bit dim for bnd to assume that we are binding to services of type

Re: [osgi-dev] getting a service filtered on my bundleId

2015-03-08 Thread Neil Bartlett
Ray, to quote two sentences from your email: * I want the thing that was built for me specifically” * I never talked about coupling providers to consumers.” These two statements are in direct contradiction with each other! To be honest this doesn’t sound like a job for the service registry, but

Re: [osgi-dev] filter syntax for version range with exclusive upper bound

2015-01-17 Thread Neil Bartlett
, I believe. Not that I have any constructive suggestions for what that syntax might look like, unfortunately. Neil On 17 Jan 2015, at 01:38, Raymond Auge raymond.a...@liferay.com wrote: On Fri, Jan 16, 2015 at 8:36 PM, Neil Bartlett njbartl...@gmail.com mailto:njbartl...@gmail.com wrote

Re: [osgi-dev] restart the framework from within?

2014-11-07 Thread Neil Bartlett
. So the launching script should look something like: do { bnd run app.bndrun } while ($?==-4) Kind regards, Peter Kriens On 6 nov. 2014, at 22:39, Neil Bartlett njbartl...@gmail.com wrote: On 6 Nov 2014, at 18:38, Ferry Huberts maili...@hupie.com wrote

Re: [osgi-dev] restart the framework from within?

2014-11-06 Thread Neil Bartlett
On 6 Nov 2014, at 18:38, Ferry Huberts maili...@hupie.com wrote: On 06/11/14 19:11, Balázs Zsoldos wrote: You can call update on the system bundle that restarts the framework on a different thread. See chapter 4.6 The System Bundle of OSGi core spec. Thanks, I'll try that! For

Re: [osgi-dev] Solving OSGi Transitive Dependencies

2014-10-24 Thread Neil Bartlett
Subject:  Re: [osgi-dev] Solving OSGi Transitive Dependencies On Saturday, 25 October 2014 at 00:10, Neil Bartlett wrote: We appear to be having the same discussion on both this list and the Felix list. To summarise what I posted there, I did a test with JScience (the library Pedro is trying to use

Re: [osgi-dev] Solving OSGi Transitive Dependencies

2014-10-24 Thread Neil Bartlett
get more dependencies than would be expected? Thanks, Neil  From: Neil Bartlett njbartl...@gmail.com Reply: Neil Bartlett njbartl...@gmail.com Date: 25 October 2014 at 00:31:59 To: Stuart McCulloch mccu...@gmail.com, OSGi Developer Mail List osgi-dev@mail.osgi.org Subject:  Re: [osgi-dev

Re: [osgi-dev] semantic versioning enums (and other new types)

2014-09-24 Thread Neil Bartlett
I believe that adding values to an enum is NOT binary compatible, therefore it would be a major change. Any switch statements written against the old version will no longer be exhaustive after the addition of the new value. This could substantially alter the logic of any client code. Neil On

Re: [osgi-dev] JDK xml implementation classes

2014-08-06 Thread Neil Bartlett
Technical Staff Member, IBM OSGi Fellow and CTO of the OSGi Alliance hargr...@us.ibm.com office: +1 386 848 1781 mobile: +1 386 848 3788 From:        Neil Bartlett njbartl...@gmail.com To:        Raymond Auge raymond.a...@liferay.com, OSGi Developer Mail List osgi-dev@mail.osgi.org

Re: [osgi-dev] Bundle attempting to interrogate BundleContext when starting up

2014-08-01 Thread Neil Bartlett
On 1 August 2014 at 15:05:35, Leschke, Scott (slesc...@medline.com) wrote: Yes, that makes sense to me. So, would there be a generally recommended approach to do the sort of thing that the DataNucleus plugin is trying to do? The answer was in your original question… DN should simply use a

Re: [osgi-dev] Solving Split Packages for the MongoDB Java Driver

2014-08-01 Thread Neil Bartlett
Hi Justin. First, what a horrible, horrible situation. I can only sympathise with you, while boiling with anger at the developers who did this! There are ways of dealing with this, using a combination of Require-Bundle along with mandatory attributes on package exports… but I would strongly

Re: [osgi-dev] Bundle attempting to interrogate BundleContext when starting up

2014-07-31 Thread Neil Bartlett
Is it possible that somebody has subclassed OSGiPluginRegistry? In which case “this.getClass()” will not return OSGiPluginRegistry but the subclass, which might be in another bundle entirely. Neil On 31 July 2014 at 23:28:10, Leschke, Scott (slesc...@medline.com) wrote:   I posted the

Re: [osgi-dev] [Ask]About Immediate Component from SCR Spec

2014-07-14 Thread Neil Bartlett
Yes it is still immediate. The opposite of immediate is delayed. A service component is delayed if its instantiation is deferred until the service is used by a consumer, ie just in time. Without a service, there is nothing we can delay until... no demand signal. Neil -- Neil

Re: [osgi-dev] core r6 in maven central

2014-06-30 Thread Neil Bartlett
Hi Raymond, I believe that David has done the Maven Central uploads in the past, but it’s a laborious process and David is very busy. If you have any bandwidth and/or knowledge of the process, it would be very cool if you could help out. Regards, Neil On 30 June 2014 at 20:32:50, Raymond

  1   2   >