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

Julio,

Julio J. Suárez Salinero wrote:
> <Context path="/test" docBase="test" debug="0" reloadable="true" >

Seriously... get rid of those "path" and "docBase" attributes.

> <Resource name="jdbc/test" auth="Container"
> type="oracle.jdbc.pool.OracleConnectionPoolDataSource"
> factory="oracle.jdbc.pool.OracleDataSourceFactory"

You didn't have a "factory" attribute last time, did you?

> driverClassName="oracle.jdbc.driver.OracleDriver"

That looks much better. Before, you had the DataSource as the
driverClassName. Are you getting the same error, now?

> User and password doesn't work in context.xml.

Huh? If that's true, then you have a crappy DataSource and/or Factory
implementation.

> Context ctx = (Context) initCtx.lookup("java:/comp/env");
> OracleConnectionPoolDataSource fuenteDatos =
> (OracleConnectionPoolDataSource) ctx.lookup("/jdbc/test");
> pc = fuenteDatos.getPooledConnection(dbUser, dbPassword);

I wouldn't be surprised if Tomcat didn't try to create Connection
objects right away when you use the <Resource>. If you need a username
and password from somewhere else, then Tomcat might fail, requiring you
to hand-insert the DataSource into JNDI. <shrug>

Again... why not just use the built-in DataSource and pooling
mechanisms? It seems just so much easier...

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGn7nL9CaO5/Lv0PARAndAAKCnrrOERCf5Y4Hv0jwKXwtIzW139wCfW8G9
0a8qRox4HdfsLw65BjMisP4=
=q3fq
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to