|
40 | 40 | *
|
41 | 41 | * Copyright 1999 (C) Exoffice Technologies Inc. All Rights Reserved.
|
42 | 42 | *
|
43 |
| - * $Id: PostgresqlDataSource.java,v 1.1 2000/10/12 08:55:24 peter Exp $ |
| 43 | + * $Id: PostgresqlDataSource.java,v 1.2 2000/11/10 22:06:26 momjian Exp $ |
44 | 44 | */
|
45 | 45 |
|
46 | 46 |
|
|
64 | 64 | import javax.naming.Name;
|
65 | 65 | import javax.naming.NamingException;
|
66 | 66 | import javax.naming.spi.ObjectFactory;
|
67 |
| -import postgresql.util.PSQLException; |
68 |
| -import postgresql.xa.XADataSourceImpl; |
69 |
| - |
| 67 | +// FIXME |
| 68 | +//import postgresql.util.PSQLException; |
| 69 | +//import postgresql.xa.XADataSourceImpl; |
| 70 | +import org.postgresql.util.PSQLException; |
| 71 | +import org.postgresql.xa.XADataSourceImpl; |
| 72 | +//--------- |
70 | 73 |
|
71 | 74 | /**
|
72 | 75 | * Implements a JDBC 2.0 {@link javax.sql.DataSource} for the
|
@@ -191,8 +194,10 @@ public class PostgresqlDataSource
|
191 | 194 | * Each datasource maintains it's own driver, in case of
|
192 | 195 | * driver-specific setup (e.g. pools, log writer).
|
193 | 196 | */
|
194 |
| - private transient postgresql.Driver _driver; |
195 |
| - |
| 197 | +// FIXME |
| 198 | +// private transient postgresql.Driver _driver; |
| 199 | +private transient org.postgresql.Driver _driver; |
| 200 | +//--------- |
196 | 201 |
|
197 | 202 |
|
198 | 203 |
|
@@ -223,8 +228,15 @@ public synchronized Connection getConnection( String user, String password )
|
223 | 228 | // Constructs a driver for use just by this data source
|
224 | 229 | // which will produce TwoPhaseConnection-s. This driver
|
225 | 230 | // is not registered with the driver manager.
|
226 |
| - _driver = new postgresql.Driver(); |
227 |
| - _driver.setLogWriter( _logWriter ); |
| 231 | +// FIXME |
| 232 | +// _driver = new postgresql.Driver(); |
| 233 | +_driver = new org.postgresql.Driver(); |
| 234 | +//----------- |
| 235 | + |
| 236 | +//FIXME |
| 237 | +// _driver.setLogWriter( _logWriter ); |
| 238 | +// Method seems to be unavailable. Just commented it out. |
| 239 | +//---------- |
228 | 240 | } catch ( SQLException except ) {
|
229 | 241 | if ( _logWriter != null )
|
230 | 242 | _logWriter.println( "DataSource: Failed to initialize JDBC driver: " + except );
|
@@ -260,7 +272,10 @@ public synchronized Connection getConnection( String user, String password )
|
260 | 272 | // attempt or a failure.
|
261 | 273 | try {
|
262 | 274 | conn = _driver.connect( url, info );
|
263 |
| - if ( ! ( conn instanceof postgresql.jdbc2.Connection ) ) { |
| 275 | +// FIXME |
| 276 | +// if ( ! ( conn instanceof postgresql.jdbc2.Connection ) ) { |
| 277 | +if ( ! ( conn instanceof org.postgresql.jdbc2.Connection ) ) { |
| 278 | +//-------- |
264 | 279 | if ( _logWriter != null )
|
265 | 280 | _logWriter.println( "DataSource: JDBC 1 connections not supported" );
|
266 | 281 | throw new PSQLException( "postgresql.ds.onlyjdbc2" );
|
@@ -289,7 +304,10 @@ public synchronized void setLogWriter( PrintWriter writer )
|
289 | 304 | // synchronizing.
|
290 | 305 | if ( writer != null ) {
|
291 | 306 | if ( _driver != null )
|
292 |
| - _driver.setLogWriter( writer ); |
| 307 | +// FIXME |
| 308 | +// _driver.setLogWriter( writer ); |
| 309 | +// Method seems to be unavailable. Commented it out. |
| 310 | +//---------- |
293 | 311 | _logWriter = writer;
|
294 | 312 | }
|
295 | 313 | }
|
|
0 commit comments