Hello Matt,

On Oct 12, 2009, at 22:14 , Matt Tennant wrote:

It seems like there should be a simple solution to my problem. Occasionally the device with our software (deployed within Felix framework) is shut off when it is in the middle of restarting a bundle. If this happens, then when everything is restarted that bundle my be in an "installed", rather than "active", state.

I'm assuming you have a bundle that is responsible for updating other bundles? That's what we usually call the "management agent".


We don't have any bundles installed that we don't want started whenever the framework starts. But we do need to use the bundle cache, so we can't wipe it out and start from scratch each time. So, is there any way of telling Felix at startup that all installed bundles should be started, even if they weren't running before? I didn't see anything obvious at: http://felix.apache.org/site/apache-felix-framework-usage-documentation.html#ApacheFelixFrameworkUsageDocumentation-configuringframework

What about having this "management agent" bundle I mentioned above go over bundles and start them if they were not started? If this bundle already has knowledge about what to update and when, then it is probably also the best place to make sure everything stays "active".

On a related note, especially if there is no solution to the above, has anybody figured out a good way to issue framework commands from outside the framework? For instance, if I have the external telnet port set up (where framework prompt is available via telnet), then I can issue framework commands via a script that connects over telnet. But telnet isn't installed on the host device, so this only works from a computer on the network. I'd be very interested in another way of doing this that doesn't require a telnet program. If I have to, I'll try writing a c program to communicate over tcp/ip to the telnet port, but I'm hoping for a cleaner solution.

We have a bundle that allows you to telnet into a remote shell.
We also have a web console that you can use to remotely "manage" the framework. There also is a JMX based interface to (again remotely) connect and manage bundles.
...and I might be forgetting one or two... ;)

So, problem 1) start Felix and force all installed bundles to start, no matter where they left off. Problem 2) issue framework command to a running Felix framework from the same host device.

<shameless-plug>
You might also want to take a look at Apache ACE, in incubation currently, that is a system for remotely managing and updating OSGi bundles and configuration data.
</shameless-plug>

Of course, there are other alternatives for that too, such as the Apache Felix File Installer and Apache Felix Karaf subprojects found here.

Greetings, Marcel


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to