Re: [equinox-dev] Bug 566085 - javax.annotation package-uses problems with Java 8

2020-08-28 Thread Neil Bartlett
the situation, where the Import-Package is ignored by the framework: > > > https://docs.osgi.org/specification/osgi.core/7.0.0/framework.module.html#framework.module-import.export.same.package > > Or am I missing something here? > > Regards, > > Mark > Am 26.08.20 um 16:44 schrieb

Re: [equinox-dev] Bug 566085 - javax.annotation package-uses problems with Java 8

2020-08-26 Thread Neil Bartlett
I'm not sure that class loading order is even relevant here. The stack trace linked by Brian was an OSGi resolution error... resolution happens before a Bundle ClassLoader is constructed and therefore before the bundle attempts to load any class name. Neil On Sat, 22 Aug 2020 at 09:50, Mark Hoffm

Re: [equinox-dev] JAXB with Java 11 in OSGi

2020-07-28 Thread Neil Bartlett
Hi Lars, Dmytro is correct, the jaxb-api and javax.activation bundles are required to provide the JAXB API on Java 11. You will also need an implementation of the API... the org.eclipse.persistence.core and org.eclipse.persistence.moxy bundles from EclipseLink provide this. I have had JAXB workin

Re: [equinox-dev] Should OSGi bundles always export all packages?

2019-12-02 Thread Neil Bartlett
The OSGi Specifications do not make any recommendation on this question – that is not their function. But as I have commented in the bug, why would we have to enumerate all exported packages in the Export-Package header if exporting everything was intended to be the default? On Mon, 2 Dec 2019 at

Re: [equinox-dev] In which thread are OSGI services started

2019-09-04 Thread Neil Bartlett
Short answer is that you should not make any assumption about the thread that your component is activated. Long answer is that for an immediate component, it is likely to be activated in whichever thread called Bundle.start(). For a lazy service component, it is likely to be activated in whichever

Re: [equinox-dev] Parallel bundle activation?

2018-10-26 Thread Neil Bartlett
Hi Lars, Activation of a bundle happens when the launcher calls Bundle.start(). You can certainly write a launcher that calls start() on many bundles concurrently from multiple threads. Most existing launchers, including AFAICT the default Eclipse/Equinox launcher, call start() in series. Neil

Re: [equinox-dev] Accessing files of a feature project during runtime

2018-04-20 Thread Neil Bartlett
On Fri, Apr 20, 2018 at 10:43 AM, Simon Scholz wrote: > Hi guys, > > is there a way to access files from features? > > With bundles it works pretty straight forward: > > Bundle bundle = Platform.getBundle("myBundlesSymbolicName"); > It's not good to do this... what if you have multiple versions

Re: [equinox-dev] Migrating Eclipse earlyStartup extenstions to OSGI ds services

2018-04-19 Thread Neil Bartlett
It looks like the system bundle publishes a service of type org.eclipse.osgi.service.environment.EnvironmentInfo. Bind to this in your DS component, and then you can get the command line args along with various other goodies. I expect this will be available in any Eclipse application. I should poi

Re: [equinox-dev] Support for Java 9 modules

2017-10-05 Thread Neil Bartlett
I think that’s an overstatement of what Tom said. It’s not that OSGi doesn’t plan to simplify consumption of JPMS modules. OSGi is certainly looking at possible ways forward for interoperability with JPMS modules, but those discussions are in their early stages. I don’t speak for the OSGi Allia

Re: [equinox-dev] Force particular bundle wirings to deal with split packages?

2016-06-20 Thread Neil Bartlett
s match the framework it is > extremely unlikely they are not picked. > > You’re in a nice mess … > > Kind regards, > > Peter Kriens > > >> On 17 jun. 2016, at 23:05, Brian de Alwis > <mailto:briandeal...@gmail.com>> wrote: >> >&

Re: [equinox-dev] Force particular bundle wirings to deal with split packages?

2016-06-17 Thread Neil Bartlett
> On 17 Jun 2016, at 18:00, Brian de Alwis wrote: > > I've hit a situation where I have three bundles providing classes in > javax.annotation and of course a key bundle is being wired up to the wrong > provider of javax.annotation. > > All of these bundles are out in the wild and can't be reb

Re: [equinox-dev] Provide capability question

2016-02-21 Thread Neil Bartlett
> On 21 Feb 2016, at 19:39, Lars Vogel wrote: > > Hi, > > I have two question about Provide capability and Require-Capability. > > Background: you declare that you provide ds in version 1.2 via the > following snippet in your MANIFEST.MF > > Provide-Capability: osgi.extender; > osgi.extender=

Re: [equinox-dev] Require system.bundle question

2016-02-10 Thread Neil Bartlett
As a reference for this, see section 3.9.4 of the OSGi Core specification, “Overall Search Order”. Step 4 covers required bundles, and step 5 is the bundle’s embedded classpath. Regards, Neil > On 10 Feb 2016, at 18:27, Thomas Watson wrote: > > Classes found in the required bundles always tak

Re: [equinox-dev] it is possible to load config.ini from a different location other than -configuration ?

2016-02-03 Thread Neil Bartlett
I'm not sure if the launcher can be made to work exactly as you want, but if you use the OSGi-standard FrameworkFactory API you have pretty much total control. It only requires you to write a short Java main () method. On 3 Feb 2016 6:38 pm, "Raymond Auge" wrote: > Have you tried to osgi framewor

Re: [equinox-dev] Bundle-ActivationPolicy: lazy without services and Activator

2015-11-16 Thread Neil Bartlett
'Bundle-ActivationPolicy: lazy' means that the bundle’s activator will be instantiated and invoked upon the first class loading from that bundle. If the bundle doesn’t have an activator then nothing will happen. So it is redundant, but I cannot see it having any impact on performance. Neil > O

Re: [equinox-dev] Accessing the log without Activator (extends Plugin)

2015-10-07 Thread Neil Bartlett
Looking at the source code, ILog is not an OSGi service but is constructed as a wrapper object around the OSGi LogService. The relevant code is in org.eclipse.core.internal.runtime.InternalPlatform. Do you need the full functionality of an ILog, or is standard OSGi LogService sufficient? If the

Re: [equinox-dev] Question about Bundle-ActivationPolicy: lazy and Activators

2015-10-07 Thread Neil Bartlett
that a bundle is started is to edit configuration/config.ini. > > Best regards, Lars > > On Wed, Oct 7, 2015 at 10:13 AM, Neil Bartlett wrote: >> It depends what you want to achieve. >> >> If you want the activator to run lazily, only when a class is loaded from >>

Re: [equinox-dev] Question about Bundle-ActivationPolicy: lazy and Activators

2015-10-07 Thread Neil Bartlett
It depends what you want to achieve. If you want the activator to run lazily, only when a class is loaded from the bundle for some other reason (eg because it contributes an extension) then that is exactly what BAP:lazy does. If you don't have that class loading trigger, then you will have to

Re: [equinox-dev] Get latest Eclipse Equinox Bundles from Maven

2015-09-25 Thread Neil Bartlett
The org.eclipse.osgi.services bundle is basically just the OSGi Compendium, repackaged. Why not use the Compendium JAR directly? http://search.maven.org/#search|ga|1|osgi.cmpn Regards, Neil > On 25 Sep 2015, at 06:54, Thusitha Thilina Day

Re: [equinox-dev] What version of the OSGi stock framework jar corresponds to equinox 3.10.0-v20140606-1445?

2015-07-16 Thread Neil Bartlett
Benson, you don't need to put the OSGi core jar on your runtime classpath if you already have an implementation (such as Equinox or Felix) on there. The OSGi core spec jar is only intended to be used as a compile-time dependency. Neil -- Neil Bartlett Sent from a phone On Thursda

Re: [equinox-dev] Bundles remaining in life cyle "Starting".

2015-05-12 Thread Neil Bartlett
No sorry this is not right. Alex and Tom’s answer was correct. Please refer to section 4.4.6.2 of the OSGi Core R6 specification for details of the Lazy Activation Policy and its impact on bundle lifecycle. Unsatisfied imports such as in your example would cause a failure of resolution, leaving

Re: [equinox-dev] dependency on org.osgi.annotation?

2015-05-09 Thread Neil Bartlett
> On 8 May 2015, at 23:52, Stephan Herrmann wrote: > > I'm not responding to any of that religious anti-PDE flame war > which is totally inappropriate in this discussion. I find *that* comment totally inappropriate. BJ has given reasons why he thinks PDE gets certain things wrong. You may not

Re: [equinox-dev] Exporting packages without a version

2014-12-11 Thread Neil Bartlett
egate to the > exported package for which the import-package requirement is wired to. The > delegation stops there and the required-bundles are not searched. > > Tom > > > > > > From:Neil Bartlett > To:Equinox development mailing list

Re: [equinox-dev] Exporting packages without a version

2014-12-11 Thread Neil Bartlett
ith version 2.7.3? At least the console shows > me that both versions are wired. > We also have LinkageErrors and ClassCastExceptions in eclipse with this > scenario. > I also noticed that, this behavior depends on the installation order of > bundles with the same version. > &g

Re: [equinox-dev] Exporting packages without a version

2014-12-11 Thread Neil Bartlett
This is a common misconception. There is no connection between bundle version and exported package versions. A bundle that imports using Import-Package will only care about the exported package versions, and a bundle that requires using Require-Bundle will only care about the Bundle-Version. Si

Re: [equinox-dev] Class loader, class space, protection domai, package private things and fragments

2014-07-22 Thread Neil Bartlett
This is probably because package-private accessibility in the JVM is based on the concept of “runtime packages”. A runtime package is a package loaded by a particular classloader. If some classes have the same package name but are loaded by a different classloader then they are NOT part of the

Re: [equinox-dev] Resolver Problem with guava and e4 (javax.annotation)

2014-06-10 Thread Neil Bartlett
a) Removing the javax.annotation import would surely not work, since then you won’t have any visibility of that package at all. I assume resolver.problem does actually use this package? b) Modifying Guava would require repackaging it and maintaining that indefinitely. I propose a third solutio

Re: [equinox-dev] Uses conflicts gone after "eclipse -clean":Why?

2014-04-04 Thread Neil Bartlett
Yes, check out the Bundle Wiring API specification (chapter 7 of the core spec). Specifically the FrameworkWiring.refreshBundles() method can be used to force refresh and re-resolution of a subset of bundles. Regards, Neil On Fri, Apr 4, 2014 at 1:45 PM, Andreas Sewe wrote: > Hi all, > > > The

Re: [equinox-dev] Uses conflicts gone after "eclipse -clean":Why?

2014-03-21 Thread Neil Bartlett
I'm reminded of an old joke. A tourist is lost in Ireland, so he stops his rental car and asks a nearby farmer, how can I get to Dublin from here? The farmer's reply: "Dublin?? Oh, you can't get there from here!" The point is that in OSGi, resolution proceeds from the current wiring state, and som

Re: [equinox-dev] Can I avoid having all my OSDI containers copied?

2013-11-19 Thread Neil Bartlett
Thanks Tom -- news to me! Then I suppose I should have said that reference URLs are not part of the OSGi specification. Neil -- Neil Bartlett Sent from a phone On Tuesday, 19 November 2013 at 15:08, Thomas Watson wrote: > > > > Patrick, > > I strongly suggest NOT

Re: [equinox-dev] Can I avoid having all my OSDI containers copied?

2013-11-19 Thread Neil Bartlett
Bundle(String location) method which requires the > bundle location to be a proper URL (e.g. reference: > file:/path/to/bundle.jar), but instead you want to control your location > strings to be something else then you can use the installBundle(String > location, InputStream content) l

Re: [equinox-dev] Can I avoid having all my OSDI containers copied?

2013-11-19 Thread Neil Bartlett
OSGi persists the state of all installed bundles in the Framework storage directory; by default in Equinox this is 'configuration/org.osgi.eclipse'. Therefore, once the bundles are installed they are no longer needed in the external "plugins" directory. You might want to consider writing a cust

Re: [equinox-dev] Class visibility without declared dependency

2013-07-27 Thread Neil Bartlett
On Sat, Jul 27, 2013 at 5:20 PM, Stephan Herrmann wrote: > On 07/27/2013 05:48 PM, BJ Hargrave wrote: >> >> You should also set mandatory:=my-attr on each export of provider so a >> hapless importer does not import some random subset of your >> package. > > > Makes sense, thanks. > > >> But this w

Re: [equinox-dev] Class visibility without declared dependency

2013-07-27 Thread Neil Bartlett
On Sat, Jul 27, 2013 at 3:53 PM, Stephan Herrmann wrote: > On 07/26/2013 11:15 PM, Thomas Watson wrote: >> >> >> > If OSGi would support Export-Class we could simply augment that >> declaration >> > for our purposes :) > >> >> >> I think this was mentioned before, but not sure if I heard why it

Re: [equinox-dev] Use equinox "application admin" in felix

2013-05-19 Thread Neil Bartlett
Try including the org.eclipse.equinox.supplement bundle. This bundle is specifically intended to provide the same packages that Equinox exports, and is used when running on non-Equinox frameworks. I haven't tried this with the ApplicationAdmin bundle, but I have successfully used it to run Equinox

Re: [equinox-dev] Choosing which version of a bundle to start after the workbench starts

2013-04-11 Thread Neil Bartlett
27;t want from starting. Eg- if > I want version 1.8.6 and I call start(START_TRANSIENT) on it, I think the > 2.0.0 version will still be started. > > I'll try this to make sure, though. > > > On Thu, Apr 11, 2013 at 10:22 AM, Neil Bartlett wrote: > >> Why not st

Re: [equinox-dev] Choosing which version of a bundle to start after the workbench starts

2013-04-11 Thread Neil Bartlett
Why not start the bundle transiently (ie. Bundle.START_TRANSIENT) from another ordinary bundle? Since the target bundle's start-state is not persisted, you will be able to decide each time which bundle to start. Neil On Thu, Apr 11, 2013 at 6:18 PM, Andrew Eisenberg wrote: > Hi all, > > I have

Re: [equinox-dev] Equinox doesn't declare a Provide-Capability header for osgi.ee

2013-02-20 Thread Neil Bartlett
Christian, the osgi.ee capability can only be published at runtime, i.e. when Equinox works out what EE it's actually running on. When performing resolution against a repository prior to runtime, you have to assume which EE you are targeting and handle the osgi.ee requirements from within your Res

Re: [equinox-dev] Equinox, PDE and packages from the ExtensionClasspath (e.g. JavaFX)

2012-11-14 Thread Neil Bartlett
On Wed, Nov 14, 2012 at 11:34 AM, Tom Schindl wrote: > Am 14.11.12 08:13, schrieb Gunnar Wagenknecht: > > Am 14.11.2012 01:30, schrieb Neil Bartlett: > >> I really feel that the problem is in the launcher, so that's where it > >> needs to be fixed, i.e. by settin

Re: [equinox-dev] Equinox, PDE and packages from the ExtensionClasspath (e.g. JavaFX)

2012-11-13 Thread Neil Bartlett
I agree with BJ that it would be better to use an Equinox-specific directive for this Equinox-specific functionality. I believe that Felix should work fine today with the following: Fragment-Host: system.bundle;x-appclasspath:=ext because it would ignore the unknown directive, and would provi

Re: [equinox-dev] Java8 and JavaFX8

2012-11-06 Thread Neil Bartlett
Hi Tom, Yes I'd like to join the IRC chat. We will need to define new Execution Envs for the Java 8 compact profiles, if and when they are specified by the JCP. This is something for the OSGi CPEG to look into. I don't think it makes sense for users to define their own EEs. I guess PDE should

Re: [equinox-dev] Java8 and JavaFX8

2012-11-06 Thread Neil Bartlett
Tom, I should point out that from a "pure" OSGi point of view, it should be no issue for these libraries to be part of the extension path. It's up to the launcher code that creates the OSGi framework to choose which packages should be exported from the system bundle. Ordinarily the launcher ha

Re: [equinox-dev] alternative to osgi.bundles starting via FrameworkFactory

2012-09-02 Thread Neil Bartlett
Hi Raymond, When using the FrameworkFactory API, initial bundles are usually installed (and started) programmatically via BundleContext.installBundle(). Regards, Neil On Mon, Sep 3, 2012 at 3:38 AM, Raymond Auge wrote: > Hey all, > > Is there an alternative to "osgi.bundles" property when loadi

Re: [equinox-dev] target version of osgi specs for juno

2012-07-03 Thread Neil Bartlett
Hi Raymond, That's certainly true for the osgi.core jar, which must be used only as a build-time dependency (and indeed it's better to build against this than against a specific framework such as Equinox, since you avoid accidentally depending on anything not in the spec). However there is no pro

Re: [equinox-dev] equinox bundle akin to felix fileinstall

2012-06-15 Thread Neil Bartlett
I think it's more likely that FileInstall is seeing the file and trying to install it while the external process (whatever that might be) is still writing it to the disk. Short of hooking into the OS filesystem events (which would require platform-specific native code), any Fileinstall-like bundle

Re: [equinox-dev] Service Lookup by GUID very Slow - the Framework Scalability

2012-05-08 Thread Neil Bartlett
My guess would be something in the implementation of the filter. Sorry I have lost track of which framework implementation was slow... but nevertheless I don't know enough about the internal details of any of them. Perhaps the slow framework is recompiling the filter each time? I have created

Re: [equinox-dev] Service Lookup by GUID very Slow - the Framework Scalability

2012-05-08 Thread Neil Bartlett
* No, services are not created lazily by default. You are creating the services yourself in your code sample, i.e., the 'serviceObject' variable. There are some frameworks such as Declarative Services that create service instances lazily, however the creation of the service (and therefore the

Re: [equinox-dev] Difference in system.packages.extra behaviour between 3.6.2 and 3.7

2011-09-08 Thread Neil Bartlett
Hi Ben, I don't use PDE any more, but I think as a workaround you should be able to create a system bundle fragment (i.e. "Fragment-Host: system.bundle") to export the desired package(s). You may need to manually construct this outside of PDE and put it in your Target Platform, but once done it wi

Re: [equinox-dev] Difference in system.packages.extra behaviour between 3.6.2 and 3.7

2011-09-08 Thread Neil Bartlett
Hi Ben, I tend to see this the other way around…. if you are using that package then you should have an Import-Package statement for it. If that causes problems for PDE then that's a bug in PDE, not in Equinox. Regards, Neil On Thu, Sep 8, 2011 at 1:14 PM, Ben Cox wrote: > Hi All, > > We're be

Re: [equinox-dev] Bundle Cache Location

2011-08-29 Thread Neil Bartlett
This location in known as the "storage area" in the terms of the OSGi specification. You can change it by setting the property "org.osgi.framework.storage". You can set this property in config.ini, or if you are using the FrameworkFactory API to launch OSGi you can add it to the Map parameter that

Re: [equinox-dev] Custom manifest headers

2011-08-19 Thread Neil Bartlett
"Incompatibility" is a strong word. To me it would mean an inability to create bundles that work the same across different framework implementations. The fact is, it's always been possible to create different behaviours by using extensions like Eclipse-BuddyPolicy, Eclipse-LazyStart, etc. But it's

Re: [equinox-dev] How to set activate on startup to 'true' in bundles.info file

2011-08-15 Thread Neil Bartlett
I don't actually know the answer to your question, but I'm hoping the answer is "no, that's not possible". Your bundle probably does not need to be activated when Eclipse is started. If you and all other plug-in authors were able to do this, then Eclipse would take hours to start. Please consider

Re: [equinox-dev] ConfigAdmin getConfiguration from external storage

2011-05-13 Thread Neil Bartlett
Hi Philip, The normal way to hook config admin into an external data storage is to write a management agent that *calls* getConfiguration() and supplies the data via an update to the Configuration object. That way your agent can work with any config admin implementation. Typically config admin im

Re: [equinox-dev] ds properties

2011-05-11 Thread Neil Bartlett
Scott, Is this what you're looking for? http://wiki.eclipse.org/Equinox/RuntimeOptions Rgds Neil On Wed, May 11, 2011 at 9:48 PM, Thomas Watson wrote: > He Scott, > > Stoyan, the current owner of DS, likely will not respond until he gets in > tom

Re: [equinox-dev] Bootdelegation issue

2011-04-18 Thread Neil Bartlett
Hmm. In theory this *should* work if you set the parent classloader to app (because you have put the library you want on the application classpath). Or you could add the library to the bootclasspath with -Xbootclasspath. However, why are you doing it this way? Assuming the library has to live "out

Re: [equinox-dev] (no subject)

2011-03-30 Thread Neil Bartlett
It would be better if you tell us what you're actually trying to achieve. Messing around with classloaders is usually not necessary, unless working with a legacy library that forces you to do it. Nevertheless, to answer your actual question: if your code is in "MyClass" then MyClass.class.getClass

Re: [equinox-dev] Automating the Equinox OSGi Console

2011-03-23 Thread Neil Bartlett
Allain, Use the OSGi API. Basically all the functionality of the Equinox console is accessible through the API, in fact the console commands are implemented as calls to the API. For the specific use case you mentioned, take a look at BundleContext.installBundle(), Bundle.update(), Bundle.start(),

Re: [equinox-dev] Mysql Connection

2011-02-28 Thread Neil Bartlett
Does your bundle import the package "javax.naming"? Rgds Neil On Mon, Feb 28, 2011 at 3:40 PM, Santiago Hurtado Gutierrez wrote: > Hi all > I'm writing a plugin that connects to a mysql database, when I used whiting > eclipse it works correctly, however when I try to run it in the standalone > e

Re: [equinox-dev] Replacement for PackageAdmin.getBundles

2011-02-22 Thread Neil Bartlett
service and Start Level service >> with >> Framework extension bundles." > > Sorry, I read "Permission Admin" as "Package Admin", but I'm still trying to > see in the spec where it says Package Admin is mandatory. See this in 7.1.3: > > "The Fr

Re: [equinox-dev] Replacement for PackageAdmin.getBundles

2011-02-22 Thread Neil Bartlett
BJ, could you confirm that the old API will still be available in all frameworks... otherwise this would be a serious breaking change for existing clients. Sent from my BlackBerry On 22 Feb 2011, at 16:09, BJ Hargrave wrote: > There is no replacement for that method. You can just grovel over

Re: [equinox-dev] Regarding Lazy Activation

2011-02-18 Thread Neil Bartlett
all need to be started... > A small doubt what does the <> atrribute means in the osgi eclipse > console... its making me quiet confusing. > > Thanks and regards > Ajinkya > On Thu, Feb 17, 2011 at 11:54 PM, Neil Bartlett > wrote: >> >> Nope it won't wo

Re: [equinox-dev] Regarding Lazy Activation

2011-02-17 Thread Neil Bartlett
it should look up and recognize > that > it refers to Bundle A for a service... but Bundle A is stopped so is there a > possibility to start the Bundle A at that moment. > > If I am wrong somewhere wrt to DeclarativeServices ... please let me know... > > Thanks and Regar

Re: [equinox-dev] Regarding Lazy Activation

2011-02-16 Thread Neil Bartlett
rs, Neil > > Thanks for ur quick reply... > > On Wed, Feb 16, 2011 at 3:32 PM, Neil Bartlett wrote: >> >> Ajinka, >> >> Do not do this. It is a common newbie mistake: there should be no >> start-ordering dependency between bundles. >> >> You d

Re: [equinox-dev] Regarding Lazy Activation

2011-02-16 Thread Neil Bartlett
Ajinka, Do not do this. It is a common newbie mistake: there should be no start-ordering dependency between bundles. You do not state *why* you want B to start after A has started. I assume that you want to publish a service from A and consume it from B? The correct way to do this is have B *list

Re: [equinox-dev] Eclipse ViewPart and OSGI Declarative Services problem

2010-11-02 Thread Neil Bartlett
Hi Richard, This is a rather challenging area, because the lifecycles of services and extensions are completely unrelated. As you've noticed, creating a component with DS does not mean it will be used by the extension registry. Indeed it cannot be, because the extension registry is more like a fac

Re: [equinox-dev] OSGi Declarative Services, Component Reference, Target Parse Error for LDAP AND-Filter

2010-10-24 Thread Neil Bartlett
on > (with the original LDAP syntax) adjusted to make it compatible to the xml > universum? > > The component.xml was generated from my sources by the great Bndtools from > Neil Bartlett (a small advert ;-) > : > @Reference(name="testRef",optional=true,dynamic=true,target=

Re: [equinox-dev] Equinox OSGI - multiple instances

2010-10-12 Thread Neil Bartlett
Hmm... the options seem to be out of order but it looks like you may be specifying the same console port () each time. The second instance will fail to bind to the socket and therefore immediately exit. A couple of questions... what is the supposed to be for, and why are you doing bootdel

Re: [equinox-dev] Eclipse plug-in using Eclipse extensions works when run in Eclipse but not when run directly in Equinox

2010-09-21 Thread Neil Bartlett
Vijay, In at least 99% of cases, problems of the form "works from Eclipse but not when exported" are due to missing entries in the build.properties file of your plugin project. Make sure that all resources required by the bundle are listed in build.properties. If that doesn't fix your problem, th

[equinox-dev] +1 for Lazar Kirchev on rt.equinox.incubator by Neil Bartlett

2010-06-28 Thread portal on behalf of Neil Bartlett
Neil Bartlett voted: +1 Awesome! Voting summary: http://portal.eclipse.org/ ___ equinox-dev mailing list equinox-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/equinox-dev

Re: [equinox-dev] Calling Equinox close command by code

2010-04-29 Thread Neil Bartlett
n >>> and exit). How could I achieve it? >>> >>> If I do context.getBundle(0).stop() my application does not stop and >>> some bundles continue running, as the same way as if I would type >>> shutdown command in the command line. >>> >>

Re: [equinox-dev] Calling Equinox close command by code

2010-04-28 Thread Neil Bartlett
David, The way to shutdown the OSGi framework is to obtain the system bundle (id zero) and call stop(): context.getBundle(0).stop(); This will work across all frameworks, not just Equinox. On a meta note to the list... can we get this question and answer into a FAQ somewhere? It seems to get

Re: [equinox-dev] Re: [p2-dev] who should declare dependencies on ds?

2010-04-02 Thread Neil Bartlett
This is the thing about decoupling bundles with services... Eggs do not depend on flour; they know nothing about flour. Flour knows nothing about eggs. We need some kind of knowledge that lives outside of the ingredients -- i.e., a recipe -- in order to make pancakes. Rgds, Neil On Fri, Apr 2, 2

Re: [equinox-dev] Question on programatic close of the runtime

2010-03-12 Thread Neil Bartlett
cache corruption. > >   Tim. > > "It is a simple task to make things complex, but a complex task to make them > simple." >  -- Fortune Cookie > > On Mar 12, 2010, at 2:34 AM, Neil Bartlett wrote: > >> Daniel, >> >> Stopping bundle zero is no

Re: [equinox-dev] Question on programatic close of the runtime

2010-03-12 Thread Neil Bartlett
Daniel, Stopping bundle zero is not a hack; this is the normal way to programmatically shutdown OSGi. However: 1) There is no need to check that the bundle is active first. Calling stop() on an already stopped bundle simply has no effect (likewise calling start() on an already active bundle has n

Re: [equinox-dev] enable/disable component event

2010-02-22 Thread Neil Bartlett
Hello Kane, It's not 100% clear from your description, but it sounds like you are calling BundleContext.getServiceReference() immediately after calling enableComponent, and expecting it to always return non-null. As you have noticed, this is not the case. Not only do you have potential race condit

Re: [equinox-dev] Embedding Equinox Example

2010-01-26 Thread Neil Bartlett
Why so complicated?? Craig: to launch either Felix 2.0 or Equinox 3.5 (and probably Knopflerfish, not sure which versions though) embedded within a larger Java application, you can simply use the new launching API included in OSGi R4.2... see section 6.2 of the Core specification. Assuming you are

Re: [equinox-dev] Registering two services in the same bundle

2009-11-16 Thread Neil Bartlett
David, While Thomas's suggestion is absolutely correct, I think you need to step back from the problem a little and ask if this is the right approach. If your consumer bundle needs the Interface1 service then it should simply bind to an instance of Interface1. If it also needs the Interface2 serv

Re: [equinox-dev] Configuration Admin Question

2009-11-04 Thread Neil Bartlett
t; > Regards > > David > > -Mensaje original- > De: equinox-dev-boun...@eclipse.org [mailto:equinox-dev-boun...@eclipse.org] > En nombre de Neil Bartlett > Enviado el: miércoles, 04 de noviembre de 2009 13:23 > Para: Equinox development mailing list > Asunt

Re: [equinox-dev] Configuration Admin Question

2009-11-04 Thread Neil Bartlett
David, Yes it sounds like Config Admin with a ManagedServiceFactory (MSF) may fit your requirements. I agree that Config Admin is difficult to understand -- I struggled with it initially as well. I think that the key to understanding MSFs is that you do not control the PID. You call createFactory

[equinox-dev] +1 for Scott Lewis on rt.equinox.incubator

2009-10-16 Thread portal on behalf of Neil Bartlett
+1 +1 Voting summary: http://portal.eclipse.org/ ___ equinox-dev mailing list equinox-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/equinox-dev

Re: [equinox-dev] Question about DI/ DS and Application model

2009-09-17 Thread Neil Bartlett
Pascal, I think there are deeper problems here than just the lifecycle. Neither DS nor the Eclipse extension registry were particularly designed to work together. In DS objects are created for only two purposes: (a) To be published to the world as a service, and/or (b) to have an independent lifec

Re: [equinox-dev] SCRManager

2009-05-18 Thread Neil Bartlett
Yes I agree this would be very useful. In fact Felix's SCR already has such an introspection interface. Like Stoyan I think this would be best mandated by the DS spec so that it could be used independently of any framework or SCR implementation. I have started writing an RFP for this already but h

Re: [equinox-dev] policy="dynamic" in Declarative Services.

2009-05-04 Thread Neil Bartlett
You cannot directly do this, because mandatory reference is mandatory at all times. However, you could make the reference optional and perform some kind of internal activation/deactivation in the bind/unbind methods. However, if that still doesn't work for you then you're trying to do something ou

Re: [equinox-dev] Equinox Declarative Services : Context Class Loader

2009-03-31 Thread Neil Bartlett
The question is, what did you expect instead of null? The OSGi spec does not specify what the thread context classloader (TCCL) should be when services or callbacks are invoked, therefore components should not rely on it being set to anything in particular. You can of course set the TCCL explicitl

Re: [equinox-dev] Declarative Services within RCP Application

2009-02-07 Thread Neil Bartlett
tps://dev.eclipse.org/mailman/listinfo/equinox-dev > or, via email, send a message with subject or body 'help' to >equinox-dev-requ...@eclipse.org > > You can reach the person managing the list at >equinox-dev-ow...@eclipse.org > > When replying, please edi

Re: [equinox-dev] Declarative Services within RCP Applications

2009-02-06 Thread Neil Bartlett
Well spotted Dennis. However the dependency on util is not indirect, it is a straightforward direct dependency. And util does not need to be started, it just needs to be present and resolved. Priyanka, could you show us the output of the "ss" command in the OSGi console? Note that in general, int

Re: [equinox-dev] Adding Equinox Declarative Services (DS) to the Eclipse SDK

2009-01-26 Thread Neil Bartlett
+1 However there are still issues related to the interoperability of extensions and services, due to the lifecycle mismatch. This is the case whether services are implemented using DS, or Spring-DM, or the good old fashioned way with spit and elbow grease Eclipse applications will be mostly based

Re: [equinox-dev] getservice throws class cast exception

2008-05-30 Thread Neil Bartlett
Toni made exactly the same comment via my bug tracker! I agree, I've intended all along to write such a chapter, I just need to get around to it... Thanks Neil On Fri, May 30, 2008 at 9:45 AM, Alin Dreghiciu <[EMAIL PROTECTED]> wrote: > +1 for having the api as a separated bundle (third in this

[equinox-dev] Incubator request for Extensions/Services Integration work

2008-03-27 Thread Neil Bartlett
Hello, I have been doing some investigative work recently in the area of integrating extensions with OSGi services. As a result of this, I have developed a small framework for dynamically injecting services into extension objects according to metadata defined via the extension registry. As a very