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.  [ 7 posts ] 
Author Message
 Post subject: CommandTimeout as System-level configuration
PostPosted: Fri Sep 08, 2006 10:34 am 
Newbie

Joined: Thu Jun 22, 2006 4:04 am
Posts: 8
Location: Prague
Hellow

I'm using Castle's NHibernateIntegration Facility to work with NHibernate. It allows me to define more than one SessionFactory configuration and many more....
It has its own xml configuration, so i do not need to have NH configuration section in app.config (so Environment.Properties Hashtable is empty!). It reads the configuration, creates Configuration object and builds session factory based on it. Everything works fine with one exception - CommandTimeout settings. This value is copied to SessionFactory's Settings class but it is never used! Only place where CommandTimeout of newly created IDbCommand is set is in DriverBase.GenerateCommand and the value is read from Environment.Properties ......which is empty in my case....
So my questions is: It is intention that CommandTimeout configuration value is global, same for all SessionFactories even that it is present on SessionFactory Settings class ?

Thanx
Liwoj

Hibernate version: 1.0.2.0


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 08, 2006 4:46 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Hmm, it wasn't intended and is certainly a bug. Created NH-709 for it. You're welcome to provide a patch ;-)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 11, 2006 7:11 am 
Newbie

Joined: Thu Jun 22, 2006 4:04 am
Posts: 8
Location: Prague
ok :-)
as i see it, the best place for setting command timeout is DriverBase (as it is now) but drivers has no access to session factory instance (because there can be more factories that share one driver, is that right?) and thus has no access to factory's settings....
We can do 2 things:
1) move the actual code that sets CommandTimeout from DriverBase to BatcherImpl.Generate
2) Add command timeout (int) parameter to DriverBase.GenerateCommand method....

What do You think ?

Liwoj


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 11, 2006 12:08 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
I worked on the relevant code today so I just went ahead and fixed it (by making some design changes). You can grab the current SVN version if you want to see the fix.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 11, 2006 3:45 pm 
Expert
Expert

Joined: Thu Jan 19, 2006 4:29 pm
Posts: 348
sergey wrote:
I worked on the relevant code today so I just went ahead and fixed it (by making some design changes). You can grab the current SVN version if you want to see the fix.


Wanted to ask what is going on with JetDriver.cs? It has not been compiling for couple of days already... Last time it was easy to fix, but this time I'm not sure how it should be changed.

Maybe we should set up some continues integration server (like CrusieControl.net)?

Gert

_________________
If a reply helps You, rate it!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 11, 2006 5:00 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
I will bring it up to date, I'm just working in Visual Studio with a reduced solution (NHibernate-2.0.sln) which only has four projects, JetDriver not being one of them so I don't notice when I break it. I will fix it tomorrow.

Yes, a CC.NET server would be nice to have.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 12, 2006 3:16 am 
Expert
Expert

Joined: Thu Jan 19, 2006 4:29 pm
Posts: 348
sergey wrote:
I will bring it up to date, I'm just working in Visual Studio with a reduced solution (NHibernate-2.0.sln) which only has four projects, JetDriver not being one of them so I don't notice when I break it. I will fix it tomorrow.

Yes, a CC.NET server would be nice to have.


Writing an ccnet configuration for build is fairly easy, I can do it (actually already did :-) ) But I do not have computer where to host the CC.NET server...

Gert

_________________
If a reply helps You, rate it!


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

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.