[ 
http://issues.apache.org/jira/browse/IBATISNET-74?page=comments#action_66396 ]
     
Ron Grabowski commented on IBATISNET-74:
----------------------------------------

I realize that URI schemas(?) aren't limited to just the familiar http://, 
ftp://, etc. but I don't think we should be so quick to introduce our own 
naming conventions:

 resource://
 embedded://

I don't know of any .Net project that uses notation like that. I'm not 
necessary opposed to it, I just don't think it should be the first choice. 
Configure(string) doesn't need to handle every possible type of file location! 

My revised suggestion is this:

 Configure(string);  // convience method for relative paths
 Configure(FileInfo);  
 Configure(Stream); 
 Configure(XmlDocument); // log4net uses XmlElement...
 Configure(Uri); // ???
 ConfigureAndWatch(string); // convience method for relative paths
 ConfigureAndWatch(FileInfo);

There are already helper functions to get an embedded resource. I don't think 
we need to duplicate this functionality in Configure(string). I think the 
common case will be for relative paths...even though everyone in this thread is 
trying to read from a non-relative path :)

> Improvement for configuration
> -----------------------------
>
>          Key: IBATISNET-74
>          URL: http://issues.apache.org/jira/browse/IBATISNET-74
>      Project: iBatis for .NET
>         Type: Improvement
>  Environment: .NET
>     Reporter: Gilles Bayon
>     Assignee: Gilles Bayon
>     Priority: Minor
>      Fix For: DataMapper 1.2

>
> To improve loading of sqlMap/dao.config files and make it more clearly, I 
> propose to use the same syntax as for other tag.
> Loading of sqlMap/dao.config files with relative path : 
> SqlMapper.Configure("resource:sqlMap.Config") or 
> SqlMapper.Configure("sqlMap.Config") [to keep old syntax][+ idem for 
> ConfigureAndWatch]
> Loading of sqlMap/dao.config files with absolute path : 
> SqlMapper.Configure("url:c:\MyDirectory\sqlMap.Config") [+ idem for 
> ConfigureAndWatch]
> Loading of sqlMap/dao.config files embedded : 
> SqlMapper.Configure("embedded:A.B.SqlMap.Config, assembyName") 
> [ConfigureAndWatch will not be allow]

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to