tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Connection pooling
Date Thu, 29 Apr 2004 16:12:55 GMT

Hi,
You have a host in your server.xml.  There might not be a context but it's not required. 
Read the docs carefully, it's all there.

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: Daxin Zuo [mailto:dzuo@techexcel.com]
>Sent: Thursday, April 29, 2004 12:04 PM
>To: Tomcat Users List
>Subject: RE: Connection pooling
>
>Thank you for reply, In my server.xml, there is no </context> and </Host>
>tags. I guess the instruction is bassed on some platform else. Mine is on
>windows 2000.
>More instruction, please.
>
>-----Original Message-----
>From: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com]
>Sent: Thursday, April 29, 2004 8:49 AM
>To: Tomcat Users List
>Subject: RE: Connection pooling
>
>
>
>http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-
>how
>to.html
>
>
>Yoav Shapira
>Millennium Research Informatics
>
>
>>-----Original Message-----
>>From: Daxin Zuo [mailto:dzuo@techexcel.com]
>>Sent: Thursday, April 29, 2004 11:43 AM
>>To: Tomcat Users List
>>Subject: RE: Connection pooling
>>
>>I am trying to configure connection pool on windows 2000+apache
>>2.0.49+tomcat 2.0.19. Could you please tell me how to do it. I read some
>>papers saying add text between </context> and </Host> tag In
>>$CATALINA_HOME/conf/server.xml. Is it between </Service>  and </Server>
>>tags
>>for windows 2000?
>>Thanks.
>>
>>-----Original Message-----
>>From: Parsons Technical Services [mailto:parsonstechnical@earthlink.net]
>>Sent: Thursday, April 22, 2004 5:22 AM
>>To: Tomcat Users List
>>Subject: Re: Connection pooling
>>
>>
>>Is this a direct cut and paste? If yes you are missing a > at the end of
>>the
>>Logger. Otherwise watch the order of the elements in the Resource. It can
>>make a difference in some cases.
>>
>>What are the errors?
>>
>>What does the web.xml look like?
>>
>>Doug
>>www.parsonstechnical.com
>>
>>
>>----- Original Message -----
>>From: "Masood Reyhanei Hamedani" <m_r_hamedani@yahoo.com>
>>To: <tomcat-user@jakarta.apache.org>
>>Sent: Thursday, April 22, 2004 8:01 AM
>>Subject: Connection pooling
>>
>>
>>> Dear all
>>>
>>> I have a problem in using Connection Pooling with Tomcat 5.0.19, that is
>>working in version 4.1.18 so good.I am using that configuration with
>5.0.19
>>but it doesn't work att all.
>>>
>>>
>>> I configure the ROOT.xml in this way:
>>>
>>> <?xml version='1.0' encoding='utf-8'?>
>>> <Context  cachingAllowed="true" crossContext="true" debug="0"
>>docBase="/ROOT" path="" privileged="false" reloadable="true"
>>swallowOutput="false" useNaming="true">
>>> <Logger className="org.apache.catalina.logger.FileLogger" debug="0"
>>directory="logs" prefix="localhost_ROOT_log." suffix=".txt"
>>timestamp="true"
>>verbosity="1"/
>>> <Resource auth="Container" name="jdbc/UKwebpooling" scope="Shareable"
>>type="javax.sql.DataSource"/>
>>>           <ResourceParams name="jdbc/UKwebpooling">
>>>             <parameter>
>>>               <name>url</name>
>>>
>><value>jdbc:mysql://localhost/university?autoReconnect=true</value>
>>>             </parameter>
>>>             <parameter>
>>>               <name>driverClassName</name>
>>>               <value>com.mysql.jdbc.Driver</value>
>>>             </parameter>
>>>             <parameter>
>>>               <name>username</name>
>>>               <value>myusername</value>
>>>             </parameter>
>>>             <parameter>
>>>               <name>password</name>
>>>               <value>mypassword</value>
>>>             </parameter>
>>>
>>>             <parameter>
>>>               <name>maxIdle</name>
>>>               <value>0</value>
>>>             </parameter>
>>>             <parameter>
>>>               <name>maxActive</name>
>>>               <value>100</value>
>>>             </parameter>
>>>             <parameter>
>>>               <name>maxWait</name>
>>>               <value>-1</value>
>>>             </parameter>
>>>             <parameter>
>>>               <name>removeAbandoned</name>
>>>               <value>true</value>
>>>             </parameter>
>>>
>>>             <parameter>
>>>               <name>logAbandoned</name>
>>>               <value>true</value>
>>>             </parameter>
>>>             <parameter>
>>>               <name>removeAbandonedTimeout</name>
>>>               <value>60</value>
>>>             </parameter>
>>>             <parameter>
>>>               <name>factory</name>
>>>
>><value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>>>             </parameter>
>>>           </ResourceParams>
>>>   </Context>
>>>
>>> and create a java class such as this:
>>>
>>> package pooling;
>>> import javax.sql.*;
>>> import javax.naming.*;
>>> import java.sql.*;
>>> public class webPooling
>>> {
>>>   Connection mySqlConnection = null;
>>>   public webPooling() //Class constructor
>>>   {
>>>   }
>>>   public void init() //Connection Creator
>>>   {
>>>     try
>>>     {
>>>         Context ctx = new InitialContext();
>>>         if(ctx == null )
>>>            throw new Exception("ERROR IN CONTEXT INITIALIZATION!!?");
>>>         DataSource mySqlDatasource =
>>(DataSource)ctx.lookup("java:comp/env/jdbc/UKwebpooling");
>>>         if(mySqlDatasource == null)
>>>            throw new Exception ("ERROR IN DATASOURCE CREATING");
>>>         else
>>>            mySqlConnection = mySqlDatasource.getConnection();
>>>     }//try
>>>     catch(Exception e)
>>>     {
>>>       e.printStackTrace();
>>>     }
>>>   }
>>>   public Connection getConnection()
>>>   {
>>>      return mySqlConnection;
>>>   }
>>> }
>>>
>>> I guess the problem is in common-dbcp-1.1 and common-pool-1.1  .jar
>files
>>.
>>> Is there any one that know about this problem?
>>>
>>> With Thanks.
>>> Masood.
>>>
>>>
>>>
>>>
>>> ---------------------------------
>>> Do you Yahoo!?
>>> Yahoo! Photos: High-quality 4x6 digital prints for 25ยข
>>
>>
>>
>>---------------------------------------------------------------------
>>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
>
>
>
>
>This e-mail, including any attachments, is a confidential business
>communication, and may contain information that is confidential,
>proprietary
>and/or privileged.  This e-mail is intended only for the individual(s) to
>whom it is addressed, and may not be saved, copied, printed, disclosed or
>used by anyone else.  If you are not the(an) intended recipient, please
>immediately delete this e-mail from your computer system and notify the
>sender.  Thank you.
>
>
>---------------------------------------------------------------------
>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




This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


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