annotate src/main/java/nl/cwi/monetdb/jdbc/MonetDriver.java.in @ 93:eeb71f7d36bf embedded

Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
author Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
date Fri, 06 Jan 2017 12:36:33 +0000 (2017-01-06)
parents 6f74e01c57da
children 64530632dc2a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
1 /*
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
2 * This Source Code Form is subject to the terms of the Mozilla Public
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
5 *
91
6f74e01c57da Made fixings regarding the null values retrieval. The JDBC embedded connection is working!!! :) Some more testing, optimizations and compilations fixes are still required.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 88
diff changeset
6 * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V.
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
7 */
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
8
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
9 package nl.cwi.monetdb.jdbc;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
10
85
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
11 import nl.cwi.monetdb.mcl.connection.MCLException;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
12 import nl.cwi.monetdb.mcl.connection.mapi.MapiConnection;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
13 import nl.cwi.monetdb.mcl.connection.mapi.MapiLanguage;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
14 import nl.cwi.monetdb.mcl.protocol.ProtocolException;
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
15
85
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
16 import java.io.IOException;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
17 import java.lang.reflect.InvocationTargetException;
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
18 import java.net.URI;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
19 import java.net.URISyntaxException;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
20 import java.sql.Connection;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
21 import java.sql.Driver;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
22 import java.sql.DriverManager;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
23 import java.sql.DriverPropertyInfo;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
24 import java.sql.SQLException;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
25 import java.sql.SQLFeatureNotSupportedException;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
26 import java.sql.Types;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
27 import java.util.*;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
28 import java.util.Map.Entry;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
29 import java.util.logging.Logger;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
30
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
31 /**
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
32 * A Driver suitable for the MonetDB database.
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
33 *
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
34 * This driver will be used by the DriverManager to determine if an URL
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
35 * is to be handled by this driver, and if it does, then this driver
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
36 * will supply a Connection suitable for MonetDB.
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
37 *
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
38 * This class has no explicit constructor, the default constructor
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
39 * generated by the Java compiler will be sufficient since nothing has
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
40 * to be set in order to use this driver.
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
41 *
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
42 * This Driver supports MonetDB database URLs. MonetDB URLs are defined
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
43 * as:
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
44 * <tt>jdbc:monetdb://&lt;host&gt;[:&lt;port&gt;]/&lt;database&gt;</tt>
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
45 * where [:&lt;port&gt;] denotes that a port is optional. If not
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
46 * given the default (@JDBC_DEF_PORT@) will be used.
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
47 *
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
48 * @author Fabian Groffen
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
49 * @version @JDBC_MAJOR@.@JDBC_MINOR@ (@JDBC_VER_SUFFIX@)
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
50 */
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
51 final public class MonetDriver implements Driver {
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
52 // the url kind will be jdbc:monetdb://<host>[:<port>]/<database>
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
53 // Chapter 9.2.1 from Sun JDBC 3.0 specification
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
54 /** The prefix of a MonetDB url */
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
55 private static final String MONETURL = "jdbc:monetdb://";
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
56 /** Major version of this driver */
85
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
57 private static final int DRIVERMAJOR = @JDBC_MAJOR@;
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
58 /** Minor version of this driver */
85
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
59 private static final int DRIVERMINOR = @JDBC_MINOR@;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
60
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
61 /** Version suffix string */
85
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
62 private static final String DRIVERVERSIONSUFFIX =
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
63 "@JDBC_VER_SUFFIX@ based on MCL v@MCL_MAJOR@.@MCL_MINOR@";
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
64 // We're not fully compliant, but what we support is compliant
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
65 /** Whether this driver is JDBC compliant or not */
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
66 private static final boolean MONETJDBCCOMPLIANT = false;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
67
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
68 /** MonetDB default port to connect to */
85
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
69 private static final String PORT = "@JDBC_DEF_PORT@";
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
70
85
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
71 private static Class EmbeddedConnectionClass = null;
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
72
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
73 // initialize this class: register it at the DriverManager
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
74 // Chapter 9.2 from Sun JDBC 3.0 specification
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
75 static {
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
76 try {
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
77 DriverManager.registerDriver(new MonetDriver());
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
78 } catch (SQLException e) {
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
79 e.printStackTrace();
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
80 }
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
81 }
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
82
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
83 //== methods of interface Driver
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
84
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
85 /**
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
86 * Retrieves whether the driver thinks that it can open a connection to the
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
87 * given URL. Typically drivers will return true if they understand the
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
88 * subprotocol specified in the URL and false if they do not.
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
89 *
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
90 * @param url the URL of the database
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
91 * @return true if this driver understands the given URL; false otherwise
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
92 */
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
93 public boolean acceptsURL(String url) {
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
94 return url != null && url.startsWith(MONETURL);
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
95 }
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
96
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
97 /**
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
98 * Retrieves the driver's major version number. Initially this should be 1.
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
99 *
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
100 * @return this driver's major version number
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
101 */
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
102 public int getMajorVersion() {
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
103 return DRIVERMAJOR;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
104 }
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
105
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
106 /**
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
107 * Gets the driver's minor version number. Initially this should be 0.
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
108 *
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
109 * @return this driver's minor version number
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
110 */
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
111 public int getMinorVersion() {
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
112 return DRIVERMINOR;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
113 }
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
114
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
115 /**
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
116 * Gets information about the possible properties for this driver.
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
117 *
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
118 * The getPropertyInfo method is intended to allow a generic GUI tool to
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
119 * discover what properties it should prompt a human for in order to get
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
120 * enough information to connect to a database. Note that depending on the
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
121 * values the human has supplied so far, additional values may become
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
122 * necessary, so it may be necessary to iterate though several calls to the
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
123 * getPropertyInfo method.
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
124 *
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
125 * @param url the URL of the database to which to connect
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
126 * @param info a proposed list of tag/value pairs that will be sent on connect open
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
127 * @return an array of DriverPropertyInfo objects describing possible properties. This array may be an empty array
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
128 * if no properties are required.
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
129 */
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
130 public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) {
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
131 if (!acceptsURL(url))
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
132 return null;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
133
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
134 List<DriverPropertyInfo> props = new ArrayList<>();
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
135
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
136 DriverPropertyInfo prop = new DriverPropertyInfo("user", info.getProperty("user"));
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
137 prop.required = true;
87
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 86
diff changeset
138 prop.description = "The user name to use when authenticating on the database server";
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
139 props.add(prop);
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
140
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
141 prop = new DriverPropertyInfo("password", info.getProperty("password"));
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
142 prop.required = true;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
143 prop.description = "The password to use when authenticating on the database server";
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
144 props.add(prop);
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
145
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
146 prop = new DriverPropertyInfo("hash", "");
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
147 prop.required = false;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
148 prop.description = "Force the use of the given hash algorithm during challenge response (one of SHA1, MD5, plain)";
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
149 props.add(prop);
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
150
93
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
151 prop = new DriverPropertyInfo("host", "localhost");
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
152 prop.required = false;
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
153 prop.description = "The MonetDB server hostname (MAPI connection only)";
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
154 props.add(prop);
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
155
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
156 prop = new DriverPropertyInfo("port", PORT);
87
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 86
diff changeset
157 prop.required = false;
93
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
158 prop.description = "The port to connect to the MonetDB server (MAPI connection only)";
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
159 props.add(prop);
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
160
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
161 prop = new DriverPropertyInfo("so_timeout", "0");
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
162 prop.required = false;
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
163 prop.description = "Defines the maximum time to wait in milliseconds on a blocking read socket call (MAPI connection only)"; // this corresponds to the Connection.setNetworkTimeout() method introduced in JDBC 4.1
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
164 props.add(prop);
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
165
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
166 prop = new DriverPropertyInfo("database", "");
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
167 prop.required = false;
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
168 prop.description = "The database name to connect (MAPI connection only)";
87
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 86
diff changeset
169 props.add(prop);
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 86
diff changeset
170
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
171 prop = new DriverPropertyInfo("follow_redirects", "true");
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
172 prop.required = false;
87
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 86
diff changeset
173 prop.description = "Whether redirects issued by the server should be followed (MAPI connection only)";
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
174 props.add(prop);
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
175
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
176 prop = new DriverPropertyInfo("treat_blob_as_binary", "false");
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
177 prop.required = false;
93
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
178 prop.description = "Whether BLOBs on the server should be treated as LONGVARBINARY types, thus mapped to byte[] (MAPI connection only)";
87
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 86
diff changeset
179 props.add(prop);
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 86
diff changeset
180
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 86
diff changeset
181 prop = new DriverPropertyInfo("treat_clob_as_longvarchar", "false");
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 86
diff changeset
182 prop.required = false;
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 86
diff changeset
183 prop.description = "Whether CLOBs on the server should be treated as LONGVARCHAR types, thus mapped to String (MAPI connection only)";
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
184 props.add(prop);
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
185
93
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
186 prop = new DriverPropertyInfo("language", "sql");
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
187 prop.required = false;
93
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
188 prop.description = "What language to use for MonetDB conversations (experts only)";
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
189 props.add(prop);
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
190
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
191 prop = new DriverPropertyInfo("embedded", "false");
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
192 prop.required = false;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
193 prop.description = "Whether or not to use an embedded MonetDB connection";
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
194 props.add(prop);
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
195
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
196 DriverPropertyInfo[] dpi = new DriverPropertyInfo[props.size()];
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
197 return props.toArray(dpi);
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
198 }
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
199
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
200 /**
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
201 * Reports whether this driver is a genuine JDBC Compliant&tm; driver. A
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
202 * driver may only report true here if it passes the JDBC compliance tests;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
203 * otherwise it is required to return false.
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
204 *
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
205 * JDBC compliance requires full support for the JDBC API and full support
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
206 * for SQL 92 Entry Level. It is expected that JDBC compliant drivers will
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
207 * be available for all the major commercial databases.
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
208 *
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
209 * This method is not intended to encourage the development of non-JDBC
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
210 * compliant drivers, but is a recognition of the fact that some vendors are
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
211 * interested in using the JDBC API and framework for lightweight databases
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
212 * that do not support full database functionality, or for special databases
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
213 * such as document information retrieval where a SQL implementation may not
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
214 * be feasible.
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
215 *
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
216 * @return true if this driver is JDBC Compliant; false otherwise
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
217 */
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
218 public boolean jdbcCompliant() {
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
219 return MONETJDBCCOMPLIANT;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
220 }
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
221
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
222 //== end methods of interface driver
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
223
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
224 /** A static Map containing the mapping between MonetDB types and Java SQL types */
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
225 /* use SELECT sqlname, * FROM sys.types order by 1, id; to view all MonetDB types */
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
226 /* see http://docs.oracle.com/javase/7/docs/api/java/sql/Types.html to view all supported java SQL types */
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
227 private static Map<String, Integer> typeMap = new HashMap<>();
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
228 static {
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
229 // fill the typeMap once
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
230 // typeMap.put("any", Types.???);
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
231 typeMap.put("bigint", Types.BIGINT);
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
232 typeMap.put("blob", Types.BLOB);
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
233 typeMap.put("boolean", Types.BOOLEAN);
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
234 typeMap.put("char", Types.CHAR);
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
235 typeMap.put("clob", Types.CLOB);
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
236 typeMap.put("date", Types.DATE);
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
237 typeMap.put("decimal", Types.DECIMAL);
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
238 typeMap.put("double", Types.DOUBLE);
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
239 typeMap.put("geometry", Types.OTHER);
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
240 typeMap.put("geometrya", Types.OTHER);
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
241 typeMap.put("hugeint", Types.NUMERIC); //but we will convert to java.math.BigInteger
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
242 typeMap.put("inet", Types.OTHER);
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
243 typeMap.put("int", Types.INTEGER);
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
244 typeMap.put("json", Types.OTHER);
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
245 // typeMap.put("mbr", Types.???);
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
246 typeMap.put("month_interval", Types.INTEGER);
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
247 // typeMap.put("oid", Types.BIGINT);
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
248 // typeMap.put("ptr", Types.???);
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
249 typeMap.put("real", Types.REAL);
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
250 typeMap.put("sec_interval", Types.BIGINT);
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
251 typeMap.put("smallint", Types.SMALLINT);
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
252 // typeMap.put("table", Types.???);
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
253 typeMap.put("time", Types.TIME);
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
254 typeMap.put("timestamp", Types.TIMESTAMP);
87
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 86
diff changeset
255 typeMap.put("timestamptz", Types.TIMESTAMP_WITH_TIMEZONE);
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 86
diff changeset
256 typeMap.put("timetz", Types.TIME_WITH_TIMEZONE);
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 86
diff changeset
257 typeMap.put("tinyint", Types.TINYINT); //but we will convert to java.lang.Byte
73
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
258 typeMap.put("url", Types.OTHER);
953422c41194 The data retrieval in ResultSets is now Column wise. Ready to start the embedded integrate, but it has to perform extra tests for the more rare types.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 68
diff changeset
259 typeMap.put("uuid", Types.OTHER);
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
260 typeMap.put("varchar", Types.VARCHAR);
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
261 typeMap.put("wrd", Types.BIGINT);
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
262 }
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
263
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
264 /**
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
265 * Returns the java.sql.Types equivalent of the given MonetDB type.
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
266 *
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
267 * @param type the type as used by MonetDB
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
268 * @return the matching java.sql.Types constant or java.sql.Types.OTHER if nothing matched on the given string
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
269 */
67
87ba760038b6 More cleanup. About to start the tuple conversions.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 66
diff changeset
270 public static int getJavaType(String type) {
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
271 // match the currentColumns type on a java.sql.Types constant
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
272 Integer tp = typeMap.get(type);
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
273 if (tp != null) {
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
274 return tp;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
275 } else {
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
276 // this should not be able to happen do not assert, since maybe future versions introduce new types
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
277 return Types.OTHER;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
278 }
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
279 }
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
280
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
281 private static String TypeMapppingSQL = null; // cache to optimise getSQLTypeMap()
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
282
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
283 /**
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
284 * Returns a String usable in an SQL statement to map the server types
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
285 * to values of java.sql.Types using the global static type map.
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
286 * The returned string will be a SQL CASE x statement where the x is
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
287 * replaced with the given currentColumns name (or expression) string.
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
288 *
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
289 * @param column a String representing the value that should be evaluated in the SQL CASE statement
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
290 * @return a SQL CASE statement
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
291 */
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
292 static String getSQLTypeMap(String column) {
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
293 if (TypeMapppingSQL == null) {
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
294 // first time, compose TypeMappping SQL string
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
295 StringBuilder val = new StringBuilder((typeMap.size() * (7 + 7 + 7 + 4)) + 14);
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
296 for (Entry<String, Integer> entry : typeMap.entrySet()) {
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
297 val.append(" WHEN '").append(entry.getKey()).append("' THEN ").append(entry.getValue().toString());
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
298 }
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
299 val.append(" ELSE ").append(Types.OTHER).append(" END");
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
300 // as the typeMap is static, cache this SQL part for all next calls
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
301 TypeMapppingSQL = val.toString();
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
302 }
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
303 return "CASE " + column + TypeMapppingSQL;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
304 }
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
305
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
306 /**
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
307 * Returns a touched up identifying version string of this driver.
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
308 *
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
309 * @return the version string
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
310 */
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
311 public static String getDriverVersion() {
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
312 return "" + DRIVERMAJOR + "." + DRIVERMINOR + " (" + DRIVERVERSIONSUFFIX + ")";
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
313 }
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
314
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
315 public static int getDriverMajorVersion() {
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
316 return DRIVERMAJOR;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
317 }
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
318
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
319 public static int getDriverMinorVersion() {
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
320 return DRIVERMINOR;
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
321 }
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
322
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
323 /**
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
324 * Return the parent Logger of all the Loggers used by this data
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
325 * source. This should be the Logger farthest from the root Logger
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
326 * that is still an ancestor of all of the Loggers used by this data
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
327 * source. Configuring this Logger will affect all of the log
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
328 * messages generated by the data source. In the worst case, this
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
329 * may be the root Logger.
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
330 *
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
331 * @return the parent Logger for this data source
68
86967be24645 Ready to start testing the old mapi connection. After passing the tests. The embedded integration will be very straightforward.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 67
diff changeset
332 * @throws SQLFeatureNotSupportedException if the data source does not use java.util.logging
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
333 */
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
334 public Logger getParentLogger() throws SQLFeatureNotSupportedException {
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
335 throw new SQLFeatureNotSupportedException("java.util.logging not in use", "0A000");
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
336 }
85
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
337
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
338 /**
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
339 * Attempts to make a database connection to the given URL. The driver
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
340 * should return "null" if it realizes it is the wrong kind of driver to
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
341 * connect to the given URL. This will be common, as when the JDBC driver
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
342 * manager is asked to connect to a given URL it passes the URL to each
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
343 * loaded driver in turn.
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
344 *
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
345 * The driver should throw an SQLException if it is the right driver to
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
346 * connect to the given URL but has trouble connecting to the database.
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
347 *
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
348 * The java.util.Properties argument can be used to pass arbitrary string
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
349 * tag/value pairs as connection arguments. Normally at least "user" and
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
350 * "password" properties should be included in the Properties object.
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
351 *
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
352 * @param url the URL of the database to which to connect
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
353 * @param info a list of arbitrary string tag/value pairs as connection
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
354 * arguments. Normally at least a "user" and "password" property
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
355 * should be included
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
356 * @return a Connection object that represents a connection to the URL
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
357 * @throws SQLException if a database access error occurs
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
358 */
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
359 public Connection connect(String url, Properties info) throws SQLException {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
360 int tmp;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
361 Properties props = new Properties();
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
362 props.put("port", PORT);
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
363 props.putAll(info);
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
364 info = props;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
365
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
366 // url should be of style jdbc:monetdb://<host>/<database>
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
367 if (!acceptsURL(url))
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
368 throw new SQLException("Invalid URL: it does not start with: " + MONETURL, "08M26");
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
369
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
370 // remove leading "jdbc:" so the rest is a valid hierarchical URI
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
371 URI uri;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
372 try {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
373 uri = new URI(url.substring(5));
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
374 } catch (URISyntaxException e) {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
375 throw new SQLException(e.toString(), "08M26");
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
376 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
377
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
378 String uri_host = uri.getHost();
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
379 if (uri_host == null)
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
380 throw new SQLException("Invalid URL: no hostname given or unparsable in '" + url + "'", "08M26");
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
381 info.put("host", uri_host);
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
382
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
383 int uri_port = uri.getPort();
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
384 if (uri_port > 0)
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
385 info.put("port", "" + uri_port);
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
386
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
387 // check the database
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
388 String uri_path = uri.getPath();
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
389 if (uri_path != null && uri_path.length() != 0) {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
390 uri_path = uri_path.substring(1);
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
391 if (!uri_path.trim().isEmpty())
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
392 info.put("database", uri_path);
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
393 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
394
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
395 String uri_query = uri.getQuery();
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
396 if (uri_query != null) {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
397 // handle additional arguments
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
398 String args[] = uri_query.split("&");
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
399 for (String arg : args) {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
400 tmp = arg.indexOf('=');
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
401 if (tmp > 0)
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
402 info.put(arg.substring(0, tmp), arg.substring(tmp + 1));
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
403 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
404 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
405
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
406 // finally return the Connection as requested
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
407 return CreateMonetDBJDBCConnection(info);
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
408 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
409
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
410 @SuppressWarnings("unchecked")
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
411 private static MonetConnection CreateMonetDBJDBCConnection(Properties props) throws SQLException,
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
412 IllegalArgumentException {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
413 MonetConnection res;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
414
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
415 boolean isEmbedded = Boolean.parseBoolean(props.getProperty("embedded", "false"));
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
416 String language = props.getProperty("language", "sql");
93
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
417 String username = props.getProperty("user");
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
418 String password = props.getProperty("password");
85
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
419 String hash = props.getProperty("hash");
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
420 int sockTimeout = 0;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
421
93
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
422 if(isEmbedded) { //instantiate the connection
85
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
423 try {
86
3db0dd967677 Fixed the class loading, started to test the JDBC embedded connection. However there is small issue that I have to check with other MonetDB Lite bindings relative to the dlopen system call.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 85
diff changeset
424 if(EmbeddedConnectionClass == null) {
3db0dd967677 Fixed the class loading, started to test the JDBC embedded connection. However there is small issue that I have to check with other MonetDB Lite bindings relative to the dlopen system call.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 85
diff changeset
425 EmbeddedConnectionClass = Class.forName("nl.cwi.monetdb.embedded.jdbc.EmbeddedConnection");
85
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
426 }
86
3db0dd967677 Fixed the class loading, started to test the JDBC embedded connection. However there is small issue that I have to check with other MonetDB Lite bindings relative to the dlopen system call.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 85
diff changeset
427 if(EmbeddedConnectionClass == null) { //if it's still null then there is a problem
85
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
428 throw new SQLException("EmbeddedConnection Class not found!");
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
429 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
430 res = (MonetConnection) EmbeddedConnectionClass
93
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
431 .getDeclaredConstructor(Properties.class, String.class, String.class)
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
432 .newInstance(props, hash, language);
85
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
433 } catch (InvocationTargetException | InstantiationException | IllegalAccessException |
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
434 NoSuchMethodException | ClassNotFoundException e) {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
435 throw new SQLException(e);
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
436 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
437 } else {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
438 String hostname = props.getProperty("host");
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
439 if (hostname == null || hostname.trim().isEmpty())
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
440 throw new IllegalArgumentException("hostname should not be null or empty");
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
441 if (username == null || username.trim().isEmpty())
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
442 throw new IllegalArgumentException("user should not be null or empty");
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
443 if (password == null || password.trim().isEmpty())
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
444 throw new IllegalArgumentException("password should not be null or empty");
93
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
445 String database = props.getProperty("database");
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
446 if (database == null || database.trim().isEmpty())
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
447 throw new IllegalArgumentException("database should not be null or empty");
85
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
448
87
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 86
diff changeset
449 boolean blobIsBinary = Boolean.valueOf(props.getProperty("treat_blob_as_binary", "false"));
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 86
diff changeset
450 boolean clobIsLongChar = Boolean.valueOf(props.getProperty("treat_clob_as_longvarchar", "false"));
2b5e32efb1a4 Made all the mappings for the MAPI connection, now it needs to be added on the Embedded connection. Changed the compilation target to 1.8 because of the timezones. Implemented some JDBC methods as well.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 86
diff changeset
451
85
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
452 boolean negative1 = false, failedparse1 = false;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
453 int port = 0;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
454 try {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
455 port = Integer.parseInt(props.getProperty("port"));
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
456 } catch (NumberFormatException e) {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
457 failedparse1 = true;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
458 props.setProperty("port", PORT);
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
459 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
460 if (port <= 0) {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
461 negative1 = true;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
462 port = Integer.parseInt(PORT);
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
463 props.setProperty("port", PORT);
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
464 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
465
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
466 String timeout = props.getProperty("so_timeout", "0");
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
467 boolean negative2 = false, failedparse2 = false;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
468 try {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
469 sockTimeout = Integer.parseInt(timeout);
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
470 } catch (NumberFormatException e) {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
471 sockTimeout = 0;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
472 failedparse2 = true;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
473 props.setProperty("so_timeout", "0");
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
474 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
475 if (sockTimeout < 0) {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
476 negative2 = true;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
477 sockTimeout = 0;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
478 props.setProperty("so_timeout", "0");
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
479 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
480 try {
93
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
481 res = new MapiConnection(props, hash, language, blobIsBinary, clobIsLongChar, hostname, port, database);
85
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
482 } catch (IOException e) {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
483 throw new SQLException(e);
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
484 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
485 if(failedparse1) {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
486 res.addWarning("Unable to parse port number from: " + port, "M1M05");
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
487 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
488 if(negative1) {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
489 res.addWarning("Negative port not allowed. Value ignored", "M1M05");
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
490 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
491 if(failedparse2) {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
492 res.addWarning("Unable to parse socket timeout number from: " + timeout, "M1M05");
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
493 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
494 if(negative2) {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
495 res.addWarning("Negative socket timeout not allowed. Value ignored", "M1M05");
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
496 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
497 res.setSoTimeout(sockTimeout);
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
498 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
499
93
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
500 try { //atempt to connect and authenticate the user
85
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
501 List<String> warnings = res.connect(username, password);
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
502 if(warnings != null) {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
503 for (String warning : warnings) {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
504 res.addWarning(warning, "01M02");
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
505 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
506 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
507 // apply NetworkTimeout value from legacy (pre 4.1) driver so_timeout calls
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
508 if(!isEmbedded) {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
509 res.setSoTimeout(sockTimeout);
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
510 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
511 } catch (IOException e) {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
512 if(!isEmbedded) {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
513 MapiConnection con = (MapiConnection) res;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
514 throw new SQLException("Unable to connect (" + con.getHostname() + ":"
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
515 + con.getPort() + "): " + e.getMessage(), "08006");
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
516 } else {
93
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
517 throw new SQLException("Unable to connect: " + e.getMessage(), "08006");
85
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
518 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
519 } catch (ProtocolException e) {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
520 throw new SQLException(e.getMessage(), "08001");
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
521 } catch (MCLException e) {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
522 String[] connex = e.getMessage().split("\n");
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
523 SQLException sqle = new SQLException(connex[0], "08001", e);
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
524 for (int i = 1; i < connex.length; i++) {
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
525 sqle.setNextException(new SQLException(connex[1], "08001"));
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
526 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
527 throw sqle;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
528 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
529
93
eeb71f7d36bf Fixed a bug on the JDBC MAPI connection from the old code! Fixed the connection properties for an JDBC Embedded connection. To start a JDBC Embedded connection, the user must start the embedded database beforehand with the method MonetDBEmbeddedDatabase.StartDatabase().
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 91
diff changeset
530 if (!isEmbedded && res.getLanguage() == MapiLanguage.LANG_SQL) { //set the timezone only in the MAPI connection
85
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
531 // enable auto commit
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
532 res.setAutoCommit(true);
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
533 // set our time zone on the server
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
534 Calendar cal = Calendar.getInstance();
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
535 int offset = cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET);
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
536 offset /= (60 * 1000); // milliseconds to minutes
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
537 String tz = offset < 0 ? "-" : "+";
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
538 tz += (Math.abs(offset) / 60 < 10 ? "0" : "") + (Math.abs(offset) / 60) + ":";
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
539 offset -= (offset / 60) * 60;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
540 tz += (offset < 10 ? "0" : "") + offset;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
541
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
542 res.sendIndependentCommand("SET TIME ZONE INTERVAL '" + tz + "' HOUR TO MINUTE");
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
543 }
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
544
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
545 return res;
073ee535234b Ok. Now everything compiles back with Ant again. Moved the Embedded stuff to the temporary MonetDBJavaLite repository before moving into the suggested MonetDBLite repository. The soon generated Embedded Connection jar will have a dependency on the regular JDBC driver jar. The JDBC driver jar is independent, however if attempted to create an Embedded Connection with will try to load the respective class from the class loader, failing if the Embedded Connection jar is not present. If anyone in the group has expertise on Java Class dynamic loading, please contact me because there might be issues on this. Removed the pom.xml file because the regular maven compilation fails.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents: 73
diff changeset
546 }
66
7307caacc2d5 Intermediary commit. Cross-implementation interface (for mapi connection with the old protocol, mapi connection with the new protocol and the embedded connection) almost done. The mcl layer processing is more memory efficient now.
Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
parents:
diff changeset
547 }