Re: osgi design pattern question

2009-04-27 Thread Peter Kriens
It looks like the best solution is not to register the Manager, but register the Handlers ... This is called the whiteboard pattern and greatly simplifies your code. Everthing seems to fall in place then. If you do not want the code that uses the Handler services to know about OSGi, use D

Re: Squawk SunSPOT

2009-04-27 Thread Dennis Geurts
Hi Joel, The SunSPOT requires CLDC 1.1 This is too limited for OSGi to run on 'out of the box'. My guess would be that this would require quite some tinkering to get this to work. For reasons why: http://jadabs.berlios.de/jadabs-cldc/multiproject/osgi-j2me/index.html This could be a great

Re: osgi design pattern question

2009-04-27 Thread Ittay Dror
For those interested, I found this: http://wimpi.coalevo.net/2007/09/osgi-design-practice-loose-coupling.html Executive Summary: * Manager has an internal registry (hash with ids as keys) * Handlers are added / removed from the registry by using a listener Ittay Ittay Dror wrote: Hi,

Re: osgi design pattern question

2009-04-27 Thread Christopher Armstrong
Hi On Tue, 2009-04-28 at 05:39 +0300, Ittay Dror wrote: > > > I'm working with spring-dm. Generally, I don't like the fact that I now > need to inject everything. As for my real use case, it is not possible, > since the code requires several Handler objects. IMHO, I don't see how you can avo

Re: osgi design pattern question

2009-04-27 Thread Ittay Dror
Christopher Armstrong wrote: Hi Would it be possible in your case to inject the Handler objects into the code that uses them via a setter method? You haven't specified what bundle is using the handlers, so I'm assuming that there is a third bundle C that uses the Manager in A to get access to

Re: osgi design pattern question

2009-04-27 Thread Christopher Armstrong
Hi Would it be possible in your case to inject the Handler objects into the code that uses them via a setter method? You haven't specified what bundle is using the handlers, so I'm assuming that there is a third bundle C that uses the Manager in A to get access to handlers. If you publish each ha

Squawk SunSPOT

2009-04-27 Thread Joel Schuster
Has anyone tried building Felix and running an OSGi based system on the SunSPOT? __ Joel Schuster Senior Software Engineer NAVSYS Corporation 14960 Woodcarver Road Colorado Springs, CO 80921 (719) 481-4877 x138 jo...@navsys.com The information

Re: Exceptions during bundle plugin

2009-04-27 Thread Jim Breen
You can get rid of the messages by forcing the maven-bundle-plugin to use a more recent version of bnd. Here's my plugin config: org.apache.felix maven-bundle-plugin 2.0.0 true ... biz.aQute bndlib 0.0.313

Re: osgi design pattern question

2009-04-27 Thread Ittay Dror
Toni Menzel wrote: Hi Uttay, solution is not necessarily osgi specific. You "lifecycle" problem sounds good to apply dynamic proxy, invokationhandler and friends. Have a look at http://java.sun.com/j2se/1.5.0/docs/api/java/lang/reflect/Proxy.html This way you can easily get and unget the real

Re: osgi design pattern question

2009-04-27 Thread Toni Menzel
Hi Uttay, solution is not necessarily osgi specific. You "lifecycle" problem sounds good to apply dynamic proxy, invokationhandler and friends. Have a look at http://java.sun.com/j2se/1.5.0/docs/api/java/lang/reflect/Proxy.html This way you can easily get and unget the real service reference. Ton

Re: Felix Build Error - Unable to load the mojo org.apache.felix:maven-bundle-plugin:1.4.3:bundle

2009-04-27 Thread Carsten Ziegeler
Just as an addition info: if you're doing a reactor build (and build all Felix sub projects) and the various modules use different parent pom versions with maybe different plugin versions defined, the whole build is just using a single version of a plugin; and this causes sometimes problems, too as

osgi design pattern question

2009-04-27 Thread Ittay Dror
Hi, I'd like to get some advice about design patterns in OSGi, I hope this is appropriate (not being felix specific). I have a bunch of Handler objects and a Manager that retrieves them by id. interface Manager { Handler get(String id); } The Manager implementation is an OSGi service

Re: BundleException - not able to load this type of class.

2009-04-27 Thread Padma shankar
Thanks a lot. The issue was because I was trying to run Felix 1.0.3 over Android1.0. I could see the application launching in old android version without any problem. To make the application work on Android1.0, I implemented the Felix1.4 changes and the Android1.0 changes to the source. When I a

Re: Felix Build Error - Unable to load the mojo org.apache.felix:maven-bundle-plugin:1.4.3:bundle

2009-04-27 Thread Stuart McCulloch
2009/4/27 itripl > > well, I'm behind a proxy, which may cause problems. I tried to change > manually everything from SNAPSHOT to release, but it seems not to have an > end. I think it's better, when I try it at home, where I do not have a > proxy. I'm going to post here tomorrow, if it did w

Re: Exceptions during bundle plugin

2009-04-27 Thread Stuart McCulloch
2009/4/28 Lewis, Eric > Hi > > I'm using the bundle plugin to repackage the JBoss client JARs and make > an OSGi bundle from them. > It's a huge load of classes, and I want to export them all. > > However, I get the following exception in my Maven log: > > [INFO] [bundle:manifest {execution: bund

Exceptions during bundle plugin

2009-04-27 Thread Lewis, Eric
Hi I'm using the bundle plugin to repackage the JBoss client JARs and make an OSGi bundle from them. It's a huge load of classes, and I want to export them all. However, I get the following exception in my Maven log: [INFO] [bundle:manifest {execution: bundle-manifest}] Index 560:Exceptions Inde

Re: Felix Build Error - Unable to load the mojo org.apache.felix:maven-bundle-plugin:1.4.3:bundle

2009-04-27 Thread itripleeee
well, I'm behind a proxy, which may cause problems. I tried to change manually everything from SNAPSHOT to release, but it seems not to have an end. I think it's better, when I try it at home, where I do not have a proxy. I'm going to post here tomorrow, if it did work, but thanks for your help gu

Re: Felix Build Error - Unable to load the mojo org.apache.felix:maven-bundle-plugin:1.4.3:bundle

2009-04-27 Thread Clement Escoffier
On 27.04.2009, at 17:30, Stuart McCulloch wrote: 2009/4/27 itripl Thanks for your answer. But it did not work. The file was corrupted so I deleted it and downloaded it manually. But the problem still is not solved. felix is using Dependencies to Snapshot-Artifacts, which do not ex

Re: Felix Build Error - Unable to load the mojo org.apache.felix:maven-bundle-plugin:1.4.3:bundle

2009-04-27 Thread Stuart McCulloch
2009/4/27 itripl > > Thanks for your answer. But it did not work. The file was corrupted so I > deleted it and downloaded it manually. But the problem still is not solved. > felix is using Dependencies to Snapshot-Artifacts, which do not exist. Like > 1) org.apache.felix:org.apache.felix.shel

Re: Felix Build Error - Unable to load the mojo org.apache.felix:maven-bundle-plugin:1.4.3:bundle

2009-04-27 Thread itripleeee
Thanks for your answer. But it did not work. The file was corrupted so I deleted it and downloaded it manually. But the problem still is not solved. felix is using Dependencies to Snapshot-Artifacts, which do not exist. Like 1) org.apache.felix:org.apache.felix.shell:jar:1.1.0-SNAPSHOT 2) org.apa

Re: JNA problem

2009-04-27 Thread Stuart McCulloch
2009/4/27 Richard S. Hall > You have two options: > > 1. Put the jna.jar in a bundle and export all of its packages. > 2. Add the jna.jar packages to > org.osgi.framework.system.packages.extra in the > conf/config.properties file so the system bundle exports them from > the class pa

Re: JNA problem

2009-04-27 Thread Richard S. Hall
You have two options: 1. Put the jna.jar in a bundle and export all of its packages. 2. Add the jna.jar packages to org.osgi.framework.system.packages.extra in the conf/config.properties file so the system bundle exports them from the class path (assuming you have the jna.jar o

JNA problem

2009-04-27 Thread chihi asma
Hi, I am a beginner in JNA and I want to test it with OSGi, so I implemented a simple bundle using JNA, but when I start it, I get this error: Couldn't start bundle: JNA (#37) (due to: java.lang.NoClassDefFoundError: com/sun/jna/Library) java.lang.NoClassDefFoundError: com/sun/jna/Library the j

Re: Felix Build Error - Unable to load the mojo org.apache.felix:maven-bundle-plugin:1.4.3:bundle

2009-04-27 Thread Clement Escoffier
Hi, I don't get the error. Can you try to: -delete bndlib from your local maven repo (in .m2/repository/biz/aQute) - compile the trunk with mvn clean install -Dpackaging=plugins -Check that you download bnd, so you should see something like: Downloading: http://repo1.maven.org/maven2/biz/aQute/b

Felix Build Error - Unable to load the mojo org.apache.felix:maven-bundle-plugin:1.4.3:bundle

2009-04-27 Thread itripleeee
I wanted to build felix, so I downloaded the sources and followed the instruction here: http://felix.apache.org/site/building-felix.html When I run the command "mvn -Dpackaging=plugins install" D:\Test\felix\bundleplugin\src\main\java\org\apache\felix\bundleplugin\AbstractDependencyFilter.java:[

Re: Interpretation of * in DynamicImport-Package

2009-04-27 Thread Stuart McCulloch
2009/4/27 Richard S. Hall > > On 4/27/09 12:56 AM, Sahoo wrote: > >> Stuart McCulloch wrote: >> >>> 2009/4/27 Sahoo >>> >>> I have a question about DynamicImport-Package and the pattern matching done using "*." I have a bundle which has the following manifest attributes: Bun

Re: Interpretation of * in DynamicImport-Package

2009-04-27 Thread Richard S. Hall
On 4/27/09 12:56 AM, Sahoo wrote: Stuart McCulloch wrote: 2009/4/27 Sahoo I have a question about DynamicImport-Package and the pattern matching done using "*." I have a bundle which has the following manifest attributes: Bundle 2 DynamicImport-Package = javax.crypto.interfaces.*

Re: List entries with the bundle protocol

2009-04-27 Thread Stuart McCulloch
2009/4/27 Triquoit Mathieu > Dear, > > I am currently migrating an application to the OSGi concepts... and I have > a > problem. In a general module (which could be a kind of framework), the > application dynamically loads properties files. > > To do that, it receives a path and loops on the URLs