> I had a look at the JNDI example, unfortunately it wasn't totally relevant
> as everything
> is defined in the web.xml and that has always worked for me.
> 
> After a lot more debugging and I am getting even more confused (!!!). I put
> some trace
> into the "init" function of my servlet. It's within the "init" that I do the
> JNDI name lookups.
> The "init" gets called twice per servlet. On the first call everything is OK
> and my lookup
> succeeds. The second time however the lookup fails with a NamingException.
> 
> I notice that the first time the "init" gets called, the context returned
> has the bindings I expect.
> The second call to "init" which performs identical processing gets a
> NamingContext with
> nothing bound (I don't have any entries in the web.xml, had I defined any I
> think they would be
> the only entries there).
> 
> It also looked like the two inits were done by different class loaders, as I
> defined some static
> members and they were not carried across to the second init.
> 
> Can anybody explain why the "init" may be called twice?

This is a very odd behavior, and I will try to reproduce it. From what 
I've seen in your config, you are using a load-on-startup servlet. Do 
you have anything else which isn't the default ?

Remy


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to