tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arshad Mahmood" <arsh...@compuvision.co.uk>
Subject Re: JNDI with a custom factory not working
Date Thu, 13 Jun 2002 18:03:23 GMT
----- Original Message -----
From: "Remy Maucherat" <remm@apache.org>
To: "Tomcat Developers List" <tomcat-dev@jakarta.apache.org>
Sent: Thursday, June 13, 2002 6:51 PM
Subject: Re: JNDI with a custom factory not working


> Arshad Mahmood wrote:
> > I do get the same context when I ask for it in my web application. The
> > problem
> > is that I can see from the debug that my "Resource" definitions in the
> > global naming resources appear to be in one context,
>
> Indeed, the global resources go into a separate context.
>
> > the "ResourceLink" I
> > have defined in
> > the "<Context" for my webapp go into another,  but the one I am given
when I
> > use
> > a lookup for "java:comp/env" in my servlet init function appears to have
> > only those
> > defined in the web.xml.
>
> Both of these should go in the same context or its subcontexts (for
> example, if your resource is "jdbc/db", then there will be a "jdbc"
> context child of "env", which will contain a "db" entry).
> Did you try to use the JNDI servlet in the servlet examples to see what
> was going on ? I believe it is quite useful for this.

Hmm, I will investigate further. It seemed to be that "ResourceLink" in the
server.xml
"<Context" entry was going into a naming context with name
"//Standard/myapp" but
the one which I retrieved from the servlet was called
"//Standard/localhost/webapp". I will
debug this further.

I will have a look at the JNDI example servlet. I must confess I was using
the
JNDI-Howto in the docs.

> > I realise you are incredibly busy, but if you have naming working, can
you
> > please try and
> > generate one with a custom factory. As I have followed the instructions
in
> > JNDI-Howto,
> > but the only things in the "bindings" when I retrieve the
"java:comp/env"
> > are the ones I have
> > defined in the web.xml, and these don't allow you to specify a factory.
>
> If the definitions from web.xml override the ones from server.xml,
> nothing will work (ie, even if you use the default DataSource factory,
> the reference will be missing some attributes).
> You can try removing the definition in web.xml to see what happens.
>
> BTW, which version of Tomcat are you using ?

The latest version of 4.1 from CVS (although it's a little broken because
MBeanUtils
does't compile, but I am not using that anyway).

Thanks for your help. I will try and pin the problem down a bit more.

Regards.

> Remy
>
>
> --
> To unsubscribe, e-mail:
<mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:tomcat-dev-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message