-- Philippe Durieux ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Bull - 1 rue de Provence - 38432 Echirolles Cedex France [EMAIL PROTECTED] -> Download our EJBServer at http://www.evidian.com/ejb <-
> Ebru NAMOGLU wrote: > > I do some tests on JONAS EJB Server and see a problem. > Here's my test: > > 1. I created a container managed EntityBean which is dealing with a table called >Rules. > 2. I executed a client that only runs findAllRules method. (This method doesn't >require > Transaction and the passivation-time-out attribute is set 60 seconds for this test. ) > 3. After execution of the client I manually updated the Rules table CustomerId >column to new > values. > 4. Then I executed the client again. > > > Database: When I check the database manually it shows the new values for about 60 >secs, however > after 60 seconds it shows the old values. > From the Bean: It always shows the old values and never gets the values that I have >updated > manually. > > > Note: Even though I only run a select statement within the bean (findAllRules), >after about 60 > seconds I see on database that an update statement which updates the Rules table >CustomerId column > to the old values executed. So I lost the CustomerId new values. > > Is there any solution of this? > > I see 2 solutions at your problem: 1) Let the default value for passivation timeout (0 = means no passivation). In that case, your beans will never be written in the database when no transaction is used. 2) Use a isModified() method (described in your deployment descriptor) that will return false, so the ejbStore() will not write bean to the database. Note that you will still have a problem: In the EJBServer, you will not see the new values that your other application set behind... To avoid this, only 1 solution: always access database thru EJBServer. -- Philippe Durieux ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Bull - 1 rue de Provence - 38432 Echirolles Cedex France [EMAIL PROTECTED] -> Download our EJBServer at http://www.evidian.com/ejb <-
