A Bundle provides services and has a lifecyle:
- register the services that it provides
- initialize the services
One bundle might have multiple services
When initialize() is called before registerServices,
the behavior is undefined
There is a probably a better way to do this with the xmlencoder
but the purpose of this provide a way for urls to be relative to
the context where they are defined.
This method used to create the UrlCurnitProvider, but that call actually loaded in
the curnit, which could be slow or could have an IOException,
so now that is delayed until the provider is actually needed.
call registerServices on all of the bundles call initializeBundle on each
bundle
All the bundles must be registered first, and after that
the bundles can be initialized
Sets contextURL to the bundle as necessary