OmniBase questions

Andrew Catton andrew at smallthought.com
Thu Nov 3 10:19:00 UTC 2005


On 11/3/05, Pavel Krivanek <squeak1 at continentalbrno.cz > wrote:
>
> Hi, I've got several questions related to OmniBase usage:
>
> 1) File locking on Windows
>
> When I open a database session and process a transaction and then I try
> to connect new user, OODBStreamLockedNotification is raised. OmniBase
> then wants a confirmation of "File can not be read because it is locked.
> Do you want to try again ?". What is the best default answer? True
> causes long delay before the connection of new user. If false is chosen,
> fileIOError should be raised but nothing happens and new connection
> works well.


IIRC, the netstyle guys were running into this issue.. what did you guys end
up doing with it?

2) Object sharing between transactions
>
> If I'm not wrong, in case I want to modify a database object, I have to
> use transaction with explicit access to database object from the root.
> So If I want use the same object in two or more independent
> transactions, I cannot identify the object by its direct reference but I
> have to use something like primary key or oid, right? How to make it
> more comfortable? Is a way how to identify and use database object
> without access from root and searching in collections?


We definitely need to get that OmniSupport code out there.. aside from the
connection pool, we also have "persistent references", which are proxies to
persistent objects that work across transactions. I've added an OmniSupport
package to SqueakSource, but haven't added any code to it -- the newest
version I can see is in the netstyle repo; I expect it's OK for public
consumption, but I'd rather they published it themselves. Lukas, I've added
you as a developer so feel free to do so if everything's in order..

3) Index updating
>
> For example I have a collection of events an index by date of event.
> Then I modify an event that was not found by this index (I have no
> direct iterator). Do I have to find this event in date index manually,
> remove it and then add it again? Is there another way how access to
> index record directly?


If you are using any of the basic indices in OmniBase you will need to be
sure to maintain them somehow (just as you would with, say, a Dictionary).
Of course, you can have some sort of framework for automatically updating
indices on data changes, though OmniBase itself doesn't include this.

Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20051103/3024f3fa/attachment.htm


More information about the Squeak-dev mailing list