OK, I tried the correct syntax and still got the same result as before.
Maybe I'm misundertstanding the setting. The test code I have reads an
Address entity bean, and I want the table to be locked for the duration of
the update. The code is:

        utx = (UserTransaction)
initialContext.lookup("javax.transaction.UserTransaction");
        utx.begin();
        AddressHome aHome =
(AddressHome)initialContext.lookup("AddressHome");
        Address adr = aHome.findByPrimaryKey(new PrimaryKey(24));
        AddressProperties props = adr.getProperties();
        System.out.println(props.address1);
        System.out.println("Change address line 1? Y/N");
        String response = new DataInputStream(System.in).readLine();
        if(response.equals("Y")){
                String newAdr = new DataInputStream(System.in).readLine();
                props.address1 = newAdr;
                adr.setProperties(props);
        }
        utx.commit();

So I want the record to be locked (another client can't read it at all) on
the call of getProperties() and unlocked on either setProperties() or
commit(). BTW I can't see any other way of doing this without a
UserTransaction.

Can this be done?

Regards

Robert Hargreaves


-----Original Message-----
From: Jim Richards [mailto:[EMAIL PROTECTED]]
Sent: 25 January 2000 00:54
To: Robert Hargreaves; Jonas Users Group (E-mail)
Subject: Re: Setting isolation levels



Your syntax is slightly wrong I believe ...

ControlDescriptors = {
                {
                        IsolationLevel = TRANSACTION_READ_COMMITTED;
                        TransactionAttribute = TX_REQUIRED;
                };
        };

At 02:47 PM 24/01/00 +0000, Robert Hargreaves wrote:
>Dear All
>
>Is there any way of setting the isolation level of a CMP entity bean to
>TRANSACTION_SERIALIABLE?
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to