I am tyring to create Bean managed entity beans.I find that everytime a get method is called on the bean the ejbStore method is activated. Is there a way we can avoid the activation of ejbStore when a get method is called and activate them only when the set methods are called.
Thanks in advance,
Anna.
-
How do we control ejbStore (4 messages)
- Posted by: Annapurna Bikkina
- Posted on: September 24 2002 15:54 EDT
Threaded Messages (4)
- How do we control ejbStore by Justin Van Vorst on September 24 2002 16:38 EDT
- How do we control ejbStore by Annapurna Bikkina on September 25 2002 10:29 EDT
- How do we control ejbStore by Matthew Cox on September 25 2002 11:04 EDT
- How do we control ejbStore by Annapurna Bikkina on September 26 2002 08:58 EDT
-
How do we control ejbStore[ Go to top ]
- Posted by: Justin Van Vorst
- Posted on: September 24 2002 16:38 EDT
- in response to Annapurna Bikkina
Most app servers provide some mechanism by which you can specify which of your methods require a save to the DB. Look in your app server docs, since the solution is app server-specific. -
How do we control ejbStore[ Go to top ]
- Posted by: Annapurna Bikkina
- Posted on: September 25 2002 10:29 EDT
- in response to Justin Van Vorst
Thanks for the information.We are using JBoss and I will try to find out from the JBoss docs. If anyone has an idea about how JBoss handles it let me know -
How do we control ejbStore[ Go to top ]
- Posted by: Matthew Cox
- Posted on: September 25 2002 11:04 EDT
- in response to Annapurna Bikkina
If you are using a BMP entity then you can simply overide the ejbStore method inherieted from EntityBean. If you looking to save yourself some needless database access you can apply a simple dirty pattern to your entities storing only when you bean has been modified. -
How do we control ejbStore[ Go to top ]
- Posted by: Annapurna Bikkina
- Posted on: September 26 2002 08:58 EDT
- in response to Matthew Cox
Yeah I know that one way is to use a flag and modify data only when the flag is turned on, but I am trying to find a way which doesnt involve such coding..( I feel flags may create panic at some moment) ... wondering if there is some attribute we can specify in the deployment descriptors or something that can be specified in the bean.