-
1. Re: Question about Multiple JBoss servers going to same data
juha Jan 7, 2004 10:50 AM (in response to mandarm)You should set <row-locking> in jbosscmp-jdbc.xml to true to avoid concurrency issues, and obviously cannot use commit option A (the default option B is ok).
-
2. Re: Question about Multiple JBoss servers going to same data
mandarm Jan 7, 2004 4:41 PM (in response to mandarm)Thanks a lot for your response.
We use SQL Server 2000 as the database and I am not sure if it supports row-level locking.
What setting can we do in the database to support this (or to find out if it is supported ? )
Will JBoss or database driver do something to support row-locking if the database does not support it ?
Also, I have some question about Java J2EE Transactions and database commit mode setting.
If the database runs in auto-commit mode
I start a EJB transaction
update row 1 in table1 (using entity bean)
update row 2 in table 2 (using entity bean)
Assuming second update fails, will the container still roll back the first update ?
If not.
do I need to do some setting for achieving this rollback ?
Thanks a lot.
Regards
Mandar -
3. Re: Question about Multiple JBoss servers going to same data
juha Jan 7, 2004 5:05 PM (in response to mandarm)row-locking means SELECT ... FOR UPDATE, or similar and is configurable in the CMP engine
-
4. Re: Question about Multiple JBoss servers going to same data
mandarm Jan 9, 2004 12:07 PM (in response to mandarm)Thanks once again.
Is it possible to write "SELECT FOR UPDATE" using SQL Server 2000 as the database ?
Does the CMP engine provide these features with all database ?
While reading about SQL Server locking stratagies, I read that by default it locks at Page Level (bunch of rows) and hence row level lock such as SELECT FOR UPDATE supported by Oracle etc is not valid.
Also,
What happens if some other application directly adds/updates/deletes rows from a table that is mapped to an entity bean in Jboss ?
Can this cause any errors (Except for FinderException,CreateException etc) ?
Thanks a lot.
Regards
Mandar -
5. Re: Question about Multiple JBoss servers going to same data
juha Jan 10, 2004 3:57 AM (in response to mandarm)"mandarm" wrote:
Is it possible to write "SELECT FOR UPDATE" using SQL Server 2000 as the database ?
Does the CMP engine provide these features with all database ?
While reading about SQL Server locking stratagies, I read that by default it locks at Page Level (bunch of rows) and hence row level lock such as SELECT FOR UPDATE supported by Oracle etc is not valid.
I don't know anything about SQL Server so you're going to have to figure that out by your own or ask someone else."mandarm" wrote:
What happens if some other application directly adds/updates/deletes rows from a table that is mapped to an entity bean in Jboss ?
Can this cause any errors (Except for FinderException,CreateException etc) ? -
6. Re: Question about Multiple JBoss servers going to same data
juha Jan 10, 2004 3:58 AM (in response to mandarm)"mandarm" wrote:
Is it possible to write "SELECT FOR UPDATE" using SQL Server 2000 as the database ?
Does the CMP engine provide these features with all database ?
While reading about SQL Server locking stratagies, I read that by default it locks at Page Level (bunch of rows) and hence row level lock such as SELECT FOR UPDATE supported by Oracle etc is not valid.
I don't know anything about SQL Server so you're going to have to figure that out by your own or ask someone else."mandarm" wrote:
What happens if some other application directly adds/updates/deletes rows from a table that is mapped to an entity bean in Jboss ?
Can this cause any errors (Except for FinderException,CreateException etc) ?
No, if you use commit option B/C and row locking as suggested. -
7. Re: Question about Multiple JBoss servers going to same data
mandarm Jan 10, 2004 10:46 AM (in response to mandarm)Hi,
Thanks a lot.
I will use Commit Option B/C as suggested.
I will find out about the SELECT FOR UPDATE using SQLServer.
Regards
Mandar