tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul" <p...@msci.ca>
Subject Re: setup of global resources, dbcp, mail, etc.
Date Tue, 16 Sep 2003 15:12:37 GMT
Hi Adam,
   thanks for samples.  I finally got it working.  My problem was simply in
naming, specifically, the ResourceLink name, and using that in the jsp
connection code, the specific ResourceLink name for each webapp connect
code, respectively.
-paul.

----- Original Message ----- 
From: "Adam Hardy" <ahardy.struts@cyberspaceroad.com>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Monday, September 15, 2003 4:33 PM
Subject: Re: setup of global resources, dbcp, mail, etc.


> Here's what I do:
>
>    <!-- Global JNDI resources -->
>    <GlobalNamingResources>
>      <Resource name="jdbc/GlobalRealmDB"
>                auth="Container"
>                type="javax.sql.DataSource"
>         description="blah">
>      </Resource>
>      <ResourceParams name="jdbc/GlobalRealmDB">
>        <parameter>
>          <name>factory</name>
>          <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>        </parameter>
>        etc
>
>
> and then in the <Host... I have the contexts, e.g.:
>
>          <Context path="/linklib" docBase="linklib"
>            debug="5" reloadable="true" crossContext="true">
>            <Manager pathname=""/>
>            <Logger className="org.apache.catalina.logger.FileLogger"
>              prefix="localhost_linklib_log." suffix=".txt"
>              timestamp="true"/>
>            <ResourceLink name="jdbc/RealmDB"
>              global="jdbc/GlobalRealmDB"
>              type="javax.sql.DataSource"/>
>
>
> On 09/15/2003 08:15 PM Paul wrote:
> > thanks for the response.  I think you are suggesting an approach i have
> > already tried, with confusing results (confusing in that it worked for
one
> > web app, but not another!), namely, setting up a global resource under
the
> > following server.xml tag:   <GlobalNamingResources>
> >
> > the actual resource tag i use is as follows:  <Resource
name="jdbc/eplResrc"
> > auth="Container" type="javax.sql.DataSource"/>
> >
> > and then the resource link is specified as follows:
> > <Context path="/test" docBase="test" debug="5" reloadable="true"
> > crossContext="true">
> >
> > <ResourceLink name="jdbc/eplResrc" global="jdbc/eplResrc"
> > type="javax.sql.DataSource"/>
> >
> > </Context>
> >
> > Notice that the values for the "name" and "global" parameter in the
> > ResourceLink tag are the same.  I notice that in your example they are
> > different.  Where does the "global" value get defined?
> >
> >
> > ----- Original Message ----- 
> > From: "Adam Hardy" <ahardy.struts@cyberspaceroad.com>
> > To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> > Sent: Monday, September 15, 2003 1:36 PM
> > Subject: Re: setup of global resources, dbcp, mail, etc.
> >
> >
> >
> >>The tricky bit is to remember to put a reference to the global-resource
> >>in the contexts which want to use it:
> >>
> >>           <ResourceLink name="jdbc/RealmDB"
> >>             global="jdbc/GlobalRealmDB"
> >>             type="javax.sql.DataSource"/>
> >>
> >>Adam
> >>
> >>On 09/15/2003 07:03 PM Paul wrote:
> >>
> >>>has anyone been successful setting up a global resource under Tomcat
> >
> > 4.1, jdk 1.4 that is accessible to all webapps?  If so, please describe
how
> > you configured tomcat.
> >
> >>>thanks, paul lomack
> >>>
> >>
> >>-- 
> >>struts 1.1 + tomcat 4.1.27 + java 1.4.2
> >>Linux 2.4.20 RH9
> >>
> >>
> >>---------------------------------------------------------------------
> >>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
> >
> >
>
> -- 
> struts 1.1 + tomcat 4.1.27 + java 1.4.2
> Linux 2.4.20 RH9
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>



Mime
View raw message