-
1. Re: check if bundles are active, no log errors etc - remotely
martinmurphy May 19, 2009 9:24 AM (in response to tokc)You should be able to use the remote console to do this.
-
2. Re: check if bundles are active, no log errors etc - remotely
tokc May 19, 2009 10:14 AM (in response to martinmurphy)Hi Martin,
thx, but that's not what I mean. I want it to be automatic, so I can use a tool to do it. Like invoking some method pleaseTellMeIfAllMyBundlesAreDeployedFine. Or even better to be notified (some listener thingie) when it happens.
I don't want to do anything by hand.
--
best regards
Tomek Kaczanowski
-
3. Re: check if bundles are active, no log errors etc - remotely
stlewis May 20, 2009 9:19 AM (in response to tokc)You can definitely get all this info via JMX, as an example connect jconsole to servicemix and you'll see there's an osgi.core mbean. With this mbean you can browse what bundles are deployed, query their states, etc. Using JMX though would the require you to poll this mbean on a regular basis to get the kind of notifications you're looking for.
-
4. Re: check if bundles are active, no log errors etc - remotely
pchandler May 20, 2009 10:30 AM (in response to stlewis)My two cents (something to try):
1. For the bundles your trying to test register/open them using org.osgi.util.tracker.ServiceTracker.
2. In your test bundle can now use org.osgi.util.tracker.ServiceTracker.waitForService or maybe getTrackingCount().
The General Question is: How do you do a automated/programmic OSGi Service Bundle testing (junit for OSGi)?
1. First wait for the test target bundle(s) to be deployed "active"
2. Run unit tests.
3. Report results.
FUSE ... any suggestions? How to you unit test your product bundles?
-
5. Re: check if bundles are active, no log errors etc - remotely
frederic.conrotte Aug 12, 2009 11:26 AM (in response to pchandler)See http://fusesource.com/forums/thread.jspa?threadID=1120
Edited by: frederic.conrotte on Aug 12, 2009 3:26 PM