You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Carl Walker <wa...@georgetown.edu> on 2003/08/05 23:05:12 UTC

How Does GlobalNamingResources Work?

Hi,

I have an object and a javax.naming.spi.Naming factory that I want to
access as resources in server.xml.  I'm able to use <Resource> and
<ResourceParams> in the <Context>.  However, when I try to move either
one of these to <GlobalNamingResources>, Tomcat returns a 500 error
saying "Cannot create resource instance".

I think the factory code is correct since I can access the JNDI resource
in a JSP when I put the resource definition in <Context>.

Any help is appreciated,
Carl


Re: How Does GlobalNamingResources Work?

Posted by Carl Walker <wa...@georgetown.edu>.
I found the answer to this question this morning.  Use <ResourceLink> in the
<Context> to point to the definitions in the globals section.

Carl Walker wrote:

> Hi,
>
> I have an object and a javax.naming.spi.Naming factory that I want to
> access as resources in server.xml.  I'm able to use <Resource> and
> <ResourceParams> in the <Context>.  However, when I try to move either
> one of these to <GlobalNamingResources>, Tomcat returns a 500 error
> saying "Cannot create resource instance".
>
> I think the factory code is correct since I can access the JNDI resource
> in a JSP when I put the resource definition in <Context>.
>
> Any help is appreciated,
> Carl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: How Does GlobalNamingResources Work?

Posted by Carl Walker <wa...@georgetown.edu>.
I found the answer to this question this morning.  Use <ResourceLink> in the
<Context> to point to the definitions in the globals section.

Carl Walker wrote:

> Hi,
>
> I have an object and a javax.naming.spi.Naming factory that I want to
> access as resources in server.xml.  I'm able to use <Resource> and
> <ResourceParams> in the <Context>.  However, when I try to move either
> one of these to <GlobalNamingResources>, Tomcat returns a 500 error
> saying "Cannot create resource instance".
>
> I think the factory code is correct since I can access the JNDI resource
> in a JSP when I put the resource definition in <Context>.
>
> Any help is appreciated,
> Carl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org