> I understand what values I should be providing for the above two properties, but > I do not understand or know what values I should give for the properties below. > Also, I thought the MaxConnections was set in the server.xml file if Tomcat > provides the Datasource, then why is there a MaxConnections property?
The quick answer is that you don't need to set the "below" values in your torque.properties file. The two "above" values are enough since tomcat is creating the datasource. The longer answer involves torque creating the pool itself then binding it to a jndi datasource. -Ben -----Original Message----- From: Saravana Kannan [mailto:[EMAIL PROTECTED] Sent: Thursday, April 29, 2004 7:53 PM To: Apache Torque Users List Subject: RE: Using Torque with Tomcat. Hi, To Ben, Thanx for the information you provided. It was very helpful. I finally managed to set up a JNDI datasource and was able to use the connection successfully for non-Torque code (I used the example code in the JNDI-Tomcat tutorial). To every1 out there, Someone help me here - When I was looking at Torque.properties file under the JNDI part- ## Using jndi #torque.dsfactory.bookstore.factory=org.apache.torque.dsfactory. JndiDataSourceFactory #torque.dsfactory.bookstore.jndi.path=jdbc/bookstore I understand what values I should be providing for the above two properties, but I do not understand or know what values I should give for the properties below. Also, I thought the MaxConnections was set in the server.xml file if Tomcat provides the Datasource, then why is there a MaxConnections property? #torque.dsfactory.bookstore.jndi.java.naming.factory.initial = org.apache. naming.java.javaURLContextFactory #torque.dsfactory.bookstore.jndi.java.naming.factory.url.pkgs = org.apache. naming #torque.dsfactory.bookstore.datasource.classname=org.apache.torque.pool. TorqueClassicDataSource #torque.dsfactory.bookstore.datasource.dataSourceName=jdbc/DBbookstore #torque.dsfactory.bookstore.datasource.jndiEnvironment.java.naming.factory. initial = org.apache.naming.java.javaURLContextFactory #torque.dsfactory.bookstore.datasource.jndiEnvironment.java.naming.factory.u rl. pkgs = org.apache.naming #torque.dsfactory.bookstore.datasource.defaultMaxConnections=10 ~Sarav -- There are 10 kinds of people in the world, those who know binary and those who don't. Quoting Benjamin Yu <[EMAIL PROTECTED]>: > Here're a couple of emails in the user group to get a sort of direction. > > > Where should I initialize Torque so that all the sessions of the Webapp > use the > > same DBConnectionPool? > > Try instantiating the pool to be referenced as a JNDI datasource. > http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED] > g&msgNo=3686 > > > > Should I be initialising Torque in a Startup servlet that > > is executed when the WebApp is started? > > I do. > http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED] > g&msgNo=3681 > > -Ben --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
