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]

Reply via email to