You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jon Archer <jo...@perceptive.com> on 2003/03/05 00:49:15 UTC

DataSource resource in

I see a lot of to and fro over setting up database connection pooling as
a JNDI resource. I only see solutions where the <Resource> and
<ResourceParams> end up inside a <Context> block. I specifically want to
have mine sit inside the <GlobalNamingResources> block. Has anyone
managed to do this and if so, could you share your technique? 

Thanks in advance,

Jon



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


Re: DataSource resource in

Posted by Jon Archer <jo...@perceptive.com>.
On Tue, 2003-03-04 at 19:50, Jacob Kjome wrote:
> 
> Look in server.xml in recent tomcat-4.1.x versions ( I have 4.1.19 
> here).  There is an entry in <GlobalNamingResources> called
> "UserDatabase"....
> There's your example.
> 
> Jake
> 

Fabulous, thanks Jake. That worked a treat :-)


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


Re: DataSource resource in

Posted by Jacob Kjome <ho...@visi.com>.
Look in server.xml in recent tomcat-4.1.x versions ( I have 4.1.19 
here).  There is an entry in <GlobalNamingResources> called "UserDatabase"....

   <GlobalNamingResources>

     <!-- Editable user database that can also be used by
          UserDatabaseRealm to authenticate users -->
     <Resource name="UserDatabase" auth="Container"
               type="org.apache.catalina.UserDatabase"
        description="User database that can be updated and saved">
     </Resource>
     <ResourceParams name="UserDatabase">
       <parameter>
         <name>factory</name>
         <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
       </parameter>
       <parameter>
         <name>pathname</name>
         <value>conf/tomcat-users.xml</value>
       </parameter>
     </ResourceParams>

   </GlobalNamingResources>


This is used in the CATALINA_HOME/webapps/manager.xml context configuration 
file with this entry...

<ResourceLink name="users" global="UserDatabase"
                 type="org.apache.catalina.UserDatabase"/>


There's your example.

Jake

At 04:49 PM 3/4/2003 -0700, you wrote:
>I see a lot of to and fro over setting up database connection pooling as
>a JNDI resource. I only see solutions where the <Resource> and
><ResourceParams> end up inside a <Context> block. I specifically want to
>have mine sit inside the <GlobalNamingResources> block. Has anyone
>managed to do this and if so, could you share your technique?
>
>Thanks in advance,
>
>Jon
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

RE: DataSource resource in

Posted by apachep2 <ap...@hotmail.com>.
It is just a scope thing.

-----Original Message-----
From: Jon Archer [mailto:jon@perceptive.com] 
Sent: March 4, 2003 6:49 PM
To: tomcat-user@jakarta.apache.org
Subject: DataSource resource in <GlobalNamingResources>

I see a lot of to and fro over setting up database connection pooling as
a JNDI resource. I only see solutions where the <Resource> and
<ResourceParams> end up inside a <Context> block. I specifically want to
have mine sit inside the <GlobalNamingResources> block. Has anyone
managed to do this and if so, could you share your technique? 

Thanks in advance,

Jon



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