Hello Marcus!
MC> Fortress currently automatically configures several components based on
MC> meta data preconfigured when fortress was built including data sources,
MC> source resolver, etc.
Well it actually should have been the source resolver only.
MC> Has anyone had any success overriding them, or adding to them, when using
MC> the roles file approach ?
MC> Found out what was going on - after looking into the Fortress source I found
MC> out that it sets up the SourceResolver manually in ContextManager IIRC.
MC> For the moment I've modified ContextManager manually as well to test out
MC> my new Source implementation, but if anyone has done this automatically via
MC> roles or metadata it would be great to hear how :)
Feel free to bug me on this :)
Here's how I would go about it:
1) using roles should be totally unnecessary, meta-data is probably
more predictable with fortress :)
2) try putting into your .xconf file something like this
<cofig>
<resolver id='resolver'/>
<file-source id='file'/>
<resource-source id='context'/>
<url-source id='does-not-matter' default='true'/>
<http-client-source id='http'/>
...
</config>
(For a real-life use case some of the
source factories described here are probably extraneous,
especially url-source and http-client-source
are likely not to be needed together, unless you want
to handle also 'ftp:' of course :-)
(This assumes that your HttpSourceFactory has got
* @avalon.component
* @avalon.service type=SourceFactory
* @x-avalon.info name=http-client-source
* @x-avalon.lifestyle type=singleton)
Please let me know if it does not work!
This source resolver will be mounted in the
DefaultContainer (precisely be provided via
its ServiceManager) thus overriding SourceResolver
provided by the root ServiceManager populated
in ContextManager.
-Anton
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]