Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in data integrity when using read only entity bean

 
Vicky Mohan
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On weblogic server 6.1, we tried to write some entity beans strictly for read only purpose. We were using DAO before, just thought of learning entity beans .

<max-beans-in-cache>100</max-beans-in-cache>
<idle-timeout-seconds>600</idle-timeout-seconds>
<read-timeout-seconds>60</read-timeout-seconds>
<concurrency-strategy>ReadOnly</concurrency-strategy>

When i deployed with this configuration, i could see ejbLoad() being called for the first time. After an interval of 60 seconds ( due to the property read-timeout-seconds set ) , it makes a call to ejbLoad(). But the wierd part is, i updated some data through toad in the database and i dont see that change at all. But if i use concurrency-strategy as Database, it retrieves the values from database but it calls ejbLoad() and ejbStor() all the time.

Last but not the least, the data i am retrieving is a Collection of entities ( not more than 50). Is it ok to use Entity Beans or continue DAO,as we have been doing all the time

Replied will be appreciated,as i gotto move along one of the two options
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic