Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Wed, 25 Jan 2006 10:12:13 +0100,    group: microsoft.public.dotnet.datatools        back       


Connection object   
I've understood that connection objects are an expensive rescource that 
should be dropped when finnished using them. Is this true for closed 
connections or just for open ones?
I've implemented a background jobs queue that will run jobs one after one in 
their own threads on my webserver. Each job gets it's own connection object 
that it will open when the job will run. Is this a waste of resources or is 
it OK to have each job keep it's closed connection, which may be several 
minutes, until the job will run?

TIA
mortb
date: Wed, 25 Jan 2006 10:12:13 +0100   author:   mortb

Re: Connection object   
Hello mortb,

It's expensive, because DB Server should keep this connection. When you close 
connection, you save DB server resources

You solution can't help save resources. Besides using DB connection pool 
you should use pool threading - to avoid spending resources on
creating new Threads

m> I've understood that connection objects are an expensive rescource
m> that
m> should be dropped when finnished using them. Is this true for closed
m> connections or just for open ones?
m> I've implemented a background jobs queue that will run jobs one after
m> one in
m> their own threads on my webserver. Each job gets it's own connection
m> object
m> that it will open when the job will run. Is this a waste of resources
m> or is
m> it OK to have each job keep it's closed connection, which may be
m> several
m> minutes, until the job will run?
m> TIA
m> mortb
---
WBR,
Michael  Nemtsev :: blog: http://spaces.msn.com/members/laflour

"At times one remains faithful to a cause only because its opponents do not 
cease to be insipid." (c) Friedrich Nietzsche
date: Wed, 25 Jan 2006 18:18:55 +0000 (UTC)   author:   Michael Nemtsev

Re: Connection object   
Have you tried object pooling your object that stores the connection
object?  Have each job pull an object from the pool when it needs it,
and put it back in the pool when done.

If you would like to see an example, I released an open source project
that does just that.  I also have a help file on-line that demonstrates
how to use the component.

Here is an thread I just published announcing the component:
http://groups.google.com/group/microsoft.public.dotnet.datatools/browse_frm/thread/0605fb3028d5aa37/b2402ef4443ec499#b2402ef4443ec499

You can get the component here:
http://sourceforge.net/projects/xqs-data/

The help file is here:
http://www.xquisoft.com/xqsdn/documentation/index.html
See XQuiSoft.Data.DataManager, and XQuiSoft.Data.IDataFactory
or
http://www.xquisoft.com/xqsdn/documentation/xquisoft.data.datamanager.html
http://www.xquisoft.com/xqsdn/documentation/XQuiSoft.Data.IDataFactory.html

Michael Lang
XQuiSoft LLC
http://www.xquisoft.com/
date: 1 Feb 2006 07:52:57 -0800   author:   unknown

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us