How do we control ejbStore

Discussions

EJB programming & troubleshooting: How do we control ejbStore

  1. How do we control ejbStore (4 messages)

    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.

    Threaded Messages (4)

  2. How do we control ejbStore[ Go to top ]

    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.
  3. How do we control ejbStore[ Go to top ]

    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
  4. How do we control ejbStore[ Go to top ]

    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.
  5. How do we control ejbStore[ Go to top ]

    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.