Subject RE: [IBO] Threads sharing SchemaCache info?
Author Jason Wharton
You will either need to go ahead and rely on the SchemaCacheDir capabilities
or customize your IBO code so that it will work as you require.

Jason Wharton

> -----Original Message-----
> From: []On
> Behalf Of dmarmur2002
> Sent: Tuesday, May 10, 2005 6:01 AM
> To:
> Subject: [IBO] Threads sharing SchemaCache info?
> Looking at the thread example each thread would read metadata from the
> database into the SchemaCache member of its TIB_Connection. In my
> scenario this is read-only data and I was thinking of a way to
> centralize it.
> I make a connection to a database at application startup, read some
> info and disconnect. This constitutes "startup phase". After this,
> when a new thread (containing session, connection and lots of queries)
> is created I would like that connection to re-use information from the
> startup IB_Connection (main thread).
> I hacked a TIB_SchemaCache.Assign(source: TIB_SchemaCache) function
> but when the "base connection" disconnects it's data is invalidated,
> by whereafter, (in my scenario), this assignment is to done.
> I would like not to use the SchemaCacheDir functions because I would
> like metadata to be refreshed completely at application startup
> (server restart). And, also, how would thread number tree react if
> thread number two writes to the directory? I don't think I can make
> such writes thread safe?
> Thanks a lot,
> /Dany