Revision 34778 branches/gvSIG_1.11.0_Mejoras_gvSIG-EIEL/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/ConnectionJDBC.java

View differences:

ConnectionJDBC.java
46 46
import java.sql.DriverManager;
47 47
import java.sql.SQLException;
48 48

  
49
import org.apache.log4j.Logger;
49 50

  
51

  
50 52
/**
51 53
 * DOCUMENT ME!
52 54
 *
53 55
 * @author Vicente Caballero Navarro
54 56
 */
55 57
public class ConnectionJDBC implements IConnection {
58
	
59
	private static Logger logger = Logger.getLogger(ConnectionJDBC.class.getName());
56 60
    private Connection connection;
57 61
	private String connectionStr;
58 62
	private String user;
......
137 141

  
138 142
	}
139 143
	
144
	
140 145

  
141 146
	public void setDataConnection(Connection _conn, String user, String _pw) throws DBException {
147
		connection = _conn;
142 148
		try {
143
			connection = _conn;
144 149
			connection.setAutoCommit(false);
145
			this.connectionStr = null;
146
			this.user = user;
147
			this._pw = _pw;
148
		} catch (SQLException e) {
149
			throw new DBException(e);
150
		} catch (Exception ex) {
151
			logger.error("Autocommit not allowed for this driver: " + ex.getMessage());
150 152
		}
151

  
153
		this.connectionStr = null;
154
		this.user = user;
155
		this._pw = _pw;
152 156
	}
153 157

  
154 158
	/**

Also available in: Unified diff