You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dionisio Ruiz de Zarate <di...@tinieblas.com> on 2002/12/21 01:34:54 UTC
using the DBCP with postgresql
with the howto
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-ho
wto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations) I have
configure tomcat for using the DBCP.
but now i must to use the DBCP from one class.
Can anybody send me one sample or say me how can i use?
i am trying to use this:
try{
Context initContext = new InitialContext();
if(initContext==null) throw new Exception("BOOOOM .... no hay
contextoooo.....");
}catch(Exception e){
System.out.println("la excepcion en el context ini: ... " + e);
}
DataSource ds = (DataSource)initContext.lookup("jdbc/irudia");
conn=ds.getConnection();
but appears this error:
utils/bd/irudia/IrudiaAccionesSQLPOOL.java [65:1] cannot resolve symbol
symbol : class DataSource
location: class utils.bd.irudia.IrudiaAccionesSQLPOOL
DataSource ds = (DataSource)initContext.lookup("jdbc/irudia");
^
utils/bd/irudia/IrudiaAccionesSQLPOOL.java [65:1] cannot resolve symbol
symbol : class DataSource
location: class utils.bd.irudia.IrudiaAccionesSQLPOOL
DataSource ds = (DataSource)initContext.lookup("jdbc/irudia");
^
utils/bd/irudia/IrudiaAccionesSQLPOOL.java [65:1] cannot resolve symbol
symbol : variable initContext
location: class utils.bd.irudia.IrudiaAccionesSQLPOOL
DataSource ds = (DataSource)initContext.lookup("jdbc/irudia");
Can anybody help me for using the DBCP?
thanks
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>