C:\Users\Me\Desktop\org.apache.felix.main.distribution-4.0.3\felix-framework-
4.0.3>java -jar bin/felix.jar
____________________________
Welcome to Apache Felix Gogo
g! start file:/C:/Users/Me/Desktop/testFelix.jar
g! lb
START LEVEL 1
ID|State |Level|Name
0|Active | 0|System Bundle (4.0.3)
1|Active | 1|Apache Felix Bundle Repository (1.6.6)
2|Active | 1|Apache Felix Gogo Command (0.12.0)
3|Active | 1|Apache Felix Gogo Runtime (0.10.0)
4|Active | 1|Apache Felix Gogo Shell (0.10.0)
5|Active | 1|file:/C:/Users/Me/Desktop/testFelix.jar (0.0.0)
g!
g! start file:/C:/Users/Me/Desktop/testFelix2.jar
g! lb
START LEVEL 1
ID|State |Level|Name
0|Active | 0|System Bundle (4.0.3)
1|Active | 1|Apache Felix Bundle Repository (1.6.6)
2|Active | 1|Apache Felix Gogo Command (0.12.0)
3|Active | 1|Apache Felix Gogo Runtime (0.10.0)
4|Active | 1|Apache Felix Gogo Shell (0.10.0)
5|Active | 1|file:/C:/Users/Me/Desktop/testFelix.jar (0.0.0)
7|Active | 1|file:/C:/Users/Me/Desktop/testFelix2.jar (0.0.0)
g!
Ulf Dittmer wrote:OSGi is the specification, and Felix the implementation. The Felix jar files contain all of the OSGi interfaces, so there's nothing else you need to download. You may want to bookmark this page, though - it's the javadocs of the OSGi API, which you'll need for development.
if I start the first example, it prints "Starting to listen for service events." and when I uninstall the service it prints "Stopped listening for service events." That's all that example does.
I also have the Apache Felix Shell Service and the Apache Felix Shell TUI bundles running, though. The file conf/config.properties tells Felix to start those automatically. I've had Felix installed for a long time, I don't recall if those were there from the beginning or if I added them later.
Running the second example does indeed cause more things to happen, provided I start both the Example English Dictionary and then the Example Dictionary Client bundles.
Ulf Dittmer wrote:I gave it a quick test with the current Felix distribution. Here are a few observations:
Contrary to what the documentation says, I'm not being asked for a profile name. That doesn't seem to have any impact, though.
Note that issuing "install file:..." does install a bundle, but it does not start it. You need to do that manually by issuing "start N" (where N is the bundle ID as listed in the "lb" listing). Or you need to load the bundle by issuing "start file:..." which installs and starts in one step.
For Example1, I see the expected output when the bundle is started and stopped.
Example2 doesn't do anything by itself - it's just a service which you can test by installing and running Example3.
Other than the issue about not having to enter a "profile name", all three examples compile, run and install pretty much as described in the documentation.
Typing "lb" gives a handy overview of which bundles are installed, and which are running.
Ulf Dittmer wrote:Sorry to hear that Felix didn't work out for you, especially as I was able to download it, follow the instructions for the examples, and have it work. I suppose it could be that I've used it before and thus did something that wasn't explicitly mentioned in the instructions. Either way, you couldn't have been off by much. Felix has some nice features that make it worthwhile exploring IMO (such as the Karaf container, amongst others).
A day job? In an office? My worst nightmare! Comfort me tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|