-
1. Re: How to implement a read only entity bean
lasterra Apr 22, 2002 1:12 PM (in response to onkalich)I'm not an expert, but you you could read somthing about read-opnly flag on jaws.xml
http://www.jboss.org/online-manual/HTML/ch06s03.html -
2. Re: How to implement a read only entity bean
lasterra Apr 22, 2002 1:18 PM (in response to onkalich)You also could take a look to adavanced container configuration in
http://www.jboss.org/online-manual/HTML/ch07s16.html -
3. Re: How to implement a read only entity bean
onkalich Apr 23, 2002 3:06 AM (in response to onkalich)thanx , I think my problem concerns the locking strategy.
I have some beans that many clients wish to read. There is db action here just locking-waiting on the specific instance.
Do you know if jboss 3.0 support passimistic locking? -
4. Re: How to implement a read only entity bean
craigday Apr 23, 2002 8:33 AM (in response to onkalich)
try this: if you are accessing many methods of multiple "read-only" entity beans, make sure you set the transaction on these methods to RequiresNew. if you dont then all the calls on your entity beans become part of the same transaction and you will be locked out of all of them while the first transaction completes. if its "read-only" and not changing in the back-end make sure you have commit-option A (or perhaps even D).
c
p.s. there is a transaction type that "suspends" the running transaction call that could be faster than starting and ending a new transaction for each call, but i had problems with it in an earlier jboss version so i havent tried it again since. -
5. Re: How to implement a read only entity bean
davidjencks Apr 23, 2002 9:43 AM (in response to onkalich)Very recently in 3.0 or 3.1 some code was added that, for declared read only entities, locks the instance only for the duration of the method call, not the transaction. This relies on the interceptors not the persistence manager so it must be controlled from jboss.xml, and should work fine for BMP. However I'm not sure if it is in 3.0 RC1 or added just after that. You may have to check the cvs logs for the locking interceptors.
-
6. Re: How to implement a read only entity bean
attachvishal Sep 6, 2002 12:00 PM (in response to onkalich)i have tried the same thing but not able to define my entity beans as read only.it is still allowing me to update data
-
7. Re: How to implement a read only entity bean
attachvishal Sep 6, 2002 12:25 PM (in response to onkalich)has any one able to implement the read only entity beans properly? i have tried to define the entity beans as commit option D and defined <trans-attribute> as RequriresNew.even than entity is allowing to update its fields.
-
8. Re: How to implement a read only entity bean
attachvishal Sep 6, 2002 12:26 PM (in response to onkalich)has any one able to implement the read only entity beans properly? i have tried to define the entity beans as commit option D and defined <trans-attribute> as RequriresNew.even than entity is allowing to update its fields.