Hi,
Fixed in CVS.  Thanks for pointing it out,

Yoav Shapira
System Design and Management Fellow
MIT Sloan School of Management
Cambridge, MA, USA
[EMAIL PROTECTED] / www.yoavshapira.com

> -----Original Message-----
> From: Robert Clarkson [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 11, 2005 5:06 AM
> To: tomcat-dev@jakarta.apache.org
> Subject: DB connection pooling webpage mistake
> 
> Hi, I noticed that the code for the connection pooling had been changed,
> but
> I can see that theres a copy and paste error here, the if statement checks
> for 'ctx' being null twice, instead of checking for ds being null the
> second
> time. As you can see in the code I copied off the page:
> 
> 
> InitialContext cxt = new InitialContext();
> if ( cxt == null ) {
>    throw new Exception("Uh oh -- no context!");
> }
> 
> DataSource ds = (DataSource) cxt.lookup( "java:/comp/env/jdbc/postgres" );
> 
> if ( cxt == null ) {
>    throw new Exception("Data source not found!");
> }
> 
> 
> A small error, but might cause problems for people copying it. :D
> 
> Robert Clarkson
> Broadmedia Technology
> 
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to