[ 
https://issues.apache.org/jira/browse/FC-26?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14189985#comment-14189985
 ] 

Emmanuel Lecharny commented on FC-26:
-------------------------------------

One solution might be to add a parameter (optional) to the manager factories :

{code}
            AccessMgr am = AccessMgrFactory.createInstance( 
TestUtils.getContext() );
{code}

could become :

{code}
            AccessMgr am = AccessMgrFactory.createInstance( configInstance, 
TestUtils.getContext() );
{code}

with a configInstance being created before. If we don't pass this config 
instance, then it's created on the fly the very first time we ask a factory is 
requested to create an instance of a manager. That requires a bit of 
protection, as the API might be used by many threads, though.

Other option : we load the config from disk - or create a default one if we 
don't have any config file - statically. If the user passes a config as a 
parameter to a factory, then this config will be used instead of the stored 
one. A bit error prone, IMHO...

> Make it possible to programatically configure Fortress
> ------------------------------------------------------
>
>                 Key: FC-26
>                 URL: https://issues.apache.org/jira/browse/FC-26
>             Project: FORTRESS-CORE
>          Issue Type: New Feature
>    Affects Versions: 1.0-RC27
>            Reporter: Emmanuel Lecharny
>             Fix For: 1.0.0
>
>
> Currently, all the fortress configuration is done though a configuration file.
> It would be very convenient to be able to configure Fortress without 
> depending on a configuration file.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to