Hi Jane,

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Friday, November 15, 2002 5:31 PM
Subject: Question ODMG transaction in tutorial 2


>
> Hi All,
>
> I am new to OJB.  While studying the tutorial code, I noticed that all
> queries were excuted inside transaction.  For example, the
> org.apache.ojb.tutorial2.UCListAllProducts excute a query that
retrieve all
> the products.  Why is transaction necessary for read only operations?
I
> tried to remove the transaction and the code still worked.

If you execute your query within a tx, all retrieved objects will become
a read-lock on ODMG level by default (see OJB.properties
'ImplicitLocking' ).

Without tx no read locks will be established (faster, "unsafe"),
independent from OJB.properties 'ImplicitLocking' property.

regards,
Armin

>  But I'd like to
> find out if there is anything I miss by taking the query out of the
> transaction.
>
> Many thanks for your help,
>
> Jane
>
>
> --
> To unsubscribe, e-mail:
<mailto:ojb-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
<mailto:ojb-user-help@;jakarta.apache.org>
>
>
>


--
To unsubscribe, e-mail:   <mailto:ojb-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>

Reply via email to