tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guofeng Zhang <guof...@radvision.com>
Subject RE: [OT] Using tomcat7-maven-plugin- 2.0-beta-1: java.lang.RuntimeException: Name jdbc is not bound in this Context
Date Fri, 09 Mar 2012 10:59:53 GMT
I create a simple project using commons-dbcp and without using any query for test, the issue
still occurred. I reported a bug.

Thanks!

-----Original Message-----
From: Christopher Schultz [mailto:chris@christopherschultz.net] 
Sent: Wednesday, March 07, 2012 11:53 PM
To: Tomcat Users List
Subject: Re: [OT] Using tomcat7-maven-plugin- 2.0-beta-1: java.lang.RuntimeException: Name
jdbc is not bound in this Context

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Guofeng,

On 3/7/12 5:32 AM, Guofeng Zhang wrote:
> <Resource auth="Container" maxPoolSize="100" minPoolSize="10" 
> name="jdbc/iviewDS" testQuery="select count(*) from T_ROLE"

You might want to use a simper testQuery (like "SELECT 1 FROM DUAL", for instance). Some RDBMS
engines don't have great performance with "SELECT COUNT(*)" (for instance, MySQL using the
InnoDB engine).

Also, does your factory generate a DataSource for which "testQuery" is a valid property? If
you are using Tomcat's standard connection poll (DBCP's BasicDataSource) or Tomcat's "other"
pool (jdbc-pool), then the proper configuration attribute is "validationQuery".

See
http://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howto.html#JDBC_Data_Sources

Specifically, step #4 under that heading.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9XhGoACgkQ9CaO5/Lv0PB7yACguvu8xlUz6Yf+MJKMqv5NH0V9
Lv0AnA+8Qyo5NUClxyAJHsfMIaaBbXXk
=K1IB
-----END PGP SIGNATURE-----

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