Re: [osgi-dev] Compendium services

2020-08-16 Thread Tim Ward via osgi-dev
Yes, it’s a requirement of the OSGi specification process that there be a reference implementation and test suite for every specification chapter. Note that the reference implementation may not always be open source (although it is very rare that it isn’t) and isn’t guaranteed to be

Re: [osgi-dev] How to: File Upload with JAX-RS Whiteboard

2020-07-08 Thread Tim Ward via osgi-dev
om > <mailto:dirk.fa...@de.bosch.com> > > Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart, HRB 14000; > Aufsichtsratsvorsitzender: Franz Fehrenbach; Geschäftsführung: Dr. Volkmar > Denner, > Prof. Dr. Stefan Asenkerschbaumer, Dr. Michael Bolle, Dr. Christian Fischer,

Re: [osgi-dev] Regarding Transaction Control

2020-04-07 Thread Tim Ward via osgi-dev
Hi Scott, If you’re using JDBC you don’t really care about JPA. Therefore you should compile against the OSGi jar, but not worry about deploying it at runtime. Instead you can just deploy the Aries Transaction Control implementation (which includes a substitutable export of the Transaction

Re: [osgi-dev] Intermittent failure to getService

2020-03-02 Thread Tim Ward via osgi-dev
Hi Alain, Is it possible that someone has a reference to a BaValidationManagerExt service instance that they aren’t releasing after ungetting it (or that they’re holding onto after it has been unregistered)? It might be an SCR bug, but it’s more likely to be some code holding onto a component

Re: [osgi-dev] [FDC-External]: Re: DB2 Enroute OSGi Connectivity

2020-01-14 Thread Tim Ward via osgi-dev
late... I will look into the PAX-JDBC. Does > wrapping the DB2 Jar is still supported? > > From: osgi-dev-boun...@mail.osgi.org On > Behalf Of Tim Ward via osgi-dev > Sent: Monday, January 6, 2020 4:04 AM > To: Matthews, Kevin ; OSGi Developer Mail List > > Subject: [

Re: [osgi-dev] DB2 Enroute OSGi Connectivity

2020-01-06 Thread Tim Ward via osgi-dev
Hi Kevin, Unfortunately you are correct that DB2 doesn’t provide an OSGi-enabled version of its driver, however it is possible to make it work (with a little effort). Implementing the JDBC Service specification yourself is pretty trivial (all you need to do is to register a single service

Re: [osgi-dev] @ConsumerType vs @ProviderType

2019-10-24 Thread Tim Ward via osgi-dev
Hi Scott, As the author of the Transaction Control specification I can attempt to explain to you the reasoning for the example that is confusing you. In the Transaction Control specification there are three primary sets of actors: People implementing the core TransactionControl service (i.e.

Re: [osgi-dev] Configurator resources that depend on a ConfigurationPlugin

2019-10-08 Thread Tim Ward via osgi-dev
> My question is, how can I tell to the Configurator bundle to not process > resources that contains placeholder until my ConfigurationPlugin is up? There are ways that you could attempt to do this, however they’re all inelegant and error prone. What would make more sense would be for the

Re: [osgi-dev] Deactivating a component manually

2019-09-23 Thread Tim Ward via osgi-dev
essary deactivation code in the DS component instance being released. Hopefully this makes sense to you, and might provide a route forward. All the best, Tim Ward > On 22 Sep 2019, at 10:43, Alain Picard via osgi-dev > wrote: > > No, we had this issue before we (just) upgraded t

Re: [osgi-dev] Enroute Tutorial - generating indexes

2019-08-22 Thread Tim Ward via osgi-dev
Hi Kevin, Have you installed Bndtools? If not then it is highly recommended to make your development more productive. You can see how it is used in https://enroute.osgi.org/tutorial/020-tutorial_qs.html#resolving-the-application

Re: [osgi-dev] Migrating a service provider interface to OSGi that's similar to SPI

2019-08-22 Thread Tim Ward via osgi-dev
Hello, When you say that each client needs a different service instance, would a bundle need more than one instance (i.e. would a ServiceFactory be sufficient or does it need to be a PrototypeServiceFactory)? Also, where are the Strings in the String array coming from? If those are passed in

Re: [osgi-dev] Using Gradle or Maven on a new OSGi project

2019-07-25 Thread Tim Ward via osgi-dev
Interestingly this is the opposite conclusion that most people come to. Until recently Bndtools did not support Maven at all and was 100% Gradle. There has been a lot of work to bring Maven support up to the same level as Gradle by the team, but I don’t think that many of us would say that

Re: [osgi-dev] OSGi book recommendations

2019-07-25 Thread Tim Ward via osgi-dev
As far as English Language books go, I’m not aware of anything that fits the bill. Enterprise OSGi in Action is probably the most “up to date” of the books, but it uses Blueprint. OSGi in Depth mostly focuses on the low-level APIs (which I would definitely not recommend using), OSGi in Action

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

2019-06-20 Thread Tim Ward via osgi-dev
Right, so lets look at these one by one: > "The importer's version range matches the exporter's version. See Semantic > Versioning > .” > The reference to semantic versioning makes the

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

2019-06-18 Thread Tim Ward via osgi-dev
Michael, I promise that we are trying to help, but there’s clearly quite a bit of confusion here. I’ll try to take the questions individually, and we can attempt to separate your questions about build/packaging (i.e. creating your bundle) and resolving (i.e. creating your deployment). These

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

2019-06-18 Thread Tim Ward via osgi-dev
>> Considering this, lowering a lower bound of an Import-Package statement when >> resolving should be acknowledged as a bug. >> Bnd does not alter the version used when resolving, as this would give “incorrect” answers that don’t resolve. The resolver must use the exact metadata from the

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

2019-06-17 Thread Tim Ward via osgi-dev
e of > the bug in A-2.0.1? > > If OSGI didn't specify that the micro part should be dropped, then > everything would be fine. Resolution would only be possible if at least > version 2.0.3 of "A" was available. So, why do we have this > "unreasonable" specification? >

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

2019-06-17 Thread Tim Ward via osgi-dev
Hi Michael, I’m afraid that there’s quite a lot of missing information before I could come to a conclusion about what’s going on. What are your input requirements? Have you checked that B actually has the version range that you think it does? Are there two versions of A being deployed? If it’s

Re: [osgi-dev] Multiple bind attempts to 8080

2019-03-25 Thread Tim Ward via osgi-dev
There are definitely two different versions of Jetty trying to start up in your runtime: This one: > 03/23/2019 09:41:58.645|INFO |main|Started > ServerConnector@77a074b4{HTTP/1.1,[http/1.1]}{0.0.0.0:8080 > } > > [INFO] Started Jetty 9.4.9.v20180320 at port(s) HTTP:8080

Re: [osgi-dev] Removing queued events in Push Steams

2019-03-16 Thread Tim Ward via osgi-dev
OSGi Developer Mail List >> >> >> >> I probably would use a (static?) priority set with a weak reference to the >> event object. (Or some key that uniquely identifies that object). The >> processor can then consult this set to see if the event has higher priority. >> A

Re: [osgi-dev] objectClass=org.osgi.service.component.ComponentFactory missing

2019-03-08 Thread Tim Ward via osgi-dev
This looks like a missing feature in bnd. When bnd spots that you have created a factory component in your bundle then it should mark the service as registered. As a workaround you should be able to add a Capability annotation to the component in question marking that a ComponentFactory

Re: [osgi-dev] Checking index project APP for rebuild

2019-03-06 Thread Tim Ward via osgi-dev
> On 6 Mar 2019, at 10:56, Paul F Fraser wrote: > > Hi Tim, > > On 6/03/2019 8:41 pm, Tim Ward wrote: >> Hi Paul, >> >> Firstly - this sounds like something for the Bndtools list rather than the >> OSGi developer list, in that your asking a question

Re: [osgi-dev] Checking index project APP for rebuild

2019-03-06 Thread Tim Ward via osgi-dev
Hi Paul, Firstly - this sounds like something for the Bndtools list rather than the OSGi developer list, in that your asking a question about the Bndtools M2E integration, rather than a question about OSGi enRoute. That said, “a long time” isn’t hugely clear - are we talking seconds or

Re: [osgi-dev] Removing queued events in Push Steams

2019-02-27 Thread Tim Ward via osgi-dev
Another option would be for you to take control of the queuing using a QueuePolicy. That would enable you to insert work at the head of the buffer (or at least higher up) if it was more important. You could also remove some of the entries if they are invalidated by the higher priority insert.

Re: [osgi-dev] SCR API

2019-02-22 Thread Tim Ward via osgi-dev
Hi Thomas, I’m not sure that there is a naming issue here, but possibly a different misunderstanding. > From my understanding there are two kinds of "services”: This is not really accurate. There is only one kind of service in OSGi, and it’s an object which has been registered with the

Re: [osgi-dev] ComponentServiceObjects vs ServiceObjects

2019-02-19 Thread Tim Ward via osgi-dev
> As I get it ComponentServiceObjects are just for use within Components and > are obtained vie @Reference? Yes - you should *always* use ComponentServiceObjects if you want to get on-demand instances of a prototype scope service inside your DS component. > But why are not ServiceObjects used

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

2019-02-18 Thread Tim Ward via osgi-dev
4e97ad-0dd3-4360-8702-de0fedf9e51f> > > Just type "resolve app" in the command line. > > Kind regards, > Thomas > > > > -- Originalnachricht -- > Von: "Tim Ward" mailto:tim.w...@paremus.com>> > An: "Thomas Driessen&quo

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

2019-02-18 Thread Tim Ward via osgi-dev
Bartlett" mailto:njbartl...@gmail.com>> > An: "Thomas Driessen" <mailto:thomas.driessen...@gmail.com>>; "OSGi Developer Mail List" > mailto:osgi-dev@mail.osgi.org>> > Cc: "Tim Ward" mailto:tim.w...@paremus.com>> > Gesendet: 18.

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

2019-02-18 Thread Tim Ward via osgi-dev
Hi Thomas, Just to clarify, the behaviour that you see with static reluctant services will always look “odd” for cardinalities other than mandatory, and what you’ve recorded is 100% correct behaviour. Static references force the component to be re-created if the value of the reference changes

Re: [osgi-dev] Aliasing OSGi DS annotations

2019-02-14 Thread Tim Ward via osgi-dev
Hi, There isn’t any sort of Aliasing for DS annotations. Best Regards, Tim > On 14 Feb 2019, at 09:10, Thomas Driessen via osgi-dev > wrote: > > Hi, > > is there a mechanism in OSGi that allows to alias specific (DS) annotations? > (Seems to be possible in Spring according to Vaadin) >

Re: [osgi-dev] Push Streams Event grouping and batching

2019-02-06 Thread Tim Ward via osgi-dev
2019, at 14:57, Tim Ward wrote: > > Hi Alain, > > Having applied some step by step debugging the issue I can see is actually a > deadlock in the async worker pool - we call asyncMap with a parallelism of 2, > but we use the default executor from the push stream

Re: [osgi-dev] Push Streams Event grouping and batching

2019-02-06 Thread Tim Ward via osgi-dev
t; >>> Finally got around to this debouncer, and I tested to change the sleep >>> time. When I set it to like 800 to 1500, it never completes after shoing >>> "Closing the Generator". At 500, I get a Queue full that I can understand. >>> So why th

Re: [osgi-dev] Remote service (thread) context properties?

2019-02-06 Thread Tim Ward via osgi-dev
Hi Bernd, What you’re asking for isn’t a required part of the RSA standard, which means that providers don’t have to offer it. There is, however, room for it to exist within the standard. OSGi Remote Services (and Remote Service Admin) define the concept of “intents” which are additional

Re: [osgi-dev] enRoute Project archetype not working correctly?

2019-02-05 Thread Tim Ward via osgi-dev
Hi Thomas, What was the command that you used to generate the folders? The Maven Archetype Plugin is useful, but the default version used by Maven is pretty old. The OSGi enRoute recommendation is that you use version 3.0.1 of the archetype plugin, as described in

Re: [osgi-dev] Move from bnd workspace to maven (enroute) workspace

2019-01-31 Thread Tim Ward via osgi-dev
the running and reloading of applications in bndtools: I don't use > Eclipse, therefore I asked if there are maven commands that mimc bndtools' > behavior ;) > > > Kind regards, > Thomas > > -- Originalnachricht -- > Von: "Tim Ward" mailto:tim.w...@

Re: [osgi-dev] Move from bnd workspace to maven (enroute) workspace

2019-01-31 Thread Tim Ward via osgi-dev
Hi > On 31 Jan 2019, at 15:22, Thomas Driessen via osgi-dev > wrote: > > Hi, > > I'm currently trying to get used to the new enroute maven workspace layout > and now have some questions :) > > 1) > In a bnd workspace I had the central.xml file where I put all the > dependencies I wanted in

Re: [osgi-dev] ContainerRequestFilter/ContainerResponseFilter life cycle

2019-01-30 Thread Tim Ward via osgi-dev
> On 30 Jan 2019, at 16:52, Nhut Thai Le wrote: > > Tim, > > Thank you for quickly identify my problems :D, please see my comments inline > > On Wed, Jan 30, 2019 at 10:13 AM Tim Ward <mailto:tim.w...@paremus.com>> wrote: > Hi, > > F

Re: [osgi-dev] Limks to R7 ionline spec

2019-01-30 Thread Tim Ward via osgi-dev
When I type "osgi specifications” into Google the first links I get are: To the main specifications page you’re already at (this requires you to follow the download link for the version you want) To the HTML version of the R7 core specification To the HTML version of the R7 compendium

Re: [osgi-dev] Prototype scope components and Fluent builder

2019-01-30 Thread Tim Ward via osgi-dev
I’m not quite sure what this question means, but the most obvious interpretation is “how should I deal with registering a service that is a fluent builder?”. The JAX-RS Whiteboard does this with the ClientBuilder service

Re: [osgi-dev] Loading xxxApp contents has encountererd NPE

2019-01-30 Thread Tim Ward via osgi-dev
Hi Paul, It’s not normal to see NPEs during your build, but I also don’t see them when using OSGi enRoute. Assuming that you can identify the Maven plugin causing the problem it might be worth talking to the maintainers of the plugin. At the very least it’s hard to diagnose without more

Re: [osgi-dev] ContainerRequestFilter/ContainerResponseFilter life cycle

2019-01-29 Thread Tim Ward via osgi-dev
Hi, As described in the JAX-RS Whiteboard spec JAX-RS extension instances are required to be singletons (I’m talking about the objects, not the services) by the JAX-RS specification itself. Therefore within an

Re: [osgi-dev] Scanning classes at runtime

2019-01-23 Thread Tim Ward via osgi-dev
specification from the enterprise R7 release (currently in draft) which does something very much like this. Tim > On 23 Jan 2019, at 16:48, Tim Ward wrote: > > Hi, > > You can optimise this pretty heavily by using the bundle wirings to look for > bundles which are wired to the

Re: [osgi-dev] Scanning classes at runtime

2019-01-23 Thread Tim Ward via osgi-dev
Hi, You can optimise this pretty heavily by using the bundle wirings to look for bundles which are wired to the same API packages as you (the one(s) that contain the relevant interface/supertype/annotation). This way you can avoid scanning bundles which can’t possibly contain relevant types.

Re: [osgi-dev] OSGi Http Client Missing Requirement

2019-01-21 Thread Tim Ward via osgi-dev
Impl > version=0.0.1.201901210415: > missing requirement > osgi.wiring.package;filter:='(&(osgi.wiring.package=org.apache.http))'] -> > [Help 1] > > Is this a similar problem to that discussed where Tim Ward stated - > > "Now in fact the Felix Http Jetty implemen

Re: [osgi-dev] Vaadin flow works in bnd workspace, fails in enRoute project

2019-01-16 Thread Tim Ward via osgi-dev
Hi Paul, The error you’re seeing is a resolution failure because the "com.vaadin.flow.osgi version=1.2.3” bundle has a requirement in the “osgi.service” namespace for the service with interface “org.osgi.service.http.HttpService”. This basically says that the Vaadin flow bundle is trying to

Re: [osgi-dev] Push Streams Event grouping and batching

2019-01-07 Thread Tim Ward via osgi-dev
rom some of the tests, and I've been looking where > tests are located, as this is often very revealing in how various aspects > actually work and I have not been able to find them. Are they on Github > somewhere? > > Alain > > >> On Mon, Jan 7, 2019 at 8:11 AM

Re: [osgi-dev] Push Streams Event grouping and batching

2019-01-07 Thread Tim Ward via osgi-dev
This use case is effectively a “debouncing” behaviour, which is possible to implement with a little thought. There are a couple of ways to attempt it. This one uses the asyncMap operation to asynchronously gather the events until it either times out the promise or it hits the maximum stream

Re: [osgi-dev] PushStream Question

2018-12-10 Thread Tim Ward via osgi-dev
Hi Clément, You should raise a bug about the JavaDoc/implementation inconsistency in the OSGi bugzilla. The StackOverflow question is now answered, hopefully to your satisfaction. Best Regards, Tim > On 9 Dec 2018, at 21:35, Clément Delgrange via osgi-dev > wrote: > > Hi all, > > I have

Re: [osgi-dev] OSGi connecting to SqlServer with Apache Aries

2018-12-09 Thread Tim Ward via osgi-dev
It sounds like you have done the right things, but my guess is that you don’t have a JDBC service implementation for SQLServer. H2 and Postgres have done the work to implement the OSGi standard (it’s pretty small), but quite a few other providers haven’t. You could either roll your own

Re: [osgi-dev] enRoute JPA example questions

2018-12-07 Thread Tim Ward via osgi-dev
Hi Clément, > The de-coupling is not the fact that they are DTOs? If the API had defined > Interfaces or Classes the de-coupling would be the same. In this case the decoupling is from the data model. If the DTO types were JPA entities (i.e. they had JPA annotations on them) then everyone would

Re: [osgi-dev] Problem starting Aries JAX-RS Whiteboard

2018-12-03 Thread Tim Ward via osgi-dev
Hi Alain, Sorry this took you so long to work out - Sunday isn’t the best time to get a response I’m afraid! In summary - this should have “just worked” for you. I’m sorry that it didn’t, but unfortunately in this case the web container implementation that you are using has some packaging

Re: [osgi-dev] Correct way to handle error/recovery in PushStream

2018-11-29 Thread Tim Ward via osgi-dev
That looks reasonable to me. You could also do it using an error handler on the promise returned by forEach(), but what you’re doing is also fine. Depending on your threading model you may lose some events, specifically if there’s a buffer in the SimplePushEventSource that you are using (which

Re: [osgi-dev] No service events for an embedded OSGi Framework?

2018-11-28 Thread Tim Ward via osgi-dev
My guess is that you are trying to start a framework from inside a framework, and then the code outside is using a different view of the ComponentFactory interface from the code inside. Normally you would need to use a system packages extra property when launching the inner framework (to share

Re: [osgi-dev] Disposing component instances

2018-11-25 Thread Tim Ward via osgi-dev
ponent X) then the instance of Factory A will remain alive until X is deactivated. I hope this makes sense, Tim Sent from my iPhone > On 25 Nov 2018, at 13:20, Alain Picard wrote: > >> On Sun, Nov 25, 2018 at 7:50 AM Tim Ward wrote: >> If your DS component ‘X’ is injected with a Comp

Re: [osgi-dev] Disposing component instances

2018-11-25 Thread Tim Ward via osgi-dev
gt; > Can I interpret this and your previous comment as meaning that within a > prototype scope component, a prototype required scope reference doesn't need > to be "unget" manually and it is just the most outer invocation that should > perform the "unget" > &

Re: [osgi-dev] Circular references with Factory component

2018-11-23 Thread Tim Ward via osgi-dev
The critical part of the spec is available at https://osgi.org/specification/osgi.cmpn/7.0.0/service.component.html#service.component-factorycomponent - the key words are "SCR must

Re: [osgi-dev] osgi and timer task

2018-11-19 Thread Tim Ward via osgi-dev
If you are asking “I observe this behaviour, is it correct?” then this sounds like a well written bundle with good behaviour. Threads started by a bundle when it starts should be stopped when it stops. Similarly sockets opened, or other resources claimed, should be closed/released. If you

Re: [osgi-dev] Push Stream reset/flush howto

2018-11-15 Thread Tim Ward via osgi-dev
e you get a Cache invalidation return newValue.recoverWith(this::recoveryFunction); } } Tim > On 15 Nov 2018, at 12:43, Alain Picard wrote: > > On Thu, Nov 15, 2018 at 7:25 AM Tim Ward <mailto:tim.w...@paremus.com>> wrote: >> My expectation is that after the "

Re: [osgi-dev] Push Stream reset/flush howto

2018-11-15 Thread Tim Ward via osgi-dev
n is invalidated > (i.e. the notification event changes the result set and there is no way to > simply update the cache and we have to re-run the query). I am unclear as to > how this would happen. > > > Thanks > Alain > > > On Thu, Nov 15, 2018 at 5:52 AM Tim Ward &

Re: [osgi-dev] Push Stream reset/flush howto

2018-11-15 Thread Tim Ward via osgi-dev
The correct option will depend on what you want to happen. If you use an endOfStream() or close() operation then you are telling your push stream that the data has reached a “natural end”. This will cause the promise at the end of your stream to resolve normally. This may be the right thing in

Re: [osgi-dev] Circular reference with Prototype components

2018-11-14 Thread Tim Ward via osgi-dev
Hi Alain, I note that you don’t include the setter code, nor the activation code, but at a guess in one of these two places you are calling getService on the ComponentServiceObjects. This will in turn cause the ZKRenderer service instance to be created. If this instance also has an injected

Re: [osgi-dev] Get Bundle for package and version

2018-11-12 Thread Tim Ward via osgi-dev
This all sounds horrible - why do you have a whiteboard that is making reflective calls on remote service objects? If you *really* want to make this work then your best option would be to have the whiteboard implementation listen for remote service discovery events and to create a local bundle

Re: [osgi-dev] Is it possible to use an interface type as the config argument of an activate method ?

2018-11-07 Thread Tim Ward via osgi-dev
The @AttributeDefinition is a build time annotation, not a runtime annotation. There is therefore no visibility of the annotation values for DS to use at runtime. This also avoids your bundle from being coupled to the meta type API just because it uses the annotations. Best Regards, Tim > On

Re: [osgi-dev] Converting CompletableFuture to Promise

2018-10-29 Thread Tim Ward via osgi-dev
Hi Alain, Unsurprisingly this isn’t very hard to do: private PromiseFactory pf; public Promise toPromise(CompletionStage cs) { Deferred deferred = pf.deferred(); cs.whenComplete((r,e) -> { if(e == null) { deferred.resolve(r);

Re: [osgi-dev] Pushstream Example not compileable

2018-10-26 Thread Tim Ward via osgi-dev
You might find this easier to follow: public PromiseprintEvens() { PushStreamProvider psp = new PushStreamProvider(); SimplePushEventSource ses = psp.createSimpleEventSource(Long.class); // Begin delivery when someone is listening

Re: [osgi-dev] Servlet Context in OSGi

2018-10-10 Thread Tim Ward via osgi-dev
servlet & filter > based features with different configurations, for instance N different JSF > applications. > > - Ray > > On Wed, Oct 10, 2018 at 4:04 AM David Leangen via osgi-dev > mailto:osgi-dev@mail.osgi.org>> wrote: > > Ok, fair enough. Thanks for these thou

Re: [osgi-dev] Servlet Context in OSGi

2018-10-10 Thread Tim Ward via osgi-dev
It also provides a way to have separate user sessions (useful), different security configurations (useful), management of static resource mappings (useful), isolation of redirection to named servlets (less useful) and I’m sure a bunch of other things. Tim Sent from my iPhone > On 9 Oct 2018,

[osgi-dev] OSGi enRoute updates

2018-10-09 Thread Tim Ward via osgi-dev
Hi all, Just a quick note to let you know that there have been some minor updates to the OSGi enRoute archetypes and indexes. The archetypes now let you select the target Java version for resolving/running your application. This makes life easier when using Java 9/10/11. The RI index has been

Re: [osgi-dev] Need advice on design pattern using Promises

2018-10-05 Thread Tim Ward via osgi-dev
I will start by saying that the original is a fundamentally bad API design. It exposes side effects of the method (namely modifying the passed in Set) which should not ever be part of a sensible API contract. This method could return a Set (or a Promise>) indicating what it did, but actually

Re: [osgi-dev] configurationPid vs factory identifier

2018-09-28 Thread Tim Ward via osgi-dev
These are absolutely not the same things! You always want this one. In ten years I have used this hundreds of times, I have never used the other setup. > @Component( > configurationPid = “com.my.component”) > @Designate( > factory = true, > ocd = MyConfig.class) > public

Re: [osgi-dev] Integrating promises

2018-09-19 Thread Tim Ward via osgi-dev
It looks like it should be pretty simple… Promise myPromise = getPromise(); myPromise.onSuccess(listener::onResponse) .onFailure(listener::onFailure); Best Regards, Tim > On 19 Sep 2018, at 15:16, Alain Picard via osgi-dev > wrote: > > We are using ElasticSearch which provide an

Re: [osgi-dev] Retrieving service configuration implementation in reference method

2018-09-03 Thread Tim Ward via osgi-dev
This may be your own (potential for missing imports) the bundle that registered the service (potential for missing uses) or some other bundle (good luck finding it)!. Best Regards, Tim > > Thanks > Alain > > > On Mon, Sep 3, 2018 at 6:12 AM Tim Ward <mailto:tim

Re: [osgi-dev] Retrieving service configuration implementation in reference method

2018-09-03 Thread Tim Ward via osgi-dev
rt if I > use a method signature that references the annotation type instead of using a > map. > > Please enlighten me. > > Alain > > > On Fri, Aug 24, 2018 at 5:52 AM Tim Ward <mailto:tim.w...@paremus.com>> wrote: > Right, so in this case it looks

Re: [osgi-dev] Retrieving service configuration implementation in reference method

2018-08-24 Thread Tim Ward via osgi-dev
he 1st line in its property and the reference > target uses the 2nd constant and that is not an issue. > > Alain > > > > Alain Picard > Chief Strategy Officer > Castor Technologies Inc > o:514-360-7208 > m:813-787-3424 > > pic...@castortech.com <mailto:

Re: [osgi-dev] Retrieving service configuration implementation in reference method

2018-08-24 Thread Tim Ward via osgi-dev
tants. Am I stuck to introduce a new separate annotation to > track this configuration? > > Alain > > Alain > > > On Thu, Aug 23, 2018 at 5:24 AM Tim Ward <mailto:tim.w...@paremus.com>> wrote: > The properties visible in the Map (or ServiceReference) are the service

Re: [osgi-dev] Disposing component instances

2018-08-23 Thread Tim Ward via osgi-dev
card <mailto:pic...@castortech.com>> wrote: > Thanks! I actually saw that being called by ComponentServiceObjects while > perusing the code. > > Alain > > > On Wed, Aug 22, 2018 at 11:52 AM Tim Ward <mailto:tim.w...@paremus.com>> wrote: > Registering a prototype

Re: [osgi-dev] Retrieving service configuration implementation in reference method

2018-08-23 Thread Tim Ward via osgi-dev
The properties visible in the Map (or ServiceReference) are the service properties. There is some overlap with configuration (services that are configurable are encouraged to publish configuration properties as service properties) but they are separate, and can be different. The only way that

Re: [osgi-dev] Disposing component instances

2018-08-22 Thread Tim Ward via osgi-dev
; prototype scoped services be used outside of DS? That would be fantastic. > Right now we have a good solution to use singleton services outside of DS but > not for "factory" type services. > > Thanks > Alain > > > On Wed, Aug 22, 2018 at 11:27

Re: [osgi-dev] Disposing component instances

2018-08-22 Thread Tim Ward via osgi-dev
using the best approach or not? > > Thanks > Alain > > > On Wed, Aug 22, 2018 at 3:46 AM Tim Ward via osgi-dev <mailto:osgi-dev@mail.osgi.org>> wrote: > > >> On 21 Aug 2018, at 20:53, Paul F Fraser via osgi-dev > <mailto:osgi-dev@mail.osgi.org>

Re: [osgi-dev] Disposing component instances

2018-08-22 Thread Tim Ward via osgi-dev
> On 21 Aug 2018, at 20:53, Paul F Fraser via osgi-dev > wrote: > > On 22/08/2018 5:40 AM, Paul F Fraser via osgi-dev wrote: >> On 21/08/2018 10:00 PM, Tim Ward via osgi-dev wrote: >>> Have you looked at what the OSC project does? It uses Vaadin, and uses the

Re: [osgi-dev] Disposing component instances

2018-08-21 Thread Tim Ward via osgi-dev
Have you looked at what the OSC project does? It uses Vaadin, and uses the ViewProvider interface to provide view instances. These automatically have a detach listener added on creation so that they get correctly disposed when their parent container is closed. See

Re: [osgi-dev] Docker configuration via environment variables

2018-08-21 Thread Tim Ward via osgi-dev
with at least some reason to couple to the environment. Best Regards, Tim > On 21 Aug 2018, at 09:21, Peter Kriens wrote: > >> On 21 Aug 2018, at 10:11, Tim Ward via osgi-dev > <mailto:osgi-dev@mail.osgi.org>> wrote: >> Just another vote in favour of the Configura

Re: [osgi-dev] Docker configuration via environment variables

2018-08-21 Thread Tim Ward via osgi-dev
Just another vote in favour of the ConfigurationPlugin model - you can use this to post-process configurations wherever they come from (meaning it isn’t tied to the Configurer or Configurator). A configuration plugin that does this sort of work is easy to write, and if using DS could be done

Re: [osgi-dev] Question about consistency and visibility

2018-08-14 Thread Tim Ward via osgi-dev
> DS guarantees that activate is called before the service is registered and > thus available to others. This is not quite correct (although it is correct for immediate components). The service is registered after it becomes satisfied (all of its mandatory service and configuration

Re: [osgi-dev] Eclipse Extension-points and EMF in OSGI

2018-08-09 Thread Tim Ward via osgi-dev
I would expect that Mark Hoffman or Jürgen Albert might have some useful pointers, I’m pretty sure that they’re heavy users of EMF. Best Regards, Tim > On 9 Aug 2018, at 09:20, Alain Picard via osgi-dev > wrote: > > Scott, > > I noticed the split of the o.e.core.runtime and am already

Re: [osgi-dev] Reference not injected to component

2018-08-07 Thread Tim Ward via osgi-dev
According to the documentation KeyCloak can be provided as a Servlet Filter, which would avoid the need for a web.xml/WAB. https://www.keycloak.org/docs/2.5/securing_apps/topics/oidc/java/servlet-filter-adapter.html#_servlet_filter_adapter Best Regards, Tim Sent from my iPhone > On 7 Aug

Re: [osgi-dev] Reference not injected to component

2018-08-07 Thread Tim Ward via osgi-dev
a WAB. Best Regards, Tim > On 7 Aug 2018, at 16:12, Nhut Thai Le wrote: > > Thanks Tim, > > I'll stick with the WAB for now and use the BundleContext to get my service > since I need to config some security filter on the web.xml. > > Thai > > On Tue, Aug 7, 2018

Re: [osgi-dev] Reference not injected to component

2018-08-07 Thread Tim Ward via osgi-dev
o use the whiteboard pattern in the first place but rather > looking for a way to inject my AdminBroker service into my servlet so I turn > my servlet into a component in order to use the reference. > > Thai > > > On Mon, Aug 6, 2018 at 4:44 PM, Tim Ward <mailto:tim.w...@paremus.

Re: [osgi-dev] Reference not injected to component

2018-08-06 Thread Tim Ward via osgi-dev
I don’t see any Http Service whiteboard properties on the Servlet component. How are you registering it with the Servlet container? Tim Sent from my iPhone > On 6 Aug 2018, at 16:22, Nhut Thai Le via osgi-dev > wrote: > > Hello, > > I have a servlet defined like this: > >

Re: [osgi-dev] Extending Services

2018-08-03 Thread Tim Ward via osgi-dev
I agree with Neil that, in general, you don’t want to reference a service of the same type that you advertise without something to prevent you wiring to yourself. Service properties are a good way to do this, but so is type safety. For example does it really make sense for the

Re: [osgi-dev] Life-cycle race condition

2018-08-02 Thread Tim Ward via osgi-dev
te >>>void start() { >>>new Thread(this::longStart).run() >>>} >>> >>> >>>@Deactivate >>>void stop() { >>>closed.set(true); >>>} >>> >>>void longStart() {

Re: [osgi-dev] Life-cycle race condition

2018-08-02 Thread Tim Ward via osgi-dev
cutors.newSingleThreadExecutor(); > } > > void deactivate() > { > executor.shutdownNow(); > } > > Then I only need to test for Thread.interrupted(). I assume this has the same > effect as having the check for “closed". > > Cheers, > =David

Re: [osgi-dev] Life-cycle race condition

2018-08-01 Thread Tim Ward via osgi-dev
Hi David, In addition to interrupting the worker thread (which is a good idea). There are a couple of useful things that you can do using the support from java.util.concurrent. For example, setting a closed state: @Component public class MyClass { private final AtomicBoolean closed = new

Re: [osgi-dev] Setting reference target in component

2018-07-31 Thread Tim Ward via osgi-dev
This sounds like a variation on this question asked a few weeks ago in the osgi-dev list. In summary, there are a couple of ways to achieve what you’re trying to do, and using configuration admin may or may not be the best

Re: [osgi-dev] OSGI enroute bndrun file

2018-07-27 Thread Tim Ward via osgi-dev
). But, there seem to be some commonality between both files > when defining your bundles. For example sl4j is added as transitive > dependences in the pom but may also needed to add to your run requirements if > you using logservice bundle. > > From: Tim Ward [mailto:tim.w...@p

Re: [osgi-dev] OSGI enroute bndrun file

2018-07-27 Thread Tim Ward via osgi-dev
Note that BJ is referencing one possible way to use the bnd-resolver-maven-plugin and bnd-export-maven-plugin. The enRoute projects set up their bndrun files to use standalone indexes generated by the bnd-indexer-maven-plugin. These indexes are generated using the dependencies from the pom

Re: [osgi-dev] Possible issue

2018-07-26 Thread Tim Ward via osgi-dev
something else and not using the project archetype to create the quickstart example. Best Regards, Tim Ward > On 26 Jul 2018, at 13:25, Julio Calvo via osgi-dev > wrote: > > Dear friends from OSG enRoute, > > In https://enroute.osgi.org/tutorial/020-tutorial_qs.html > <

Re: [osgi-dev] Dealing with bouncing

2018-07-23 Thread Tim Ward via osgi-dev
An alternative way to look at this is simply that your DS component needs to be sufficiently thread-safe to deal with the consequences of its own internal threading model. In this case: > What would be a good (and simple) strategy to handle this type of > long-running configuration, where the

Re: [osgi-dev] Service binding order

2018-07-18 Thread Tim Ward via osgi-dev
Promises are great, and should be used much more often! Note that if you want to have more control of the threading then you can instantiate a PromiseFactory with the executor that should be used to run callbacks. In this case, for example, you may wish to use an Immediate executor (available

Re: [osgi-dev] Tool/API to analyze component dependencies

2018-07-17 Thread Tim Ward via osgi-dev
Hi Alain It’s not possible to model this accurately at build time because services may come and go at runtime, and their service properties may change with configuration. Added to this it is also possible to change the target filters on references which changes/restricts what they may bind to.

  1   2   3   >