[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Performance?

> Riddle me this:
> On a particularly sunny and inspiring day you write not one but two
> letters of poetry to your lady friend. You put them both in the mailbox,
> and by noon the postman empties the box. The following day another
> postman in another town carry the two to your girlies house, so that she
> may read your fine words.
> The trick I use is described above.
I believe you talk about a 'burst mode', collect and send in one flush.

We have this mode when publishing already.

Burst mode when updating is established
in our interfaces, implementation is scheduled (for a rainy day).

But this is another test case, applicable with some use cases, but not

> > The 62 requests per seconds of JBoss is strange, my EJbean looks like:
> >
> >   getXy() {
> >         return xy;
> >   }
> >
> > JBoss does allways call ejbStore() which is a Oracle UPDATE call,
> > i believe this consumes a lot of performance.
> > But why does JBOSS call ejbStore() on a simple get method?
> > (it is a bean managed entity bean)
> ejbStore() is called at the end of a transaction. This is the EJB spec
> rule. There are two ways to avoid it:
> * In your BMP EntityBean you could have a flag "dirty" which you set to
> true when state changes. In ejbStore you should check this flag and only
> store if necessary.
> * Convert your bean to a CMP one and use tuned updates. This will do the
> above automatically.
> * Convert your bean to a CMP one and keep a dirty flag and implement a
> method "public boolean isModified()". jBoss will call it before it calls
> "ejbStore" to test whether the state has changed or not.
Thanks for these hints.
I didn't read the spec now, but calling ejbStore() on a get() method
seems strange to me (Suns reference implementation does not do it).

best regards,

Marcel Ruff
mailto:ruff at swand.lake.de