Hi,
I wanted to know if WebLogic caches BMP Entity beans. If not why.
Rakesh.
-
Caching of BMP's (3 messages)
- Posted by: Rakesh Malpani
- Posted on: October 21 2002 09:32 EDT
Threaded Messages (3)
- Caching of BMP's by Marco Ingco on October 21 2002 13:53 EDT
- Caching of BMP's by Pranab Ghosh on October 23 2002 01:32 EDT
- Caching of BMP's by Marco Ingco on October 23 2002 04:45 EDT
- Caching of BMP's by Pranab Ghosh on October 23 2002 01:32 EDT
-
Caching of BMP's[ Go to top ]
- Posted by: Marco Ingco
- Posted on: October 21 2002 13:53 EDT
- in response to Rakesh Malpani
I don't think Weblogic caches BMP entity beans, or for that matter, any entity beans. The basic reason is: Weblogic has to make sure that the data contained in the beans are current (meaning in sync with the database). So whenever you access any entity bean, before your method gets called, the ejbLoad() method gets called first to make sure of this. Now, if your data doesn't change that often, you can use read-only entity beans. Read-only entity beans are cached and only gets updated every so often (this you have to specify). An example:
<weblogic-enterprise-bean>
<ejb-name>PersonEn</ejb-name>
<entity-descriptor>
<entity-cache>
<read-timeout-seconds>0</read-timeout-seconds>
<concurrency-strategy>ReadOnly</concurrency-strategy>
</entity-cache>
...
</weblogic-enterprise-bean>
When you specify your bean as read-only, Weblogic blindly assumes that the data never change. The read-timeout-seconds specify the time when you want your beans updated. If you set this to 0, your beans will never be updated until you restart your server.
Regards,
Marco
-
Caching of BMP's[ Go to top ]
- Posted by: Pranab Ghosh
- Posted on: October 23 2002 01:32 EDT
- in response to Marco Ingco
It depends on the commit option you choose. With commit option A, the container will cache EB between transactions.
'Commit Option' goes by different names in different AppServer configurations.
Pranab -
Caching of BMP's[ Go to top ]
- Posted by: Marco Ingco
- Posted on: October 23 2002 16:45 EDT
- in response to Pranab Ghosh
What's commit option?