Re: Classloader exception

2014-03-19 Thread Marcel Offermans
Hello Frizz, That is exactly why OSGi has a built-in mechanism to load native code, to deal with such problems. You say you are loading the DLL yourself, but did you look at the specification and its abilities to load native code? If for some reason you really can’t use the spec for this, I

Re: Classloader exception

2014-03-19 Thread Frizz
Hello Marcel, thank you for your reply. That is exactly why OSGi has a built-in mechanism to load native code, to deal with such problems. Do you mean this Bundle-NativeCode in the MANIFEST files? You say you are loading the DLL yourself, but did you look at the specification and its

Re: How to use a service immediately after its activation?

2014-03-19 Thread Bertrand Delacretaz
Hi, On Tue, Mar 18, 2014 at 10:22 PM, Neil Bartlett njbartl...@gmail.com wrote: ...Whatever you're trying to do in your special listener, wouldn't it be better done inside the same bundle as the service?... You're right, and this is similar to what Bruce suggests - the bundle's initialization

Re: How to use a service immediately after its activation?

2014-03-19 Thread Neil Bartlett
Bear in mind that the Service Hook approach is not a panacea: there is still no guarantee that the hook will be installed before other consumers. To provide this kind of guarantee you would have to resort to bundle start ordering. Regards, Neil On Wed, Mar 19, 2014 at 11:25 AM, Bertrand

Re: How to use a service immediately after its activation?

2014-03-19 Thread Ferry Huberts
On 19/03/14 12:25, Bertrand Delacretaz wrote: Hi, On Tue, Mar 18, 2014 at 10:22 PM, Neil Bartlett njbartl...@gmail.com wrote: ...Whatever you're trying to do in your special listener, wouldn't it be better done inside the same bundle as the service?... You're right, and this is similar to

Re: How to use a service immediately after its activation?

2014-03-19 Thread David Bosschaert
Yep, in order to use any of the OSGi hooks, they need to be installed before you can rely on them, so if there are solutions that can be done without hooks these should be preferred. Cheers, David On 19 March 2014 04:36, Neil Bartlett njbartl...@gmail.com wrote: Bear in mind that the Service

Re: [java6][deadlock] with parallel classloading, and how to deal with it

2014-03-19 Thread Stefan Egli
Hi, I wrote a test which reproduces the deadlock on Java 6 (MacOS). It's attached to FELIX-4462 ([0]). Unfortunately I only managed to get it fail when running from Eclipse, not via 'mvn clean test'. I had to use byteman to inject a delay in the BundleClassLoader.findClass - and if that inject is

Re: [java6][deadlock] with parallel classloading, and how to deal with it

2014-03-19 Thread Richard S. Hall
On 3/19/14, 10:47 , Stefan Egli wrote: Hi, I wrote a test which reproduces the deadlock on Java 6 (MacOS). It's attached to FELIX-4462 ([0]). Unfortunately I only managed to get it fail when running from Eclipse, not via 'mvn clean test'. I had to use byteman to inject a delay in the

Re: [java6][deadlock] with parallel classloading, and how to deal with it

2014-03-19 Thread Richard S. Hall
On 3/19/14, 11:00 , Richard S. Hall wrote: On 3/19/14, 10:47 , Stefan Egli wrote: Hi, I wrote a test which reproduces the deadlock on Java 6 (MacOS). It's attached to FELIX-4462 ([0]). Unfortunately I only managed to get it fail when running from Eclipse, not via 'mvn clean test'. I had to

Re: [java6][deadlock] with parallel classloading, and how to deal with it

2014-03-19 Thread Richard S. Hall
I just attached a patch to the issue...could you please try it and see if it solves your issue. If so, report back on the issue. Thanks. - richard On 3/19/14, 10:47 , Stefan Egli wrote: Hi, I wrote a test which reproduces the deadlock on Java 6 (MacOS). It's attached to FELIX-4462 ([0]).