On Mon, 19 Feb 2001, you wrote:
[snip - keep the modem people happy ;-]
> 1) Getting the context once, storing it in a singleton and keep using it
> seems to work well. Any downside doing this?
Shouldn't think so, it might be worth implementing some thing to make sure
there hasn't been a network timeout or something before you use it each time.
> 2) Getting home once and storing it and reusing it also seems to work
> fine. Will this work with multiple clients? Ie, is the home object
> always the same or does it depend on the client?
This will be fine, I should think.
> 3) Caching the actual remote object for entity and statefull session
> beans will obviously not work, question is with stateless session beans.
> AFAIK, the server can create multiple instances to increase performance,
> but are they created on invocation of "create" (in which case they
> should not be cached) or are the invocation of methods dispatched to
> different instances (in which case we should be able to cache the
> remote object and use across different clients).
Huh? Why will caching a remote interface in a client not work? The client
shouldn't really care how the server does things. It can create multiple
physical instances for one logical bean, or use one physical instance to
service all requests from all clients, it doesn't matter. The container will
make sure that, when you call a method on that remote interface, an instance of
the bean will be activated with the correct data, and the method invocation
will be performed in the correct transaction context. Why can't you cache
these?
> Another performance question. In order to keep beans independend, all
> our entity beans are packaged into separate deployment units.
> Relationships between entities are implemented using separate beans
> which use client style lookups to get to the beans. Is there are
> performance penalty doing this? Should we for deployment stick all
> beans in one deployment unit.
Yes, you should package them all together. You only get optimised calls
between beans if they are all in one archive.
Tom
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]