db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Vandahl ...@apache.org>
Subject Re: Torque 3.1.1 - change database url based on env (QA, TEST, etc.)
Date Sun, 02 Oct 2011 17:19:18 GMT
On 29.09.11 19:36, mrab wrote:
> I made that change, but still get the error.  I did notice that I'm getting
> warnings as well.  From one of them I saw that that the 'user' paramenter in
> server.xml needed to be 'username'.  I fixed that and am now down to the
> original error and warnings as seen below.  (I saw in a posted message from
> last year that you indicated that with those kind of warnings there was a
> database connection problem.)  What I was wondering, since I have looked at
> the source for TorqueInstance.java, is whether the torque.database.default
> property is used by getConnection when you are using JNDI pooling.  I ask
> because the test database name is 'inventory_test', but the production
> database name (my default in torque.properties) is 'inventory'.  Is that
> going to be a problem?

Yes it is. The Torque database name is just a handle to a configuration
of a database connection pool whatever type it may be, JNDI or other. So
for the whole trick to work, you should select a fixed name for your
database handle to use in torque.properties and map that to default.
Don't change it for different environments. This is done at the
container (read: Tomcat) level.

BTW: You should seriously consider upgrading to Torque 3.3.

Bye, Thomas.

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message