Your db is shared so you need to specify "commit Option C".
what happens is that the container believes he is alone in owning the entity
so doesn't reload and refresh the value at tx start. to force that specify
option C for the bean (please refer to xml doco on where to do that, you
will find Option A in the files.
I believe that a "Flag" like "db is shared" is more explicit than Option C.
This is the 3 time the question pops up in a week and I believe an
overridding flag somewhere is good.
Does someone have sometime to code this??? it's a nice little project
(couple of hours) (do as the Option parsing just trace the parsing and
metadata)
marc
|-----Original Message-----
|From: [EMAIL PROTECTED]
|[mailto:[EMAIL PROTECTED]]On Behalf Of vimal kansal
|Sent: Thursday, November 23, 2000 10:49 AM
|To: jBoss
|Subject: [jBoss-User] EntityBean sharing table with other non EJB apps
|
|
|
|
|Does anyone know how to deal with a situation where
|a table that is accessed by a CMP entity bean is also
|potentially modified by another application that is
|accessing the database directly, not through the app
|server. I created a simple entity bean that a has a
|couple of fields and then a client that fetches an
|entity bean in a loop every 300 ms. It calls a get
|method on the remote interface and displays it to the
|console window. Then I went to the database and hanged
|the value of the field. The console continued to
|display the original value. When I requeried the
|database, I could see that the value was set back to
|it's original value. I assume that every time the get
|method was called, ejbStore was writing the
|cached value back to the database and overwriting my
|change in the database. To avoid this, I implemented
|the isModified() I'm not sure if I did this
|correctly,
|it is appended at the bottom of this note. Now the
|behavoir that I see is that when I make changes in the
|database, they aren't overwritten when I call getValue
|but they are never displayed in the client. Weblogic
|has a feature called that I think is called
|db-is-shared that takes into account. Not quite sure
|how it works. Does this exist in jBoss?
|
|Thanks.....
|
|
|
|__________________________________________________
|Do You Yahoo!?
|Yahoo! Shopping - Thousands of Stores. Millions of Products.
|http://shopping.yahoo.com/
|
|
|--
|--------------------------------------------------------------
|To subscribe: [EMAIL PROTECTED]
|To unsubscribe: [EMAIL PROTECTED]
|Problems?: [EMAIL PROTECTED]
|
|
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]