Using something like this :
DASFactory.registerFactory("RDB", "
org.apache.tuscany.das.rdb.impl.DASFactoryImpl");

Implies that the user needs to know about the impl, and register it, this
was something I was avoiding to do, and was suggesting the Service locator
or a different pattern to discover and register the impls.

--
Luciano Resende
http://people.apache.org/~lresende

On 2/21/07, Adriano Crestani <[EMAIL PROTECTED]> wrote:

I suggest:

DASFactory.registerFactory("RDB", "
org.apache.tuscany.das.rdb.impl.DASFactoryImpl");
DASFactory factory = DASFactory.getInstance("RBD")
DAS rdbDAS = factory.creDas(...)

would it work? Than there would be possible to add factories dynamically.

Adriano Crestani

On 2/21/07, Luciano Resende <[EMAIL PROTECTED]> wrote:
>
> Current DAS only have one implementation supporting Relational Database
> (RDB). In order to allow DAS to support multiple implementations (e.gLDAP
> DAS proposed by Ole Ersoy :
> http://www.mail-archive.com/[email protected]/msg13395.html) I
> would
> like to propose some changes on the DAS project structure as explained
> below
> :
>
> 1.Create an das-api project, and move the general interfaces, and maybe
> part
> of the config model to this project as well.
> 2.das-rdb and das-ldap would depend on this common das-api project
> 3.Enhance the factory pattern to handle multiple das implementations,
> probably implementing the service locator pattern to handle the multiple
> implementations.
>
> The new programming model would probably look like :
>
> DASFactory factory = DASFactory.getInstance("RBD")
> DAS rdbDAS = factory.creDas(...)
>
> Current unresolved issue that I have is regarding the config mode, i
think
> this might be specific to each implementation, and I need to see what's
> the
> best approach to handle this on the das-api.
>
> I should have something in my sandbox over the weekend.
>
> Thoughts ?
>
> --
> Luciano Resende
> http://people.apache.org/~lresende
>

Reply via email to