Ok, but then your operations aren't isomorphic, namely

AB getAB(); // bulk accessor called at time t_0
checks the declarative context (tx, sec, etc.) at t_0 whereas:

A getA(); // call at t_0
B getB(); // call at t_1

checks the declarative ctx at both t_0 and t_1, there is additional
behaviour required *unless* you can allow a call to pin the
declarative ctx so that the second check isn't performed. This
may actually be useful for large systems where users want to use
EJB to say help front a warehouse. People might want to accept restrictions
associated with some sort of "pinning" for certain
beans in certain cases.


>From: Krishnan Subramanian <[EMAIL PROTECTED]>
>Reply-To: Krishnan Subramanian <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: Retrieving data from entity beans
>Date: Fri, 31 May 2002 15:55:07 +0200
>
>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)


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

===========================================================================
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".

Reply via email to