Hi,
I test NHibernate 1.2 with VS2005 and Oracle10g. I wrote this code :
Code:
namespace ormsamples {
public class CreateDonneesData {
private void CreateData()
{
ISessionFactory sessions = new Configuration().Configure().BuildSessionFactory();
ISession s = sessions.OpenSession();
ITransaction t = s.BeginTransaction();
try
{
//...
t.Commit();
}
catch(Exception e) {
t.Rollback();
}
s.Close();
sessions.Close();
}
// ...
}
}
hibernate.cfg.xml :
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.0" >
<session-factory name="localfactory">
<!-- properties -->
<property name="hibernate.connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="hibernate.dialect">NHibernate.Dialect.Oracle9Dialect</property>
<property name="hibernate.connection.driver_class">NHibernate.Driver.OracleDataClientDriver</property>
<property name="hibernate.connection.connection_string">User ID=Owner_Sgl_6;Password=idem;Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp) (HOST=10.99.100.5)(PORT=1520))(CONNECT_DATA=(SERVICE_NAME=ANAPDEV)))</property>
<property name="show_sql">false</property>
<property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
<!-- <property name="use_outer_join">false</property> -->
<!-- <property name="max_fetch_depth">3</property> -->
<!-- <property name="use_reflection_optimizer">false</property> -->
<!-- mapping files -->
<mapping assembly="NHibernate.Test" />
</session-factory>
</hibernate-configuration>
When I create the ISessionFactory variable, it takes 30-50 SECONDS !!
I test some options in the cfg.xml file but it's still the same. Have you got an idea ?
Thank's
Xavier.