but isnt there a potential problem in the fact the underlying socket that
maintains the connection can tome out if the client is idle for a long
time??
Anamitra

-----Original Message-----
From: Rich Johns [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 20, 2000 7:03 PM
To: [EMAIL PROTECTED]
Subject: Re: Caching of InitialContext


I have just started doing this with JMS Topics. I suppose that if the JMS
server
were to go down, then the cached Topics would be invalid. I would then need
to flush the cache and go look them up again. But how would I know?

Does anyone know if a Topic
goes bad, and you try to use it, if a reasonable exception is thrown?
Actually,

if the JMS server goes down, then you'll probably need to reobtain any and
all
JMS resource you might have stashed away. So maybe that's not such a
hard one. Ok, what if the JMS server decided to refresh it's Topic bindings?
Is there a reason they might do that?

Joel Shellman wrote:

> Heiko Seebach wrote:
> > I've got the same question, but I want to go even further: not only
cache
> > the InitialContext, but cache the result in a static Hashtable, maybe
> > something like this:
> >
> > public static Object lookup(String name) {
> >         Object object = hashtable.get(name);
> >         if (object == null) {
> >                 object = context.lookup(name);
> >                 hashtable.put(name, object);
> >         }
> >         return object;
> > }
> >
> > Is this /impossible/good/bad practice... ?
>
> I have been doing this with JOnAS 1.6.1 (EJB 1.0) and so far as I know
> haven't been bitten by it. However, looking at EJB 1.1, shouldn't you
> use bean references to accomplish this sort of thing? At least for EJBs.
> --
> Joel Shellman
> Chief Software Architect
> The virally-driven B2B marketplace for outsourcing projects
> http://www.ants.com/90589781
>
>
===========================================================================
> 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".

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


STATEMENT OF CONFIDENTIALITY.   The information contained in this electronic
message and any attachments to this message are intended for the exclusive
use of the addressee(s) and may contain confidential or privileged
information. If you are not the intended recipient, please notify
USPowerSolutions Corporation immediately at (617) 547-3800, or at
[EMAIL PROTECTED], and destroy all copies of this message and any
attachments.

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