How to share a context [message #272172] |
Thu, 04 October 2007 03:06  |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
In the application I work on we use a context to bind variables to a dynamic cursor. The number of binds is not known in advance, so using a context is a great way to do it.
Now we are temporarily short on servers, so I want to share an instance with multiple versions of the application. No problem, except that contexts are (or seem to be) defined globally to the instance.
In the context, the schema-name with the package that can set elements in the context is defined, so I have to choose which schema can use the context.
Now this way of installing is not even close to what the customer ever will do, so I don't want to create a third user that owns the context and use that.
Anybody any ideas?
Used db-version: 9.2.0.7
[Updated on: Thu, 04 October 2007 04:28] Report message to a moderator
|
|
|
|
Re: How to share a context [message #276335 is a reply to message #276168] |
Wed, 24 October 2007 22:02   |
rleishman
Messages: 3728 Registered: October 2005 Location: Melbourne, Australia
|
Senior Member |
|
|
Instead of storing the values in a context, you could store them in a persistent packaged Associative Array. Then instead of using SYS_CONTEXT() to retireve the values, you use a function from your package.
Ross Leishman
|
|
|
Re: How to share a context [message #276358 is a reply to message #276335] |
Thu, 25 October 2007 00:04   |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
Why is it always so I keep searching for a solution instead of rethinking the problem?! Nice and elegant solution, and very usable because we don't really need the extra level of security an application-context offers.
Thanks, Ross!
|
|
|
|