OSGi fixes

https://issues.jboss.org/browse/ISPN-4785
https://issues.jboss.org/browse/ISPN-4786
https://issues.jboss.org/browse/ISPN-4788
https://issues.jboss.org/browse/ISPN-4789