The Spring Extension Factory builds a bridge between the Eclipse Extension
Registry and the Spring Framework (especially Spring Dynamic Modules).
It allows you to define your extension as a spring bean within the spring
application context of your bundle. If you would like to use this bean as an
instance of an extension (an Eclipse RCP view, for example) you define the
extension with this spring extension factory as the class to be created.
To let the spring extension factory pick the right bean from your application
context you need to set the bean id to the same value as the id of the view
within the view definition, for example. This is important if your extension
definition contains more than one element, where each element has its own id.
If the extension definition elements themselves have no id attribute the
spring extension factory uses the id of the extension itself to identify the
bean.
original code from:
Blog entry