Fixed osgi
Note: due to limited scope you might need to do
BeanResolver.getInstance().register() for java classes in an OSGi
environment...