Skip to content

Commit dd50339

Browse files
author
clinton.begin
committed
Initial Import
1 parent ce98133 commit dd50339

File tree

2,080 files changed

+393429
-161668
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,080 files changed

+393429
-161668
lines changed

README.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
docs - The docbook source for the Developers Guide. Form this, we generate HTML, PDF, and CHM files to be distributed in the Documentation package.
2+
3+
mapper - The main iBatisNet solution, including Common, DataAccess, and DataMapper.
4+
5+
tutorial - The tutorial solution (and docbook).
6+
7+
npetshop - The example PetShop solution
8+
9+
####

docs/dataAccessGuide/src/en/configuration.xml

Lines changed: 36 additions & 262 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@
2424
<title>Setup the Distribution</title>
2525

2626
<para>The official site for iBATIS for .NET is our Apache site
27-
&lt;http://ibatis.apache.org/&gt;. The DataAccess framework is availabe
28-
in 2 types of distributions: a binary distribution that includes the
29-
required DataAccess assemblies and a source distribution that includes a
30-
VSN solution. To download either of the distributions, follow the link
31-
to the Downloads area on our web site, and select the either the binary
32-
or source distribution for the iBATIS .NET DataAccess V1.6.1 or later
33-
release (if you download the binary distribution, extract the files
34-
using a utility like WinZip or the extractor built into newer versions
35-
of Windows and skip ahead to the Add Assembly References
36-
section).</para>
27+
&lt;http://incubator.apache.org/ibatis/&gt;. The DataAccess framework is
28+
availabe in 2 types of distributions: a binary distribution that
29+
includes the required DataAccess assemblies and a source distribution
30+
that includes a VSN solution. To download either of the distributions,
31+
follow the link to the Downloads area on our web site, and select the
32+
either the binary or source distribution for the iBATIS .NET DataAccess
33+
V1.5.1 or later release (if you download the binary distribution,
34+
extract the files using a utility like WinZip or the extractor built
35+
into newer versions of Windows and skip ahead to the Add Assembly
36+
References section).</para>
3737

3838
<para>The source distribution includes a VSN solution and a number of C#
3939
projects. The distribution is in the form of a ZIP archive. You can
@@ -122,26 +122,12 @@
122122
are seven projects in the solution, and all should succeed. The
123123
assemblies we need will be created under
124124
<filename>\source\IBatisNet.DataAccess\bin\Debug</filename>. The created
125-
assemblies are :
126-
<orderedlist>
127-
<listitem>
128-
<filename>IBatisNet.Common.dll</filename>
129-
</listitem>
130-
131-
<listitem>
132-
<filename>iBatisNet.DataAccess.dll</filename>
133-
</listitem>
134-
</orderedlist>
135-
136-
The core DataAccess
125+
assemblies are : <filename>IBatisNet.Common.dll</filename> and
126+
<filename>iBatisNet.DataAccess.dll</filename>. The core DataAccess
137127
framework has external dependencies on
138-
<orderedlist>
139-
<listitem>
140-
<filename>Castle.DynamicProxy.dll</filename> (creating proxies)
141-
</listitem>
142-
143-
</orderedlist>
144-
The dependency is found in the <filename>External-Bin</filename> folder and can also
128+
<filename>Castle.DynamicProxy.dll</filename> (creating proxies) and
129+
<filename>log4net.dll</filename> (logging). Both of these dependencies
130+
are found in the <filename>External-Bin</filename> folder and can also
145131
be found in the <filename>bin\Debug</filename> folder after building the
146132
solution. In addition, the framework's
147133
<filename>IBatisNet.DataAccess.Extensions</filename> and
@@ -190,13 +176,30 @@
190176

191177
<tbody>
192178
<row>
193-
<entry>Castle dynamic proxy 1.1.5.0</entry>
179+
<entry>Castle dynamic proxy 1.0.3.0</entry>
194180

195181
<entry>Dynamic proxy generator</entry>
196182

197183
<entry>Castle.DynamicProxy.dll</entry>
198184
</row>
199185

186+
<row>
187+
<entry>Log4NET 1.2.0.30714</entry>
188+
189+
<entry>Logging framework</entry>
190+
191+
<entry>log4net.dll</entry>
192+
</row>
193+
194+
<row>
195+
<entry>NHibernate 0.6</entry>
196+
197+
<entry>Object persistence library; required if using
198+
NHibernate DAO Session Handler</entry>
199+
200+
<entry>HashCodeProvider.dll NHibernate.dll
201+
Iesi.Collections.dll</entry>
202+
</row>
200203
</tbody>
201204
</tgroup>
202205
</table></para>
@@ -256,237 +259,8 @@
256259
</tgroup>
257260
</table>
258261
</sect2>
259-
260-
<sect2>
261-
<title>Visual Studio.NET Integration</title>
262-
263-
<para>The configuration file (dao.config) is associated to a schema. The benefits of associating
264-
an XML document with a schema are to validate the document (which is
265-
done at runtime) and to use editing features such as
266-
IntelliSense/content completion assistance.</para>
267-
268-
<para>To allow association of the schemas in VS.NET XML editor to your
269-
configuration file, you should add the schema file
270-
(<filename>DaoConfig.xsd</filename> to either your VS.NET project or in
271-
your VS.NET installation directory. The VS.NET directory will be
272-
either</para>
273-
274-
<para><filename>C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas for VS.NET 2005</filename></para>
275-
276-
<para>or</para>
277-
278-
<para><filename>C:\Program Files\Microsoft Visual Studio .NET
279-
2003\Common7\Packages\schemas\xml for VS.NET 2003</filename></para>
280-
281-
<para>or</para>
282-
283-
<para><filename>C:\Program Files\Microsoft Visual Studio
284-
.NET\Common7\Packages\schemas\xml for VS.NET 2002</filename></para>
285-
286-
<para>depending on your version of VS.NET. It is typically easier to
287-
place the file in the well known location under the VS.NET installation
288-
directory than to copy the XSD file for each project you create.</para>
289-
290-
<para>Once you have registered the schema with VS.NET you will be enough
291-
to get IntelliSense and validation of the configuration file from within
292-
VS.NET.</para>
293-
294-
<figure>
295-
<title>IntelliSense example</title>
296-
297-
<mediaobject>
298-
<imageobject>
299-
<imagedata align="center" fileref="images/intellisense.gif"
300-
format="GIF" />
301-
</imageobject>
302-
</mediaobject>
303-
</figure>
304-
</sect2>
305262
</sect1>
306263

307-
<sect1>
308-
<title>Logging Activity</title>
309-
310-
<para>The iBATIS DataAccess framework records its interaction with the
311-
database through an internal logging mechanism patterned after Apache
312-
Log4Net. The internal logging mechanism can use one of the three built-in
313-
loggers (NoOpLogger, ConsoleOutLogger, TraceLogger) or external logging
314-
packages such as Apache Log4Net. In order for iBATIS to generate log
315-
messages, the application's config file (App.Config or Web.Config) must
316-
contain an appropriate configSection node:</para>
317-
318-
<example>
319-
<title>iBATIS Configuration Section Handler for logging</title>
320-
321-
<programlisting>&lt;configSections&gt;
322-
&lt;sectionGroup name="iBATIS"&gt;
323-
&lt;section name="logging" type="IBatisNet.Common.Logging.ConfigurationSectionHandler, IBatisNet.Common" /&gt;
324-
&lt;/sectionGroup&gt;
325-
&lt;/configSections&gt;</programlisting>
326-
</example>
327-
328-
<para>The application's config file must declare one logger
329-
implementation. See the examples below on how to configure one of the
330-
three built-in loggers.</para>
331-
332-
<para><programlisting>&lt;iBATIS&gt;
333-
&lt;logging&gt;
334-
&lt;logFactoryAdapter type="IBatisNet.Common.Logging.Impl.ConsoleOutLoggerFA, IBatisNet.Common"&gt;
335-
&lt;arg key="showLogName" value="true" /&gt;
336-
&lt;arg key="showDataTime" value="true" /&gt;
337-
&lt;arg key="level" value="ALL" /&gt;
338-
&lt;arg key="dateTimeFormat" value="yyyy/MM/dd HH:mm:ss:SSS" /&gt;
339-
&lt;/logFactoryAdapter&gt;
340-
&lt;/logging&gt;
341-
&lt;/iBATIS&gt;
342-
</programlisting><programlisting>&lt;iBATIS&gt;
343-
&lt;logging&gt;
344-
&lt;logFactoryAdapter type="IBatisNet.Common.Logging.Impl.NoOpLoggerFA, IBatisNet.Common" /&gt;
345-
&lt;/logging&gt;
346-
&lt;/iBATIS&gt;
347-
</programlisting><programlisting>&lt;iBATIS&gt;
348-
&lt;logging&gt;
349-
&lt;logFactoryAdapter type="IBatisNet.Common.Logging.Impl.TraceLoggerFA, IBatisNet.Common" /&gt;
350-
&lt;/logging&gt;
351-
&lt;/iBATIS&gt;</programlisting></para>
352-
353-
<para>To configure iBATIS to use another logger implementation, simple
354-
specify the appropriate logFactoryAdapter type. To use Apache Log4Net with
355-
the iBATIS framework, use the following configuration
356-
setting:</para>
357-
358-
<para><programlisting>&lt;iBATIS&gt;
359-
&lt;logging&gt;
360-
&lt;logFactoryAdapter type="IBatisNet.Common.Logging.Impl.Log4NetLoggerFA, IBatisNet.Common.Logging.Log4Net"&gt;
361-
&lt;arg key="configType" value="inline" /&gt;
362-
&lt;/logFactoryAdapter&gt;
363-
&lt;/logging&gt;
364-
&lt;/iBATIS&gt;</programlisting></para>
365-
366-
<para><programlisting>&lt;iBATIS&gt;
367-
&lt;logging&gt;
368-
&lt;logFactoryAdapter type="IBatisNet.Common.Logging.Impl.Log4NetLoggerFA, IBatisNet.Common.Logging.Log4Net"&gt;
369-
&lt;arg key="configType" value="file" /&gt;
370-
&lt;arg key="configFile" value="log4Net.config" /&gt;
371-
&lt;/logFactoryAdapter&gt;
372-
&lt;/logging&gt;
373-
&lt;/iBATIS&gt;</programlisting></para>
374-
375-
<para>The Log4NetLoggerFA supports the following values for the
376-
configTypes argument:<table>
377-
<title>Valid configType values</title>
378-
379-
<tgroup cols="2">
380-
<thead>
381-
<row>
382-
<entry>configType</entry>
383-
384-
<entry>Description</entry>
385-
</row>
386-
</thead>
387-
388-
<tbody>
389-
<row>
390-
<entry>inline</entry>
391-
392-
<entry>log4net node will use the log4net node in the
393-
App.Config/Web.Config file when it is configured</entry>
394-
</row>
395-
396-
<row>
397-
<entry>file</entry>
398-
399-
<entry>(also requires configFile argument) - log4net will use an
400-
external file for its configuration</entry>
401-
</row>
402-
403-
<row>
404-
<entry>file-watch</entry>
405-
406-
<entry> (also requires configFile argument) - log4net will use
407-
an external file for its configuration and will re-configure
408-
itself if this file changes</entry>
409-
</row>
410-
411-
<row>
412-
<entry>external</entry>
413-
414-
<entry>iBATIS will not attempt to configure log4net.</entry>
415-
</row>
416-
</tbody>
417-
</tgroup>
418-
</table></para>
419-
420-
<sect2>
421-
<title>Sample Logging Configurations</title>
422-
423-
<para>The simplest logging configuration is to output log messages to
424-
Console.Out:</para>
425-
426-
<para><programlisting>&lt;configuration&gt;
427-
&lt;configSections&gt;
428-
&lt;sectionGroup name="iBATIS"&gt;
429-
&lt;section name="logging" type="IBatisNet.Common.Logging.ConfigurationSectionHandler, IBatisNet.Common" /&gt;
430-
&lt;/sectionGroup&gt;
431-
&lt;/configSections&gt;
432-
&lt;iBATIS&gt;
433-
&lt;logging&gt;
434-
&lt;logFactoryAdapter type="IBatisNet.Common.Logging.Impl.ConsoleLoggerFA, IBatisNet.Common.Logging" /&gt;
435-
&lt;/logging&gt;
436-
&lt;/iBATIS&gt;
437-
&lt;/configuration&gt;</programlisting></para>
438-
439-
<para>A common logging configuration is to use Apache Log4Net. To use
440-
Log4Net with your own application, you need to provide your own Log4Net
441-
configuration. You can do this by adding a configuration file for your
442-
assembly that includes a &lt;log4Net&gt; element. The configuration file
443-
is named after your assembly but adds a <filename>.config</filename>
444-
extension, and is stored in the same folder as your assembly. This is an
445-
example of a basic Log4Net configuration block
446-
(IBatisNet.DataMapper.Test.dll.Config) that also creates a log4net.txt
447-
which contains debug information from log4net. If log4net is not
448-
producing output, check the log4net.txt file.</para>
449-
450-
<para><programlisting>&lt;configuration&gt;
451-
&lt;configSections&gt;
452-
&lt;sectionGroup name="iBATIS"&gt;
453-
&lt;section name="logging" type="IBatisNet.Common.Logging.ConfigurationSectionHandler, IBatisNet.Common" /&gt;
454-
&lt;/sectionGroup&gt;
455-
&lt;section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /&gt;
456-
&lt;/configSections&gt;
457-
&lt;appSettings&gt;
458-
&lt;add key="log4net.Internal.Debug" value="true"/&gt;
459-
&lt;/appSettings&gt;
460-
&lt;system.diagnostics&gt;
461-
&lt;trace autoflush="true"&gt;
462-
&lt;listeners&gt;
463-
&lt;add name="textWriterTraceListener"
464-
type="System.Diagnostics.TextWriterTraceListener"
465-
initializeData="C:\\inetpub\\wwwroot\\log4net.txt" /&gt;
466-
&lt;/listeners&gt;
467-
&lt;/trace&gt;
468-
&lt;/system.diagnostics&gt;
469-
&lt;iBATIS&gt;
470-
&lt;logging&gt;
471-
&lt;logFactoryAdapter type="IBatisNet.Common.Logging.Impl.Log4NetLoggerFA, IBatisNet.Common.Logging.Log4Net"&gt;
472-
&lt;arg key="configType" value="inline" /&gt;
473-
&lt;/logFactoryAdapter&gt;
474-
&lt;/logging&gt;
475-
&lt;/iBATIS&gt;
476-
&lt;log4net&gt;
477-
&lt;appender name="FileAppender" type="log4net.Appender.FileAppender"&gt;
478-
&lt;file value="log.txt" /&gt;
479-
&lt;appendToFile value="true" /&gt;
480-
&lt;layout type="log4net.Layout.SimpleLayout" /&gt;
481-
&lt;/appender&gt;
482-
&lt;root&gt;
483-
&lt;level value="ALL" /&gt;
484-
&lt;appender-ref ref="FileAppender" /&gt;
485-
&lt;/root&gt;
486-
&lt;/log4net&gt;
487-
&lt;/configuration&gt;</programlisting></para>
488-
</sect2>
489-
</sect1>
490264
<sect1>
491265
<title>The Configuration File (dao.config)</title>
492266

@@ -525,8 +299,8 @@
525299
Example dao.config file
526300

527301
<programlisting>&lt;?xml version="1.0" encoding="utf-8"?&gt;
528-
&lt;daoConfig xmlns="http://ibatis.apache.org/dataAccess"
529-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
302+
&lt;daoConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
303+
xsi:noNamespaceSchemaLocation="DaoConfig.xsd"&gt;
530304

531305
&lt;providers resource="providers.config"&gt;
532306

@@ -590,7 +364,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
590364
environments (DEVT, Q/A, PROD), you can also make use of the optional
591365
<literal>&lt;properties&gt;</literal> element as shown above. This allows
592366
you to use placeholders in the place of literal value elements. If you
593-
have a "properties" file with the following values:</para>
367+
have a properties file with the following values:</para>
594368

595369
<example>
596370
<title>Example properties file</title>

docs/dataAccessGuide/src/en/dao.xml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,12 @@
5050
</thead>
5151

5252
<tbody>
53-
54-
<row>
55-
56-
<entry>DomDaoManagerBuilder</entry>
53+
<row>
54+
<entry>DaoManager (Facade)</entry>
5755

5856
<entry>Responsible for configuration of the DAO framework (via
59-
dao.config), instantiating DAO implementations and IDaoManager instances.</entry>
60-
</row>
61-
62-
<row>
63-
<entry>IDaoManager (Facade)</entry>
64-
65-
<entry>Acting as a façade to the rest of the API.</entry>
57+
dao.config), instantiating DAO implementations, and acting as a
58+
façade to the rest of the API.</entry>
6659
</row>
6760

6861
<row>

0 commit comments

Comments
 (0)