...
The standard bean definition resource provides parent bean definitions and assistance with migration from olders older versions of the MDA.
Parent bean definitions
...
mda.RelocatedBeanFactoryPostProcessor
is an abstract bean providing access to the Shibboleth support class implementing the migration assistance functionality.mda.MigrationClassMap
is a<util:map>
from old class names to new class names.mda.MigrationBeanMap
is a<util:map>
from old bean names to new bean names.mda.MigrationAssistanceBean
is instantiated in every configuration and references the maps above; if it encounters one of the “old” names it logs a warning message and (where appropriate) changes your configuration on-the-fly to refer to the replacement name.
...
You can override mda.MigrationClassMap
and mda.MigrationBeanMap
in the same way, or define another instance of mda.RelocatedBeanFactoryPostProcessor
if you need similar assistance in migrating classes and beans of your own.Important note: the Spring Framework technology on which this feature is built has limitations; the principal limitation being that it can only migrate bean names and class names in beans defined at the outer level of the configuration. Beans defined within other beans (“inner beans”) are not visible to it and migration assistance will not be available for them.
Migration assistance and Spring contexts
The mda.MigrationAssistanceBean
will only be instantiated in the Spring context in which the standard bean definition resource is imported. This instance of the bean will be able to process other beans instantiated within that context. It will not process uninstantiated bean definitions (e.g., lazy-initialised beans which are not used, abstract beans).
If your application uses child contexts, note that in general bean definitions are inherited from parent contexts, but those bean definitions are not instantiated. This means that the MigrationAssistanceBean
from the parent context will not be able to process beans instantiated in the child context.
If you need migration assistance in a child context, instantiate the bean again in the child context like this:
Code Block | ||
---|---|---|
| ||
<bean id="child.MigrationAssistanceBean" lazy-init=false
parent="mda.MigrationAssistanceBean"/> |