tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hadraba Petr <hadra...@gmail.com>
Subject Re: jdbc context
Date Mon, 13 Feb 2006 16:08:14 GMT
Hi,

maybe helps this, but it's working on Tomcat 5.5.15:-(

http://mail-archives.apache.org/mod_mbox/tomcat-users/200602.mbox/%3c371765080602050712qffc5x9da4df608b94c621@mail.gmail.com%3e


PETR

On 2/13/06, chen jacky <jacky_chenp@hotmail.com> wrote:
> hi,
>   Do you mean add the following code in the web.xml?
> <resource-ref>
>       <description>DB Connection</description>
>       <res-ref-name>jdbc/TestDB</res-ref-name>
>       <res-type>javax.sql.DataSource</res-type>
>       <res-auth>Container</res-auth>
>   </resource-ref>
>
> But this still need to add the jdbc config in the server.xml,right?
> Can you give me some suggestions?
>
> >From: "Duan, Nick" <NDuan@mcdonaldbradley.com>
> >Reply-To: "Tomcat Users List" <users@tomcat.apache.org>
> >To: "Tomcat Users List" <users@tomcat.apache.org>
> >Subject: RE: jdbc context
> >Date: Mon, 13 Feb 2006 10:11:34 -0500
> >
> >You should be able to add the context info in your web.xml file.  In
> >other words, instead of making the JDBC resource available to all web
> >apps, you make it only to particular applications.  If this JDBC
> >connection is only used by the workflow web app, defining it in web.xml
> >is actually preferred.
> >
> >ND
> >
> >-----Original Message-----
> >From: jacky [mailto:jacky_chenp@hotmail.com]
> >Sent: Monday, February 13, 2006 5:07 AM
> >To: users@tomcat.apache.org
> >Subject: jdbc context
> >
> >hi,
> >    I have deploy a workflow webapp in Tomcat4.1.31. First time, i add
> >the following code in server.xml:
> >
> ><Context path="/myworkflow" docBase="myworkflow" reloadable="true" >
> >           <Resource name="jdbc/DefaultDS" type="javax.sql.DataSource"/>
> >           <ResourceParams name="jdbc/DefaultDS">
> >           <parameter>
> >      <name>maxActive</name>
> >     <!-- Maximum number of DB connections in pool.Set to 0 for no limit.
> >-->
> >      <value>100</value>
> >     </parameter>
> >     <parameter>
> >      <name>maxIdle</name>
> >     <!-- Maximum number of idle DB connections to retain in pool.Set to
> >0 for no limit. -->
> >      <value>30</value>
> >     </parameter>
> >     <parameter>
> >      <name>maxWait</name>
> >     <!-- Maximum time to wait for a DB connection to become available in
> >ms.An exception is thrown if this timeout is exceeded.Set to -1 to wait
> >indefinitely. -->
> >      <value>15000</value>
> >     </parameter>
> >     <parameter>
> >      <name>removeAbandoned</name>
> >     <!-- Abandoned DB connections are removed and recycled -->
> >      <value>true</value>
> >     </parameter>
> >     <parameter>
> >      <name>removeAbandonedTimeout</name>
> >     <!-- Use the removeAbandonedTimeout parameter to set the number of
> >seconds a DB connection has been idle before it is considered abandoned.
> >-->
> >      <value>60</value>
> >     </parameter>
> >     <parameter>
> >      <name>logAbandoned</name>
> >     <!-- Log a stack trace of the code which abandoned -->
> >      <value>false</value>
> >     </parameter>
> >     <parameter>
> >      <name>factory</name>
> >     <!--DBCP Basic Datasource Factory -->
> >      <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
> >   </parameter>
> >
> ><parameter><name>username</name><value>sa</value></parameter>
> >             <parameter><name>password</name><value></value></parameter>
> >             <parameter><name>driverClassName</name>
> >
> ><value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value></parameter>
> >             <parameter><name>url</name>
> >
> ><value>jdbc:microsoft:sqlserver://localhost:1433;databaseName=myworkflow
> ></value></parameter>
> >           </ResourceParams>
> ></Context>
> >
> >It works well. But now, we need to migrate myworkflow into another
> >tomcat4.1.31, in which the server.xml can't be modified.
> >So what shall i do to deploy the jdbc context? Thanks for your help!
> >
> >      Best Regards.
> >        jacky
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >For additional commands, e-mail: users-help@tomcat.apache.org
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Mime
View raw message