🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.next.programmer
4 messages
4 total messages Started by estrinkswanson Kevin Swanson Mon, 28 Dec 1992 20:10
dbkit and sybase server connections
#1976
Author: estrinkswanson Kevin Swanson
Date: Mon, 28 Dec 1992 20:10
12 lines
666 bytes
I'm working on an application that uses dbkit along with sybase.
I've come across the problem that my application makes two and sometimes
three connections to the sybase server, when it really should only need
a single connection.

Has anyone who has worked with dbkit experienced any problems like this?

thanks,
kevin


kswanson@rdr.com
Re: dbkit and sybase server connections
#1978
Author: Timothy J. Wood
Date: Mon, 28 Dec 1992 23:13
61 lines
2092 bytes
estrin!kswanson (Kevin Swanson) writes:

>I'm working on an application that uses dbkit along with sybase.
>I've come across the problem that my application makes two and sometimes
>three connections to the sybase server, when it really should only need
>a single connection.

>Has anyone who has worked with dbkit experienced any problems like this?

  Yes, actually.  The problem is that DBBinder defaults to use non-shared
context (this is where the connection is stored) when you really want it to
share the context.  You can set the context sharing with 

  [aBinder setSharesContext: flag];

  What I did to get around this problem was to impelement a subclass of
DBBinder called SharedBinder that goes something like:

#import <dbkit/dbkit.h>

@interface SharedBinder : DBBinder
{
}
- init;
- setSharesContext: (BOOL) flag
@end

@implementation SharedBinder
- init
{
  return [[super init] setSharesContext: YES];
}

- setSharesContext: (BOOL) flag
{
  return [super setSharesContext: YES];
}
@end

   To get this to effect the binders that DBKit sets up for you, you will
have to do a:

   [SharedBinder poseAs: [DBBinder class]];

  before they are allocated.  The best place is probably in you *_main.m
file or in your appWillInit: method. 
   
   You will want to note that sharing context with other DBBinders disables
flushing.  I haven't experienced any problems with this, but depending upon
what you are doing, you might.

>thanks,
>kevin


>kswanson@rdr.com


Timothy J. Wood
The Omni Group
DBKit Consulting
Re: dbkit and sybase server connections
#2323
Author: Fouad Habboub
Date: Tue, 12 Jan 1993 04:16
20 lines
956 bytes
estrin!kswanson (Kevin Swanson) writes:

>I'm working on an application that uses dbkit along with sybase.
>I've come across the problem that my application makes two and sometimes
>three connections to the sybase server, when it really should only need
>a single connection.

>Has anyone who has worked with dbkit experienced any problems like this?

>thanks,
>kevin


>kswanson@rdr.com


I've experienced similar problems. At one point it seemed that every
instance of RecordList make a separate connections to sybase.

fouad
Re: dbkit and sybase server connections
#2333
Author: George Fankhauser
Date: Tue, 12 Jan 1993 13:07
27 lines
1346 bytes
In article <C0q3w5.2Lq@unix.portal.com> pyramid@shell.portal.com (Fouad Habboub) writes:
>estrin!kswanson (Kevin Swanson) writes:
>
>>I'm working on an application that uses dbkit along with sybase.
>>I've come across the problem that my application makes two and sometimes
>>three connections to the sybase server, when it really should only need
>>a single connection.
>
>>Has anyone who has worked with dbkit experienced any problems like this?
>
>>thanks,
>>kevin
>
>
>>kswanson@rdr.com
>
>
>I've experienced similar problems. At one point it seemed that every
>instance of RecordList make a separate connections to sybase.
>
>fouad
>

no, only instances of DBDatabase create new tcp connections to the
db server.

George
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads