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

Reply via email to