-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Creating new Configuration is taking a REALLY long time...
PostPosted: Mon Apr 25, 2011 5:21 pm 
Newbie

Joined: Mon Apr 25, 2011 5:13 pm
Posts: 5
We are looking at possibly including NHibernate into a build and a colleague and myself have been trying to get it implemented in a test project.

We have everything set up correctly and it is creating the Configuration, SessionFactory, and actually posting the Schema to the database successfully; however, the line were we initailize the configuration via:
Code:
Configuration configuration = new Configuration();

is taking an extremely long time to run within our project. We have even tried serializing the configuration and loading it after the initial startup and the configuration has been serialized and saved, but it still is taking a really long time.

We are currently using MS SQL Server 2008, we have about 20-30 classes within out namespace, and are only attempting to get it to work with one of these classes at the time being. The initialization time for creating the new Configuration is taking between 1-2 minutes connection to a database server on the local network. We are running this in a thread, but tests with another setup application where it was created in a thread took little to no time at all.

Any insight as to what may be going on here? Application is developed in c# using VS 2010 and .Net Framework 4. Here is our configuration, minus the username and password:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!--
This template was written to work with NHibernate.Test.
Copy the template to your NHibernate.Test project folder and rename it in hibernate.cfg.xml and change it
for your own use before compile tests in VisualStudio.
-->
<!-- This is the System.Data.dll provider for SQL Server -->
<hibernate-configuration  xmlns="urn:nhibernate-configuration-2.2" >
   <session-factory>
    <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
      <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
      <property name="connection.connection_string">
      Server=192.168.0.xxx;Initial Catalog=EMTRAC3;User ID=omitted;Password=omitted;
    </property>
      <property name="adonet.batch_size">10</property>
      <property name="show_sql">false</property>
      <property name="dialect">NHibernate.Dialect.MsSql2008Dialect</property>
      <property name="use_outer_join">true</property>
      <property name="command_timeout">60</property>
      <property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
      <property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property>
   </session-factory>
</hibernate-configuration>


Any help would be greatly appreciated, as we are about to give up on using this if we cannot figure out what is going on. What exactly is the new Configuration doing that would be taking so long?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.