Re: [osgi-dev] Intermittent failure to getService

2020-03-11 Thread Alain Picard via osgi-dev
hat can create ResourceSets. > This solves many problems using EMF in pure OSGi. There is also a > Thread-safe ResourceSet implementation regarding the usage of Resources > > https://gitlab.com/gecko.io/geckoEMF > > Mark > Am 11.03.20 um 13:26 schrieb Alain Picard via osgi-dev: &

Re: [osgi-dev] Intermittent failure to getService

2020-03-11 Thread Alain Picard via osgi-dev
log > but those messages were discarded. > > Kind regards, > > Peter Kriens > > > On 2 Mar 2020, at 12:03, Alain Picard via osgi-dev > wrote: > > Question: The method getDiagnosticForEObject can be called by different > threads. Can this be the source of the issue?

Re: [osgi-dev] Intermittent failure to getService

2020-03-02 Thread Alain Picard via osgi-dev
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 com

Re: [osgi-dev] Intermittent failure to getService

2020-03-02 Thread Alain Picard via osgi-dev
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 instance > that it shouldn’t. > > Best Regards, > > Tim > > On 29 Feb 2020, at 13:29, Alain Picard via osgi-dev < > osgi-dev@mail.osgi.org> wro

[osgi-dev] Intermittent failure to getService

2020-02-29 Thread Alain Picard via osgi-dev
Hi I am having a very intermittent issue with getService on a prototype component. This is called hundreds of times and I put a breakpoint a few weeks ago and have now gotten the error. I have this class: @Component(scope=ServiceScope.PROTOTYPE, property=

Re: [osgi-dev] Deactivating a component manually

2019-09-23 Thread Alain Picard via osgi-dev
is will also run any necessary > 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 < > os

Re: [osgi-dev] Deactivating a component manually

2019-09-22 Thread Alain Picard via osgi-dev
2019 at 5:22 PM Raymond Auge via osgi-dev < osgi-dev@mail.osgi.org> wrote: > I'm wondering if you might be suffering from this Apache Felix SCR bug: > https://issues.apache.org/jira/plugins/servlet/mobile#issue/FELIX-5974 > > - Ray > > On Sat, Sep 21, 2019, 11:53 Alain

Re: [osgi-dev] Deactivating a component manually

2019-09-21 Thread Alain Picard via osgi-dev
d be a factory for instances > of `ZkViewModel, BaItem, MasterDetailTopMenuListener` instead of being one > itself. > > - Ray > > On Sat, Sep 21, 2019 at 5:05 AM Alain Picard via osgi-dev < > osgi-dev@mail.osgi.org> wrote: > >> I'm facing a case where the UI fr

[osgi-dev] Deactivating a component manually

2019-09-21 Thread Alain Picard via osgi-dev
I'm facing a case where the UI framework is sending a destroy request when a page is destroyed and I want to use that to also deactivate the component, so that its "host" can then automatically get deactivated and so on so forth as needed. As shown below I tried to use disableComponent. That

Re: [osgi-dev] Shutdown order

2019-08-12 Thread Alain Picard via osgi-dev
Member, IBM // office: +1 386 848 1781 >> OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788 >> hargr...@us.ibm.com >> >> >> >> - Original message - >> From: Alain Picard via osgi-dev >> Sent by: osgi-dev-boun...@mail.osgi.

[osgi-dev] Shutdown order

2019-08-10 Thread Alain Picard via osgi-dev
Hi, I'm getting some exceptions when invoking shutdown. Some of those come from Eclipse plugins that expect the Platform to exist (from o.e.core.runtime). I was reading section 9.3.1 and expected that if o.e.core.runtime start level would be lower then it would be stopped later in the process as

[osgi-dev] Strange Unresolved component issue

2019-05-14 Thread Alain Picard via osgi-dev
I've just had a weird case of unresolved component where the unsatisfied dependency is actually satisfied. { "check": "Services Check", "status": "YELLOW", "details": "Component com.castortech.iris.models.query.cached.impl.QueryCacheService missing config on pid [IQueryCacheService_PID]

[osgi-dev] Issue starting Infinispan with updated Eclipse/Felix

2019-04-06 Thread Alain Picard via osgi-dev
We are working on deploying our app developed as an Eclipse PDE app with Oxygen (SCR 1.3 and Felix 2.0.10) in Karaf and finding that it runs newer versions. So we have started to move our target platform to current versions based on Eclipse 2019.3 with SCR 1.4 and Felix 2.1.14. We are running

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

2019-02-27 Thread Alain Picard via osgi-dev
Anyone has any insight here? Alain On Tue, Feb 5, 2019 at 1:28 PM Alain Picard wrote: > Hi, > > We have cases where we need to process events with different priorities, > and such priority can change after the initial event having been queued, > but not yet processed. > > For example, when

Re: [osgi-dev] Programmatically creating DS components

2019-02-12 Thread Alain Picard via osgi-dev
As a ZK user I"m gonna start to be jealous ;) Alain On Tue, Feb 12, 2019 at 4:21 PM Thomas Driessen via osgi-dev < osgi-dev@mail.osgi.org> wrote: > Hi Todor, > > thank you so much for your detailed explanation and the additional links. > That helped me a lot to simplify my implementation for

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

2019-02-06 Thread Alain Picard via osgi-dev
eferred(); >> deferred = currentDeferred; >> list = currentWindow; >> } >> currentWindow.add(t); >> if(currentWindow.size() == maxSize) { >> hitMaxSize = true; >> deferred = currentDeferred; >> currentDeferred = null; >> list = curren

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

2019-02-05 Thread Alain Picard via osgi-dev
axSize) { > // We must resolve this way round to avoid racing > // the timeout and ending up with empty lists in > // all the promises > deferred.resolve(Collections.emptyList()); > return promiseFactory.resolved(list); > } else { > final Collection finalList = list; >

[osgi-dev] Removing queued events in Push Steams

2019-02-05 Thread Alain Picard via osgi-dev
Hi, We have cases where we need to process events with different priorities, and such priority can change after the initial event having been queued, but not yet processed. For example, when there is an event that some content has changed, we subscribe to this event and based on some conditions

Re: [osgi-dev] SCR - Could not obtain lock

2019-02-04 Thread Alain Picard via osgi-dev
// office: +1 386 848 1781 > OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788 > hargr...@us.ibm.com > > > > - Original message ----- > From: Alain Picard via osgi-dev > Sent by: osgi-dev-boun...@mail.osgi.org > To: OSGi Developer Mail List >

[osgi-dev] SCR - Could not obtain lock

2019-02-02 Thread Alain Picard via osgi-dev
I regularly get this exception when starting our app, w/o having ever seen any impact. !ENTRY org.eclipse.equinox.cm 4 0 2019-02-02 14:31:46.715 !MESSAGE Could not obtain lock !STACK 0 java.lang.IllegalStateException: Could not obtain lock at

[osgi-dev] Prototype scope components and Fluent builder

2019-01-29 Thread Alain Picard via osgi-dev
I am curious if there is a prescribed or suggested approach to use fluent builder in conjunction with Fluent builders? Cheers, Alain ___ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev

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

2019-01-07 Thread Alain Picard via osgi-dev
.withPushbackPolicy( q -> { >> return Math.max(0, q.size() - 650); >> }) >> .withQueuePolicy(QueuePolicyOption.BLOCK) >> .withBuffer(new A

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

2019-01-07 Thread Alain Picard via osgi-dev
groups to expect. It essentially returns an array of > pushstreams correlating to each predicate you give it. For everything else, > you would need to do the grouping for every batch you get with the usual > stream methods. > > Regards, > > Jürgen. > > Am 05/01/2019 um 19:47 s

[osgi-dev] Push Streams Event grouping and batching

2019-01-05 Thread Alain Picard via osgi-dev
Hi, We are using push streams to process post-commit events. Those events originate from different data sources. At the moment we are processing those individually, but the overhead of having a transaction for each is too much. Quite often those events come in bursts following an upstream

Re: [osgi-dev] Split-package for 3rd party jars/bundle

2019-01-02 Thread Alain Picard via osgi-dev
citizen. > > I happen to have a friend who recently works at Elasticsearch that has a > lot of OSGi experience that may be willing to help. > > Thoughts? > > - Ray > > On Wed, Jan 2, 2019, 06:38 Alain Picard via osgi-dev < > osgi-dev@mail.osgi.org wrote: >

Re: [osgi-dev] Split-package for 3rd party jars/bundle

2019-01-02 Thread Alain Picard via osgi-dev
re-bundle, it worked well out of the > box with package ex- and imports. Using a mega-lucene bundle with all > dependencies, was our first approach ad worked well too. But don't forget, > to put the Java service files as well in the bundles, because Lucene uses > the serv

[osgi-dev] Split-package for 3rd party jars/bundle

2018-12-31 Thread Alain Picard via osgi-dev
I am trying to convert a bundle of ours that now simply imports jars for Elasticsearch and make it a p2 site with p2-maven-plugin that usesthe maven-bundle-plugin/bnd to wrap non-OSGi jars. I ended up with resolution errors since ES has about 7-8 split packages, most notably

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

2018-12-03 Thread Alain Picard via osgi-dev
ement the Http Whiteboard, and is wired to all > the packages. I would also note that Pax Web puts the osgi.service > capability for the HttpServiceRuntime service on the > org.ops4j.pax.web.pax-web-runtime bundle, even though this bundle is not > the one that provides the service! This

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

2018-12-02 Thread Alain Picard via osgi-dev
Ok, After another 10 hours of frustration, I finally solved the issue. By debugging the Aries Whiteboard activator, it is looking for a service matching; "(&(objectClass=org.osgi.service.http.runtime.HttpServiceRuntime)(osgi.http.endpoint=*))". Happens that I am having resolver chain issues with

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

2018-12-01 Thread Alain Picard via osgi-dev
Banging my head trying to figure out why my jaxrs is not starting properly. One of my colleague is running what should be the same environment and it works in his, but he has seen issues at time. In my log I see: 17:28:09.870 [Start Level: Equinox Container: 8adb54b2-c97b-4651-9844-16e93c4d8f80]

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

2018-11-30 Thread Alain Picard via osgi-dev
listener *before* the old one > returns its back pressure to the SimplePushEventSource. > > Note that this whole reasoning goes out of the window if you add another > buffer between the SimplePushEventSource and your error handler. > > I hope this helps, > > Tim > > > O

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

2018-11-28 Thread Alain Picard via osgi-dev
We ended up with an exception thrown in the forEach of our stream, which is a stream to manage notifications and that should be always on. Nothing got reported, but the stream stopped working. Finally testing isConnected reported false and then found the source of the exception. Now digging, we

Re: [osgi-dev] Disposing component instances

2018-11-25 Thread Alain Picard via osgi-dev
have the latest. > > - Ray > > On Sun, Nov 25, 2018, 08:21 Alain Picard via osgi-dev < > osgi-dev@mail.osgi.org wrote: > >> On Sun, Nov 25, 2018 at 7:50 AM Tim Ward wrote: >> >>> If your DS component ‘X’ is injected with a Component Service Objects >>&g

Re: [osgi-dev] Disposing component instances

2018-11-25 Thread Alain Picard via osgi-dev
On Sun, Nov 25, 2018 at 7:50 AM Tim Ward wrote: > If your DS component ‘X’ is injected with a Component Service Objects > which it uses to get instances ‘A’, ‘B’ and ‘C' of a referenced service > then those service instances will be released when either: > > >- The component ‘X’ releases

Re: [osgi-dev] Disposing component instances

2018-11-25 Thread Alain Picard via osgi-dev
Tim, Circling back on this. Re-reading section 112.3.6 it says "This means that if a component instance used a Component Service Objects object to obtain service objects, SCR must track those service objects so that when the service becomes unbound, SCR can unget any unreleased service objects".

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

2018-11-23 Thread Alain Picard via osgi-dev
reak the cycle for this to work. Either you need to change > the composition of your services, or you need to use Dynamic/Optional for > one of the references. > > I hope this helps, > > Tim > > > > On 23 Nov 2018, at 07:52, Alain Picard via osgi-dev < > osgi-dev@mail.osgi.org&g

[osgi-dev] Circular references with Factory component

2018-11-22 Thread Alain Picard via osgi-dev
Been running into an issue with circular references dealing with ComponentFactory and I'm a bit confused. I have: @Component class A implements X { @Reference(target = CoreDeleteEObjects.CONFIG_TARGET) private ComponentFactory coreDeleteFactory; } and the factory component matching

Re: [osgi-dev] Usinge Cache in Karaf

2018-11-22 Thread Alain Picard via osgi-dev
If it might help, we are in the process of using Infinispan at our end. It is OSGi compliant (almost) and for Karaf users (not us yet), it comes with features for easy deployment. Alain On Thu, Nov 22, 2018 at 5:02 AM Mohamed AFIF via osgi-dev < osgi-dev@mail.osgi.org> wrote: > Hello

[osgi-dev] Push Stream reset/flush howto

2018-11-15 Thread Alain Picard via osgi-dev
We are using a push stream to process data change notifications against a cached result set. Some of those notifications can result in directly applying updates to the result set, while other will force us to invalidate the cached result set. When we do a requery, we want to make sure that any

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

2018-11-14 Thread Alain Picard via osgi-dev
be optionally >satisfied later >- Avoid getting an instance from the ComponentServiceObjects until >*after* your activate is called. > > > I hope this makes sense, > > Tim > > > On 14 Nov 2018, at 13:59, Alain Picard via osgi-dev < > osgi-dev

[osgi-dev] Circular reference with Prototype components

2018-11-14 Thread Alain Picard via osgi-dev
Facing an issue here. I have a component registering service as such: @Reference( cardinality=ReferenceCardinality.MULTIPLE, policy=ReferencePolicy.DYNAMIC, scope=PROTOTYPE_REQUIRED, target=ZKRenderer.CONFIG_TARGET ) private void

Re: [osgi-dev] Service component resolution time

2018-11-03 Thread Alain Picard via osgi-dev
re's very visible and useful diagnostic details provided >> when they occur. >> >> Sincerely, >> - Ray >> >> On Sat, Nov 3, 2018, 11:30 Alain Picard via osgi-dev < >> osgi-dev@mail.osgi.org wrote: >> >>> A small note if anyone happens to

Re: [osgi-dev] Service component resolution time

2018-11-03 Thread Alain Picard via osgi-dev
d it is VERY slow. Most apps don't need this >> functionality. By removing it I cut the start time of one application from >> nearly 2 minutes (not exaggerating) down to 15 seconds (still not great, >> more work to do). >> >> Regards, >> Neil >> >> On Mon,

Re: [osgi-dev] Converting CompletableFuture to Promise

2018-10-29 Thread Alain Picard via osgi-dev
(the API for consuming > failures is so bad that it’s not worth trying to optimise the already > failed case). > > Best Regards, > > Tim > > On 28 Oct 2018, at 15:41, Alain Picard via osgi-dev < > osgi-dev@mail.osgi.org> wrote: > > We are now us

[osgi-dev] Converting CompletableFuture to Promise

2018-10-28 Thread Alain Picard via osgi-dev
We are now using Promises all over the place, but we are finding ourselves using a library that uses CompletableFuture and want our service based on that library to convert those futures into promises. Has anyone done this before? While I can surely find a way of doing it, I would like to get

[osgi-dev] User instance of Background threads

2018-10-24 Thread Alain Picard via osgi-dev
I have repurposed the Background thread class described by Peter here: https://v2archive.enroute.osgi.org/appnotes/concurrency.html, and added returning Promise to make it more usable. I'm now looking for an implementation that provides the same confinement, but that can be scoped by users in the

Re: [osgi-dev] Service component resolution time

2018-10-23 Thread Alain Picard via osgi-dev
gt; plus the dropins folder, and it is VERY slow. Most apps don't need this > functionality. By removing it I cut the start time of one application from > nearly 2 minutes (not exaggerating) down to 15 seconds (still not great, > more work to do). > > Regards, > Neil > > On

Re: [osgi-dev] Service component resolution time

2018-10-22 Thread Alain Picard via osgi-dev
eb: www.exploitsys.com > > > > > On Mon, Oct 22, 2018 at 6:43 PM Alain Picard via osgi-dev < > osgi-dev@mail.osgi.org> wrote: > >> We are experiencing some long startup time in our reafactored application >> that is now heavily using SCR. >> >> We

[osgi-dev] Service component resolution time

2018-10-22 Thread Alain Picard via osgi-dev
We are experiencing some long startup time in our reafactored application that is now heavily using SCR. We have 125 projects with over 1200 Service Components and it takes about 2 minutes to get any output in the console. Some quick analysis shows that its running the Felix ResolverImpl with

Re: [osgi-dev] osgi integration with Lucene or ElasticSearch

2018-10-03 Thread Alain Picard via osgi-dev
Ali, I can't make recommendation about which one to use, but I can say that we're in the midst of converting a very basic text search based on Lucene to ElasticSearch with DS. We have adapted the ES async API to work with Promises instead of CompletableFuture and are now putting together a

[osgi-dev] Event Handler and Push Streams

2018-10-01 Thread Alain Picard via osgi-dev
We are using a number of Event Handlers to handle post-commit updates to notifications, metrics, search, etc. A number of those process can be somewhat lengthy, such as email or SMS notifications. For search, we have build our ElasticSearch to use the async mode with Promises. As is documented

Re: [osgi-dev] Integrating promises

2018-09-20 Thread Alain Picard via osgi-dev
ecuted by our PromiseFactory. I guess that's where >> my limited knowledge is hitting a wall. >> >> Cheers, >> Alain >> >> >> On Wed, Sep 19, 2018 at 11:13 AM Tim Ward wrote: >> >>> It looks like it should be pretty simple… >>> >>> Promis

Re: [osgi-dev] Integrating promises

2018-09-19 Thread Alain Picard via osgi-dev
>> >> myPromise.onSuccess(listener::onResponse) >> .onFailure(listener::onFailure); >> >> >> Best Regards, >> >> Tim >> >> On 19 Sep 2018, at 15:16, Alain Picard via osgi-dev < >> osgi-dev@mail.osgi.org> wrote: >> >

Re: [osgi-dev] Integrating promises

2018-09-19 Thread Alain Picard via osgi-dev
uccess(listener::onResponse) > .onFailure(listener::onFailure); > > > Best Regards, > > Tim > > On 19 Sep 2018, at 15:16, Alain Picard via osgi-dev < > osgi-dev@mail.osgi.org> wrote: > > We are using ElasticSearch which provide an async mode that is heavily > bas

[osgi-dev] Integrating promises

2018-09-19 Thread Alain Picard via osgi-dev
We are using ElasticSearch which provide an async mode that is heavily based on promises, They even provide BiConsumer to integrate with CompletableFuture. The interface is ActionListener (

Re: [osgi-dev] Getting bundle symbolic name in Component property annotation

2018-09-06 Thread Alain Picard via osgi-dev
undleContext which you can have injected. > > > -- > > BJ Hargrave > Senior Technical Staff Member, IBM // office: +1 386 848 1781 > OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788 > hargr...@us.ibm.com > > > > - Original message - > Fro

[osgi-dev] Getting bundle symbolic name in Component property annotation

2018-09-06 Thread Alain Picard via osgi-dev
Is there a pre-defined constant or character like the $ for PID that can be used to compose a component property and inject the bundle symbolic name? Thanks Alain ___ OSGi Developer Mail List osgi-dev@mail.osgi.org

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

2018-09-03 Thread Alain Picard via osgi-dev
> no error or warning and blow up later on. And since annotations only >>>> support compile time constants, you can't do a MyClass.class.getName() to >>>> even get a String. My idea was since the implementation class is part of >>>> the component description, if I co

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

2018-09-03 Thread Alain Picard via osgi-dev
t;> >>> Alain >>> >>> Alain >>> >>> >>> On Thu, Aug 23, 2018 at 5:24 AM Tim Ward wrote: >>> >>>> The properties visible in the Map (or ServiceReference) are the service >>>> properties. There is some overlap with config

Re: [osgi-dev] Double config

2018-08-26 Thread Alain Picard via osgi-dev
David, In my own journey I have had (and still does have) my share of moments where I'm not sure what's happening. We are still on Equinox/PDE (can't wait to switch to BND but that will have to wait a bit), and there I have used the tracing to get insight into the service registry events. With

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

2018-08-25 Thread Alain Picard via osgi-dev
rent. >>> >>> The only way that something becomes a service property is if it is >>> deliberately registered as such or, for a few specific properties such as >>> service.id and service.scope, added automatically by the framework. >>> >>>

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

2018-08-24 Thread Alain Picard via osgi-dev
be different. >>> >>> The only way that something becomes a service property is if it is >>> deliberately registered as such or, for a few specific properties such as >>> service.id and service.scope, added automatically by the framework. >>> >>&

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

2018-08-24 Thread Alain Picard via osgi-dev
e added as a service >> property if done so deliberately, and this is typically discouraged (it >> leaks internal implementation detail and forces your internal naming to >> become API). If you *really* care about the details of a service (and in >> general you shouldn’t) then you

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

2018-08-24 Thread Alain Picard via osgi-dev
r > implementation details of the service. > > Best Regards, > > Tim > > > On 22 Aug 2018, at 16:53, Alain Picard via osgi-dev < > osgi-dev@mail.osgi.org> wrote: > > > > In a reference method, i can get the property configuration of the > service alon

Re: [osgi-dev] Disposing component instances

2018-08-23 Thread Alain Picard via osgi-dev
On Thu, Aug 23, 2018 at 9:20 AM Tim Ward wrote: > If you’re using Declarative Services to consume these other dynamic > references then there is no need to worry. > That's what I'm doing. If you’re trying to programmatically write a prototype scoped service that > has service dependencies then

Re: [osgi-dev] Disposing component instances

2018-08-23 Thread Alain Picard via osgi-dev
Just a small note, I should have stated that my worry is about the unget timing. I obviously have a reference to the object and this won't disappear by itself, but if that service has other dynamic references that go away and I keep using the service, I might be in trouble. But I guess the

Re: [osgi-dev] Disposing component instances

2018-08-23 Thread Alain Picard via osgi-dev
Tim, Based on your referenced javadoc, some more googling, I used and adapted from our own current tracker and supplier to create some Prototype versions. Tests are showing correct results, but this is not directly using the PrototypeServiceFactory, so I would appreciate a very quick confirmation

Re: [osgi-dev] Disposing component instances

2018-08-22 Thread Alain Picard via osgi-dev
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 wrote: > Registering a prototype service is almost as easy as registering a > singleton service. Instead of registering a single object you register an

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

2018-08-22 Thread Alain Picard via osgi-dev
In a reference method, i can get the property configuration of the service along with the ComponentFactory and some other optional arguments. Can any of those give me a way to retrieve the implementation from the configuration (i.e. the class name of the implementation) ? Thanks Alain

Re: [osgi-dev] Disposing component instances

2018-08-22 Thread Alain Picard via osgi-dev
Tim, This helps quite a bit and clarifies a few points for me. As someone who is migrating from a pre-DS environment and dealing with lots of legacy, how can prototype scoped services be used outside of DS? That would be fantastic. Right now we have a good solution to use singleton services

Re: [osgi-dev] Disposing component instances

2018-08-22 Thread Alain Picard via osgi-dev
On the 2nd part of the question regarding ComponentFactory/ComponentInstance vs Prototype/ComponentServiceObjects. I get the feeling that CSO should be favored, but I saw an old post from Scott Lewis about configuration and that is a bit close to some of my use cases. I have cases where I have a

Re: [osgi-dev] Disposing component instances

2018-08-21 Thread Alain Picard via osgi-dev
troller/osc-core/blob/4441c96fe49e4b11ce6f380a440367912190a246/osc-ui/src/main/java/org/osc/core/broker/view/OSCViewProvider.java#L60-L67 > for > details. > > Tim > > On 21 Aug 2018, at 09:56, Alain Picard via osgi-dev < > osgi-dev@mail.osgi.org> wrote: > > When using factory

[osgi-dev] Disposing component instances

2018-08-21 Thread Alain Picard via osgi-dev
When using factory components, you get a ComponentInstance and you should dispose once done. For services with prototype scope, you get ComponentServiceObjects from which you need to ungetService after use. I have some cases where I am creating some UI Widgets and where I don't have a well

Re: [osgi-dev] Help validating pattern

2018-08-13 Thread Alain Picard via osgi-dev
David, I have experimented with factory configuration and used it in one case. But what I have not done is used the Extender Pattern with the BundleTracker to initialize services or here configurations. That is a very good point that I wasn't aware of. I can see how this could probably replace

Re: [osgi-dev] Help validating pattern

2018-08-12 Thread Alain Picard via osgi-dev
t;>>> Maybe you know this already, but the “usual” practice is to expose an >>>> interface in your API (and export the containing package), and to keep the >>>> implementation private. >>>> >>> Yes, absolutely, and that's why I'm asking. I have a

Re: [osgi-dev] Help validating pattern

2018-08-12 Thread Alain Picard via osgi-dev
(i.e. for the same table) and a few cases where >> they are invoked generically. Here all of those are in a single bundle so >> this is more like a "private" API and the use of a class is not a real >> problem. But I didn't feel like using @Reference(target

Re: [osgi-dev] Help validating pattern

2018-08-12 Thread Alain Picard via osgi-dev
; >> Also: >> >> >Collection> servRefs = >> bcontext.getServiceReferences(target, props.get("filter")); //filter to be >> like: "(target >> > servRef = servRefs.isEmpty() ? null : >> servRefs.iterator().next();

Re: [osgi-dev] Help validating pattern

2018-08-11 Thread Alain Picard via osgi-dev
; > If you can explain a little more what you are trying to do I think that > would be helpful. > > > Cheers, > =David > > > > On Aug 12, 2018, at 1:27, Alain Picard via osgi-dev < > osgi-dev@mail.osgi.org> wrote: > > > > Looking for confirmation or

[osgi-dev] Help validating pattern

2018-08-11 Thread Alain Picard via osgi-dev
Looking for confirmation or insight in how best to specify components and references, so that the same component can be invoked directly or more generically through its interface. Let's say that I have some components, 1 per table to do some export function: @Component( property=

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

2018-08-10 Thread Alain Picard via osgi-dev
pecial code generator like CDO. There are a few other Document based DB > (like couchDB) extensions available as well. > > Jürgen. > > Am 09/08/2018 um 17:27 schrieb Alain Picard via osgi-dev: > > Mark, > > We have started to create our own extension of o.e.core.ru

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

2018-08-09 Thread Alain Picard via osgi-dev
nk we meet > Eike Stepper, the CDO lead, in October at the ECE2018 and discuss this > topic with him. > > Mark > > Am 09.08.2018 um 17:02 schrieb Alain Picard via osgi-dev: > > Jurgen, > > This looks fantastic. Just out of curiosity, have you used it with CDO ? > > Alai

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

2018-08-09 Thread Alain Picard via osgi-dev
n 9 Aug 2018, at 09:20, Alain Picard via osgi-dev < >> osgi-dev@mail.osgi.org> wrote: >> >> Scott, >> >> I noticed the split of the o.e.core.runtime and am already using the >> o.e.equinox.common + supplement and running some stuff like that with >> Felix. But that pa

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

2018-08-09 Thread Alain Picard via osgi-dev
@mail.osgi.org> > *Cc: *Scott Lewis > > 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

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

2018-08-09 Thread Alain Picard via osgi-dev
ug 9, 2018 at 12:18 AM Scott Lewis via osgi-dev < osgi-dev@mail.osgi.org> wrote: > IOn 8/8/2018 7:43 AM, Alain Picard via osgi-dev wrote: > > Working through our move from RCP to a generic OSGI solution, and I am > > stuck with a couple of questions. > > > > There was

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

2018-08-08 Thread Alain Picard via osgi-dev
Working through our move from RCP to a generic OSGI solution, and I am stuck with a couple of questions. There was an issue a while ago for EMF that resulted in a generation setting to support generic OSGI frameworks and not only Eclipse/Equinox. But the resulting bundles still have plugin.xml

Re: [osgi-dev] Enabling debug of SCR with Equinox

2018-08-07 Thread Alain Picard via osgi-dev
FIED >> {org.osgi.service.component.runtime.ServiceComponentRuntime}={service.changecount=19, >> service.id=39, service.bundleid=20, >> service.scope=singleton}|E.S.org.apache.felix.scr||E.S.o.a.f.scr@ >> ?[Timer-1] >> >> >> > >> >> rega

[osgi-dev] Enabling debug of SCR with Equinox

2018-08-06 Thread Alain Picard via osgi-dev
I want to enable debug logging / tracing of SCR when running with Equinox. I tried to use config admin to configure "org.apache.felix.scr.ScrService" but to no avail. Not sure if even if Eclipse now uses felix scr if that is the way to go. Or it is the whole log redirection thing (

Re: [osgi-dev] Extending Services

2018-08-03 Thread Alain Picard via osgi-dev
o, I'm not sure. > > A safe way to protect against this regardless is to use properties and > filters. For example the AppSessionServiceImpl can provide the > SessionService with a property such as app=true. Then it would bind to > SessionService with a target filter of (!(app=*)

[osgi-dev] Extending Services

2018-08-03 Thread Alain Picard via osgi-dev
Facing an issue and looking for the right pattern to apply where I have a service interface that is extended and at run time I want to always run the most appropriate one. Each extension provides additional method to the API. As an example (posted here:

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

2018-08-01 Thread Alain Picard via osgi-dev
want to request an instance which you directly control the > lifecycle of. Hopefully the thread will give you the answer that you’re > looking for. > > Best Regards, > > Tim > > On 31 Jul 2018, at 13:24, Alain Picard via osgi-dev < > osgi-dev@mail.osgi.org> wrote: > &g

[osgi-dev] Setting reference target in component

2018-07-31 Thread Alain Picard via osgi-dev
I need to configure some Component to be session scoped. I have followed the article from Dirk at http://blog.vogella.com/2017/02/24/control-osgi-ds-component-instances-via-configuration-admin/ which matches what I want. But in my case the Component that configures the service is also the has a

Re: [osgi-dev] Functions as configuration

2018-07-28 Thread Alain Picard via osgi-dev
BJ, When I first saw your comment a couple of weeks ago about being able to pass any object, it sounded interesting and I have just used it in some tests and will be leveraging this approach. Thanks for the tip. Alain On Fri, Jul 13, 2018 at 4:04 PM BJ Hargrave via osgi-dev <

[osgi-dev] Service Composition

2018-07-11 Thread Alain Picard via osgi-dev
Converting existing code to DS in an EMF environment where we have models starting with core and being extended at different levels by different applications, and those providing various type of "features". Trying to determine the best approach that allows for specialization, inheritance of

Re: [osgi-dev] Service ranking usage

2018-07-11 Thread Alain Picard via osgi-dev
s://osgi.org/javadoc/osgi.cmpn/7.0.0/org/osgi/service/component/propertytypes/ServiceRanking.html> > . > > This will get rid of the ugly property section in your component > annotation :) > > Best Regards, > > Tim > > On 10 Jul 2018, at 22:35, Alain Picard via osgi-d

Re: [osgi-dev] Service ranking usage

2018-07-10 Thread Alain Picard via osgi-dev
wer ranked service is published by a bundle with a lower ID, >>> it is probably published first. So that’s the one you will get. >>> >>> If you uncomment the dynamic+greedy setting in Example I expect you will >>> see the component briefly bind to the lower ranked

Re: [osgi-dev] Service ranking usage

2018-07-10 Thread Alain Picard via osgi-dev
definition of greedy. > > Neil > > On Tue, 10 Jul 2018 at 22:05, Alain Picard via osgi-dev < > osgi-dev@mail.osgi.org> wrote: > >> As part of DS enabling a lot of our code, I am testing how to compose >> services after finding out that reference annotations are

[osgi-dev] Service ranking usage

2018-07-10 Thread Alain Picard via osgi-dev
As part of DS enabling a lot of our code, I am testing how to compose services after finding out that reference annotations are not inherited. But I am facing a much more basic issue dealing with service ranking. Made a trivial example of an interface with one method and 2 implementation and

Re: [osgi-dev] Best practice for refactoring to DS

2018-06-29 Thread Alain Picard via osgi-dev
ype Collection then I will > not see one that is advertised as a List, even though a List can be > transparently widened to a Collection. You should therefore advertise as a > List *and* a Collection. Note that this does not mean that you should > advertise that you are a LinkedList bec

Re: [osgi-dev] Best practice for refactoring to DS

2018-06-29 Thread Alain Picard via osgi-dev
vice" components extend another component to either specialize the service or provide additional inherited functionalities. > > Best Regards, > > Tim > > > On 28 Jun 2018, at 17:47, Alain Picard via osgi-dev < > osgi-dev@mail.osgi.org> wrote: > > We have a

[osgi-dev] Best practice for refactoring to DS

2018-06-28 Thread Alain Picard via osgi-dev
We have a pretty large codebase from an Eclipse PDE RCP EMF application which we are moving to a web/servlet type application. As part of this effort we are fully moving to run in an OSGI framework and leveraging as much as possible native OSGI approaches like DS. Many of our struggles are surely

  1   2   >