[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XML Object



On Sat, 09 Aug 2036, bhat prashanth wrote:
> hi,
> 
> In case of multiple users accessing the same xml object with the same login ,
> 
> ExternalTransaction tx = database.newTransaction();
>                 tx.begin();
>                 tx.join();like that 
> 
> in case of the above soon after connection to the RemoteDatabase().
> are the users put in a queue so that the next user can read from the same xml
> object only after the first user has commited the transaction. thereby locking
> the xml object ??.
> or can many users access the same xml object at the same instance of time.??
> if not
> in case of 100's of users using the same xml object for data. won't the system
> be too slow in traversing the entire dom tree structure, getting the data,
> commiting and then allowing the next user access to the same xml object. so
> each user will have to wait for ??
> can someone please explain how the Query.java given in the samples, which
> Queries the xml object, work for multi-users aceesing the same xml object at
> nearly the same instance of time.

ozone uses the simple Multiple Reader One Writer lock. This allows different
transactions to acquire the READ lock of a XML document (or any other object).
Read: different users may read access the same document at the same time.

If just one thread is joined to the transaction, then the above is also true
for threads. (different threads can read access the same object at the same
time) However, all threads of a transaction share one (socket) connection (and
one server thread). Therefore the threads of a transaction get synchronized
on each database operation. (read: just one thread of a transaction can do
database things at the same time).

Does this answer your question?


Falko
-- 
______________________________________________________________________
Falko Braeutigam                         mailto:falko@softwarebuero.de
softwarebuero m&b (SMB)                    http://www.softwarebuero.de