Hi,
IMHO, you could define a new ROLE (something like this):
---
package my.avalon.xmldb;
import org.xmldb.api.base.Collection;
public interface XMLDataSource {
public final static String ROLE = XMLDataSource.class.getName();
/**
* acceptsURI determines whether this Database implementation can
handle the URI.
*/
public boolean acceptsURI(java.lang.String uri) throws Exception;
/**
* Retrieves a Collection instance based on the URI provided in the
uri parameter.
*/
public Collection getCollection(String uri, String username, String
password) throws Exception;
/**
* Returns the XML:DB API Conformance level for the implementation.
*/
public String getConformanceLevel();
/**
* Returns the name associated with the Database instance.
*/
public String getName();
}
---
this interface is an Adapter from org.xmldb.api.base.Database to Avalon
Concept (no public use of DatabaseManager). where getCollection is
similar to getConnection of DataSource for RDBMS.
This interface could be simply implemented for all xmldb complient base
(like Xindice), may be it's possible to create a generic implementation
that wrappe xmldb.DatabaseManager and xmldb.Configurable in a
Configurable service.
!! don't throw XMLDBException to avoid dependencies and
CascadingException.
This my 2 cents.
> hy , i would made avalon component to use XML database (Xindice) with the
> DataSource Interface , but the getConnection return a java.sql.connection ..
>
> the datasource is specific to relational base and not general.
> so which interface should i use ?
>
>
--
--------------------------------------------------------------
David "Dwayne" Bernard Freelance Developer (Java)
mailto:[EMAIL PROTECTED]
\|/ http://dwayne.java-fan.com
--o0O @.@ O0o-------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]