You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by "Yang, Wenchao" <WY...@mednet.ucla.edu> on 2003/06/26 22:59:20 UTC

ODMG API thread safety

I am using ojb-0.9.7 ODMG API exclusively in my multi-threaded application.
In my data model I have a very straight forward 1:M association between
class A(1) and class B(M). The application runs fine under single thread
configuration, but occasionally the application fails to behave properly
when multiple threads are enabled (each thread accesses the database via
ODMG API exclusively). The root cause to this is that the collection
attribute in A was not materialized, containing zero instance of B, while
the database actually has more than one instances of B that should have been
materialized into that collection attribute. 

I understand I should have written some simple code that can regenerates
this problem before I post this message. I am just hoping that maybe someone
already have some quick answer to this. 

Any help would be greatly appreciated. Thanks.

--Wenchao--