July 2006

NHibernate and Oracle.DataAccess.Client

All the examples in the NHibernate documentation for Oracle have the following setting for the driver_class:

<property name="connection.driver_class">
  NHibernate.Driver.OracleClientDriver
</property>

This will use the Microsoft Oracle client. The documentation states that you can also use the client from Oracle (ODP.NET), but it does not state how you can achieve this.

Apparently you have to use the NHibernate.Driver.OracleDataClientDriver as driver_class in your NHibernate config file:

<property name="connection.driver_class">
  NHibernate.Driver.OracleDataClientDriver
</property>

A Logger util class for log4net

In my opinion, log4net is the best logging library available for .NET. It combines simplicity with extensibility and has proven its value in many other languages on a number of platforms through sister projects like log4j, log4Cxx, …

The official log4net FAQ recommends you to create a static reference to an ILogger instance in each class. Although you could state that this is the fastest way to access the logger for your class, this approach has a few drawbacks which make it worth considering a different way of doing things.
Continue Reading »

« Prev