I know how to do the following outside of EJB but how can I do it using
Container-Managed Transactions with the setting of Transaction and Isolation
levels?

I have the following:
MySessionBean
{
  MySessionBeanMethod()
  {
     ... do some stuff ...
     myEntityBean.readData();
     myEntityBean.updateData();
  }
}

In EJB (and, in particular, JBoss), I want to do the following:
1. Start a transaction for the MySessionBean method
2. When MyEntityBean.readData() is called from within the
MySessionBeanMethod, readData should read the data from the database and
block anyone else from reading until the transaction is over
3. MyEntityBean.updateData() is called from within the MySessionBeanMethod
and it updates the data in the database.
4. If another client invokes MySessionBeanMethod(), I would like them to
block until the other client is done.  Actually, I'd like the other client
to get into the method and block only while the data is read and updated.

Thanks,
Bill

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to