[omniORB] Concurrent access to CORBA objects

Alexander Deruwe aderuwe@aqs-carcontrol.be
Mon Jul 22 15:41:00 2002


Hewwo everyone,

Working from the following interface:

module SampleModule 
{
    interface SampleInterface 
    {
        attribute string code;
        attribute string name;

        boolean new();
    };
};

(this would implement access to a very simple table in a database, only
the new() method is specified here for simplicity)

This would give me 1 object in the server on which the methods
set_code(), set_name() and new() can be called. If there are two
connections to this object, they will be working on the same values
(correct?); what is the preferred way to work around this? Threading
with locking? I am quite new to this subject, so I would appreciate any
insight you guys can give.


For the record, I am now doing the following for database access:

..<snip>..
struct data_s
{
    string code;
    string name;
};
typedef sequence<data_s> data;

interface SampleInterface
{
    boolean new(in data d);
};
..<snip>..

Is this the way I should implement what I'm doing? I've grown
increasingly unsatisfied with this method, mostly because I need to have
structs for every table. I'd much rather define the data along with the
interface but perhaps this is not recommended when doing database
access.

Is there anyone out there who has also implemented an interface to a
database using OmniORB (or any ORB, it's mostly the design I'm
interested in) who could give me some pointers? My googling turned up a
surprisingly low amount of information on this (apart from libgda, but I
haven't found any Python bindings for that, even though there are
several mentionings of such a beast).

I guess I am too new to CORBA, and not completely 'in' on what it can
do, and thus the better ways of doing things.
If this is too general for this mailing list (hopefully not too OT
though, if so I apologise), please point me to a better source for this
information.

Thanks in advance,

-- 
Alexander Deruwe