You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ibatis.apache.org by ro...@apache.org on 2005/05/30 06:33:58 UTC
svn commit: r179011 - in /incubator/ibatis/trunk/cs: ./
docs/dataAccessGuide/src/en/ docs/dataAccessGuide/styles/
docs/dataMapperGuide/src/en/ docs/dataMapperGuide/styles/
Author: roberto
Date: Sun May 29 21:33:56 2005
New Revision: 179011
URL: http://svn.apache.org/viewcvs?rev=179011&view=rev
Log:
~Updated C# docs: lots of edits for configuration
~Updated C# docs fopdf.xsl (left-align text instead of full justification)
Modified:
incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/configuration.xml
incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/handler.xml
incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/index.xml
incubator/ibatis/trunk/cs/docs/dataAccessGuide/styles/fopdf.xsl
incubator/ibatis/trunk/cs/docs/dataMapperGuide/src/en/dotnet.xml
incubator/ibatis/trunk/cs/docs/dataMapperGuide/src/en/index.xml
incubator/ibatis/trunk/cs/docs/dataMapperGuide/src/en/introduction.xml
incubator/ibatis/trunk/cs/docs/dataMapperGuide/styles/fopdf.xsl
incubator/ibatis/trunk/cs/to-do.txt
Modified: incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/configuration.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/configuration.xml?rev=179011&r1=179010&r2=179011&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/configuration.xml (original)
+++ incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/configuration.xml Sun May 29 21:33:56 2005
@@ -123,7 +123,7 @@
assemblies we need will be created under
<filename>\source\IBatisNet.DataAccess\bin\Debug</filename>. The created
assemblies are : <filename>IBatisNet.Common.dll</filename> and
- <filename>iBatisNet.DataAccess.dll</filename>. The DataMapper has
+ <filename>iBatisNet.DataAccess.dll</filename>. The framework has
external dependencies on <filename>Castle.DynamicProxy.dll</filename>
(creating proxies) and <filename>log4net.dll</filename> (logging). Both
of these dependencies are found in the External-Bin folder and can also
@@ -147,7 +147,7 @@
application. It may be a library project that your application project
references. You need to add two references to your project: <orderedlist>
<listitem>
- IBatisNet.DataAccess.dll
+ IBatisNet.DataAccess.dll
</listitem>
<listitem>
@@ -298,6 +298,8 @@
<daoConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="DaoConfig.xsd">
+<providers resource="providers.config">
+
<emphasis role="comment"><!-- Example ADO.NET DAO Configuration --></emphasis>
<context id="<emphasis role="blue">SimpleDao</emphasis>" default="<emphasis
role="blue">true</emphasis>">
@@ -330,7 +332,12 @@
<daoSessionHandler id="SqlMap">
<property name="resource" value="<emphasis role="blue">SqlMap.config</emphasis>"/>
- </daoSessionHandler>
+<emphasis role="comment"> <!--
+ url and embedded options are also available
+ <property name="url" value="C:\iBATIS\IBatisNet.DataAccess.Test\bin\Debug\SqlMap.config"/>
+ <property name="embedded" value="bin.Debug.SqlMap.config, IBatisNet.DataAccess.Test"/>
+ -->
+</emphasis> </daoSessionHandler>
<daoFactory>
<dao interface="<emphasis role="blue">IBatisNet.Test.Dao.Interfaces.IAccountDao, IBatisNet.Test</emphasis>"
@@ -409,9 +416,9 @@
<sect2>
- <title>type Attribute</title>
+ <title>type Attributes</title>
- When specifying a type attribute within configuration, the type attribute value must be a fully qualified type name following the format:
+ In general, when specifying a type attribute within a configuration file, a type attribute value must be a fully qualified type name following the format:
<programlisting> type="[namespace.class], [assembly name],
Version=[version], Culture=[culture],
@@ -432,123 +439,141 @@
</sect2>
<sect2>
- <title>The <context> Element</title>
+ <title>The <providers> Element</title>
- <para>A DAO context is a grouping of related configuration information
- and DAO implementations for a specific database and provider.</para>
+ <para>Under ADO.NET, a database system is accessed through a provider. A
+ database system can use a custom provider or a generic ODBC provider.
+ iBATIS.NET uses a pluggable approach to installing providers. Each
+ provider is represented by an XML descriptor element. The list of
+ providers you might want to use can be kept in a separate XML descriptor
+ file. The iBATIS.NET distribution includes the standard
+ <filename>providers.config</filename> file with a set of thirteen
+ prewritten provider elements:</para>
- <table>
- <title>Attributes of the <context> element</title>
+ <para><itemizedlist>
+ <listitem>
+ sqlServer1.0 - Microsoft SQL Server 7.0/2000 provider available with .NET Framework 1.0
+ </listitem>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Attribute</entry>
+ <listitem>
+ sqlServer1.1 -Microsoft SQL Server 7.0/2000 provider available with .NET Framework 1.1
+ </listitem>
- <entry>Description</entry>
- </row>
- </thead>
+ <listitem>
+ OleDb1.1 - OleDb provider available with .NET Framework 1.1
+ </listitem>
- <tbody>
- <row>
- <entry><emphasis>id</emphasis></entry>
+ <listitem>
+ Odbc1.1 - Odbc provider available with .NET Framework 1.1
+ </listitem>
- <entry>Context id</entry>
- </row>
+ <listitem>
+ oracle9.2 - Oracle provider V9.2.0.401
+ </listitem>
- <row>
- <entry><emphasis>default</emphasis></entry>
+ <listitem>
+ oracle10.1 - Oracle provider V10.1.0.301
+ </listitem>
- <entry>Global setting to indicate if this is the default
- context</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </sect2>
+ <listitem>
+ oracleClient1.0 - MS Oracle provider V1.0.5 available with .NET Framework 1.1
+ </listitem>
- <sect2>
- <title>The <properties> Element</title>
+ <listitem>
+ ByteFx - ByteFx MySQL provider V0.7.6.15073
+ </listitem>
- <para>Sometimes the values we use in an XML configuration file occur in
- more than one element. Often, there are values that change when we move
- the application from one server to another. To help you manage
- configuration values, you can specify a standard properties file (with
- name=value entries) as part of a Data Access configuration. Each named
- value in the properties file becomes a <emphasis>shell</emphasis>
- variable that can be used throughout the Data Access
- configuration.</para>
+ <listitem>
+ MySql - MySQL provider V1.0.4.20163
+ </listitem>
- <para>Properties are handy during building, testing, and deployment.
- Additionally, properties make it easy to reconfigure your application
- for multiple environments or to use automated tools for configuration
- such as NAnt.</para>
-
- <para>The <properties> element can only accept one of the
- following attributes to specify the location of the properties
- file.</para>
+ <listitem>
+ SQLite3 - SQLite.NET provider V0.21.1869.3794
+ </listitem>
- <table>
- <title>Attributes of the <properties> element</title>
+ <listitem>
+ Firebird1.7 - Firebird SQL .NET provider V1.7.0.33200
+ </listitem>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Attribute</entry>
+ <listitem>
+ PostgreSql0.7 - Npgsql provider V0.7.0.0
+ </listitem>
- <entry>Description</entry>
- </row>
- </thead>
+ <listitem>
+ iDb2.10 - IBM DB2 iSeries provider V10.0.0.0
+ </listitem>
+ </itemizedlist></para>
- <tbody>
- <row>
- <entry><emphasis>resource</emphasis></entry>
+ <para>The <filename>providers.config</filename> file can be found under
+ <filename>\source\IBatisNet.DataAccess.Test\bin\Debug</filename> in the
+ iBATIS.NET source distribution or in the root folder of the .NET
+ DataAccess binary distribution.</para>
+
+ <para>A provider may require libraries that you do not have installed,.
+ Therefore, the provider element has an "enabled" attribute that allows
+ you to disable unused providers. One provider can also be marked as the
+ "default" and will be used if another is not specified by your
+ configuration.</para>
- <entry>Specify the properties file name files to be loaded from
- the root directory of the application (relative
- path)<programlisting>resource="properties.config"</programlisting></entry>
- </row>
+ <para>The standard <filename>providers.config</filename> file has
+ sqlServer1.1 set as the default and the sqlServer1.0 provider disabled.
+ Aside from sqlServer1.1, OleDb1.1, and Odbc1.1, all other providers are
+ disabled by default. Remember to set the "enabled" attribute to "true"
+ for the provider that you will be using.</para>
+
+ <important>
+ <para>ByteFx is the recommended provider if you are using MySQL. You
+ may download ByteFx from the MySQLNet SourceForge site
+ (http://sf.net/projects/mysqlnet/). If the ByteFx license is
+ acceptable to you, you may install it as a reference within your
+ application and enable the ByteFx provider.</para>
+ </important>
+
+ <para><tip>
+ <para>Be sure to review the <filename>providers.config</filename>
+ file and confirm that the provider you intend to use is enabled!
+ (Set the enabled attribute to true.)</para>
+ </tip></para>
+ <table>
+ <title>Expected default locations of the providers.config file</title>
+
+ <tgroup cols="2">
+ <tbody>
<row>
- <entry><emphasis>url</emphasis></entry>
+ <entry>Windows, Library, or Test projects (using NUnit or
+ equivalent)</entry>
- <entry>Specify the properties file to be loaded through an
- absolute path<programlisting>url="<filename>c:\Web\MyApp\Resources\properties</filename>.config"
-or
-url="file://<filename>c:\Web\MyApp\Resources\properties</filename>.config"</programlisting></entry>
+ <entry>With the assembly (.dll) files with the
+ <filename>app.config</filename> file</entry>
</row>
<row>
- <entry><emphasis>embedded</emphasis></entry>
+ <entry>Web projects</entry>
- <entry>Specify the properties file to be loaded as an embedded
- resource in an assembly. Syntax for the embedded attribute is
- '<emphasis>[extendednamespace.]filename, the name of the
- assembly which contains the embedded
- resource</emphasis>'<programlisting>embedded="Resources.properties.config, MyApp.Data"</programlisting></entry>
+ <entry>In the project base directory, with the
+ <filename>web.config</filename> file</entry>
</row>
</tbody>
</tgroup>
</table>
+ <para>To use the file, you can copy it into your project at the expected
+ default location, give a path to the file relative to the project root
+ directory, specify a url (absolute path) to its location, or make it an
+ embedded resource of your project. If you copy the file into the
+ expected default location, the <providers> element is not required
+ in your dao.config file.</para>
+
<sect3>
- <title><property> element and attributes</title>
+ <title><providers> attributes</title>
- <para>You can also specify more than one properties file or add
- property keys and values directly into your
- <filename>dao.config</filename> file by using <property>
- elements. For example:</para>
-
- <informalexample>
- <programlisting><properties>
- <property resource="myProperties.config"/>
- <property resource="anotherProperties.config"/>
- <property key="host" value="ibatis.com" />
-</properties></programlisting>
- </informalexample>
+ <para>The <providers> element can accept one of the following
+ attributes to specify the location of the providers.config
+ file.</para>
<table>
- <title>Attributes of the <property> element</title>
+ <title>Attributes of the <providers> element</title>
<tgroup cols="2">
<thead>
@@ -563,41 +588,32 @@
<row>
<entry><emphasis>resource</emphasis></entry>
- <entry>Specify the properties file to be loaded from the root
- directory of the application<programlisting>resource="properties.config"</programlisting></entry>
+ <entry>Specify the file to be loaded from a relative path from
+ the project root directory. Since the root directory is
+ different depending on the project type, it is best to use a
+ properties variable to indicate the relative path. Having that
+ variable defined in a properties file makes it easy to change
+ the path to all your DataAccess configuration resources in one
+ location.<programlisting>resource="${root}providers.config"</programlisting></entry>
</row>
<row>
<entry><emphasis>url</emphasis></entry>
- <entry>Specify the properties file to be loaded through an
- absolute path.<programlisting>url="<filename>c:\Web\MyApp\Resources\properties</filename>.config"
+ <entry>Specify the providers.config to be loaded through an
+ absolute path.<programlisting>url="<filename>c:\Web\MyApp\</filename>Resources\providers.config"
or
-url="file://<filename>c:\Web\MyApp\Resources\properties</filename>.config"</programlisting></entry>
+url="file://<filename>c:\</filename><filename><filename>Web\MyApp\</filename>Resources\</filename>providers.config"</programlisting></entry>
</row>
<row>
<entry><emphasis>embedded</emphasis></entry>
- <entry>Specify the properties file to be loaded as an embedded
- resource in an assembly. Syntax for the embedded attribute is
- '<emphasis>[extendednamespace.]filename, the name of the
- assembly which contains the embedded
- resource</emphasis>'<programlisting>embedded="Resources.properties.config, MyApp.Data"</programlisting></entry>
- </row>
-
- <row>
- <entry><emphasis>key</emphasis></entry>
-
- <entry>Defines a property key (variable) name<programlisting>key="username"</programlisting></entry>
- </row>
-
- <row>
- <entry><emphasis>value</emphasis></entry>
-
- <entry>Defines a value that will be used by the framework in
- place of the the specified property
- key/variable<programlisting>value="mydbuser"</programlisting></entry>
+ <entry>Specify the providers.config file to be loaded as an
+ embedded resource in an assembly. Syntax for the embedded
+ attribute is '<emphasis>[extendednamespace.]filename, the name
+ of the assembly which contains the embedded
+ resource</emphasis>'<programlisting>embedded="Resources.providers.config, MyApp.Data"</programlisting></entry>
</row>
</tbody>
</tgroup>
@@ -606,145 +622,63 @@
</sect2>
<sect2>
- <title>The <database> Element</title>
+ <title>The <context> Element</title>
- <para>The <database> element encloses elements that configure the
- database system for use by the framework. These are the <provider>
- and <datasource> elements.</para>
+ <para>A DAO context is a grouping of related configuration information
+ and DAO implementations for a specific database and provider.</para>
- <sect3>
- <title>The <provider> Element</title>
+ <table>
+ <title>Attributes of the <context> element</title>
- <para>The <provider> element specifies a database provider from
- the <filename>providers.config</filename> file.</para>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Attribute</entry>
- <para>Under ADO.NET, a database system is accessed through a provider.
- A database system can use a custom provider or a generic ODBC
- provider. iBATIS.NET uses a pluggable approach to installing
- providers. Each provider is represented by an XML descriptor element.
- The list of providers you might want to use can be kept in a separate
- XML descriptor file. The iBATIS.NET distribution includes the standard
- <filename>providers.config</filename> file with a set of thirteen
- prewritten provider elements:</para>
-
- <para><itemizedlist>
- <listitem>
- sqlServer1.0 - Microsoft SQL Server 7.0/2000 provider available with .NET Framework 1.0
- </listitem>
-
- <listitem>
- sqlServer1.1 -Microsoft SQL Server 7.0/2000 provider available with .NET Framework 1.1
- </listitem>
-
- <listitem>
- OleDb1.1 - OleDb provider available with .NET Framework 1.1
- </listitem>
-
- <listitem>
- Odbc1.1 - Odbc provider available with .NET Framework 1.1
- </listitem>
-
- <listitem>
- oracle9.2 - Oracle provider V9.2.0.401
- </listitem>
-
- <listitem>
- oracle10.1 - Oracle provider V10.1.0.301
- </listitem>
-
- <listitem>
- oracleClient1.0 - MS Oracle provider V1.0.5 available with .NET Framework 1.1
- </listitem>
-
- <listitem>
- ByteFx - ByteFx MySQL provider V0.7.6.15073
- </listitem>
-
- <listitem>
- MySql - MySQL provider V1.0.4.20163
- </listitem>
-
- <listitem>
- SQLite3 - SQLite.NET provider V0.21.1869.3794
- </listitem>
-
- <listitem>
- Firebird1.7 - Firebird SQL .NET provider V1.7.0.33200
- </listitem>
-
- <listitem>
- PostgreSql0.7 - Npgsql provider V0.7.0.0
- </listitem>
-
- <listitem>
- iDb2.10 - IBM DB2 iSeries provider V10.0.0.0
- </listitem>
- </itemizedlist></para>
-
- <para>The <filename>providers.config</filename> file can be found
- under <filename>\source\IBatisNet.DataAccess.Test\bin\Debug</filename>
- in the iBATIS.NET source distribution or in the root folder of the
- .NET DataMapper binary distribution.</para>
-
- <para>A provider may require libraries that you do not have
- installed,. Therefore, the provider element has an "enabled" attribute
- that allows you to disable unused providers. One provider can also be
- marked as the "default" and will be used if another is not specified
- by your configuration.</para>
-
- <para>The standard <filename>providers.config</filename> file has
- sqlServer1.1 set as the default and the sqlServer1.0 provider
- disabled. Aside from sqlServer1.1, OleDb1.1, and Odbc1.1, all other
- providers are disabled by default. Remember to set the "enabled"
- attribute to "true" for the provider that you will be using.</para>
-
- <important>
- <para>ByteFx is the recommended provider if you are using MySQL. You
- may download ByteFx from the MySQLNet SourceForge site
- (http://sf.net/projects/mysqlnet/). If the ByteFx license is
- acceptable to you, you may install it as a reference within your
- application and enable the ByteFx provider.</para>
- </important>
-
- <para><tip>
- <para>Be sure to review the <filename>providers.config</filename>
- file and confirm that the provider you intend to use is enabled!
- (Set the enabled attribute to true.)</para>
- </tip></para>
+ <entry>Description</entry>
+ </row>
+ </thead>
- <table>
- <title>Expected default locations of the providers.config
- file</title>
+ <tbody>
+ <row>
+ <entry><emphasis>id</emphasis></entry>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>Windows, Library, or Test projects (using NUnit or
- equivalent)</entry>
+ <entry>Context id</entry>
+ </row>
- <entry>With the assembly (.dll) files with the
- <filename>app.config</filename> file</entry>
- </row>
+ <row>
+ <entry><emphasis>default</emphasis></entry>
- <row>
- <entry>Web projects</entry>
+ <entry>Global setting to indicate if this is the default
+ context</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
- <entry>In the project base directory, with the
- <filename>web.config</filename> file</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
+ <sect3>
+ <title>The <properties> Element</title>
- <para>To use the file, you can copy it into your project at the
- expected default location, give a path to the file relative to the
- project root directory, specify a url (absolute path) to its location,
- or make it an embedded resource of your project. If you copy the file
- into the expected default location, the <providers> element is
- not required in your dao.config file.</para>
+ <para>Sometimes the values we use in an XML configuration file occur
+ in more than one element. Often, there are values that change when we
+ move the application from one server to another. To help you manage
+ configuration values, you can specify a standard properties file (with
+ name=value entries) as part of a Data Access configuration. Each named
+ value in the properties file becomes a <emphasis>shell</emphasis>
+ variable that can be used throughout the Data Access
+ configuration.</para>
+
+ <para>Properties are handy during building, testing, and deployment.
+ Additionally, properties make it easy to reconfigure your application
+ for multiple environments or to use automated tools for configuration
+ such as NAnt.</para>
+
+ <para>The <properties> element can only accept one of the
+ following attributes to specify the location of the properties
+ file.</para>
<table>
- <title>Attributes of the <provider> element</title>
+ <title>Attributes of the <properties> element</title>
<tgroup cols="2">
<thead>
@@ -757,90 +691,195 @@
<tbody>
<row>
- <entry><emphasis>name</emphasis></entry>
-
- <entry>Name used to uniquely identify the provider</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </sect3>
-
- <sect3>
- <title>The <dataSource> Element</title>
-
- <para>The <datasource> element specifies the connection string
- for a specific database and provider.</para>
-
- <table>
- <title>Attributes of the <dataSource> element</title>
-
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Attribute</entry>
+ <entry><emphasis>resource</emphasis></entry>
- <entry>Description</entry>
+ <entry>Specify the properties file name files to be loaded
+ from the root directory of the application (relative
+ path)<programlisting>resource="properties.config"</programlisting></entry>
</row>
- </thead>
- <tbody>
<row>
- <entry><emphasis>name</emphasis></entry>
+ <entry><emphasis>url</emphasis></entry>
- <entry>Name used to identify the data source</entry>
+ <entry>Specify the properties file to be loaded through an
+ absolute path<programlisting>url="<filename>c:\Web\MyApp\Resources\properties</filename>.config"
+or
+url="file://<filename>c:\Web\MyApp\Resources\properties</filename>.config"</programlisting></entry>
</row>
<row>
- <entry><emphasis>connectionString</emphasis></entry>
+ <entry><emphasis>embedded</emphasis></entry>
- <entry>The connection string to the database</entry>
+ <entry>Specify the properties file to be loaded as an embedded
+ resource in an assembly. Syntax for the embedded attribute is
+ '<emphasis>[extendednamespace.]filename, the name of the
+ assembly which contains the embedded
+ resource</emphasis>'<programlisting>embedded="Resources.properties.config, MyApp.Data"</programlisting></entry>
</row>
</tbody>
</tgroup>
</table>
- </sect3>
- </sect2>
- <sect2>
- <title>The <daoSessionHandler> Element</title>
+ <sect4>
+ <title><property> element and attributes</title>
- <para>The <daoSessionHandler> element specifies the component that
- <isPropertyAvailable property="id" > ACCOUNT_ID=#id#
- </isPropertyAvailable>manages transaction and connections for a
- session.</para>
+ <para>You can also specify more than one properties file or add
+ property keys and values directly into your
+ <filename>dao.config</filename> file by using <property>
+ elements. For example:</para>
- <table>
- <title>Attributes of the <daoSessionHandler> element</title>
+ <informalexample>
+ <programlisting><properties>
+ <property resource="myProperties.config"/>
+ <property resource="anotherProperties.config"/>
+ <property key="host" value="ibatis.com" />
+</properties></programlisting>
+ </informalexample>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Attribute</entry>
+ <table>
+ <title>Attributes of the <property> element</title>
- <entry>Description</entry>
- </row>
- </thead>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Attribute</entry>
- <tbody>
- <row>
- <entry><emphasis>id</emphasis></entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
- <entry>Id used to uniquely identify the handler</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
+ <tbody>
+ <row>
+ <entry><emphasis>resource</emphasis></entry>
+
+ <entry>Specify the properties file to be loaded from the
+ root directory of the application<programlisting>resource="properties.config"</programlisting></entry>
+ </row>
+
+ <row>
+ <entry><emphasis>url</emphasis></entry>
+
+ <entry>Specify the properties file to be loaded through an
+ absolute path.<programlisting>url="<filename>c:\Web\MyApp\Resources\properties</filename>.config"
+or
+url="file://<filename>c:\Web\MyApp\Resources\properties</filename>.config"</programlisting></entry>
+ </row>
+
+ <row>
+ <entry><emphasis>embedded</emphasis></entry>
+
+ <entry>Specify the properties file to be loaded as an
+ embedded resource in an assembly. Syntax for the embedded
+ attribute is '<emphasis>[extendednamespace.]filename, the
+ name of the assembly which contains the embedded
+ resource</emphasis>'<programlisting>embedded="Resources.properties.config, MyApp.Data"</programlisting></entry>
+ </row>
+
+ <row>
+ <entry><emphasis>key</emphasis></entry>
+
+ <entry>Defines a property key (variable)
+ name<programlisting>key="username"</programlisting></entry>
+ </row>
+
+ <row>
+ <entry><emphasis>value</emphasis></entry>
+
+ <entry>Defines a value that will be used by the framework in
+ place of the the specified property
+ key/variable<programlisting>value="mydbuser"</programlisting></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </sect4>
+ </sect3>
<sect3>
- <title>The <property > Element</title>
+ <title>The <database> Element</title>
- <para>Some <daoSessionHandler> implementations (such as SqlMap
- and NHibernate) need additional information for configuration. The
- <property> element is used to specify this information.</para>
+ <para>The <database> element encloses elements that configure
+ the database system for use by the framework. These are the
+ <provider> and <datasource> elements.</para>
+
+ <sect4>
+ <title>The <provider> Element</title>
+
+ <para>The <provider> element specifies a database provider
+ from the <filename>providers.config</filename> file.</para>
+
+ <para>If the default provider is being used, the <provider>
+ element is optional. Or, if several providers are available, one may
+ be selected using the provider element without modifying the
+ <filename>providers.config</filename> file. <programlisting><provider name="OleDb1.1" /></programlisting></para>
+
+ <table>
+ <title>Attributes of the <provider> element</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Attribute</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><emphasis>name</emphasis></entry>
+
+ <entry>Name used to uniquely identify the provider</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </sect4>
+
+ <sect4>
+ <title>The <dataSource> Element</title>
+
+ <para>The <datasource> element specifies the connection string
+ for a specific database and provider.</para>
+
+ <table>
+ <title>Attributes of the <dataSource> element</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Attribute</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><emphasis>name</emphasis></entry>
+
+ <entry>Name used to identify the data source</entry>
+ </row>
+
+ <row>
+ <entry><emphasis>connectionString</emphasis></entry>
+
+ <entry>The connection string to the database</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </sect4>
+ </sect3>
+
+ <sect3>
+ <title>The <daoSessionHandler> Element</title>
+
+ <para>The <daoSessionHandler> element specifies the component
+ that manages transaction and connections for a session.</para>
<table>
- <title>Attributes of the <property> element</title>
+ <title>Attributes of the <daoSessionHandler> element</title>
<tgroup cols="2">
<thead>
@@ -853,74 +892,152 @@
<tbody>
<row>
- <entry><emphasis>name</emphasis></entry>
+ <entry><emphasis>id</emphasis></entry>
- <entry>The name of the property to configure.
- Example:<programlisting>name="sqlMapConfigFile"</programlisting></entry>
- </row>
-
- <row>
- <entry><emphasis>value</emphasis></entry>
-
- <entry>The value of the property configuration.
- Example:<programlisting>value="SqlMap_MSSQL_SqlClient.config"</programlisting></entry>
+ <entry>Id used to uniquely identify the handler</entry>
</row>
</tbody>
</tgroup>
</table>
- </sect3>
- </sect2>
- <sect2>
- <title>The <daoFactory> Element</title>
+ <sect4>
+ <title>The <property > Element</title>
- <para>The <daoFactory> element is a grouping of Dao interfaces and
- implementations.</para>
+ <para>Some <daoSessionHandler> implementations such as iBATIS
+ DataMapper SqlMaps and NHibernate need additional information for
+ configuration. The <property> element is used to specify this
+ information.</para>
+
+ <para>For iBATIS DataMapper SqlMaps, the method for locating and
+ loading the <filename>SqlMap.config</filename> file is used in the
+ "name" attribute. Depending on the chosen method, the corresponding
+ filepath or fully-qualified resource and assembly name is used for
+ the "value" attribute.</para>
+
+ <table>
+ <title>Attributes of the <property> element for use with
+ iBATIS DataMapper SqlMaps</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Attribute</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><emphasis>name</emphasis></entry>
+
+ <entry>Indicates the method used to locate and load the
+ <filename>SqlMap.config</filename> file. The available
+ options are "resource", "url", and "embedded" (as previously
+ described for loading the providers and properties
+ configuration files).<programlisting>name="resource"</programlisting></entry>
+ </row>
+
+ <row>
+ <entry><emphasis>value</emphasis></entry>
+
+ <entry>Used to specify the filename, fullpath, or fully
+ qualified resource and assembly name for the
+ <filename>SqlMap.config</filename> file.<programlisting>value="MySqlMap.config"</programlisting></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>For NHibernate, the name and value attributes are used to
+ specify various NHibernate configuration details such as the
+ hibernate.dialect, hibernate.connection.provider, or mapping.</para>
+
+ <table>
+ <title>Attributes of the <property> element for use with
+ NHibernate</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Attribute</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><emphasis>name</emphasis></entry>
+
+ <entry>The name of the property to configure.
+ Example:<programlisting>name="hibernate.dialect"</programlisting></entry>
+ </row>
+
+ <row>
+ <entry><emphasis>value</emphasis></entry>
+
+ <entry>The value of the property configuration.
+ Example:<programlisting>value="NHibernate.Dialect.MsSql2000Dialect"</programlisting></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </sect4>
+ </sect3>
<sect3>
- <title>The <dao> Element</title>
-
- <para>The <dao> element specifies a Dao interface and one
- implementation of that interface.</para>
-
- <table>
- <title>Attributes of the <dao> element</title>
-
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Attribute</entry>
+ <title>The <daoFactory> Element</title>
- <entry>Description</entry>
- </row>
- </thead>
+ <para>The <daoFactory> element is a grouping of Dao interfaces
+ and implementations.</para>
- <tbody>
- <row>
- <entry><emphasis>interface</emphasis></entry>
+ <sect4>
+ <title>The <dao> Element</title>
- <entry>The interface that the Dao must implement. Structure
- value must be : namespace-qualified name of the class,
- followed by a comma, followed by (at a bare minimum) the name
- of the assembly that contains the class. Example:
- <programlisting>interface=
+ <para>The <dao> element specifies a Dao interface and one
+ implementation of that interface.</para>
+
+ <table>
+ <title>Attributes of the <dao> element</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Attribute</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><emphasis>interface</emphasis></entry>
+
+ <entry>The interface that the Dao must implement. Structure
+ value must be : namespace-qualified name of the class,
+ followed by a comma, followed by (at a bare minimum) the
+ name of the assembly that contains the class. Example:
+ <programlisting>interface=
"IBatisNet.Test.Dao.Interfaces.IAccountDao,
IBatisNet.Test"</programlisting></entry>
- </row>
+ </row>
- <row>
- <entry><emphasis>implementation</emphasis></entry>
+ <row>
+ <entry><emphasis>implementation</emphasis></entry>
- <entry>An implementation of the Dao interface. Structure value
- must be : namespace-qualified name of the class, followed by a
- comma, followed by (at a bare minimum) the name of the
- assembly that contains the class. Example: <programlisting>implementation=
+ <entry>An implementation of the Dao interface. Structure
+ value must be : namespace-qualified name of the class,
+ followed by a comma, followed by (at a bare minimum) the
+ name of the assembly that contains the class. Example:
+ <programlisting>implementation=
"IBatisNet.Test.Dao.Implementations.Ado.AccountDao,
IBatisNet.Test"</programlisting></entry>
- </row>
- </tbody>
- </tgroup>
- </table>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </sect4>
</sect3>
</sect2>
</sect1>
Modified: incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/handler.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/handler.xml?rev=179011&r1=179010&r2=179011&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/handler.xml (original)
+++ incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/handler.xml Sun May 29 21:33:56 2005
@@ -17,9 +17,11 @@
<para>This implementation uses ADO.NET to provide a connection and
transaction via the ADO.NET API.</para>
- <example><title>Example Simple DAO Session Handler configuration</title>
- <programlisting><context id="<emphasis role="blue">SimpleDao</emphasis>" default="<emphasis
- role="blue">true</emphasis>">
+ <example>
+ <title>Example Simple DAO Session Handler configuration</title>
+
+ <programlisting><context id="<emphasis role="blue">SimpleDao</emphasis>" default="<emphasis
+ role="blue">true</emphasis>">
<properties resource="<emphasis role="blue">database.config</emphasis>"/>
<database>
@@ -36,7 +38,8 @@
<dao interface="<emphasis role="blue">IBatisNet.Test.Dao.Interfaces.IAccountDao, IBatisNet.Test</emphasis>"
implementation="<emphasis role="blue">IBatisNet.Test.Dao.Implementations.Ado.AccountDao, IBatisNet.Test</emphasis>"/>
</daoFactory>
-</context></programlisting></example>
+</context></programlisting>
+ </example>
<para></para>
</sect1>
@@ -46,10 +49,13 @@
<para>The SqlMap session handler implementation wraps iBATIS Data Mapper
SqlMapper session management services for simple use via the DAO
- framework. All you need to specify is the SqlMap configuration file.</para>
+ framework. All you need to specify is the SqlMap configuration
+ file.</para>
+
+ <example>
+ <title>Example SqlMap DAO Session Handler configuration</title>
- <example><title>Example SqlMap DAO Session Handler configuration</title>
- <programlisting><context id="<emphasis role="blue">SqlMapDao</emphasis>">
+ <programlisting><context id="<emphasis role="blue">SqlMapDao</emphasis>">
<properties resource="<emphasis role="blue">database.config</emphasis>"/>
<database>
@@ -60,14 +66,15 @@
</database>
<daoSessionHandler id="SqlMap">
- <property name="sqlMapConfigFile" value="<emphasis role="blue">SqlMap.config</emphasis>"/>
+ <property name="resource" value="<emphasis role="blue">SqlMap.config</emphasis>"/>
</daoSessionHandler>
<daoFactory>
<dao interface="<emphasis role="blue">IBatisNet.Test.Dao.Interfaces.IAccountDao, IBatisNet.Test</emphasis>"
implementation="<emphasis role="blue">IBatisNet.Test.Dao.Implementations.DataMapper.AccountDao, IBatisNet.Test"</emphasis>/>
</daoFactory>
-</context></programlisting></example>
+</context></programlisting>
+ </example>
<para></para>
</sect1>
@@ -81,8 +88,10 @@
configuration are the same as those that would normally be specified in an
NHibernate configuration section. Here is an example configuration:</para>
- <example><title>Example NHibernate DAO Session Handler configuration</title>
- <programlisting><context id="<emphasis role="blue">NHibernateDao</emphasis>">
+ <example>
+ <title>Example NHibernate DAO Session Handler configuration</title>
+
+ <programlisting><context id="<emphasis role="blue">NHibernateDao</emphasis>">
<properties resource="<emphasis role="blue">database.config</emphasis>"/>
<database>
@@ -108,6 +117,7 @@
<dao interface="<emphasis role="blue">IBatisNet.Test.Dao.Interfaces.IAccountDao, IBatisNet.Test</emphasis>"
implementation="<emphasis role="blue">IBatisNet.Test.Dao.Implementations.DataMapper.AccountDao, IBatisNet.Test</emphasis>"/>
</daoFactory>
-</context></programlisting></example>
+</context></programlisting>
+ </example>
</sect1>
</chapter>
Modified: incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/index.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/index.xml?rev=179011&r1=179010&r2=179011&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/index.xml (original)
+++ incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/index.xml Sun May 29 21:33:56 2005
@@ -11,7 +11,7 @@
]>
<book>
<bookinfo>
- <title>iBATIS.NET - .NET Application Framework</title>
+ <title>iBATIS.NET - Data Access Objects Application Framework</title>
<subtitle>Data Access Objects Developer Guide</subtitle>
<releaseinfo>Version 1.5.1</releaseinfo>
<pubdate>June 1 2005</pubdate>
Modified: incubator/ibatis/trunk/cs/docs/dataAccessGuide/styles/fopdf.xsl
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/docs/dataAccessGuide/styles/fopdf.xsl?rev=179011&r1=179010&r2=179011&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/docs/dataAccessGuide/styles/fopdf.xsl (original)
+++ incubator/ibatis/trunk/cs/docs/dataAccessGuide/styles/fopdf.xsl Sun May 29 21:33:56 2005
@@ -286,8 +286,8 @@
Fonts & Styles
################################################### -->
- <!-- Justified text and no hyphenation -->
- <xsl:param name="alignment">justify</xsl:param>
+ <!-- Left-align text and no hyphenation -->
+ <xsl:param name="alignment">left</xsl:param>
<xsl:param name="hyphenate">false</xsl:param>
<!-- Default Font size -->
Modified: incubator/ibatis/trunk/cs/docs/dataMapperGuide/src/en/dotnet.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/docs/dataMapperGuide/src/en/dotnet.xml?rev=179011&r1=179010&r2=179011&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/docs/dataMapperGuide/src/en/dotnet.xml (original)
+++ incubator/ibatis/trunk/cs/docs/dataMapperGuide/src/en/dotnet.xml Sun May 29 21:33:56 2005
@@ -632,7 +632,7 @@
file.</para>
<table>
- <title>Attributes of the <properties> element</title>
+ <title>Attributes of the <providers> element</title>
<tgroup cols="2">
<thead>
@@ -1123,7 +1123,8 @@
properties variable to indicate the relative path when using the
<sqlMap> "resource" attribute. Having a variable defined in a
properties file makes it easy to change the path to all your Data
- Mapper configuration resources in one location.</para>
+ Mapper configuration resources in one location (note the
+ ${projectdir} and ${root} variables in the example above).</para>
</tip>
</sect3>
</sect2>
@@ -1159,13 +1160,16 @@
<title>Building a SqlMapper Instance</title>
<note>
- <para>The SqlMapper API for configuration has been deprecated. The new
- configuration API is now found within the DomSqlMapBuilder class. Old
- method signatures have remained the same, and new methods for loading
- SqlMap.config files through a <classname>Stream</classname>,
- <classname>Uri</classname>, <classname>FileInfo</classname>, or
- <classname>XmlDocument</classname> instance have been added for more
- flexibility.</para>
+ <para>In prior versions of the DataMapper, the
+ <classname>SqlMapper</classname> class was responsible for
+ configuration. This has been superceded by a new configuration API
+ found within the <classname>DomSqlMapBuilder</classname> class. Old
+ configuration method signatures have remained the same, but there are
+ new methods that have been added for more flexibility. These methods
+ support the loading of configuration information through a
+ <classname>Stream</classname>, <classname>Uri</classname>,
+ <classname>FileInfo</classname>, or <classname>XmlDocument</classname>
+ instance.</para>
</note>
<para>An XML document is a wonderful tool for describing a database
@@ -1396,8 +1400,8 @@
useful when using a singleton such as the
<classname>Mapper</classname> class shown in the prior section. The
example <classname>Mapper</classname> singleton allows a reconfigured
- <classname>SqlMapper</classname> instance to be reloaded on the fly.
- </para>
+ <classname>SqlMapper</classname> instance to be reloaded on the
+ fly.</para>
<example>
<title>Mapper ConfigureHandler delegate</title>
@@ -2128,4 +2132,4 @@
<classname>IBatisNet.DataMapper.SqlMapSession</classname>.</para>
</sect2>
</sect1>
-</chapter>
+</chapter>
\ No newline at end of file
Modified: incubator/ibatis/trunk/cs/docs/dataMapperGuide/src/en/index.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/docs/dataMapperGuide/src/en/index.xml?rev=179011&r1=179010&r2=179011&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/docs/dataMapperGuide/src/en/index.xml (original)
+++ incubator/ibatis/trunk/cs/docs/dataMapperGuide/src/en/index.xml Sun May 29 21:33:56 2005
@@ -12,8 +12,8 @@
]>
<book>
<bookinfo>
- <title>iBATIS.NET - .NET Application Framework</title>
- <subtitle>Data Mapper Developer Guide</subtitle>
+ <title>iBATIS.NET - DataMapper Application Framework</title>
+ <subtitle>DataMapper Developer Guide</subtitle>
<releaseinfo>Version 1.2</releaseinfo>
<pubdate>1 June 2005</pubdate>
<authorgroup>
Modified: incubator/ibatis/trunk/cs/docs/dataMapperGuide/src/en/introduction.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/docs/dataMapperGuide/src/en/introduction.xml?rev=179011&r1=179010&r2=179011&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/docs/dataMapperGuide/src/en/introduction.xml (original)
+++ incubator/ibatis/trunk/cs/docs/dataMapperGuide/src/en/introduction.xml Sun May 29 21:33:56 2005
@@ -34,7 +34,7 @@
<tip>
<para>If you would like to get the latest development (unreleased)
version of this Guide, please see the <ulink
- url="http://opensource.atlassian.com/confluence/oss/display/IBATIS/How+do+I+generate+PDF+and+HTML+Help+files+from+the+latest+documentation+XML+source+files+in+the+source+control+repository%3F">iBATIS
+ url="http://opensource.atlassian.com/confluence/oss/display/IBATIS/">iBATIS
Wiki FAQ</ulink>. The FAQ entry explains how you can access our SVN
source repository and generate CHM and PDF files of the latest
development documentation for the DataMapper.</para>
Modified: incubator/ibatis/trunk/cs/docs/dataMapperGuide/styles/fopdf.xsl
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/docs/dataMapperGuide/styles/fopdf.xsl?rev=179011&r1=179010&r2=179011&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/docs/dataMapperGuide/styles/fopdf.xsl (original)
+++ incubator/ibatis/trunk/cs/docs/dataMapperGuide/styles/fopdf.xsl Sun May 29 21:33:56 2005
@@ -287,7 +287,7 @@
################################################### -->
<!-- Justified text and no hyphenation -->
- <xsl:param name="alignment">justify</xsl:param>
+ <xsl:param name="alignment">left</xsl:param>
<xsl:param name="hyphenate">false</xsl:param>
<!-- Default Font size -->
Modified: incubator/ibatis/trunk/cs/to-do.txt
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/to-do.txt?rev=179011&r1=179010&r2=179011&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/to-do.txt (original)
+++ incubator/ibatis/trunk/cs/to-do.txt Sun May 29 21:33:56 2005
@@ -14,13 +14,13 @@
[tell that old API SqlMApper.Configure(...) are marked as obsolete]
+ DataAccess Configuration changes
+ Add more .NET DataMapper coding examples (at least the code!)
- + DataAccess : New syntax to configure daoSessionHandler (old is too supported)
+
+ + DONE DataAccess : New syntax to configure daoSessionHandler (old is too supported)
<daoSessionHandler id="SqlMap">
<property name="resource" value="SqlMap_MSSQL_SqlClient.config"/>
<property name="url" value="E:\Projet\iBatis\trunk\cs\mapper\IBatisNet.DataAccess.Test\bin\Debug\SqlMap_MSSQL_SqlClient.config"/>
<property name="embedded" value="bin.Debug.SqlMap_MSSQL_SqlClient.config, IBatisNet.DataAccess.Test"/>
</daoSessionHandler>
-
+ DONE Tutorial changes for SqlMap.config (with properties variable for relative path) and new DomSqlMapBuilder configuration API
+ DONE DataMapper Configuration changes (ex: properties support in diff't SqlMap.config elements)
+ DONE Add doc for providers tag with attribute resource/embedded/url