Before people start misunderstanding my intent, its not to slam local entity beans. I am very much in favour of them :) All I am doing is debating certain recommendations being made on techniques/patterns for accessing them.
And the discussion at hand has _nothing_ to do with ejbStore()'s being invoked. I'm talking about individual accessors being invoked within a transactional context. That is, there is only one call to the database to read data (SQL SELECT ... done by a call to the ejbLoad) at the beginning of the transaction. A write to the database is avoided since no mutators are invoked. Continued below: John, > Just out of curiousity do you know exactly what this overhead is? > Is it the old load/store problem? Is there something that a future > spec could do so that fine-grained accessors from a local entity can perform > close to bulk accessors or is it just the nature of the beast? Calls made on methods in the local interface should be delegated to the appropriate instance of the bean implementation class (in the case of an entity bean, its the class generated by the persistence manager which implements the abstract entity bean class). Additionally the Container needs to ensure that calls on the local interface methods are executed in whatever transactional context is specified in the deployment descriptor. Security checks may be needed as well & if you specify access permissions & roles, these have to checked on every invocation. (If you perform a bulk get (or set), they're done only once) Apart from the above, every Container has to do some house keeping when entity beans are accessed (caches, pools, trimming of these, threading, concurrency control etc). Adding all of the above, you end up with a measurable overhead. -krish (Borland) =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
